@iamproperty/components 5.6.1-beta4 → 5.6.1-beta5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/components/fileupload.css +1 -1
- package/assets/css/components/fileupload.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +3 -3
- package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +6 -6
- package/assets/js/components/fileupload/fileupload.component.min.js.map +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.js +2 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +3 -3
- package/assets/js/components/multiselect/multiselect.component.min.js.map +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/dynamic.min.js +2 -2
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/modules/dialogs.js +1 -1
- package/assets/js/modules/fileupload.js +2 -9
- package/assets/js/scripts.bundle.js +2 -2
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/components/fileupload.scss +1 -0
- package/assets/ts/components/fileupload/fileupload.component.ts +1 -1
- package/assets/ts/components/multiselect/multiselect.component.ts +2 -1
- package/assets/ts/modules/dialogs.ts +1 -1
- package/assets/ts/modules/fileupload.ts +3 -14
- package/dist/components.es.js +508 -578
- package/dist/components.umd.js +54 -50
- package/package.json +1 -1
- package/src/components/FileUpload/FileUpload.vue +29 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
.file-upload{max-width:25rem !important;padding-bottom:1rem}.file-upload .drop-area>input{display:none}.file-upload .file-upload__title{margin-top:0;margin-bottom:0;font-family:var(--font-heading);font-style:normal;font-weight:var(--heading-weight);line-height:2rem;color:var(--colour-heading);clear:both;display:block;padding-bottom:2rem;font-size:1.5rem;line-height:2rem;padding-bottom:2rem;max-width:var(--content-max-width)}.file-upload .helper-text{max-width:16.875rem}.files span{display:block;width:100%;padding:var(--input-padding-block, 0.75rem) var(--input-padding-inline, 1rem);font-size:var(--input-fs, 1rem);line-height:var(--input-lh, 1.25rem);border:2px solid var(--colour-primary-theme);appearance:none;border-radius:0.5rem;margin-bottom:1rem;color:var(--colour-primary);border-color:#d8d8d8;background:#d8d8d8;max-width:25rem !important;position:relative}@media screen and (prefers-color-scheme: dark){.files span{background:var(--colour-canvas-2);border-color:var(--colour-canvas-2);color:var(--colour-body)}}@media(forced-colors: active){.files span{padding-right:5rem}.files span button{padding:0;width:3.7rem !important;text-indent:0% !important}.files span button:after{display:none !important}}.files span button{position:absolute;top:calc(50% - 0.5625rem);right:0.875rem;z-index:var(--index-floating);text-indent:300%;overflow:hidden;border:none;height:1.125rem;width:1.125rem;background:rgba(0,0,0,0)}.files span button:after{content:"";top:0;left:0;position:absolute;display:block;height:1.125rem;width:1.125rem;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}:host(.fileupload--drag-drop) .file-upload{max-width:50rem !important}:host(.fileupload--drag-drop) .file-upload .helper-text{max-width:50rem !important}:host(.fileupload--drag-drop) .file-upload .drop-area>input{display:block;min-height:12.5rem;border:2px dashed var(--colour-primary-theme);color:rgba(0,0,0,0);position:relative;padding:1.5rem 2rem 1.5rem 2rem;user-select:none;max-width:100%;min-width:100
|
|
1
|
+
.file-upload{max-width:25rem !important;padding-bottom:1rem}.file-upload .drop-area>input{display:none}.file-upload .file-upload__title{margin-top:0;margin-bottom:0;font-family:var(--font-heading);font-style:normal;font-weight:var(--heading-weight);line-height:2rem;color:var(--colour-heading);clear:both;display:block;padding-bottom:2rem;font-size:1.5rem;line-height:2rem;padding-bottom:2rem;max-width:var(--content-max-width)}.file-upload .helper-text{max-width:16.875rem}.files span{display:block;width:100%;padding:var(--input-padding-block, 0.75rem) var(--input-padding-inline, 1rem);font-size:var(--input-fs, 1rem);line-height:var(--input-lh, 1.25rem);border:2px solid var(--colour-primary-theme);appearance:none;border-radius:0.5rem;margin-bottom:1rem;color:var(--colour-primary);border-color:#d8d8d8;background:#d8d8d8;max-width:25rem !important;position:relative}@media screen and (prefers-color-scheme: dark){.files span{background:var(--colour-canvas-2);border-color:var(--colour-canvas-2);color:var(--colour-body)}}@media(forced-colors: active){.files span{padding-right:5rem}.files span button{padding:0;width:3.7rem !important;text-indent:0% !important}.files span button:after{display:none !important}}.files span button{position:absolute;top:calc(50% - 0.5625rem);right:0.875rem;z-index:var(--index-floating);text-indent:300%;overflow:hidden;border:none;height:1.125rem;width:1.125rem;background:rgba(0,0,0,0)}.files span button:after{content:"";top:0;left:0;position:absolute;display:block;height:1.125rem;width:1.125rem;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}:host(.fileupload--drag-drop) .file-upload{max-width:50rem !important}:host(.fileupload--drag-drop) .file-upload .helper-text{max-width:50rem !important}:host(.fileupload--drag-drop) .file-upload .drop-area>input{display:block;min-height:12.5rem;border:2px dashed var(--colour-primary-theme);color:rgba(0,0,0,0);position:relative;padding:1.5rem 2rem 1.5rem 2rem;user-select:none;max-width:100%;min-width:100%;margin-bottom:1rem}:host(.fileupload--drag-drop) .file-upload .drop-area>input.focus{border:2px solid var(--colour-info)}:host(.fileupload--drag-drop) .file-upload .drop-area{position:relative}:host(.fileupload--drag-drop) .file-upload .drop-area::before{content:"Drag and drop files here or click to upload";position:absolute;inset:1.5rem 2rem 1.5rem 2rem;z-index:1;pointer-events:none}:host(.fileupload--drag-drop) .file-upload ::file-selector-button{position:absolute;inset:0;opacity:0}/*# sourceMappingURL=fileupload.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../sass/components/fileupload.scss","../../sass/_functions/variables.scss","../../sass/_functions/mixins.scss"],"names":[],"mappings":"AAGA,aACE,2BACA,oBAEA,8BACE,aAGF,iCACE,aACA,cCwYqB,EDvYrB,YCkYqB,oBDjYrB,WCuYkB,ODtYlB,YCiYqB,sBDhYrB,YCsYmB,KDrYnB,MCgYe,sBD/Xf,WACA,cACA,oBAEA,iBACA,iBACA,oBACA,mCAGF,0BACE,oBAMF,YACE,cACA,WACA,8EACA,gCACA,qCACA,6CACA,gBACA,qBACA,mBACA,4BACA,qBACA,mBACA,2BACA,kBE7BF,+CFeA,YAqBI,kCACA,oCACA,0BAIF,8BA3BF,YA6BI,mBAEA,mBACE,UACA,wBACA,0BAEA,yBACE,yBAKN,mBACE,kBACA,0BACA,eACA,8BACA,iBACA,gBACA,YACA,gBACA,eACA,yBAEA,yBACE,WACA,MACA,OACA,kBACA,cACA,gBACA,eACA,2BACA,wBACA,6BACA,eACA,sBACA,sBACA,qCACA,uBACA,8BACA,8BAMR,2CAEE,2BAEA,wDAEE,2BAGF,4DACE,cACA,mBACA,8CACA,oBACA,kBACA,gCACA,iBACA,eACA,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../sass/components/fileupload.scss","../../sass/_functions/variables.scss","../../sass/_functions/mixins.scss"],"names":[],"mappings":"AAGA,aACE,2BACA,oBAEA,8BACE,aAGF,iCACE,aACA,cCwYqB,EDvYrB,YCkYqB,oBDjYrB,WCuYkB,ODtYlB,YCiYqB,sBDhYrB,YCsYmB,KDrYnB,MCgYe,sBD/Xf,WACA,cACA,oBAEA,iBACA,iBACA,oBACA,mCAGF,0BACE,oBAMF,YACE,cACA,WACA,8EACA,gCACA,qCACA,6CACA,gBACA,qBACA,mBACA,4BACA,qBACA,mBACA,2BACA,kBE7BF,+CFeA,YAqBI,kCACA,oCACA,0BAIF,8BA3BF,YA6BI,mBAEA,mBACE,UACA,wBACA,0BAEA,yBACE,yBAKN,mBACE,kBACA,0BACA,eACA,8BACA,iBACA,gBACA,YACA,gBACA,eACA,yBAEA,yBACE,WACA,MACA,OACA,kBACA,cACA,gBACA,eACA,2BACA,wBACA,6BACA,eACA,sBACA,sBACA,qCACA,uBACA,8BACA,8BAMR,2CAEE,2BAEA,wDAEE,2BAGF,4DACE,cACA,mBACA,8CACA,oBACA,kBACA,gCACA,iBACA,eACA,eACA,mBAEA,kEAEE,oCAIJ,sDACE,kBAGF,8DACE,sDACA,kBACA,8BACA,UACA,oBAGF,kEACE,kBACA,QACA","file":"fileupload.css"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class s extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${o}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
|
-
*/const _=function(i){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=i.getAttribute("data-id"),c=i.getAttribute("id");if(typeof c>"u"||c==null){var l=String.fromCharCode(65+Math.floor(Math.random()*26));c=l+Date.now(),i.setAttribute("id",c)}function
|
|
4
|
+
*/const _=function(i){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=i.getAttribute("data-id"),c=i.getAttribute("id");if(typeof c>"u"||c==null){var l=String.fromCharCode(65+Math.floor(Math.random()*26));c=l+Date.now(),i.setAttribute("id",c)}function r(){window.player=new YT.Player(c,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:p,onStateChange:e}})}r();function p(o){o.target.playVideo()}var t=!1;function e(o){if(o.data==YT.PlayerState.PLAYING&&!t){var s=document.getElementById(c);s.classList.add("player-ready"),t=!0}}},k=i=>(Array.from(i.querySelectorAll("dialog[open]")).forEach((a,c)=>{a.closest(".dialog__wrapper")||(a.removeAttribute("open"),a.showModal(),a.focus(),v(a))}),i.addEventListener("click",a=>{if(a.target.tagName=="IAM-ACTIONBAR")return!1;if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-modal]")){const r=a.target.closest("[data-modal]"),p=r.hasAttribute("data-modal")?r.getAttribute("data-modal"):r.getAttribute("data-filter"),t=document.querySelector(`dialog#${p}`);v(t),t.showModal(),t.focus();let e=t.offsetWidth;t.setAttribute("style",`max-width: ${e}px;`),Array.from(t.querySelectorAll("[data-duplicate]")).forEach((o,s)=>{const b=o.getAttribute("data-duplicate"),m=document.getElementById(b);if(o.checked!=m.checked){o.checked=m.checked;let u=new Event("change");o.dispatchEvent(u)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:p})}if(a&&a.target instanceof HTMLElement&&a.target.closest("button.dialog__close")){const r=a.target.closest("dialog[open]");a.preventDefault(),r.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((p,t)=>{p.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:r.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest('button[formmethod="dialog"]')){const r=a.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((p,t)=>{p.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:r.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest("dialog[open]")){let r=a.target.closest("dialog[open]");var c=window.getComputedStyle(r);if(c.display==="contents"&&(r=r.parentNode.closest("dialog[open]")),!r.classList.contains("dialog--transactional")&&!r.classList.contains("dialog--acknowledgement")){const p=r.getBoundingClientRect();(a.clientX<p.left||a.clientX>p.right||a.clientY<p.top||a.clientY>p.bottom)&&(!a.target.closest('input[type="radio"]')&&!a.target.closest('input[type="file"]')&&!a.target.closest("iam-fileupload")&&r.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:r.getAttribute("id")}))}}if(a&&a.target instanceof HTMLElement&&a.target.closest(".dialog__wrapper > button")){a.stopPropagation();let r=a.target.closest(".dialog__wrapper > button"),p=r.parentNode,t="openPopover",e=p.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=e&&r.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((m,u)=>{m.removeAttribute("aria-expanded")}),e.hasAttribute("open"))e.close(),t="closePopover",e.removeAttribute("style"),r.removeAttribute("aria-expanded");else{e.show(),r.setAttribute("aria-expanded",!0);var l=r.getBoundingClientRect();let m=l.top,u=l.left;if(r.closest("iam-table")){let n=r.closest("iam-table").parentNode.getBoundingClientRect();m-=n.top,u-=n.left}e.classList.contains("dialog--fix")&&e.setAttribute("style",`position:fixed;top: ${m}px; left: ${u}px; margin: 3rem 0 0 0;`)}let o=e.getBoundingClientRect(),s=o.bottom-window.scrollY,b=window.innerHeight-window.scrollY;if(s>b){let m=e.hasAttribute("style")?e.getAttribute("style")+" ":"";e.setAttribute("style",m+"transform: translate(0, calc(-100% - 4rem))"),o=e.getBoundingClientRect(),o.top-window.scrollY<100&&e.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,id:r.textContent})}a&&a.target instanceof HTMLElement&&!a.target.closest("dialog[open]")&&!a.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach((r,p)=>{r.removeAttribute("aria-expanded")}))}),null),v=i=>{let a=i.querySelector(".youtube-embed a");if(a&&_(a),i.classList.contains("dialog--multi")&&!i.querySelector(":scope > .steps")&&L(i),!i.querySelector(":scope .mh-lg")&&!i.classList.contains("dialog--multi")){i.innerHTML=`<div class="mh-lg">${i.innerHTML}</div>`;let c=i.querySelector(".mh-lg"),l=i.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(l){let r=l.previousSibling;c.before(l),r&&l.before(r)}}i.querySelector(":scope > button:first-child")||i.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},L=i=>{let a="",c=Array.from(i.querySelectorAll("fieldset[data-title]")),l=i.querySelector("form");c.forEach((t,e)=>{a+=`<button data-title="${t.getAttribute("data-title")}" type="button" class="${e==0?"active":""}" tabindex="-1">${t.getAttribute("data-title")}</button>`;const o=document.createElement("div");if(o.classList.add("btn--wrapper"),t.appendChild(o),e!=0&&(o.innerHTML+=`<button data-title="${c[e-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),e!=c.length-1&&(o.innerHTML+=`<button data-title="${c[e+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),e==c.length-1)if(l&&l.querySelector(':scope > button[type="submit"]')){let s=l.querySelector(':scope > button[type="submit"]');s.classList.add("mb-0"),o.insertAdjacentElement("beforeend",s)}else o.innerHTML+=`<button data-title="${c[e].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),i.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${a}</div>`);let r=Array.from(i.querySelectorAll("fieldset.was-validated"));for(let t=0;t<r.length;t++){let e=r[t],o=e.getAttribute("data-title");if(e.querySelector(".is-invalid")){Array.from(i.querySelectorAll(`[data-title="${o}"]`)).forEach((s,b)=>{s.classList.add("active")});break}else Array.from(i.querySelectorAll(`[data-title="${o}"]`)).forEach((s,b)=>{s.classList.add("valid")})}i.addEventListener("invalid",function(){return function(t){t.preventDefault()}}(),!0);function p(t){const e=i.querySelector("fieldset.active")?i.querySelector("fieldset.active"):i.querySelector("fieldset[data-title]"),o=e.getAttribute("data-title");let s=!0;if(e.classList.add("was-validated"),Array.from(e.querySelectorAll("input")).forEach((u,n)=>{u.checkValidity()||(s=!1)}),s?Array.from(i.querySelectorAll(`[data-title="${o}"]`)).forEach((u,n)=>{u.classList.add("valid")}):Array.from(i.querySelectorAll(`[data-title="${o}"]`)).forEach((u,n)=>{u.classList.remove("valid")}),s||!t.hasAttribute("data-next")){const u=i.querySelector(`fieldset[data-title="${t.getAttribute("data-title")}"]`),n=i.querySelector(`.steps button[data-title="${t.getAttribute("data-title")}"]`);Array.from(i.querySelectorAll("button")).forEach((g,y)=>{g.classList.remove("active")}),Array.from(i.querySelectorAll("fieldset")).forEach((g,y)=>{g.classList.remove("active")}),n.classList.add("active"),u.classList.add("active")}let b=Array.from(i.querySelectorAll("fieldset")).length,m=Array.from(i.querySelectorAll("fieldset.valid")).length;i.style.setProperty("--progress",`${m/(b-1)*100}%`)}i.addEventListener("keydown",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("button")){const e=t.target.closest("button");t.keyCode==13&&e.getAttribute("type")!="submit"&&(t.preventDefault(),p(e))}t&&t.target instanceof HTMLElement&&t.target.closest("input")&&(t.target.closest("input").classList.remove("is-invalid"),t.keyCode==13&&t.preventDefault())}),i.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest('button[type="submit"]'))t.target.closest("form").classList.add("was-validated");else if(t&&t.target instanceof HTMLElement&&t.target.closest("button[data-title]")){const e=t.target.closest("button[data-title]");p(e)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function A(i,a){i&&a=="all"?(i.querySelector("input").indeterminate=!1,i.querySelector("input").checked=!0,i.querySelector("label").textContent="Select all"):i&&a==0?(i.querySelector("input").indeterminate=!1,i.querySelector("input").checked=!1,i.querySelector("label").textContent="Select all"):i&&a?(i.querySelector("input").indeterminate=!0,i.querySelector("input").checked=!1,i.querySelector("label").textContent=`${a} item${a>1?"s":""} selected`):i&&(i.querySelector("input").checked=!1,i.querySelector("input").indeterminate=!1,i.querySelector("label").textContent="Select all")}class S extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",c=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
|
|
5
5
|
<style>
|
|
6
6
|
@import "${c}";
|
|
7
7
|
:host{background-color:#fcfcfc}.actionbar__wrapper{position:relative;z-index:10;height:4.25rem;container-type:inline-size}.views,.selectall,slot[name=selectall]{display:block;position:absolute !important;top:50%;left:1.5rem;margin-left:0;transform:translate(0, -50%);z-index:10}@media screen and (min-width: 36em){.views,.selectall,slot[name=selectall]{left:2rem}}.views .btn-action:not(:last-child),.selectall .btn-action:not(:last-child),slot[name=selectall] .btn-action:not(:last-child){margin-right:0.25rem !important}.selectall,slot[name=selectall]{width:2.5rem;overflow:hidden}.selectall label,slot[name=selectall] label{height:2.5rem}@media screen and (min-width: 36em){.selectall,slot[name=selectall]{width:auto;overflow:visible}}.actionbar [data-search]{display:none}:host([data-search]) .actionbar [data-search]{display:block;margin:0 0 0 1rem}:is(.actionbar,.actionbar--selected,.actionbar--search){border-top-left-radius:var(--actionbar-radius, 0.625rem);border-top-right-radius:var(--actionbar-radius, 0.625rem);padding:0 1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center;height:4.25rem;inset:0}@supports selector(:has(*)){:is(.actionbar,.actionbar--selected,.actionbar--search){position:absolute}}@container (width > 23.4375em){:is(.actionbar,.actionbar--selected,.actionbar--search){padding:0 2rem}}.actionbar{display:flex}.actionbar--selected{background-color:var(--colour-canvas);display:flex;pointer-events:none}@media screen and (prefers-color-scheme: light){.actionbar--selected{background-color:#e6eaec}}@supports selector(:has(*)){.actionbar--selected{opacity:0}}.actionbar--search{background-color:var(--colour-canvas);display:flex;z-index:2;position:relative;opacity:0;pointer-events:none}@media screen and (prefers-color-scheme: light){.actionbar--search{background-color:#e6eaec}}.actionbar{opacity:var(--selectall-actionbar-opacity, 1);pointer-events:var(--selectall-actionbar-pe, all)}.actionbar--selected{opacity:var(--selectall-opacity, 0);pointer-events:var(--selectall-pe, none)}.selectall:has(input:checked)~.actionbar,.selectall:has(input:indeterminate)~.actionbar{opacity:0;pointer-events:none}.selectall:has(input:checked)~.actionbar--selected,.selectall:has(input:indeterminate)~.actionbar--selected{opacity:1;pointer-events:all}.actionbar--search.show{opacity:1;pointer-events:all}.actionbar__wrapper:has(.actionbar--search.show)>*:not(.actionbar--search.show){opacity:0;pointer-events:none}::slotted(.btn){margin-top:0 !important;margin-bottom:0 !important;margin-left:1rem !important;margin-right:0 !important}::slotted(.btn:not(.btn-action)){order:2}::slotted([data-single]){pointer-events:none;opacity:.5}:host([data-selected="1"]) ::slotted([data-single]){pointer-events:all;opacity:1}::slotted(hr){height:2rem;color:#9d9d9d !important;width:1px;display:none;margin-left:1rem !important}@container (width > 48em){::slotted(hr){display:block}}.safe-area{display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;width:13.125rem;overflow:visible;position:relative}@container (width > 23.4375em){.safe-area{width:28.125rem}}@container (width > 48em){.safe-area{width:46.875rem}}.safe-area .body{display:contents}:host([data-large-safe-area]) .safe-area{width:16.25rem}@container (width > 23.4375em){:host([data-large-safe-area]) .safe-area{width:38.75rem}}@container (width > 48em){:host([data-large-safe-area]) .safe-area{width:65.5rem}}:host([data-switchviews]) .safe-area{width:9rem}::slotted(.btn-compact[slot=selected-overflow]),::slotted(.btn-compact[slot=overflow]){max-width:none !important;text-indent:0 !important;width:auto !important;text-align:left !important;padding-left:0 !important;background:none !important;border:none !important}::slotted(.btn-compact[slot=selected-overflow]):before,::slotted(.btn-compact[slot=overflow]):before{position:static !important;line-height:inherit !important}.dialog__wrapper.dialog-overflow{margin-left:.5rem;margin-right:-0.5rem}.actionbar--search .btn{margin:0;margin-left:-0.75rem !important;margin-right:auto !important}.search-wrapper{width:calc(100% - 3.25rem);max-width:21.875rem !important;margin:0 !important}@container (width > 48em){.search-wrapper{max-width:28.125rem !important}}.search-wrapper input{padding-top:0.5rem;padding-bottom:0.5rem;min-height:2.5rem !important;max-height:2.5rem !important}.search-wrapper :is(.prefix,.suffix){padding:0.5rem !important;min-height:2.5rem !important;max-height:2.5rem !important;min-width:2.5rem !important;max-width:2.5rem !important;line-height:1.5rem !important}/*# sourceMappingURL=assets/css/components/actionbar.css.map */
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
`,this.shadowRoot.appendChild(l.content.cloneNode(!0)),document.getElementById("actionbarGlobal")||document.head.insertAdjacentHTML("beforeend",`<style id="actionbarGlobal">iam-actionbar{background-color:#fcfcfc;display:block;border-top-left-radius:0.625rem;border-top-right-radius:0.625rem;--actionbar-radius: 0}@media screen and (prefers-color-scheme: dark){iam-actionbar{background-color:var(--colour-canvas)}}main>.actionbar__sticky-wrapper>.actionbar__sticky>iam-actionbar{border-radius:0.5rem;margin:var(--container-padding);margin-bottom:2rem;box-shadow:2px 6px 12px rgba(0,0,0,.2)}@media screen and (prefers-color-scheme: light){main>.actionbar__sticky-wrapper>.actionbar__sticky>iam-actionbar{background-color:#e6eaec}}main>.actionbar__sticky-wrapper>.actionbar__sticky>iam-actionbar:first-child{padding-top:0}@media screen and (min-width: 36em){main>.actionbar__sticky-wrapper>.actionbar__sticky>iam-actionbar{box-shadow:none;margin-inline:0;border-radius:0}}@media screen and (min-width: 62em){main>.actionbar__sticky-wrapper>.actionbar__sticky>iam-actionbar{padding-inline:calc(50% - 34.75rem - 2rem)}}iam-table iam-actionbar{margin-left:1.5rem;margin-right:1.5rem}.actionbar__sticky-wrapper{container-type:inline-size}@media screen and (min-width: 36em){.actionbar__sticky-wrapper{padding:0 !important}}@container (width < 23.4375em){:is(iam-table,.actionbar__sticky-wrapper)>.actionbar__sticky{display:block;position:sticky;left:0;top:calc(var(--sticky-padding) + 1rem);z-index:var(--index-menu);pointer-events:none}:is(iam-table,.actionbar__sticky-wrapper)>.actionbar__sticky:after{content:"";display:block;width:100%;height:calc(100vh - 6.75rem);pointer-events:none}:is(iam-table,.actionbar__sticky-wrapper)>.actionbar__sticky+*{margin-top:calc(-100vh + 6.75rem)}:is(iam-table,.actionbar__sticky)>iam-actionbar{pointer-events:all !important;display:block;border:none;background:var(--colour-canvas-2);box-shadow:0px 6px 12px rgba(0,0,0,.11);border-radius:.5rem;margin-bottom:1.5rem}}@container (width > 23.4375em){iam-table iam-actionbar{margin-left:-2rem;margin-right:-2rem;margin-top:-2rem;margin-bottom:1rem}}iam-actionbar~:is([data-view=square],[data-view=list],[data-view=small]){display:none}iam-actionbar[data-view=square]~[data-view=square]{display:block}iam-actionbar[data-view=list]~[data-view=list]{display:block}iam-actionbar[data-view=small]~[data-view=small]{display:block}iam-actionbar .actionbar__text{font-size:1.125rem;line-height:2.5rem;color:var(--colour-heading);display:inline-block}iam-actionbar .dialog__wrapper[slot=selected-overflow]>button,iam-actionbar .dialog__wrapper[slot=overflow]>button{background:none;border:none;text-indent:0;width:100%;display:block;max-width:100%;text-align:left;padding:0}iam-actionbar .dialog__wrapper[slot=selected-overflow]>button:before,iam-actionbar .dialog__wrapper[slot=overflow]>button:before{position:static}iam-actionbar button[slot=overflow],iam-actionbar button[slot=selected-overflow]{background:none;border:none;margin:0 !important}iam-actionbar .dialog__wrapper[slot=selected-overflow] dialog[open],iam-actionbar .dialog__wrapper[slot=overflow] dialog[open]{display:contents}iam-actionbar:has(.selectall input:checked){--selectall-opacity: 1;--selectall-pe: all;--selectall-actionbar-opactiy: 0;--selectall-action-pe: none}/*# sourceMappingURL=assets/css/components/actionbar.global.css.map */
|
|
55
|
-
</style>`)}connectedCallback(){let a=this;const c=this.shadowRoot.querySelector(".actionbar__wrapper");if(this.hasAttribute("data-selectall")){c.insertAdjacentHTML("afterbegin",'<div class="selectall pb-0"><input type="checkbox" name="selectall" id="selectall"><label for="selectall" class="m-0">Select all</label></div>');let t=this.shadowRoot.querySelector(".selectall");this.hasAttribute("data-selected")&&A(t,this.getAttribute("data-selected")),t.addEventListener("change",
|
|
55
|
+
</style>`)}connectedCallback(){let a=this;const c=this.shadowRoot.querySelector(".actionbar__wrapper");if(this.hasAttribute("data-selectall")){c.insertAdjacentHTML("afterbegin",'<div class="selectall pb-0"><input type="checkbox" name="selectall" id="selectall"><label for="selectall" class="m-0">Select all</label></div>');let t=this.shadowRoot.querySelector(".selectall");this.hasAttribute("data-selected")&&A(t,this.getAttribute("data-selected")),t.addEventListener("change",o=>{o&&o.target instanceof HTMLElement&&o.target.closest("input")&&(o.target.closest("input").checked?this.setAttribute("data-selected","all"):this.setAttribute("data-selected",0))});let e=this.querySelector("button[data-cancel]");e&&e.addEventListener("click",o=>{this.setAttribute("data-selected",0)})}if(this.hasAttribute("data-select-watch")){const t=document.getElementById(this.getAttribute("data-select-watch"));t.setAttribute("data-select-container","true"),Array.from(t.querySelectorAll('input[type="checkbox"]')).forEach((e,o)=>{e.parentElement.setAttribute("slot","checkbox")}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest('[type="checkbox"]')){let o=t.querySelectorAll('input[type="checkbox"]').length,s=t.querySelectorAll('input[type="checkbox"]:checked').length;a.setAttribute("data-selected",o==s?"all":s),e.target.closest('[type="checkbox"]'),s?Array.from(t.querySelectorAll('input[type="checkbox"]')).forEach((b,m)=>{b.closest("iam-card")&&b.closest("iam-card").setAttribute("data-selected","true")}):Array.from(t.querySelectorAll('input[type="checkbox"]')).forEach((b,m)=>{b.closest("iam-card")&&b.closest("iam-card").removeAttribute("data-selected")})}})}if(this.hasAttribute("data-switchviews")){let t="";this.getAttribute("data-switchviews").split(",").forEach((s,b)=>{let m="fa-grid-2";s=="list"?m="fa-grip-lines":s=="small"&&(m="fa-bars"),t+=`<button class="btn btn-action btn-compact mb-0 fa-regular ${m}">${s}</button>`}),c.insertAdjacentHTML("afterbegin",`<div class="views m-0">${t}</div>`),this.shadowRoot.querySelector(".views").addEventListener("click",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest(".btn-action")){let b=s.target.closest(".btn-action");this.setAttribute("data-view",b.textContent);const m=new CustomEvent("switch-view",{detail:{view:b.textContent}});this.dispatchEvent(m)}})}const l=this.shadowRoot.querySelector(".actionbar--search");this.hasAttribute("data-search-value")&&(this.shadowRoot.querySelector("#search").value=this.getAttribute("data-search-value")),this.hasAttribute("data-search")&&this.getAttribute("data-search")=="show"&&l.classList.add("show");const r=this.shadowRoot.querySelector("button[data-search]");this.shadowRoot.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("button[data-search]")&&(l.classList.toggle("show"),r.toggleAttribute("aria-expanded"))}),l.addEventListener("keyup",t=>{const e=new CustomEvent("search-keyup",{detail:{search:l.querySelector("input").value}});this.dispatchEvent(e)}),l.addEventListener("change",t=>{const e=new CustomEvent("search-change",{detail:{search:l.querySelector("input").value}});this.dispatchEvent(e)}),l.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("button.suffix")){const e=new CustomEvent("search-submit",{detail:{search:l.querySelector("input").value}});this.dispatchEvent(e)}}),Array.from(this.shadowRoot.querySelectorAll(".body")).forEach((t,e)=>{k(t)});function p(){const t=c.scrollWidth,e=document.documentElement.scrollWidth;let o=750,s=16,b=450,m=a.hasAttribute("data-switchviews")?144:210;a.hasAttribute("data-large-safe-area")&&(o=1048,b=620,m=260);let u=1;e>=992&&e<=1280?u=e/1280:e>=576&&e<992?u=e/768:e<576&&(u=e/375),t>=992&&t<=1280?o=o*u:t>=576&&t<992?o=b*u:t<576&&(o=m*u),s=s*u,t<576?Array.from(a.querySelectorAll(':scope > .btn:not(.js-updated), :scope > .dialog__wrapper > .btn[class*="fa-"]:first-child:not(.js-updated)')).forEach((n,g)=>{n.className=n.className.replace(" btn-compact"," _btn-compact"),n.classList.add("btn-compact"),n.classList.add("js-updated")}):Array.from(a.querySelectorAll(":scope > .btn.js-updated, :scope > .dialog__wrapper > .btn.js-updated:first-child")).forEach((n,g)=>{n.classList.remove("btn-compact"),n.classList.remove("js-updated"),n.className=n.className.replace(" _btn-compact"," btn-compact")}),Array.from(a.querySelectorAll("[slot]")).forEach((n,g)=>{n.getAttribute("slot")=="overflow"&&n.removeAttribute("slot"),n.getAttribute("slot")=="selected-overflow"&&n.setAttribute("slot","selected")}),Array.from(a.querySelectorAll(".show")).forEach((n,g)=>{n.classList.remove("show")}),Array.from(a.shadowRoot.querySelectorAll(".safe-area")).forEach((n,g)=>{let y="overflow";n.querySelector("slot").hasAttribute("name")&&n.querySelector("slot").getAttribute("name")=="selected"&&(y="selected-overflow");let h=n.querySelector("slot").assignedElements(),f=44*u;a.hasAttribute("data-search")&&(f+=44*u);for(let d=0;d<h.length;d++)!h[d].classList.contains("btn-action")&&!h[d].classList.contains("dialog__wrapper")&&(f+=h[d].offsetWidth,f+=s);for(let d=0;d<h.length;d++)if(h[d].classList.contains("dialog__wrapper")&&(h[d].classList.add("show"),f+=h[d].offsetWidth,f+=s/2,f-s/2>o)){h[d].classList.remove("show");break}for(let d=0;d<h.length;d++)if(h[d].classList.contains("btn-action")&&(h[d].classList.add("show"),f+=h[d].offsetWidth,f+=s/2,f-s/2>o)){h[d].classList.remove("show");break}let w=n.querySelector(".dialog-overflow");w&&w.classList.add("d-none");for(let d=0;d<h.length;d++)(h[d].classList.contains("btn-action")||h[d].classList.contains("dialog__wrapper"))&&(h[d].classList.contains("show")||(h[d].setAttribute("slot",y),w&&w.classList.remove("d-none")))})}p(),new ResizeObserver(p).observe(c)}static get observedAttributes(){return["data-selected"]}attributeChangedCallback(a,c,l){switch(a){case"data-selected":{let r=this.shadowRoot.querySelector(".selectall");r&&A(r,l);const p=new CustomEvent("selected",{detail:{selected:l}});if(this.dispatchEvent(p),l=="all"&&this.hasAttribute("data-select-watch")){const t=document.getElementById(this.getAttribute("data-select-watch"));Array.from(t.querySelectorAll('input[type="checkbox"]')).forEach((e,o)=>{e.checked=!0,e.closest("iam-card")&&e.closest("iam-card").setAttribute("data-selected","true")})}if(l=="0"&&this.hasAttribute("data-select-watch")){const t=document.getElementById(this.getAttribute("data-select-watch"));Array.from(t.querySelectorAll('input[type="checkbox"]')).forEach((e,o)=>{e.checked=!1,e.closest("iam-card")&&e.closest("iam-card").removeAttribute("data-selected","true")})}break}}}}export{S as default};
|
|
56
56
|
//# sourceMappingURL=actionbar.component.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionbar.component.min.js","sources":["../../modules/youtubevideo.js","../../modules/dialogs.js","actionbar.component.js"],"sourcesContent":["// @ts-nocheck\n/**\n * Integrate YouTube videos as a way of hosting videos without the overhead and worry surrounding hosting vides. i.e. file sizes, performance and accessibility.\n */\nclass youtubeVideo {\n /** @param {Element} embed dom element */\n constructor(embed) {\n // If the scripts is already loaded then lets just create the embed\n if (document.body.classList.contains('youtubeLoaded')) {\n embed.addEventListener('click', function (e) {\n // loop parent nodes from the target to the delegation node\n for (var target = e.target; target && target != this; target = target.parentNode) {\n if (target.matches('a')) {\n e.preventDefault();\n createEmbed(target);\n break;\n }\n }\n }, false);\n }\n else {\n this.loadScripts(embed, this.createEmbed);\n }\n }\n /**\n * Load the YouTube scripts before trying to create the embed\n * @param {HTMLElement} embed dom element\n */\n loadScripts(embed) {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = function () {\n // This code loads the IFrame Player API code asynchronously.\n var tag = document.createElement('script');\n tag.src = \"https://www.youtube.com/iframe_api\";\n var firstScriptTag = document.getElementsByTagName('script')[0];\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n document.body.classList.add('youtubeLoaded');\n resolve(true);\n // script has loaded, you can now use it safely\n tag.onload = () => {\n embed.addEventListener('click', function (event) {\n console.log('click');\n // loop parent nodes from the target to the delegation node\n if (event && event.target instanceof HTMLElement && event.target.closest('a')) {\n event.preventDefault();\n createEmbed(event.target.closest('a'));\n }\n }, false);\n };\n };\n image.onerror = function () {\n reject(false);\n };\n image.src = \"https://youtube.com/favicon.ico\";\n });\n }\n}\nexport const createEmbed = function (target) {\n // If there is more than one video lets make sure there is only one playing at a time.\n if (typeof window.player != \"undefined\" && typeof window.player.pauseVideo == \"function\")\n window.player.pauseVideo();\n var video_id = target.getAttribute('data-id');\n var link_id = target.getAttribute('id');\n // create an id to pass t the script if one isn't present\n if (typeof link_id == 'undefined' || link_id == null) {\n var randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26));\n link_id = randLetter + Date.now();\n target.setAttribute('id', link_id);\n }\n // This function creates an <iframe> (and YouTube player) after the API code downloads.\n function onYouTubeIframeAPIReady() {\n window.player = new YT.Player(link_id, {\n height: '100%',\n width: '100%',\n videoId: video_id,\n playerVars: {\n 'modestbranding': 1,\n 'playsinline': 1,\n 'rel': 0,\n 'showinfo': 0\n },\n events: {\n 'onReady': onPlayerReady,\n 'onStateChange': onPlayerStateChange\n }\n });\n }\n onYouTubeIframeAPIReady();\n // The API will call this function when the video player is ready.\n function onPlayerReady(event) {\n // Play the video straight away\n event.target.playVideo();\n }\n // The API calls this function when the player's state changes.\n // The function indicates that when playing a video (state=1)\n var done = false;\n function onPlayerStateChange(event) {\n if (event.data == YT.PlayerState.PLAYING && !done) {\n var link = document.getElementById(link_id);\n link.classList.add('player-ready');\n done = true;\n }\n }\n};\nexport default youtubeVideo;\n","// @ts-nocheck\nimport { createEmbed } from \"./youtubevideo.js\";\nconst extendDialogs = (body) => {\n Array.from(body.querySelectorAll('dialog[open]')).forEach((dialog, index) => {\n let parent = dialog.closest('.dialog__wrapper');\n if (!parent) {\n dialog.removeAttribute('open');\n dialog.showModal();\n dialog.focus();\n createDialog(dialog);\n }\n });\n // Dialogs/modals\n body.addEventListener('click', (event) => {\n if (event.target.tagName == 'IAM-ACTIONBAR')\n return false;\n // Modal\n if (event && event.target instanceof HTMLElement && event.target.closest('[data-modal]')) {\n const button = event.target.closest('[data-modal]');\n const modalID = button.hasAttribute('data-modal') ? button.getAttribute('data-modal') : button.getAttribute('data-filter');\n const dialog = document.querySelector(`dialog#${modalID}`);\n createDialog(dialog);\n // Open the modal!\n dialog.showModal();\n dialog.focus();\n let firstWidth = dialog.offsetWidth;\n dialog.setAttribute('style', `max-width: ${firstWidth}px;`);\n // When the modal is opened we want to make sure any duplicate checkboxes are matching the originals\n Array.from(dialog.querySelectorAll('[data-duplicate]')).forEach((element, index) => {\n const id = element.getAttribute('data-duplicate');\n const originalInput = document.getElementById(id);\n if (element.checked != originalInput.checked) {\n element.checked = originalInput.checked;\n let changeEvent = new Event('change');\n element.dispatchEvent(changeEvent);\n }\n });\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"openModal\",\n \"id\": modalID\n });\n }\n ;\n // Close modal\n if (event && event.target instanceof HTMLElement && event.target.closest('button.dialog__close')) {\n const dialog = event.target.closest('dialog[open]');\n event.preventDefault();\n dialog.close();\n // Remove active class from exiting active buttons\n Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement, index) => {\n btnElement.classList.remove('active');\n });\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"closeModal\",\n \"id\": dialog.getAttribute('id')\n });\n }\n // Track default close buttons\n if (event && event.target instanceof HTMLElement && event.target.closest('button[formmethod=\"dialog\"]')) {\n const dialog = event.target.closest('dialog[open]');\n // Remove active class from exiting active buttons\n Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement, index) => {\n btnElement.classList.remove('active');\n });\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"closeModal\",\n \"id\": dialog.getAttribute('id')\n });\n }\n // Close the modal when clicked on the backdrop\n if (event && event.target instanceof HTMLElement && event.target.closest('dialog[open]')) {\n let dialog = event.target.closest('dialog[open]');\n // Small fix to make sure the dialog isn't a dialog inside of a dialog.\n var style = window.getComputedStyle(dialog);\n if (style.display === 'contents')\n dialog = dialog.parentNode.closest('dialog[open]');\n // Dont allow the backdrop to be clicked when transactional\n if (!dialog.classList.contains('dialog--transactional') && !dialog.classList.contains('dialog--acknowledgement')) {\n const dialogDimensions = dialog.getBoundingClientRect();\n if (event.clientX < dialogDimensions.left || event.clientX > dialogDimensions.right || event.clientY < dialogDimensions.top || event.clientY > dialogDimensions.bottom) {\n if (!event.target.closest('input[type=\"radio\"]')) // Weird bug when interacting with radio input fields within dialogs cuases it to close\n dialog.close();\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"closeModal\",\n \"id\": dialog.getAttribute('id')\n });\n }\n }\n }\n // Popover\n if (event && event.target instanceof HTMLElement && event.target.closest('.dialog__wrapper > button')) {\n event.stopPropagation();\n let btn = event.target.closest('.dialog__wrapper > button');\n let parent = btn.parentNode;\n let dataEvent = \"openPopover\";\n let popover = parent.querySelector(':scope > dialog');\n // close open dialogs\n if (document.querySelector('*:not([data-keep-open]) > dialog[open]') && document.querySelector('*:not([data-keep-open]) > dialog[open]') != popover) {\n // Check that the ope dialog isn't a parent of the dialog being opened\n if (btn.closest('dialog[open]') != document.querySelector('*:not([data-keep-open]) > dialog[open]')) {\n document.querySelector('*:not([data-keep-open]) > dialog[open]').close();\n }\n }\n // Remove active class from exiting active buttons\n Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement, index) => {\n btnElement.removeAttribute('aria-expanded');\n });\n if (popover.hasAttribute('open')) {\n popover.close();\n dataEvent = \"closePopover\";\n popover.removeAttribute('style');\n btn.removeAttribute('aria-expanded');\n }\n else {\n popover.show();\n btn.setAttribute('aria-expanded', true);\n var position = btn.getBoundingClientRect();\n let topOffset = position.top;\n let leftOffset = position.left;\n if (btn.closest('iam-table')) {\n let container = btn.closest('iam-table').parentNode.getBoundingClientRect();\n topOffset -= container.top;\n leftOffset -= container.left;\n }\n if (popover.classList.contains('dialog--fix')) {\n popover.setAttribute('style', `position:fixed;top: ${topOffset}px; left: ${leftOffset}px; margin: 3rem 0 0 0;`);\n }\n }\n // When the dialog is fixed it could dip under the viewport\n // Lets check the dimensions and transform it to appear above\n let boundingRec = popover.getBoundingClientRect();\n let popoverBottom = boundingRec.bottom - window.scrollY;\n let windowPos = window.innerHeight - window.scrollY;\n if (popoverBottom > windowPos) {\n let currentStyle = popover.hasAttribute('style') ? popover.getAttribute('style') + ' ' : '';\n popover.setAttribute('style', currentStyle + `transform: translate(0, calc(-100% - 4rem))`);\n // Check that the dialog doesn't go over the top of the page\n boundingRec = popover.getBoundingClientRect();\n let popoverTop = boundingRec.top - window.scrollY;\n if (popoverTop < 100)\n popover.removeAttribute('style');\n }\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": dataEvent,\n \"id\": btn.textContent\n });\n }\n ;\n // Close popovers when clicked away\n if (event && event.target instanceof HTMLElement && !event.target.closest('dialog[open]') && !event.target.closest('.dialog__wrapper > button')) {\n if (document.querySelector('.dialog__wrapper:not([data-keep-open]) > dialog[open]'))\n document.querySelector('.dialog__wrapper:not([data-keep-open]) > dialog[open]').close();\n Array.from(document.querySelectorAll('.dialog__wrapper:not([data-keep-open]) > button')).forEach((btnElement, index) => {\n btnElement.removeAttribute('aria-expanded');\n });\n }\n });\n return null;\n};\nexport const createDialog = (dialog) => {\n // Create the video embed\n let videoButton = dialog.querySelector('.youtube-embed a');\n if (videoButton) {\n createEmbed(videoButton);\n }\n // Multi dialog\n if (dialog.classList.contains('dialog--multi') && !dialog.querySelector(':scope > .steps')) {\n createMultiFormDialog(dialog);\n }\n // If you are using Vue eevents and bindings its recommended to add in the .mh-lg div manually to the dialog\n if (!dialog.querySelector(':scope .mh-lg') && !dialog.classList.contains('dialog--multi')) {\n dialog.innerHTML = `<div class=\"mh-lg\">${dialog.innerHTML}</div>`;\n let dialogContent = dialog.querySelector('.mh-lg');\n let titleElement = dialog.querySelector('.mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)');\n if (titleElement) {\n let optionalElement = titleElement.previousSibling;\n dialogContent.before(titleElement);\n if (optionalElement)\n titleElement.before(optionalElement);\n }\n }\n // Create close button is needed\n if (!dialog.querySelector(':scope > button:first-child'))\n dialog.insertAdjacentHTML('afterbegin', `<button class=\"dialog__close\">Close</button>`);\n};\nexport const createMultiFormDialog = (dialog) => {\n let buttons = \"\";\n let fieldsets = Array.from(dialog.querySelectorAll('fieldset[data-title]'));\n let form = dialog.querySelector('form');\n fieldsets.forEach((fieldset, index) => {\n buttons += `<button data-title=\"${fieldset.getAttribute('data-title')}\" type=\"button\" class=\"${index == 0 ? \"active\" : \"\"}\" tabindex=\"-1\">${fieldset.getAttribute('data-title')}</button>`;\n const btnWrapper = document.createElement(\"div\");\n btnWrapper.classList.add('btn--wrapper');\n fieldset.appendChild(btnWrapper);\n if (index != 0)\n btnWrapper.innerHTML += `<button data-title=\"${fieldsets[index - 1].getAttribute('data-title')}\" class=\"btn btn-secondary mb-0\" data-previous type=\"button\">Previous</button>`;\n if (index != fieldsets.length - 1)\n btnWrapper.innerHTML += `<button data-title=\"${fieldsets[index + 1].getAttribute('data-title')}\" class=\"btn btn-primary mb-0\" data-next type=\"button\">Next</button>`;\n // Last fieldset\n if (index == fieldsets.length - 1) {\n if (form && form.querySelector(':scope > button[type=\"submit\"]')) {\n let existingButton = form.querySelector(':scope > button[type=\"submit\"]');\n existingButton.classList.add('mb-0');\n btnWrapper.insertAdjacentElement('beforeend', existingButton);\n }\n else\n btnWrapper.innerHTML += `<button data-title=\"${fieldsets[index].getAttribute('data-title')}\" class=\"btn btn-primary mb-0\" data-next type=\"submit\">Submit</button>`;\n }\n });\n dialog.insertAdjacentHTML('afterbegin', `<div class=\"steps bg-primary\">${buttons}</div>`);\n // Open the fieldset with an error inside\n let validatedFieldsets = Array.from(dialog.querySelectorAll('fieldset.was-validated'));\n for (let i = 0; i < validatedFieldsets.length; i++) {\n let fieldset = validatedFieldsets[i];\n let fieldsetID = fieldset.getAttribute('data-title');\n if (fieldset.querySelector('.is-invalid')) {\n Array.from(dialog.querySelectorAll(`[data-title=\"${fieldsetID}\"]`)).forEach((element, index) => {\n element.classList.add('active');\n });\n break;\n }\n else {\n Array.from(dialog.querySelectorAll(`[data-title=\"${fieldsetID}\"]`)).forEach((element, index) => {\n element.classList.add('valid');\n });\n }\n }\n // Prevent the bubble messages\n dialog.addEventListener('invalid', (function () {\n return function (e) {\n e.preventDefault();\n };\n })(), true);\n function validateFieldset(button) {\n const currentFieldset = dialog.querySelector(`fieldset.active`) ? dialog.querySelector(`fieldset.active`) : dialog.querySelector(`fieldset[data-title]`);\n const currentFieldsetID = currentFieldset.getAttribute('data-title');\n let isFieldsetValid = true;\n currentFieldset.classList.add('was-validated');\n Array.from(currentFieldset.querySelectorAll('input')).forEach((input, index) => {\n if (!input.checkValidity())\n isFieldsetValid = false;\n });\n // If valid mode to next field set\n if (!isFieldsetValid) {\n Array.from(dialog.querySelectorAll(`[data-title=\"${currentFieldsetID}\"]`)).forEach((element, index) => {\n element.classList.remove('valid');\n });\n }\n else {\n Array.from(dialog.querySelectorAll(`[data-title=\"${currentFieldsetID}\"]`)).forEach((element, index) => {\n element.classList.add('valid');\n });\n }\n // Allow the previous button to navigate\n if (isFieldsetValid || !button.hasAttribute('data-next')) {\n const fieldset = dialog.querySelector(`fieldset[data-title=\"${button.getAttribute('data-title')}\"]`);\n const step = dialog.querySelector(`.steps button[data-title=\"${button.getAttribute('data-title')}\"]`);\n Array.from(dialog.querySelectorAll('button')).forEach((button, index) => {\n button.classList.remove('active');\n });\n Array.from(dialog.querySelectorAll('fieldset')).forEach((button, index) => {\n button.classList.remove('active');\n });\n step.classList.add('active');\n fieldset.classList.add('active');\n }\n let fieldsetCount = Array.from(dialog.querySelectorAll(`fieldset`)).length;\n let validFieldsetCount = Array.from(dialog.querySelectorAll(`fieldset.valid`)).length;\n // update the progress bar\n dialog.style.setProperty('--progress', `${(validFieldsetCount / (fieldsetCount - 1) * 100)}%`);\n }\n // remove error messages from server\n dialog.addEventListener('keydown', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button')) {\n const button = event.target.closest('button');\n if (event.keyCode == 13 && button.getAttribute('type') != \"submit\") {\n event.preventDefault();\n validateFieldset(button);\n }\n }\n if (event && event.target instanceof HTMLElement && event.target.closest('input')) {\n const input = event.target.closest('input');\n input.classList.remove('is-invalid');\n if (event.keyCode == 13) {\n event.preventDefault();\n }\n }\n });\n dialog.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button[type=\"submit\"]')) {\n const form = event.target.closest('form');\n form.classList.add('was-validated');\n }\n else if (event && event.target instanceof HTMLElement && event.target.closest('button[data-title]')) {\n const button = event.target.closest('button[data-title]');\n validateFieldset(button);\n }\n ;\n return null;\n });\n};\nexport default extendDialogs;\n","// @ts-nocheck\nimport extendDialogs from \"../../modules/dialogs.js\";\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n \"event\": \"customElementRegistered\",\n \"element\": \"action bar\"\n});\nfunction setSelectAllInput(element, value) {\n if (element && value == \"all\") {\n element.querySelector('input').indeterminate = false;\n element.querySelector('input').checked = true;\n element.querySelector('label').textContent = `Select all`;\n }\n else if (element && value == 0) {\n element.querySelector('input').indeterminate = false;\n element.querySelector('input').checked = false;\n element.querySelector('label').textContent = `Select all`;\n }\n else if (element && value) {\n element.querySelector('input').indeterminate = true;\n element.querySelector('input').checked = false;\n element.querySelector('label').textContent = `${value} item${value > 1 ? 's' : ''} selected`;\n }\n else if (element) {\n element.querySelector('input').checked = false;\n element.querySelector('input').indeterminate = false;\n element.querySelector('label').textContent = `Select all`;\n }\n}\nclass iamActionbar extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css') ? document.body.getAttribute('data-core-css') : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/actionbar.css\";`;\n const loadExtraCSS = `@import \"${assetLocation}/css/components/actionbar.global.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n </style>\n <link rel=\"stylesheet\" href=\"https://kit.fontawesome.com/26fdbf0179.css\" crossorigin=\"anonymous\">\n <div class=\"actionbar__wrapper\">\n \n <div class=\"actionbar\">\n <slot name=\"selectall\"></slot>\n <div class=\"safe-area\">\n <slot></slot>\n <div class=\"body\">\n <div class=\"dialog__wrapper dialog__wrapper--right dialog-overflow d-none show\">\n <button class=\"btn btn-secondary btn-compact fa-ellipsis-vertical m-0\">More actions</button>\n <dialog class=\"dialog--list\">\n <slot name=\"overflow\"></slot>\n <slot name=\"menu\"></slot>\n </dialog>\n </div>\n <button class=\"btn btn-secondary btn-compact btn-sm fa-search\" data-search=\"\">Search</button>\n </div>\n </div>\n </div>\n <div class=\"actionbar--selected\">\n <div class=\"safe-area\">\n <slot name=\"selected\"></slot>\n <div class=\"body\">\n <div class=\"dialog__wrapper dialog__wrapper--right dialog-overflow d-none show\">\n <button class=\"btn btn-secondary btn-compact fa-ellipsis-vertical m-0\">More actions</button>\n <dialog class=\"dialog--list\">\n <slot name=\"selected-overflow\"></slot>\n </dialog>\n </div>\n </div>\n </div>\n </div>\n <div class=\"actionbar--search\">\n <button data-search class=\"btn btn-compact fa-xmark-large btn-secondary m-0\" >Close</button>\n\n <div class=\"search-wrapper\">\n <label for=\"search\" class=\"visually-hidden\">Input field label</label>\n <button class=\"suffix\"><i class=\"fa-regular fa-search\"></i></button>\n <input type=\"text\" id=\"search\" name=\"search\" required=\"\">\n </div>\n\n </div>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n // insert extra CSS\n if (!document.getElementById('actionbarGlobal'))\n document.head.insertAdjacentHTML('beforeend', `<style id=\"actionbarGlobal\">${loadExtraCSS}</style>`);\n }\n connectedCallback() {\n let that = this;\n const actionbarWrapper = this.shadowRoot.querySelector('.actionbar__wrapper');\n // #region select all\n if (this.hasAttribute('data-selectall')) {\n actionbarWrapper.insertAdjacentHTML('afterbegin', `<div class=\"selectall pb-0\"><input type=\"checkbox\" name=\"selectall\" id=\"selectall\"><label for=\"selectall\" class=\"m-0\">Select all</label></div>`);\n let selectAll = this.shadowRoot.querySelector('.selectall');\n if (this.hasAttribute('data-selected')) {\n setSelectAllInput(selectAll, this.getAttribute('data-selected'));\n }\n selectAll.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('input')) {\n if (event.target.closest('input').checked)\n this.setAttribute('data-selected', 'all');\n else\n this.setAttribute('data-selected', 0);\n }\n });\n let cancelButton = this.querySelector('button[data-cancel]');\n if (cancelButton) {\n cancelButton.addEventListener('click', (event) => {\n this.setAttribute('data-selected', 0);\n });\n }\n }\n // Wtach div for the select inputs\n if (this.hasAttribute('data-select-watch')) {\n const element = document.getElementById(this.getAttribute('data-select-watch'));\n element.setAttribute('data-select-container', 'true');\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n input.parentElement.setAttribute('slot', 'checkbox');\n });\n element.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('[type=\"checkbox\"]')) {\n let count = element.querySelectorAll('input[type=\"checkbox\"]').length;\n let countChecked = element.querySelectorAll('input[type=\"checkbox\"]:checked').length;\n that.setAttribute('data-selected', count == countChecked ? \"all\" : countChecked);\n let input = event.target.closest('[type=\"checkbox\"]');\n if (countChecked) {\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n if (input.closest('iam-card'))\n input.closest('iam-card').setAttribute('data-selected', 'true');\n });\n }\n else {\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n if (input.closest('iam-card'))\n input.closest('iam-card').removeAttribute('data-selected');\n });\n }\n }\n ;\n });\n }\n // #endregion\n // #region switchviews\n if (this.hasAttribute('data-switchviews')) {\n let btns = '';\n let viewList = this.getAttribute('data-switchviews').split(',');\n viewList.forEach((view, index) => {\n let icon = 'fa-grid-2';\n if (view == \"list\")\n icon = 'fa-grip-lines';\n else if (view == \"small\")\n icon = 'fa-bars';\n btns += `<button class=\"btn btn-action btn-compact mb-0 fa-regular ${icon}\">${view}</button>`;\n });\n actionbarWrapper.insertAdjacentHTML('afterbegin', `<div class=\"views m-0\">${btns}</div>`);\n let views = this.shadowRoot.querySelector('.views');\n views.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('.btn-action')) {\n let btn = event.target.closest('.btn-action');\n this.setAttribute('data-view', btn.textContent);\n const switchEvent = new CustomEvent(\"switch-view\", { detail: { view: btn.textContent } });\n this.dispatchEvent(switchEvent);\n }\n });\n }\n // #endregion\n // #region search\n const searchBar = this.shadowRoot.querySelector('.actionbar--search');\n if (this.hasAttribute('data-search-value')) {\n this.shadowRoot.querySelector('#search').value = this.getAttribute('data-search-value');\n }\n if (this.hasAttribute('data-search') && this.getAttribute('data-search') == 'show')\n searchBar.classList.add('show');\n const searchBtn = this.shadowRoot.querySelector('button[data-search]');\n this.shadowRoot.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button[data-search]')) {\n searchBar.classList.toggle('show');\n searchBtn.toggleAttribute('aria-expanded');\n }\n });\n searchBar.addEventListener('keyup', (event) => {\n const keyupEvent = new CustomEvent(\"search-keyup\", { detail: { search: searchBar.querySelector('input').value } });\n this.dispatchEvent(keyupEvent);\n });\n searchBar.addEventListener('change', (event) => {\n const changeEvent = new CustomEvent(\"search-change\", { detail: { search: searchBar.querySelector('input').value } });\n this.dispatchEvent(changeEvent);\n });\n searchBar.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button.suffix')) {\n const submitEvent = new CustomEvent(\"search-submit\", { detail: { search: searchBar.querySelector('input').value } });\n this.dispatchEvent(submitEvent);\n }\n });\n // #endregion\n // Make sure dialogs created in the shadow dom work\n Array.from(this.shadowRoot.querySelectorAll('.body')).forEach((element, index) => {\n extendDialogs(element);\n });\n // #region Reponsive safe area\n function hideButtons() {\n const wrapperWidth = actionbarWrapper.scrollWidth;\n const screenWidth = document.documentElement.scrollWidth;\n let safeAreaWidth = 750;\n let elementMargin = 16;\n let tabletSafeWidth = 450;\n let mobileSafeWidth = that.hasAttribute('data-switchviews') ? 144 : 210;\n if (that.hasAttribute('data-large-safe-area')) {\n safeAreaWidth = 1048;\n tabletSafeWidth = 620;\n mobileSafeWidth = 260;\n }\n // We need to modify the widths to mimic the CSS's scaling functionality\n let modifier = 1;\n if (screenWidth >= 992 && screenWidth <= 1280) {\n modifier = screenWidth / 1280;\n }\n else if (screenWidth >= 576 && screenWidth < 992) {\n modifier = screenWidth / 768;\n }\n else if (screenWidth < 576) {\n modifier = screenWidth / 375;\n }\n // Work out the safe sapce width depending upon the wrappers width and modifier comp\n if (wrapperWidth >= 992 && wrapperWidth <= 1280) {\n safeAreaWidth = safeAreaWidth * modifier;\n }\n else if (wrapperWidth >= 576 && wrapperWidth < 992) {\n safeAreaWidth = tabletSafeWidth * modifier;\n }\n else if (wrapperWidth < 576) {\n safeAreaWidth = mobileSafeWidth * modifier;\n }\n // Margin in between elements\n elementMargin = elementMargin * modifier;\n // If the wrapper width is small we want to reduce the btn sizes by adding or removing btn-compact classes\n if (wrapperWidth < 576) {\n Array.from(that.querySelectorAll(':scope > .btn:not(.js-updated), :scope > .dialog__wrapper > .btn[class*=\"fa-\"]:first-child:not(.js-updated)')).forEach((element, index) => {\n element.className = element.className.replace(' btn-compact', ' _btn-compact');\n element.classList.add('btn-compact');\n element.classList.add('js-updated');\n });\n }\n else {\n Array.from(that.querySelectorAll(':scope > .btn.js-updated, :scope > .dialog__wrapper > .btn.js-updated:first-child')).forEach((element, index) => {\n element.classList.remove('btn-compact');\n element.classList.remove('js-updated');\n element.className = element.className.replace(' _btn-compact', ' btn-compact');\n });\n }\n // Reset the elements before we decide what elements become slotted into the overflow\n Array.from(that.querySelectorAll('[slot]')).forEach((element, index) => {\n if (element.getAttribute(\"slot\") == \"overflow\")\n element.removeAttribute('slot');\n if (element.getAttribute(\"slot\") == \"selected-overflow\")\n element.setAttribute('slot', 'selected');\n });\n Array.from(that.querySelectorAll('.show')).forEach((element, index) => {\n element.classList.remove('show');\n });\n // Foreach safe area lets check what elements are slotted in them and if they need an overflow\n Array.from(that.shadowRoot.querySelectorAll('.safe-area')).forEach((element, index) => {\n // Decide on which overflow slot to use\n let overflowSlot = \"overflow\";\n if (element.querySelector('slot').hasAttribute('name') && element.querySelector('slot').getAttribute('name') == \"selected\")\n overflowSlot = \"selected-overflow\";\n // Get the slotted elements, remember they aren't children of the safe area\n let elements = element.querySelector('slot').assignedElements();\n let tempWidth = 44 * modifier; // Allow space for the overflow button\n // If search then allow for the search button width\n if (that.hasAttribute('data-search'))\n tempWidth += 44 * modifier;\n // Foreach element that isn't an action button or dialog wrapper add to the width, these will not be moved into the overflow slot\n for (let i = 0; i < elements.length; i++) {\n if (!elements[i].classList.contains('btn-action') && !elements[i].classList.contains('dialog__wrapper')) {\n tempWidth += elements[i].offsetWidth;\n tempWidth += elementMargin;\n }\n }\n // Foreach dialog wrapper decide if safe in safe area or move into the overflow slot, dialog wrappers have priority over the action buttons\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('dialog__wrapper')) {\n elements[i].classList.add('show');\n tempWidth += elements[i].offsetWidth;\n tempWidth += (elementMargin / 2);\n // If we have exceeded the safe area then lets break the loop\n if (tempWidth - (elementMargin / 2) > safeAreaWidth) {\n elements[i].classList.remove('show');\n break;\n }\n }\n }\n // Foreach action button \n for (let i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('btn-action')) {\n elements[i].classList.add('show');\n tempWidth += elements[i].offsetWidth;\n tempWidth += (elementMargin / 2);\n // If we have exceeded the safe area then lets break the loop\n if (tempWidth - (elementMargin / 2) > safeAreaWidth) {\n elements[i].classList.remove('show');\n break;\n }\n }\n }\n let overflowDialog = element.querySelector('.dialog-overflow');\n if (overflowDialog)\n overflowDialog.classList.add('d-none');\n // Decide which elements go into the overflow slot\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('btn-action') || elements[i].classList.contains('dialog__wrapper')) {\n if (!elements[i].classList.contains('show')) {\n // Move to the slot by changing the attribute\n elements[i].setAttribute('slot', overflowSlot);\n // if an element has been added to overflow slot then make sure we show the overflow menu button\n if (overflowDialog)\n overflowDialog.classList.remove('d-none');\n }\n }\n }\n });\n }\n // Check buttons on load and when the wrapper element gets resized.\n hideButtons();\n new ResizeObserver(hideButtons).observe(actionbarWrapper);\n // #endregion\n }\n static get observedAttributes() {\n return [\"data-selected\"];\n }\n attributeChangedCallback(attrName, oldVal, newVal) {\n switch (attrName) {\n case \"data-selected\": {\n let selectAll = this.shadowRoot.querySelector('.selectall');\n if (selectAll)\n setSelectAllInput(selectAll, newVal);\n const event = new CustomEvent(\"selected\", { detail: { selected: newVal } });\n this.dispatchEvent(event);\n if (newVal == \"all\" && this.hasAttribute('data-select-watch')) {\n const element = document.getElementById(this.getAttribute('data-select-watch'));\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n input.checked = true;\n if (input.closest('iam-card'))\n input.closest('iam-card').setAttribute('data-selected', 'true');\n });\n }\n if (newVal == \"0\" && this.hasAttribute('data-select-watch')) {\n const element = document.getElementById(this.getAttribute('data-select-watch'));\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n input.checked = false;\n if (input.closest('iam-card'))\n input.closest('iam-card').removeAttribute('data-selected', 'true');\n });\n }\n break;\n }\n }\n }\n}\nexport default iamActionbar;\n"],"names":["createEmbed","target","video_id","link_id","randLetter","onYouTubeIframeAPIReady","onPlayerReady","onPlayerStateChange","event","done","link","extendDialogs","body","dialog","index","createDialog","button","modalID","firstWidth","element","id","originalInput","changeEvent","btnElement","style","dialogDimensions","btn","parent","dataEvent","popover","position","topOffset","leftOffset","container","boundingRec","popoverBottom","windowPos","currentStyle","videoButton","createMultiFormDialog","dialogContent","titleElement","optionalElement","buttons","fieldsets","form","fieldset","btnWrapper","existingButton","validatedFieldsets","i","fieldsetID","e","validateFieldset","currentFieldset","currentFieldsetID","isFieldsetValid","input","step","fieldsetCount","validFieldsetCount","setSelectAllInput","value","iamActionbar","assetLocation","coreCSS","template","that","actionbarWrapper","selectAll","cancelButton","count","countChecked","btns","view","icon","switchEvent","searchBar","searchBtn","keyupEvent","submitEvent","hideButtons","wrapperWidth","screenWidth","safeAreaWidth","elementMargin","tabletSafeWidth","mobileSafeWidth","modifier","overflowSlot","elements","tempWidth","overflowDialog","attrName","oldVal","newVal"],"mappings":";;;IA0DO,MAAMA,EA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E,OAAQ,CAAE,SAAUuF,CAAQ,CAAA,CAAE,EAE1E,GADA,KAAK,cAAcvF,CAAK,EACpBuF,GAAU,OAAS,KAAK,aAAa,mBAAmB,EAAG,CAC3D,MAAM5E,EAAU,SAAS,eAAe,KAAK,aAAa,mBAAmB,CAAC,EAC9E,MAAM,KAAKA,EAAQ,iBAAiB,wBAAwB,CAAC,EAAE,QAAQ,CAACsC,EAAO3C,IAAU,CACrF2C,EAAM,QAAU,GACZA,EAAM,QAAQ,UAAU,GACxBA,EAAM,QAAQ,UAAU,EAAE,aAAa,gBAAiB,MAAM,CAC1F,CAAqB,EAEL,GAAIsC,GAAU,KAAO,KAAK,aAAa,mBAAmB,EAAG,CACzD,MAAM5E,EAAU,SAAS,eAAe,KAAK,aAAa,mBAAmB,CAAC,EAC9E,MAAM,KAAKA,EAAQ,iBAAiB,wBAAwB,CAAC,EAAE,QAAQ,CAACsC,EAAO3C,IAAU,CACrF2C,EAAM,QAAU,GACZA,EAAM,QAAQ,UAAU,GACxBA,EAAM,QAAQ,UAAU,EAAE,gBAAgB,gBAAiB,MAAM,CAC7F,CAAqB,EAEL,KACH,CACJ,CACJ,CACL"}
|
|
1
|
+
{"version":3,"file":"actionbar.component.min.js","sources":["../../modules/youtubevideo.js","../../modules/dialogs.js","actionbar.component.js"],"sourcesContent":["// @ts-nocheck\n/**\n * Integrate YouTube videos as a way of hosting videos without the overhead and worry surrounding hosting vides. i.e. file sizes, performance and accessibility.\n */\nclass youtubeVideo {\n /** @param {Element} embed dom element */\n constructor(embed) {\n // If the scripts is already loaded then lets just create the embed\n if (document.body.classList.contains('youtubeLoaded')) {\n embed.addEventListener('click', function (e) {\n // loop parent nodes from the target to the delegation node\n for (var target = e.target; target && target != this; target = target.parentNode) {\n if (target.matches('a')) {\n e.preventDefault();\n createEmbed(target);\n break;\n }\n }\n }, false);\n }\n else {\n this.loadScripts(embed, this.createEmbed);\n }\n }\n /**\n * Load the YouTube scripts before trying to create the embed\n * @param {HTMLElement} embed dom element\n */\n loadScripts(embed) {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = function () {\n // This code loads the IFrame Player API code asynchronously.\n var tag = document.createElement('script');\n tag.src = \"https://www.youtube.com/iframe_api\";\n var firstScriptTag = document.getElementsByTagName('script')[0];\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n document.body.classList.add('youtubeLoaded');\n resolve(true);\n // script has loaded, you can now use it safely\n tag.onload = () => {\n embed.addEventListener('click', function (event) {\n console.log('click');\n // loop parent nodes from the target to the delegation node\n if (event && event.target instanceof HTMLElement && event.target.closest('a')) {\n event.preventDefault();\n createEmbed(event.target.closest('a'));\n }\n }, false);\n };\n };\n image.onerror = function () {\n reject(false);\n };\n image.src = \"https://youtube.com/favicon.ico\";\n });\n }\n}\nexport const createEmbed = function (target) {\n // If there is more than one video lets make sure there is only one playing at a time.\n if (typeof window.player != \"undefined\" && typeof window.player.pauseVideo == \"function\")\n window.player.pauseVideo();\n var video_id = target.getAttribute('data-id');\n var link_id = target.getAttribute('id');\n // create an id to pass t the script if one isn't present\n if (typeof link_id == 'undefined' || link_id == null) {\n var randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26));\n link_id = randLetter + Date.now();\n target.setAttribute('id', link_id);\n }\n // This function creates an <iframe> (and YouTube player) after the API code downloads.\n function onYouTubeIframeAPIReady() {\n window.player = new YT.Player(link_id, {\n height: '100%',\n width: '100%',\n videoId: video_id,\n playerVars: {\n 'modestbranding': 1,\n 'playsinline': 1,\n 'rel': 0,\n 'showinfo': 0\n },\n events: {\n 'onReady': onPlayerReady,\n 'onStateChange': onPlayerStateChange\n }\n });\n }\n onYouTubeIframeAPIReady();\n // The API will call this function when the video player is ready.\n function onPlayerReady(event) {\n // Play the video straight away\n event.target.playVideo();\n }\n // The API calls this function when the player's state changes.\n // The function indicates that when playing a video (state=1)\n var done = false;\n function onPlayerStateChange(event) {\n if (event.data == YT.PlayerState.PLAYING && !done) {\n var link = document.getElementById(link_id);\n link.classList.add('player-ready');\n done = true;\n }\n }\n};\nexport default youtubeVideo;\n","// @ts-nocheck\nimport { createEmbed } from \"./youtubevideo.js\";\nconst extendDialogs = (body) => {\n Array.from(body.querySelectorAll('dialog[open]')).forEach((dialog, index) => {\n let parent = dialog.closest('.dialog__wrapper');\n if (!parent) {\n dialog.removeAttribute('open');\n dialog.showModal();\n dialog.focus();\n createDialog(dialog);\n }\n });\n // Dialogs/modals\n body.addEventListener('click', (event) => {\n if (event.target.tagName == 'IAM-ACTIONBAR')\n return false;\n // Modal\n if (event && event.target instanceof HTMLElement && event.target.closest('[data-modal]')) {\n const button = event.target.closest('[data-modal]');\n const modalID = button.hasAttribute('data-modal') ? button.getAttribute('data-modal') : button.getAttribute('data-filter');\n const dialog = document.querySelector(`dialog#${modalID}`);\n createDialog(dialog);\n // Open the modal!\n dialog.showModal();\n dialog.focus();\n let firstWidth = dialog.offsetWidth;\n dialog.setAttribute('style', `max-width: ${firstWidth}px;`);\n // When the modal is opened we want to make sure any duplicate checkboxes are matching the originals\n Array.from(dialog.querySelectorAll('[data-duplicate]')).forEach((element, index) => {\n const id = element.getAttribute('data-duplicate');\n const originalInput = document.getElementById(id);\n if (element.checked != originalInput.checked) {\n element.checked = originalInput.checked;\n let changeEvent = new Event('change');\n element.dispatchEvent(changeEvent);\n }\n });\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"openModal\",\n \"id\": modalID\n });\n }\n ;\n // Close modal\n if (event && event.target instanceof HTMLElement && event.target.closest('button.dialog__close')) {\n const dialog = event.target.closest('dialog[open]');\n event.preventDefault();\n dialog.close();\n // Remove active class from exiting active buttons\n Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement, index) => {\n btnElement.classList.remove('active');\n });\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"closeModal\",\n \"id\": dialog.getAttribute('id')\n });\n }\n // Track default close buttons\n if (event && event.target instanceof HTMLElement && event.target.closest('button[formmethod=\"dialog\"]')) {\n const dialog = event.target.closest('dialog[open]');\n // Remove active class from exiting active buttons\n Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement, index) => {\n btnElement.classList.remove('active');\n });\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"closeModal\",\n \"id\": dialog.getAttribute('id')\n });\n }\n // Close the modal when clicked on the backdrop\n if (event && event.target instanceof HTMLElement && event.target.closest('dialog[open]')) {\n let dialog = event.target.closest('dialog[open]');\n // Small fix to make sure the dialog isn't a dialog inside of a dialog.\n var style = window.getComputedStyle(dialog);\n if (style.display === 'contents')\n dialog = dialog.parentNode.closest('dialog[open]');\n // Dont allow the backdrop to be clicked when transactional\n if (!dialog.classList.contains('dialog--transactional') && !dialog.classList.contains('dialog--acknowledgement')) {\n const dialogDimensions = dialog.getBoundingClientRect();\n if (event.clientX < dialogDimensions.left || event.clientX > dialogDimensions.right || event.clientY < dialogDimensions.top || event.clientY > dialogDimensions.bottom) {\n if (!event.target.closest('input[type=\"radio\"]') && !event.target.closest('input[type=\"file\"]') && !event.target.closest('iam-fileupload')) // Weird bug when interacting with radio input fields within dialogs cuases it to close\n dialog.close();\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": \"closeModal\",\n \"id\": dialog.getAttribute('id')\n });\n }\n }\n }\n // Popover\n if (event && event.target instanceof HTMLElement && event.target.closest('.dialog__wrapper > button')) {\n event.stopPropagation();\n let btn = event.target.closest('.dialog__wrapper > button');\n let parent = btn.parentNode;\n let dataEvent = \"openPopover\";\n let popover = parent.querySelector(':scope > dialog');\n // close open dialogs\n if (document.querySelector('*:not([data-keep-open]) > dialog[open]') && document.querySelector('*:not([data-keep-open]) > dialog[open]') != popover) {\n // Check that the ope dialog isn't a parent of the dialog being opened\n if (btn.closest('dialog[open]') != document.querySelector('*:not([data-keep-open]) > dialog[open]')) {\n document.querySelector('*:not([data-keep-open]) > dialog[open]').close();\n }\n }\n // Remove active class from exiting active buttons\n Array.from(document.querySelectorAll('.dialog__wrapper > button')).forEach((btnElement, index) => {\n btnElement.removeAttribute('aria-expanded');\n });\n if (popover.hasAttribute('open')) {\n popover.close();\n dataEvent = \"closePopover\";\n popover.removeAttribute('style');\n btn.removeAttribute('aria-expanded');\n }\n else {\n popover.show();\n btn.setAttribute('aria-expanded', true);\n var position = btn.getBoundingClientRect();\n let topOffset = position.top;\n let leftOffset = position.left;\n if (btn.closest('iam-table')) {\n let container = btn.closest('iam-table').parentNode.getBoundingClientRect();\n topOffset -= container.top;\n leftOffset -= container.left;\n }\n if (popover.classList.contains('dialog--fix')) {\n popover.setAttribute('style', `position:fixed;top: ${topOffset}px; left: ${leftOffset}px; margin: 3rem 0 0 0;`);\n }\n }\n // When the dialog is fixed it could dip under the viewport\n // Lets check the dimensions and transform it to appear above\n let boundingRec = popover.getBoundingClientRect();\n let popoverBottom = boundingRec.bottom - window.scrollY;\n let windowPos = window.innerHeight - window.scrollY;\n if (popoverBottom > windowPos) {\n let currentStyle = popover.hasAttribute('style') ? popover.getAttribute('style') + ' ' : '';\n popover.setAttribute('style', currentStyle + `transform: translate(0, calc(-100% - 4rem))`);\n // Check that the dialog doesn't go over the top of the page\n boundingRec = popover.getBoundingClientRect();\n let popoverTop = boundingRec.top - window.scrollY;\n if (popoverTop < 100)\n popover.removeAttribute('style');\n }\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n \"event\": dataEvent,\n \"id\": btn.textContent\n });\n }\n ;\n // Close popovers when clicked away\n if (event && event.target instanceof HTMLElement && !event.target.closest('dialog[open]') && !event.target.closest('.dialog__wrapper > button')) {\n if (document.querySelector('.dialog__wrapper:not([data-keep-open]) > dialog[open]'))\n document.querySelector('.dialog__wrapper:not([data-keep-open]) > dialog[open]').close();\n Array.from(document.querySelectorAll('.dialog__wrapper:not([data-keep-open]) > button')).forEach((btnElement, index) => {\n btnElement.removeAttribute('aria-expanded');\n });\n }\n });\n return null;\n};\nexport const createDialog = (dialog) => {\n // Create the video embed\n let videoButton = dialog.querySelector('.youtube-embed a');\n if (videoButton) {\n createEmbed(videoButton);\n }\n // Multi dialog\n if (dialog.classList.contains('dialog--multi') && !dialog.querySelector(':scope > .steps')) {\n createMultiFormDialog(dialog);\n }\n // If you are using Vue eevents and bindings its recommended to add in the .mh-lg div manually to the dialog\n if (!dialog.querySelector(':scope .mh-lg') && !dialog.classList.contains('dialog--multi')) {\n dialog.innerHTML = `<div class=\"mh-lg\">${dialog.innerHTML}</div>`;\n let dialogContent = dialog.querySelector('.mh-lg');\n let titleElement = dialog.querySelector('.mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)');\n if (titleElement) {\n let optionalElement = titleElement.previousSibling;\n dialogContent.before(titleElement);\n if (optionalElement)\n titleElement.before(optionalElement);\n }\n }\n // Create close button is needed\n if (!dialog.querySelector(':scope > button:first-child'))\n dialog.insertAdjacentHTML('afterbegin', `<button class=\"dialog__close\">Close</button>`);\n};\nexport const createMultiFormDialog = (dialog) => {\n let buttons = \"\";\n let fieldsets = Array.from(dialog.querySelectorAll('fieldset[data-title]'));\n let form = dialog.querySelector('form');\n fieldsets.forEach((fieldset, index) => {\n buttons += `<button data-title=\"${fieldset.getAttribute('data-title')}\" type=\"button\" class=\"${index == 0 ? \"active\" : \"\"}\" tabindex=\"-1\">${fieldset.getAttribute('data-title')}</button>`;\n const btnWrapper = document.createElement(\"div\");\n btnWrapper.classList.add('btn--wrapper');\n fieldset.appendChild(btnWrapper);\n if (index != 0)\n btnWrapper.innerHTML += `<button data-title=\"${fieldsets[index - 1].getAttribute('data-title')}\" class=\"btn btn-secondary mb-0\" data-previous type=\"button\">Previous</button>`;\n if (index != fieldsets.length - 1)\n btnWrapper.innerHTML += `<button data-title=\"${fieldsets[index + 1].getAttribute('data-title')}\" class=\"btn btn-primary mb-0\" data-next type=\"button\">Next</button>`;\n // Last fieldset\n if (index == fieldsets.length - 1) {\n if (form && form.querySelector(':scope > button[type=\"submit\"]')) {\n let existingButton = form.querySelector(':scope > button[type=\"submit\"]');\n existingButton.classList.add('mb-0');\n btnWrapper.insertAdjacentElement('beforeend', existingButton);\n }\n else\n btnWrapper.innerHTML += `<button data-title=\"${fieldsets[index].getAttribute('data-title')}\" class=\"btn btn-primary mb-0\" data-next type=\"submit\">Submit</button>`;\n }\n });\n dialog.insertAdjacentHTML('afterbegin', `<div class=\"steps bg-primary\">${buttons}</div>`);\n // Open the fieldset with an error inside\n let validatedFieldsets = Array.from(dialog.querySelectorAll('fieldset.was-validated'));\n for (let i = 0; i < validatedFieldsets.length; i++) {\n let fieldset = validatedFieldsets[i];\n let fieldsetID = fieldset.getAttribute('data-title');\n if (fieldset.querySelector('.is-invalid')) {\n Array.from(dialog.querySelectorAll(`[data-title=\"${fieldsetID}\"]`)).forEach((element, index) => {\n element.classList.add('active');\n });\n break;\n }\n else {\n Array.from(dialog.querySelectorAll(`[data-title=\"${fieldsetID}\"]`)).forEach((element, index) => {\n element.classList.add('valid');\n });\n }\n }\n // Prevent the bubble messages\n dialog.addEventListener('invalid', (function () {\n return function (e) {\n e.preventDefault();\n };\n })(), true);\n function validateFieldset(button) {\n const currentFieldset = dialog.querySelector(`fieldset.active`) ? dialog.querySelector(`fieldset.active`) : dialog.querySelector(`fieldset[data-title]`);\n const currentFieldsetID = currentFieldset.getAttribute('data-title');\n let isFieldsetValid = true;\n currentFieldset.classList.add('was-validated');\n Array.from(currentFieldset.querySelectorAll('input')).forEach((input, index) => {\n if (!input.checkValidity())\n isFieldsetValid = false;\n });\n // If valid mode to next field set\n if (!isFieldsetValid) {\n Array.from(dialog.querySelectorAll(`[data-title=\"${currentFieldsetID}\"]`)).forEach((element, index) => {\n element.classList.remove('valid');\n });\n }\n else {\n Array.from(dialog.querySelectorAll(`[data-title=\"${currentFieldsetID}\"]`)).forEach((element, index) => {\n element.classList.add('valid');\n });\n }\n // Allow the previous button to navigate\n if (isFieldsetValid || !button.hasAttribute('data-next')) {\n const fieldset = dialog.querySelector(`fieldset[data-title=\"${button.getAttribute('data-title')}\"]`);\n const step = dialog.querySelector(`.steps button[data-title=\"${button.getAttribute('data-title')}\"]`);\n Array.from(dialog.querySelectorAll('button')).forEach((button, index) => {\n button.classList.remove('active');\n });\n Array.from(dialog.querySelectorAll('fieldset')).forEach((button, index) => {\n button.classList.remove('active');\n });\n step.classList.add('active');\n fieldset.classList.add('active');\n }\n let fieldsetCount = Array.from(dialog.querySelectorAll(`fieldset`)).length;\n let validFieldsetCount = Array.from(dialog.querySelectorAll(`fieldset.valid`)).length;\n // update the progress bar\n dialog.style.setProperty('--progress', `${(validFieldsetCount / (fieldsetCount - 1) * 100)}%`);\n }\n // remove error messages from server\n dialog.addEventListener('keydown', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button')) {\n const button = event.target.closest('button');\n if (event.keyCode == 13 && button.getAttribute('type') != \"submit\") {\n event.preventDefault();\n validateFieldset(button);\n }\n }\n if (event && event.target instanceof HTMLElement && event.target.closest('input')) {\n const input = event.target.closest('input');\n input.classList.remove('is-invalid');\n if (event.keyCode == 13) {\n event.preventDefault();\n }\n }\n });\n dialog.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button[type=\"submit\"]')) {\n const form = event.target.closest('form');\n form.classList.add('was-validated');\n }\n else if (event && event.target instanceof HTMLElement && event.target.closest('button[data-title]')) {\n const button = event.target.closest('button[data-title]');\n validateFieldset(button);\n }\n ;\n return null;\n });\n};\nexport default extendDialogs;\n","// @ts-nocheck\nimport extendDialogs from \"../../modules/dialogs.js\";\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n \"event\": \"customElementRegistered\",\n \"element\": \"action bar\"\n});\nfunction setSelectAllInput(element, value) {\n if (element && value == \"all\") {\n element.querySelector('input').indeterminate = false;\n element.querySelector('input').checked = true;\n element.querySelector('label').textContent = `Select all`;\n }\n else if (element && value == 0) {\n element.querySelector('input').indeterminate = false;\n element.querySelector('input').checked = false;\n element.querySelector('label').textContent = `Select all`;\n }\n else if (element && value) {\n element.querySelector('input').indeterminate = true;\n element.querySelector('input').checked = false;\n element.querySelector('label').textContent = `${value} item${value > 1 ? 's' : ''} selected`;\n }\n else if (element) {\n element.querySelector('input').checked = false;\n element.querySelector('input').indeterminate = false;\n element.querySelector('label').textContent = `Select all`;\n }\n}\nclass iamActionbar extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location') ? document.body.getAttribute('data-assets-location') : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css') ? document.body.getAttribute('data-core-css') : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/actionbar.css\";`;\n const loadExtraCSS = `@import \"${assetLocation}/css/components/actionbar.global.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n </style>\n <link rel=\"stylesheet\" href=\"https://kit.fontawesome.com/26fdbf0179.css\" crossorigin=\"anonymous\">\n <div class=\"actionbar__wrapper\">\n \n <div class=\"actionbar\">\n <slot name=\"selectall\"></slot>\n <div class=\"safe-area\">\n <slot></slot>\n <div class=\"body\">\n <div class=\"dialog__wrapper dialog__wrapper--right dialog-overflow d-none show\">\n <button class=\"btn btn-secondary btn-compact fa-ellipsis-vertical m-0\">More actions</button>\n <dialog class=\"dialog--list\">\n <slot name=\"overflow\"></slot>\n <slot name=\"menu\"></slot>\n </dialog>\n </div>\n <button class=\"btn btn-secondary btn-compact btn-sm fa-search\" data-search=\"\">Search</button>\n </div>\n </div>\n </div>\n <div class=\"actionbar--selected\">\n <div class=\"safe-area\">\n <slot name=\"selected\"></slot>\n <div class=\"body\">\n <div class=\"dialog__wrapper dialog__wrapper--right dialog-overflow d-none show\">\n <button class=\"btn btn-secondary btn-compact fa-ellipsis-vertical m-0\">More actions</button>\n <dialog class=\"dialog--list\">\n <slot name=\"selected-overflow\"></slot>\n </dialog>\n </div>\n </div>\n </div>\n </div>\n <div class=\"actionbar--search\">\n <button data-search class=\"btn btn-compact fa-xmark-large btn-secondary m-0\" >Close</button>\n\n <div class=\"search-wrapper\">\n <label for=\"search\" class=\"visually-hidden\">Input field label</label>\n <button class=\"suffix\"><i class=\"fa-regular fa-search\"></i></button>\n <input type=\"text\" id=\"search\" name=\"search\" required=\"\">\n </div>\n\n </div>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n // insert extra CSS\n if (!document.getElementById('actionbarGlobal'))\n document.head.insertAdjacentHTML('beforeend', `<style id=\"actionbarGlobal\">${loadExtraCSS}</style>`);\n }\n connectedCallback() {\n let that = this;\n const actionbarWrapper = this.shadowRoot.querySelector('.actionbar__wrapper');\n // #region select all\n if (this.hasAttribute('data-selectall')) {\n actionbarWrapper.insertAdjacentHTML('afterbegin', `<div class=\"selectall pb-0\"><input type=\"checkbox\" name=\"selectall\" id=\"selectall\"><label for=\"selectall\" class=\"m-0\">Select all</label></div>`);\n let selectAll = this.shadowRoot.querySelector('.selectall');\n if (this.hasAttribute('data-selected')) {\n setSelectAllInput(selectAll, this.getAttribute('data-selected'));\n }\n selectAll.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('input')) {\n if (event.target.closest('input').checked)\n this.setAttribute('data-selected', 'all');\n else\n this.setAttribute('data-selected', 0);\n }\n });\n let cancelButton = this.querySelector('button[data-cancel]');\n if (cancelButton) {\n cancelButton.addEventListener('click', (event) => {\n this.setAttribute('data-selected', 0);\n });\n }\n }\n // Wtach div for the select inputs\n if (this.hasAttribute('data-select-watch')) {\n const element = document.getElementById(this.getAttribute('data-select-watch'));\n element.setAttribute('data-select-container', 'true');\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n input.parentElement.setAttribute('slot', 'checkbox');\n });\n element.addEventListener('change', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('[type=\"checkbox\"]')) {\n let count = element.querySelectorAll('input[type=\"checkbox\"]').length;\n let countChecked = element.querySelectorAll('input[type=\"checkbox\"]:checked').length;\n that.setAttribute('data-selected', count == countChecked ? \"all\" : countChecked);\n let input = event.target.closest('[type=\"checkbox\"]');\n if (countChecked) {\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n if (input.closest('iam-card'))\n input.closest('iam-card').setAttribute('data-selected', 'true');\n });\n }\n else {\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n if (input.closest('iam-card'))\n input.closest('iam-card').removeAttribute('data-selected');\n });\n }\n }\n ;\n });\n }\n // #endregion\n // #region switchviews\n if (this.hasAttribute('data-switchviews')) {\n let btns = '';\n let viewList = this.getAttribute('data-switchviews').split(',');\n viewList.forEach((view, index) => {\n let icon = 'fa-grid-2';\n if (view == \"list\")\n icon = 'fa-grip-lines';\n else if (view == \"small\")\n icon = 'fa-bars';\n btns += `<button class=\"btn btn-action btn-compact mb-0 fa-regular ${icon}\">${view}</button>`;\n });\n actionbarWrapper.insertAdjacentHTML('afterbegin', `<div class=\"views m-0\">${btns}</div>`);\n let views = this.shadowRoot.querySelector('.views');\n views.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('.btn-action')) {\n let btn = event.target.closest('.btn-action');\n this.setAttribute('data-view', btn.textContent);\n const switchEvent = new CustomEvent(\"switch-view\", { detail: { view: btn.textContent } });\n this.dispatchEvent(switchEvent);\n }\n });\n }\n // #endregion\n // #region search\n const searchBar = this.shadowRoot.querySelector('.actionbar--search');\n if (this.hasAttribute('data-search-value')) {\n this.shadowRoot.querySelector('#search').value = this.getAttribute('data-search-value');\n }\n if (this.hasAttribute('data-search') && this.getAttribute('data-search') == 'show')\n searchBar.classList.add('show');\n const searchBtn = this.shadowRoot.querySelector('button[data-search]');\n this.shadowRoot.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button[data-search]')) {\n searchBar.classList.toggle('show');\n searchBtn.toggleAttribute('aria-expanded');\n }\n });\n searchBar.addEventListener('keyup', (event) => {\n const keyupEvent = new CustomEvent(\"search-keyup\", { detail: { search: searchBar.querySelector('input').value } });\n this.dispatchEvent(keyupEvent);\n });\n searchBar.addEventListener('change', (event) => {\n const changeEvent = new CustomEvent(\"search-change\", { detail: { search: searchBar.querySelector('input').value } });\n this.dispatchEvent(changeEvent);\n });\n searchBar.addEventListener('click', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.closest('button.suffix')) {\n const submitEvent = new CustomEvent(\"search-submit\", { detail: { search: searchBar.querySelector('input').value } });\n this.dispatchEvent(submitEvent);\n }\n });\n // #endregion\n // Make sure dialogs created in the shadow dom work\n Array.from(this.shadowRoot.querySelectorAll('.body')).forEach((element, index) => {\n extendDialogs(element);\n });\n // #region Reponsive safe area\n function hideButtons() {\n const wrapperWidth = actionbarWrapper.scrollWidth;\n const screenWidth = document.documentElement.scrollWidth;\n let safeAreaWidth = 750;\n let elementMargin = 16;\n let tabletSafeWidth = 450;\n let mobileSafeWidth = that.hasAttribute('data-switchviews') ? 144 : 210;\n if (that.hasAttribute('data-large-safe-area')) {\n safeAreaWidth = 1048;\n tabletSafeWidth = 620;\n mobileSafeWidth = 260;\n }\n // We need to modify the widths to mimic the CSS's scaling functionality\n let modifier = 1;\n if (screenWidth >= 992 && screenWidth <= 1280) {\n modifier = screenWidth / 1280;\n }\n else if (screenWidth >= 576 && screenWidth < 992) {\n modifier = screenWidth / 768;\n }\n else if (screenWidth < 576) {\n modifier = screenWidth / 375;\n }\n // Work out the safe sapce width depending upon the wrappers width and modifier comp\n if (wrapperWidth >= 992 && wrapperWidth <= 1280) {\n safeAreaWidth = safeAreaWidth * modifier;\n }\n else if (wrapperWidth >= 576 && wrapperWidth < 992) {\n safeAreaWidth = tabletSafeWidth * modifier;\n }\n else if (wrapperWidth < 576) {\n safeAreaWidth = mobileSafeWidth * modifier;\n }\n // Margin in between elements\n elementMargin = elementMargin * modifier;\n // If the wrapper width is small we want to reduce the btn sizes by adding or removing btn-compact classes\n if (wrapperWidth < 576) {\n Array.from(that.querySelectorAll(':scope > .btn:not(.js-updated), :scope > .dialog__wrapper > .btn[class*=\"fa-\"]:first-child:not(.js-updated)')).forEach((element, index) => {\n element.className = element.className.replace(' btn-compact', ' _btn-compact');\n element.classList.add('btn-compact');\n element.classList.add('js-updated');\n });\n }\n else {\n Array.from(that.querySelectorAll(':scope > .btn.js-updated, :scope > .dialog__wrapper > .btn.js-updated:first-child')).forEach((element, index) => {\n element.classList.remove('btn-compact');\n element.classList.remove('js-updated');\n element.className = element.className.replace(' _btn-compact', ' btn-compact');\n });\n }\n // Reset the elements before we decide what elements become slotted into the overflow\n Array.from(that.querySelectorAll('[slot]')).forEach((element, index) => {\n if (element.getAttribute(\"slot\") == \"overflow\")\n element.removeAttribute('slot');\n if (element.getAttribute(\"slot\") == \"selected-overflow\")\n element.setAttribute('slot', 'selected');\n });\n Array.from(that.querySelectorAll('.show')).forEach((element, index) => {\n element.classList.remove('show');\n });\n // Foreach safe area lets check what elements are slotted in them and if they need an overflow\n Array.from(that.shadowRoot.querySelectorAll('.safe-area')).forEach((element, index) => {\n // Decide on which overflow slot to use\n let overflowSlot = \"overflow\";\n if (element.querySelector('slot').hasAttribute('name') && element.querySelector('slot').getAttribute('name') == \"selected\")\n overflowSlot = \"selected-overflow\";\n // Get the slotted elements, remember they aren't children of the safe area\n let elements = element.querySelector('slot').assignedElements();\n let tempWidth = 44 * modifier; // Allow space for the overflow button\n // If search then allow for the search button width\n if (that.hasAttribute('data-search'))\n tempWidth += 44 * modifier;\n // Foreach element that isn't an action button or dialog wrapper add to the width, these will not be moved into the overflow slot\n for (let i = 0; i < elements.length; i++) {\n if (!elements[i].classList.contains('btn-action') && !elements[i].classList.contains('dialog__wrapper')) {\n tempWidth += elements[i].offsetWidth;\n tempWidth += elementMargin;\n }\n }\n // Foreach dialog wrapper decide if safe in safe area or move into the overflow slot, dialog wrappers have priority over the action buttons\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('dialog__wrapper')) {\n elements[i].classList.add('show');\n tempWidth += elements[i].offsetWidth;\n tempWidth += (elementMargin / 2);\n // If we have exceeded the safe area then lets break the loop\n if (tempWidth - (elementMargin / 2) > safeAreaWidth) {\n elements[i].classList.remove('show');\n break;\n }\n }\n }\n // Foreach action button \n for (let i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('btn-action')) {\n elements[i].classList.add('show');\n tempWidth += elements[i].offsetWidth;\n tempWidth += (elementMargin / 2);\n // If we have exceeded the safe area then lets break the loop\n if (tempWidth - (elementMargin / 2) > safeAreaWidth) {\n elements[i].classList.remove('show');\n break;\n }\n }\n }\n let overflowDialog = element.querySelector('.dialog-overflow');\n if (overflowDialog)\n overflowDialog.classList.add('d-none');\n // Decide which elements go into the overflow slot\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('btn-action') || elements[i].classList.contains('dialog__wrapper')) {\n if (!elements[i].classList.contains('show')) {\n // Move to the slot by changing the attribute\n elements[i].setAttribute('slot', overflowSlot);\n // if an element has been added to overflow slot then make sure we show the overflow menu button\n if (overflowDialog)\n overflowDialog.classList.remove('d-none');\n }\n }\n }\n });\n }\n // Check buttons on load and when the wrapper element gets resized.\n hideButtons();\n new ResizeObserver(hideButtons).observe(actionbarWrapper);\n // #endregion\n }\n static get observedAttributes() {\n return [\"data-selected\"];\n }\n attributeChangedCallback(attrName, oldVal, newVal) {\n switch (attrName) {\n case \"data-selected\": {\n let selectAll = this.shadowRoot.querySelector('.selectall');\n if (selectAll)\n setSelectAllInput(selectAll, newVal);\n const event = new CustomEvent(\"selected\", { detail: { selected: newVal } });\n this.dispatchEvent(event);\n if (newVal == \"all\" && this.hasAttribute('data-select-watch')) {\n const element = document.getElementById(this.getAttribute('data-select-watch'));\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n input.checked = true;\n if (input.closest('iam-card'))\n input.closest('iam-card').setAttribute('data-selected', 'true');\n });\n }\n if (newVal == \"0\" && this.hasAttribute('data-select-watch')) {\n const element = document.getElementById(this.getAttribute('data-select-watch'));\n Array.from(element.querySelectorAll('input[type=\"checkbox\"]')).forEach((input, index) => {\n input.checked = false;\n if (input.closest('iam-card'))\n input.closest('iam-card').removeAttribute('data-selected', 'true');\n });\n }\n break;\n }\n }\n }\n}\nexport default iamActionbar;\n"],"names":["createEmbed","target","video_id","link_id","randLetter","onYouTubeIframeAPIReady","onPlayerReady","onPlayerStateChange","event","done","link","extendDialogs","body","dialog","index","createDialog","button","modalID","firstWidth","element","id","originalInput","changeEvent","btnElement","style","dialogDimensions","btn","parent","dataEvent","popover","position","topOffset","leftOffset","container","boundingRec","popoverBottom","windowPos","currentStyle","videoButton","createMultiFormDialog","dialogContent","titleElement","optionalElement","buttons","fieldsets","form","fieldset","btnWrapper","existingButton","validatedFieldsets","i","fieldsetID","e","validateFieldset","currentFieldset","currentFieldsetID","isFieldsetValid","input","step","fieldsetCount","validFieldsetCount","setSelectAllInput","value","iamActionbar","assetLocation","coreCSS","template","that","actionbarWrapper","selectAll","cancelButton","count","countChecked","btns","view","icon","switchEvent","searchBar","searchBtn","keyupEvent","submitEvent","hideButtons","wrapperWidth","screenWidth","safeAreaWidth","elementMargin","tabletSafeWidth","mobileSafeWidth","modifier","overflowSlot","elements","tempWidth","overflowDialog","attrName","oldVal","newVal"],"mappings":";;;IA0DO,MAAMA,EAAc,SAAUC,EAAQ,CAErC,OAAO,OAAO,OAAU,KAAe,OAAO,OAAO,OAAO,YAAc,YAC1E,OAAO,OAAO,aAClB,IAAIC,EAAWD,EAAO,aAAa,SAAS,EACxCE,EAAUF,EAAO,aAAa,IAAI,EAEtC,GAAI,OAAOE,EAAW,KAAeA,GAAW,KAAM,CAClD,IAAIC,EAAa,OAAO,aAAa,GAAK,KAAK,MAAM,KAAK,SAAW,EAAE,CAAC,EACxED,EAAUC,EAAa,KAAK,MAC5BH,EAAO,aAAa,KAAME,CAAO,EAGrC,SAASE,GAA0B,CAC/B,OA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AU,GACZA,EAAM,QAAQ,UAAU,GACxBA,EAAM,QAAQ,UAAU,EAAE,aAAa,gBAAiB,MAAM,CAC1F,CAAqB,EAEL,GAAIsC,GAAU,KAAO,KAAK,aAAa,mBAAmB,EAAG,CACzD,MAAM5E,EAAU,SAAS,eAAe,KAAK,aAAa,mBAAmB,CAAC,EAC9E,MAAM,KAAKA,EAAQ,iBAAiB,wBAAwB,CAAC,EAAE,QAAQ,CAACsC,EAAO3C,IAAU,CACrF2C,EAAM,QAAU,GACZA,EAAM,QAAQ,UAAU,GACxBA,EAAM,QAAQ,UAAU,EAAE,gBAAgB,gBAAiB,MAAM,CAC7F,CAAqB,EAEL,KACH,CACJ,CACJ,CACL"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/import k from"js-cookie";var A=function(L,i,o,s){function m(c){return c instanceof o?c:new o(function(u){u(c)})}return new(o||(o=Promise))(function(c,u){function b(n){try{f(s.next(n))}catch(p){u(p)}}function v(n){try{f(s.throw(n))}catch(p){u(p)}}function f(n){n.done?c(n.value):m(n.value).then(b,v)}f((s=s.apply(L,i||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class $ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/function A(r,i){function d(e,t,s=!0){let f=!1,l=t.getAttribute("name");if(!l)return!1;l.includes("[]")&&(l=l.replace("[]",`[${t.value}]`));let a=e.querySelector(`[data-name="${l}"]`);a&&t.getAttribute("type")=="checkbox"&&(f=!t.checked);let h=t.getAttribute("data-filter-text");if(a||(a=document.createElement("button"),e.appendChild(a)),a.setAttribute("type","button"),a.classList.add("filter"),a.classList.add("tag"),s&&a.classList.add("tag--not-set"),a.setAttribute("data-name",l),a.innerHTML=h.replace("$value",t.value),(!t.value||f)&&a.remove(),t.parentNode.closest("[data-filter-text]")){let m=t.parentNode.closest("[data-filter-text]"),o=!0;if(l="",m.querySelectorAll("input").forEach((u,c)=>{let p=u.getAttribute("name");if(l+=`${c!=0?",":""}${p}`,e.querySelector(`[data-name="${p}"]`)&&e.querySelector(`[data-name="${p}"]`).remove(),u.value){let n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),s&&a.classList.add("tag--not-set"),n.setAttribute("data-name",p),n.innerHTML=h.replace("$value",u.value),e.appendChild(n)}else o=!1}),e.querySelector(`[data-name="${l}"]`)&&e.querySelector(`[data-name="${l}"]`).remove(),o){let u=m.getAttribute("data-filter-text");m.querySelectorAll("input").forEach((p,n)=>{let y=p.getAttribute("name");e.querySelector(`[data-name="${y}"]`)&&e.querySelector(`[data-name="${y}"]`).remove(),u=u.replace(`$${n+1}`,p.value)});let c=document.createElement("button");c.setAttribute("type","button"),c.classList.add("filter"),c.classList.add("tag"),s&&a.classList.add("tag--not-set"),c.setAttribute("data-name",l),c.innerHTML=u,e.appendChild(c)}}}Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{d(i,e,!1)});let b=r.closest("dialog");b&&new MutationObserver(function(t){t[0].attributeName=="open"&&Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((s,f)=>{d(i,s,!1)})}).observe(b,{attributes:!0}),r.addEventListener("tags-set",function(e){i.innerHTML="",Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((t,s)=>{d(i,t,!1)})}),Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{e.addEventListener("change",function(s){r.hasAttribute("data-keep-same")||d(i,e),s.stopPropagation()})}),r.addEventListener("change",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){let t=e.target.closest("input[data-filter-text]");r.hasAttribute("data-keep-same")||d(i,t)}}),i.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){let f=e.target.closest(".filter"),l=f.getAttribute("data-name").split(",");for(var t=0;t<l.length;t++){let a=l[t],h=`[name="${a}"]`;a.match(/\[(.*)\]/)&&(a.replace(/\[(.*)\]/,"[]"),h=`[value="${a.replace(/.*\[(.*)\]/,"$1")}"]`);let m=r.querySelectorAll(h);for(var s=0;s<m.length;s++){let o=m[s];if(o.getAttribute("type")!="radio"&&o.getAttribute("type")!="checkbox"){o.value="";var e=new Event("force");r.hasAttribute("data-nosubmit")||o.closest("form").dispatchEvent(e)}else{o.checked=!1;var e=new Event("force");r.hasAttribute("data-nosubmit")||o.closest("form").dispatchEvent(e)}}}f.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",d=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`;let b=this.classList.toString();const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)')&&this.classList.add("card--has-icon");let e=this.classList.toString();const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/function b(l,r){var n;let s=l.querySelector(".carousel__inner"),i=l.querySelector(".carousel__controls"),e=r.querySelectorAll(".col").length;s.addEventListener("scroll",function(o){clearTimeout(n),n=setTimeout(function(){let t=s.clientWidth,c=s.scrollWidth,d=s.scrollLeft,a=Math.round(d/c*e)+1,h=r.querySelector(".col:last-child").offsetLeft+50;s.scrollLeft+t>=h&&(a=e),Array.from(l.querySelectorAll(".carousel__controls button")).forEach((u,f)=>{u.removeAttribute("aria-current")}),l.querySelector(".control-"+a).setAttribute("aria-current",!0),a==1?l.querySelector(".btn-prev").setAttribute("disabled","disabled"):l.querySelector(".btn-prev").removeAttribute("disabled"),a==e?l.querySelector(".btn-next").setAttribute("disabled","disabled"):l.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),i.addEventListener("click",function(o){for(var t=o.target;t&&t!=this;t=t.parentNode)if(typeof t.matches=="function"&&t.matches("button")){o.preventDefault(),Array.from(i.querySelectorAll("button")).forEach((d,a)=>{d.removeAttribute("aria-current")}),t.setAttribute("aria-current",!0);const c=r.querySelector(`*:nth-child(${t.getAttribute("data-slide")})`);s.scroll({top:0,left:c.offsetLeft,behavior:"smooth"});break}},!1),l.addEventListener("click",function(o){for(var t=o.target;t&&t!=this;t=t.parentNode)if(typeof t.matches=="function"&&t.matches(".btn-next, .btn-prev")){o.preventDefault();let c=t.classList.contains("btn-prev")?s.scrollLeft-s.clientWidth:s.scrollLeft+s.clientWidth;s.scroll({top:0,left:c,behavior:"smooth"});break}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"carousel"});class m extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const r=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${r}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.6.1-
|
|
2
|
+
* iamKey v5.6.1-beta5
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class a extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -23,7 +23,7 @@ class iamFileupload extends HTMLElement {
|
|
|
23
23
|
<div class="file-upload">
|
|
24
24
|
<span class="file-upload__title">Upload file</span>
|
|
25
25
|
<p class="helper-text"><slot name="helper"></slot></p>
|
|
26
|
-
<button class="btn btn-primary"><slot name="btn"></slot> Upload ${this.hasAttribute('data-filetype') ? this.getAttribute('data-filetype') : 'file'}</button>
|
|
26
|
+
<button class="btn btn-primary" type="button"><slot name="btn"></slot> Upload ${this.hasAttribute('data-filetype') ? this.getAttribute('data-filetype') : 'file'}</button>
|
|
27
27
|
<div class="drop-area"></div>
|
|
28
28
|
<hr/>
|
|
29
29
|
<slot></slot>
|