@iamproperty/components 7.1.0--beta4 → 7.1.0--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/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +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/barchart/barchart.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.min.js +1 -1
- package/assets/js/components/filter-card/filter-card.component.min.js +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.min.js +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/record-card/record-card.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.js +2 -2
- package/assets/js/components/tabs/tabs.component.min.js +4 -4
- package/assets/js/components/tabs/tabs.component.min.js.map +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components.bundle.js +1 -1
- package/assets/js/modules/tabs.js +1 -0
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/ts/components/tabs/tabs.component.ts +2 -2
- package/assets/ts/modules/tabs.ts +1 -0
- package/dist/components.es.js +11 -11
- package/dist/components.umd.js +41 -41
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class a extends HTMLElement{constructor(){var t;super(),this.attachShadow({mode:"open"});const e=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"):`${e}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const M=o=>(Array.from(o.querySelectorAll("dialog[open]")).forEach((t,a)=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),E(t))}),o.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){const a=t.target.closest("[data-modal]"),s=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),n=document.querySelector(`dialog#${s}`);if(E(n),n.showModal(),n.focus(),!n.querySelector("iam-multi-step")){const i=n.offsetWidth;n.setAttribute("style",`max-width: ${i}px;`)}Array.from(n.querySelectorAll("[data-duplicate]")).forEach((i,f)=>{const h=i.getAttribute("data-duplicate"),d=document.getElementById(h);if(i.checked!=d.checked){i.checked=d.checked;const w=new Event("change");i.dispatchEvent(w)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:s})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){const a=t.target.closest("dialog[open]");t.preventDefault(),a.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((n,i)=>{n.classList.remove("active")});const s=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:a.id}});t.target.dispatchEvent(s),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){const a=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((s,n)=>{s.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){let a=t.target.closest("dialog[open]");if(window.getComputedStyle(a).display==="contents"&&(a=a.parentNode.closest("dialog[open]")),!a.classList.contains("dialog--transactional")&&!a.classList.contains("dialog--acknowledgement")){const n=a.getBoundingClientRect();(t.clientX<n.left||t.clientX>n.right||t.clientY<n.top||t.clientY>n.bottom)&&(t.target.closest("dialog *")||a.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:a.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();const a=t.target.closest(".dialog__wrapper > button"),s=a.parentNode;let n="openPopover";const i=s.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=i&&a.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((w,_)=>{w.removeAttribute("aria-expanded")}),i.hasAttribute("open"))i.close(),n="closePopover",i.removeAttribute("style"),a.removeAttribute("aria-expanded");else{i.show(),a.setAttribute("aria-expanded",!0);const w=a.getBoundingClientRect();let _=w.top,e=w.left;if(a.closest("iam-table")){const r=a.closest("iam-table").parentNode.getBoundingClientRect();_-=r.top,e-=r.left}i.classList.contains("dialog--fix")&&i.setAttribute("style",`position:fixed;top: ${_}px; left: ${e}px; margin: 3rem 0 0 0;`)}let f=i.getBoundingClientRect();const h=f.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(h>d){const w=i.hasAttribute("style")?i.getAttribute("style")+" ":"";i.setAttribute("style",w+"transform: translate(0, calc(-100% - 4rem))"),f=i.getBoundingClientRect(),f.top-window.scrollY<100&&i.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:n,id:a.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.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((a,s)=>{a.removeAttribute("aria-expanded")}))}),null),E=o=>{if(!o.querySelector(":scope .mh-lg")&&!o.querySelector("iam-multi-step")){o.innerHTML=`<div class="mh-lg">${o.innerHTML}</div>`;const t=o.querySelector(".mh-lg"),a=o.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){const s=a.previousSibling;t.before(a),s&&a.before(s)}}o.querySelector(":scope > button:first-child")||o.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function q(o,t){o&&t=="all"?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!0,o.querySelector("label").textContent="Select all"):o&&t==0?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!1,o.querySelector("label").textContent="Select all"):o&&t?(o.querySelector("input").indeterminate=!0,o.querySelector("input").checked=!1,o.querySelector("label").textContent=`${t} item${t>1?"s":""} selected`):o&&(o.querySelector("input").checked=!1,o.querySelector("input").indeterminate=!1,o.querySelector("label").textContent="Select all")}class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/import x from"js-cookie";var g=function(S,c,a,i){function n(u){return u instanceof a?u:new a(function(p){p(u)})}return new(a||(a=Promise))(function(u,p){function b(d){try{m(i.next(d))}catch(f){p(f)}}function v(d){try{m(i.throw(d))}catch(f){p(f)}}function m(d){d.done?u(d.value):n(d.value).then(b,v)}m((i=i.apply(S,c||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class j extends HTMLElement{constructor(){var c;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function A(o,i){function u(e,t,r=!0){let p=!1,a=t.getAttribute("name");if(!a)return!1;a.includes("[]")&&(a=a.replace("[]",`[${t.value}]`));let s=e.querySelector(`[data-name="${a}"]`);s&&t.getAttribute("type")=="checkbox"&&(p=!t.checked);const h=t.getAttribute("data-filter-text");if(s||(s=document.createElement("button"),e.appendChild(s)),s.setAttribute("type","button"),s.classList.add("filter"),s.classList.add("tag"),r&&s.classList.add("tag--not-set"),s.setAttribute("data-name",a),s.innerHTML=h.replace("$value",t.value),(!t.value||p)&&s.remove(),t.parentNode.closest("[data-filter-text]")){const c=t.parentNode.closest("[data-filter-text]");let l=!0;if(a="",c.querySelectorAll("input").forEach((f,n)=>{const m=f.getAttribute("name");if(a+=`${n!=0?",":""}${m}`,e.querySelector(`[data-name="${m}"]`)&&e.querySelector(`[data-name="${m}"]`).remove(),f.value){const d=document.createElement("button");d.setAttribute("type","button"),d.classList.add("filter"),d.classList.add("tag"),r&&s.classList.add("tag--not-set"),d.setAttribute("data-name",m),d.innerHTML=h.replace("$value",f.value),e.appendChild(d)}else l=!1}),e.querySelector(`[data-name="${a}"]`)&&e.querySelector(`[data-name="${a}"]`).remove(),l){let f=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((m,d)=>{const y=m.getAttribute("name");e.querySelector(`[data-name="${y}"]`)&&e.querySelector(`[data-name="${y}"]`).remove(),f=f.replace(`$${d+1}`,m.value)});const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.classList.add("tag"),r&&s.classList.add("tag--not-set"),n.setAttribute("data-name",a),n.innerHTML=f,e.appendChild(n)}}}Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{u(i,e,!1)});const b=o.closest("dialog");b&&new MutationObserver(function(t){t[0].attributeName=="open"&&Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((r,p)=>{u(i,r,!1)})}).observe(b,{attributes:!0}),o.addEventListener("tags-set",function(e){i.innerHTML="",Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((t,r)=>{u(i,t,!1)})}),Array.from(o.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((e,t)=>{e.addEventListener("change",function(r){o.hasAttribute("data-keep-same")||u(i,e),r.stopPropagation()})}),o.addEventListener("change",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){const t=e.target.closest("input[data-filter-text]");o.hasAttribute("data-keep-same")||u(i,t)}}),i.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){const t=e.target.closest(".filter"),r=t.getAttribute("data-name").split(",");for(let p=0;p<r.length;p++){const a=r[p];let s=`[name="${a}"]`;a.match(/\[(.*)\]/)&&(a.replace(/\[(.*)\]/,"[]"),s=`[value="${a.replace(/.*\[(.*)\]/,"$1")}"]`);const h=o.querySelectorAll(s);for(let c=0;c<h.length;c++){const l=h[c];if(l.getAttribute("type")!="radio"&&l.getAttribute("type")!="checkbox"){l.value="";var e=new Event("force");o.hasAttribute("data-nosubmit")||l.closest("form").dispatchEvent(e)}else{l.checked=!1;var e=new Event("force");o.hasAttribute("data-nosubmit")||l.closest("form").dispatchEvent(e)}}}t.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",u=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,b=this.classList.toString(),e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const x=(e,t)=>{for(let a=1;a<=10;a++){if(e.hasAttribute(`data-colour-${a}`)){const i=e.getAttribute(`data-colour-${a}`);e.style.setProperty(`--chart-colour-${a}`,`var(--chart-colour-${i})`),e.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${i}-hover)`)}Array.from(t.querySelectorAll(`[data-colour-${a}]`)).forEach(i=>{const r=i.getAttribute(`data-colour-${a}`);i.style.setProperty(`--chart-colour-${a}-set`,`var(--chart-colour-${r})`),i.style.setProperty(`--chart-colour-${a}-hover`,`var(--chart-colour-${r}-hover)`)})}return!0},u=(e,t,a)=>{const i=t.querySelector(".chart__key");i.innerHTML="";const r=t.querySelector(".chart__guidelines");r.innerHTML="";const o=t.querySelector(".chart__yaxis");o.innerHTML="",Array.from(t.querySelectorAll(':scope > input[type="checkbox"],:scope > input[type="radio"]')).map(n=>{n.remove()});const{xaxis:c}=d(e);return _(e,a),S(t,a,i),q(e,r),M(e,o),c&&T(t),!0},k=function(e,t){const a=t.querySelector(".chart");a.addEventListener("mousemove",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest("td:not(:first-child")){const l=c.target.closest("td:not(:first-child").getBoundingClientRect(),s=c.clientX-l.left,h=c.clientY-l.top;a.setAttribute("style",`--cursor-x: ${s}px; --cursor-y: ${h}px;`)}});const i=t.querySelectorAll("label");Array.from(i).forEach(c=>{t.querySelector(`input#${c.getAttribute("for")}`).checked?c.setAttribute("part","key-checked"):c.setAttribute("part","key-unchecked")});const r=e.querySelector("table"),o=t.querySelector("table");t.addEventListener("change",function(c){const n=c.target,l=new CustomEvent("view-change",{detail:{"data-dataset":n.getAttribute("data-dataset"),label:n.getAttribute("data-label"),checked:n.checked}});e.dispatchEvent(l),Array.from(i).forEach(s=>{var h;!((h=t.querySelector(`input#${s.getAttribute("for")}`))===null||h===void 0)&&h.checked?s.setAttribute("part","key-checked"):s.setAttribute("part","key-unchecked")}),o.innerHTML=r.innerHTML,_(e,o)})},A=function(e,t){const a=e.querySelector("table"),i=t.querySelector("table"),r=(l,s)=>{s.disconnect(),n.disconnect();for(const h of l)(h.attributeName=="class"||h.type==="attributes"||h.type==="attributes")&&(i.innerHTML=a.innerHTML,u(e,t,i));s.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0})},o=(l,s)=>{s.disconnect(),n.disconnect();for(const h of l)(h.type=="characterData"||h.type=="childList"&&h.addedNodes.length)&&(i.innerHTML=a.innerHTML,u(e,t,i));s.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0})},c=new MutationObserver(o),n=new MutationObserver(r);return c.observe(a,{characterData:!0,subtree:!0}),n.observe(e,{attributes:!0}),!0},d=function(e){const t=e.shadowRoot.querySelector(".chart__wrapper table"),a=e.hasAttribute("data-min")?e.getAttribute("data-min"):0,i=e.hasAttribute("data-max")?e.getAttribute("data-max"):z(e,t),r=e.hasAttribute("data-yaxis")?e.getAttribute("data-yaxis").split(","):[],o=e.hasAttribute("data-guidelines")?e.getAttribute("data-guidelines").split(","):[],c=e.hasAttribute("data-xaxis")?e.getAttribute("data-xaxis").split(","):null;return{min:a,max:i,yaxis:r,xaxis:c,guidelines:o}};function z(e,t){const a=e.classList.contains("chart--stacked")?"tbody tr":"tbody td:not(:first-child)",i=Array.from(t.querySelectorAll(a)).map(o=>o.getAttribute("data-numeric")),r=Math.max(...i);return Math.ceil(r)}const b=function(e,t,a,i){let r=String(e);r=r.replace("\xA3",""),r=r.replace("%",""),r=r.replace(",",""),r=Number.parseFloat(r);let o=(r-t)/(a-t)*100,c=o,n=0;return i&&i!=0&&(n=(i-t)/(a-t)*100),t<0&&(n=Math.abs(t/(a-t)*100),r<0?(o=n-o,n=n-o,c=n):(o=o-n,c=o+n)),{percent:o,axis:c,bottom:n}},_=function(e,t){Array.from(t.querySelectorAll("tbody tr")).forEach(r=>{let o=0;Array.from(r.querySelectorAll("td:not(:first-child)")).forEach(c=>{const n=parseFloat(c.textContent.replace("\xA3","").replace("%","").replace(",",""));c.setAttribute("data-numeric",n),c.setAttribute("data-value",c.textContent),getComputedStyle(c).display!="none"&&(o+=n)}),r.setAttribute("data-numeric",o)});const{min:a,max:i}=d(e);Array.from(t.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=r.querySelector("td:first-child, th:first-child")?r.querySelector("td:first-child, th:first-child").textContent:"";r.setAttribute("part","group");const n=(r.getAttribute("data-numeric")-a)/(i-a)*100;r.style.setProperty("--percent",`${n}%`),Array.from(r.querySelectorAll("td:not([data-label])")).forEach((h,p)=>{p==0?h.setAttribute("part","xaxis-label"):h.setAttribute("part","value"),r.querySelectorAll("td").length>2&&h.setAttribute("data-label",t.querySelectorAll("thead th")[p].textContent)});const l=r.hasAttribute("data-min")?r.getAttribute("data-min"):a,s=r.hasAttribute("data-max")?r.getAttribute("data-max"):i;if(l<0){const h=Math.abs(l/(s-l)*100);e.setAttribute("style",`--min-bottom: ${h}%;`)}r.style.setProperty("--row-index",o+1),Array.from(r.querySelectorAll('td[data-numeric]:not([data-label="Min"]):not([data-label="Max"]):not(:first-child)')).forEach(h=>{if(getComputedStyle(h).display=="none")return;const f=h.innerHTML,v=Number.parseFloat(h.getAttribute("data-numeric")),m=Number.parseFloat(h.getAttribute("data-start"));if(h.querySelector("span[data-group]")||(h.innerHTML=`<span data-group="${c}" ${h.hasAttribute("data-label")?`data-label="${h.getAttribute("data-label")}"`:""} part="popover">${f}</span>`),!h.hasAttribute("style")){const{percent:y,bottom:g,axis:w}=b(v,l,s,m);h.setAttribute("data-percent",y),h.setAttribute("style",`--bottom:${g}%;--percent:${y}%;--axis:${w}%;`)}})})},C=function(e){const t=e.querySelector(".chart__wrapper"),a=e.querySelector(".chart__spacer span"),i=e.querySelector(".chart table");let r="";Array.from(i.querySelectorAll("tbody tr td:first-child")).forEach(o=>{typeof o.textContent<"u"&&o.textContent.length>r.length&&(r=o.textContent)}),t.setAttribute("data-longest-label",r),a.innerHTML=r},$=function(e){const t=e.querySelector(".chart__wrapper"),a=e.querySelector(".chart table");let i="";Array.from(a.querySelectorAll("tbody tr td:not(:first-child) span")).forEach(r=>{typeof r.textContent<"u"&&r.textContent.length>i.length&&(i=r.textContent)}),t.setAttribute("data-longest-value",i)},S=function(e,t,a){const i=`chart-${Date.now()+(Math.floor(Math.random()*100)+1)}`;let r;const o=Array.from(t.querySelectorAll("thead th"));return o.forEach((c,n)=>{n!=0&&(r=L(i,n,c.textContent,a,e,r)),n==50&&(o.length=n+1)}),!0};function L(e,t,a,i,r,o){const c=document.createElement("input");c.setAttribute("name",`${e}-dataset-${t}`),c.setAttribute("id",`${e}-dataset-${t}`),c.setAttribute("data-dataset",`${t}`),c.setAttribute("data-label",`${a}`),c.checked=!0,c.setAttribute("type","checkbox"),t==1?r.prepend(c):r.insertBefore(c,o.nextSibling),o=c;const n=document.createElement("label");return n.setAttribute("class","key btn btn-action"),n.setAttribute("for",`${e}-dataset-${t}`),n.setAttribute("data-label",`${a}`),n.setAttribute("part","key"),n.innerHTML=`${a}`,i.append(n),o}const q=function(e,t){let{min:a,max:i,yaxis:r,guidelines:o}=d(e);o.length||(o=r),t.innerHTML="";for(let c=0;c<o.length;c++){const n=parseFloat(o[c].replace("\xA3","").replace("%","").replace(",","")),{axis:l}=b(n,a,i);t.innerHTML+=`<div class="guideline" style="--percent:${l}%;">${r.indexOf(o[c])!=-1?`<span>${o[c]}</span>`:""}</div>`}},M=function(e,t){const{min:a,max:i,yaxis:r}=d(e);t.innerHTML="";for(let o=0;o<r.length;o++){const c=parseFloat(r[o].replace("\xA3","").replace("%","")),{axis:n}=b(c,a,i);t.innerHTML+=`<div class="axis__point" style="--percent:${n}%;"><span>${r[o]}</span></div>`}},T=function(e){const t=e.querySelector(".chart");let a=e.querySelector(".chart__xaxis");a||(a=document.createElement("div"),a.setAttribute("class","chart__xaxis")),t.prepend(a)},F=function(e){const t=e.querySelectorAll("thead th[title], tbody th[title]:first-child, tbody td[title]:first-child");Array.from(t).forEach(a=>{const i=`tooltip-${Date.now()}-${Math.floor(Math.random()*100)}`;a.innerHTML=`<button class="tooltip" popovertarget="${i}" part="tooltip" style="anchor-name: --${i};">${a.textContent}</button><span id="${i}" style="position-anchor: --${i};" popover part="tooltip__content" class="tooltip__content">${a.getAttribute("title")}</span>`})},H=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},D=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(i=>{e.addEventListener(i,function(r){const o={event:i,element:t,target:r.target};Object.keys(r.detail).forEach(c=>{const n=r.detail[c];o[c]=n}),window.dataLayer.push(o)})}),!0);H("iam-barchart");class E extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const m=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})},g=(r,t,i)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),i.forEach(e=>{r.addEventListener(e,function(n){const d={event:e,element:t,target:n.target};Object.keys(n.detail).forEach(o=>{const a=n.detail[o];d[o]=a}),window.dataLayer.push(d)})}),!0),b=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const M=function(e){const o=[];return Array.from(e.querySelectorAll(":scope > div")).forEach((n,t)=>{n.hasAttribute("data-thumbnail")&&(o[t]=n.getAttribute("data-thumbnail"))}),o},W=function(e,o){const n=e.querySelectorAll(":scope > div").length;let t="";for(let a=1;a<=n;a++){let r=null,i="";o.length&&o[a-1]?(i="has-thumbnail",r=`<img src="${o[a-1]}" alt="Slide ${a}" height="148"/>`):r=`Slide ${a}`,t+=`<button class="control-${a} ${i}" data-slide="${a}" ${a==1?"aria-current":""}>${r}</button>`}return t},z=function(e,o){return o==1?e:Math.ceil(e/o)*o-o+1},A=function(e,o){return(e-1)/(o-1)*100},$=function(e){let o;const n=e.shadowRoot.querySelector(".carousel"),t=n.querySelector(".carousel__inner"),a=n.querySelector(".carousel__controls"),r=n.querySelector('.carousel__progress [type="range"]'),i=e.querySelectorAll(":scope > div").length;let v=t.clientWidth,y=e.querySelector(":scope > div").scrollWidth,g=Math.round(v/y);r.setAttribute("min",1),r.setAttribute("step",g);let d=z(i,g);r.setAttribute("max",d),r.value=1;let p=A(1,d);r.style.setProperty("--percent",p+"%");let f,S="mouseup",L="mousedown";"ontouchstart"in document.documentElement&&(S="touchend",L="touchstart"),t.addEventListener("scroll",function(h){clearTimeout(o),o=setTimeout(function(){const s=t.clientWidth,m=t.scrollWidth,b=t.scrollLeft;let l=Math.round(b/m*i)+1;const _=e.querySelector(":scope > div").scrollWidth,w=e.querySelector(":scope > div:last-child").offsetLeft,k=t.scrollLeft+s+t.getBoundingClientRect().left>=w+60,u=Math.round(s/_),c=Math.ceil(i/u)*u-i;r.setAttribute("step",u),c>0&&k&&(l=Math.floor(i/u)*u+1),Array.from(n.querySelectorAll(".carousel__controls button")).forEach((x,E)=>{x.removeAttribute("aria-current")}),n.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?n.querySelector(".btn-prev").setAttribute("disabled","disabled"):n.querySelector(".btn-prev").removeAttribute("disabled"),l>i-u?n.querySelector(".btn-next").setAttribute("disabled","disabled"):n.querySelector(".btn-next").removeAttribute("disabled"),r.value=l,d=z(i,u),r.setAttribute("max",d),p=l/d*100,p=A(l,d),r.style.setProperty("--percent",p+"%")},100)},!1),a.addEventListener("click",function(h){for(let s=h.target;s&&s!=this;s=s.parentNode)if(typeof s.matches=="function"&&s.matches("button")){h.preventDefault(),Array.from(a.querySelectorAll("button")).forEach((l,_)=>{l.removeAttribute("aria-current")}),s.setAttribute("aria-current",!0);const m=new CustomEvent("pip-clicked",{detail:{slide:s.getAttribute("data-slide")}});e.dispatchEvent(m);const b=e.querySelector(`:scope > *:nth-child(${s.getAttribute("data-slide")})`);t.scroll({top:0,left:b.offsetLeft-t.getBoundingClientRect().left,behavior:"smooth"});break}},!1),n.addEventListener("click",function(h){const s=t.clientWidth;t.scrollWidth;const m=e.querySelector(":scope > div").scrollWidth,b=Math.round(s/m),l=e.querySelector(":scope > div:last-child").offsetLeft,_=t.scrollLeft+s+t.getBoundingClientRect().left>=l+60,w=Math.ceil(i/b)*b-i,k=b-w,u=_&&w>0?k*m:t.clientWidth;for(let c=h.target;c&&c!=this;c=c.parentNode)if(typeof c.matches=="function"&&c.matches(".btn-next, .btn-prev")){const x=c.matches(".btn-next")?"next":"prev",E=new CustomEvent(`${x}-clicked`,{detail:{slide:c.getAttribute("data-go")}});e.dispatchEvent(E),h.preventDefault();const q=c.classList.contains("btn-prev")?t.scrollLeft-u:t.scrollLeft+t.clientWidth;t.scroll({top:0,left:q,behavior:"smooth"});break}},!1),r.addEventListener(L,function(h){clearInterval(f),f=setInterval(function(){v=t.clientWidth,y=e.querySelector(":scope > div").scrollWidth,g=Math.round(v/y),r.setAttribute("step",g),d=z(i,g),r.setAttribute("max",d),p=A(r.value,d),r.style.setProperty("--percent",p+"%")},10)}),r.addEventListener(S,function(h){clearInterval(f)}),r.addEventListener("change",function(h){clearInterval(f);const s=e.querySelector(`:scope > *:nth-child(${r.value})`);t.scroll({top:0,left:s?s.offsetLeft-t.getBoundingClientRect().left:0,behavior:"smooth"}),s.matches(".btn-next");const m=new CustomEvent("slider-changed",{detail:{slide:r.value}});e.dispatchEvent(m)},!1)},C=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},P=(e,o,n)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),n.forEach(t=>{e.addEventListener(t,function(a){const r={event:t,element:o,target:a.target};Object.keys(a.detail).forEach(i=>{const v=a.detail[i];r[i]=v}),window.dataLayer.push(r)})}),!0);C("iam-carousel");class I extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 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">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function v(d,s){const n=s.querySelector(".files"),i=s.querySelector(".drop-area"),e=d.querySelector("input"),f=d.hasAttribute("data-maxsize")?d.getAttribute("data-maxsize"):0,u=s.querySelector(".invalid-feedback.size"),h=s.querySelector(".invalid-feedback.ext"),o=e.cloneNode();i.append(o);const b=function(t){if(!e.hasAttribute("accept"))return!0;const r=t.split(".").pop();return!!e.getAttribute("accept").includes(r)};if(s.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest(".btn-primary")&&(t.target.closest(".btn-primary"),h.classList.remove("d-block"),u.classList.remove("d-block"),(e.hasAttribute("multiple")?o:e).click())}),s.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".files button")){const r=new DataTransfer,{files:a}=e,m=t.target.closest(".files button");for(let p=0;p<a.length;p++){const l=a[p];l.name!=m.getAttribute("data-file")&&r.items.add(l)}e.files=r.files;const c=new Event("change");e.dispatchEvent(c)}}),o.addEventListener("change",t=>{if(e.hasAttribute("multiple")){const a=[...e.files,...o.files],m=[],c=new DataTransfer;for(let p=0;p<a.length;p++){const l=a[p],g=l.size/1e3;!m.includes(l.name)&&(f==0||g<f)&&b(l.name)&&c.items.add(l),b(l.name)||h.classList.add("d-block"),g>f&&u.classList.add("d-block"),m.push(l.name)}e.files=c.files}else e.files=o.files;const r=new Event("change");e.dispatchEvent(r)}),o.addEventListener("dragenter",t=>{o.classList.add("focus")}),o.addEventListener("dragleave",t=>{o.classList.remove("focus")}),o.addEventListener("drop",t=>{o.classList.remove("focus")}),e.addEventListener("change",t=>{if(e.files.length==1){const a=e.files[0],m=a.size/1e3;if(!b(a.name)){h.classList.add("d-block");const c=new DataTransfer;e.files=c.files}if(m>f){u.classList.add("d-block");const c=new DataTransfer;e.files=c.files}}n.innerHTML="";for(const a of e.files)n.innerHTML+=`<span class="file" part="file">${a.name} <button data-file="${a.name}">Remove</button></span>`;const r=new CustomEvent("elementchange",{detail:{files:e.files}});if(d.dispatchEvent(r),e.files.length==0){const a=new CustomEvent("empty");d.dispatchEvent(a)}}),d.hasAttribute("data-filename")){const t=d.getAttribute("data-filename");t&&(n.innerHTML=`<span class="file">${t} <button data-file="${t}">Remove</button></span>`)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class y extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=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"):`${s}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const h=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},p=(e,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(o=>{e.addEventListener(o,function(i){const r={event:o,element:t,target:i.target};Object.keys(i.detail).forEach(d=>{const s=i.detail[d];r[d]=s}),window.dataLayer.push(r)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function i(s,t){n(s,t)}function n(s,t){let e;t.addEventListener("keyup",a=>{clearTimeout(e),e=setTimeout(function(){o(s,t.value)},500)}),t.addEventListener("change",a=>{clearTimeout(e),o(s,t.value)})}const o=function(s,t){Array.from(s.querySelectorAll(":scope > li")).forEach((e,a)=>{const r=e.textContent.toLowerCase();e.classList.add("d-none"),r.includes(t.toLowerCase())&&e.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:t})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class c extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class b extends HTMLElement{constructor(){super();const t=this.attachShadow({mode:"open"}),i=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"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});class o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",i=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",l=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class v extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),n=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"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
|
|
5
5
|
<style class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/function f(i){if(i.hasAttribute("data-type")&&i.getAttribute("data-type")=="toast"){let t=document.querySelector(".notification__holder");t||(t=document.createElement("div"),t.classList.add("notification__holder"),t.classList.add("container"),document.querySelector("body").appendChild(t)),i.closest(".notification__holder")||t.appendChild(i)}if(i.setAttribute("role","alert"),i.addEventListener("click",function(t){event&&event.target instanceof HTMLElement&&(event.target.closest("[data-dismiss-button]")||event.target.matches("[data-dismiss-button]"))&&(t.preventDefault(),d(i))},!1),i.hasAttribute("data-timeout")){const t=i.getAttribute("data-timeout"),o=new m(function(){d(i)},t);i.addEventListener("mouseenter",n=>{o.pause()}),i.addEventListener("mouseleave",n=>{o.resume()})}}function m(i,t){let o,n,e=t;this.pause=function(){window.clearTimeout(o),e-=new Date-n},this.resume=function(){n=new Date,window.clearTimeout(o),o=window.setTimeout(i,e)},this.resume()}const d=function(i){i.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=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"):`${t}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=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"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const h=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},p=(t,o,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:o}),a.forEach(r=>{t.addEventListener(r,function(e){const d={event:r,element:o,target:e.target};Object.keys(e.detail).forEach(i=>{const c=e.detail[i];d[i]=c}),window.dataLayer.push(d)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/import k from"js-cookie";const q=e=>e.replace(/ /g,"_"),x=function(e){return e=e.toLowerCase(),e=q(e),e=e.replace(/\W/g,""),e},m=(e,s,a)=>s.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,d)=>o?o[d]:a,e),S=e=>Array.isArray(e)||e!==null&&["function","object"].includes(typeof e);var L=function(e,s,a,o){function d(r){return r instanceof a?r:new a(function(n){n(r)})}return new(a||(a=Promise))(function(r,n){function v(c){try{u(o.next(c))}catch(i){n(i)}}function t(c){try{u(o.throw(c))}catch(i){n(i)}}function u(c){c.done?r(c.value):d(c.value).then(v,t)}u((o=o.apply(e,s||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class C extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const s=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${s}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Slider"});class f extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",p=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/const U=function(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))},B=(i,e)=>String(i).padStart(e,"0"),Q=i=>i.charAt(0).toUpperCase()+i.slice(1),k=(i,e,r)=>e.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,c)=>o?o[c]:r,i);var X=function(i,e,r,o){function c(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function d(h){try{t(o.next(h))}catch(n){a(n)}}function l(h){try{t(o.throw(h))}catch(n){a(n)}}function t(h){h.done?s(h.value):c(h.value).then(d,l)}t((o=o.apply(i,e||[])).next())})};const j=i=>{const e=Array.from(i.querySelectorAll("thead th"));Array.from(i.querySelectorAll("tbody tr")).forEach((o,c)=>{const s=Array.from(o.querySelectorAll("th, td")),a=["0","low","medium","high","unknown","n/a","pending","verified","due","overdue","incomplete","complete","completed","approval required","upcoming","requires approval","to do","on track","not started","warning","error"];s.forEach((d,l)=>{const t=e[l];if(typeof t<"u"){const h=document.createElement("div");h.innerHTML=t.innerHTML;const n=h.textContent||h.innerText||"";d.setAttribute("data-label",n),t.hasAttribute("data-td-class")&&d.setAttribute("class",t.getAttribute("data-td-class")),t.hasAttribute("data-format")&&(d.setAttribute("data-format",t.getAttribute("data-format")),d.innerHTML=_(t.getAttribute("data-format"),d.textContent.trim())),a.includes(d.textContent.trim().toLowerCase())&&d.setAttribute("data-content",d.textContent.trim().toLowerCase())}})})},Y=i=>{let e=0;return Array.from(i.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=window.getComputedStyle(document.querySelector("html")),s=r.querySelector(":scope > *:last-child > *:first-child");if(s){s.classList.add("text-nowrap");let a=s.offsetWidth/parseFloat(c.fontSize);a+=1.7,e=e>a?e:a}}),e},J=(i,e)=>{if(e.classList.contains("table--fullwidth")&&!e.hasAttribute("data-expandable")||i.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(i.querySelectorAll("thead tr")).forEach((r,o)=>{i.querySelectorAll("thead tr th.expand-button-heading").length||r.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(i.querySelectorAll("tbody tr")).forEach((r,o)=>{const c=r.getAttribute("data-view")==="full"?"aria-expanded":"";r.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${c}>Expand</button></td>`)})},G=i=>{i.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){const r=e.target.closest("[data-expand-button]"),o=r.closest("tr");r.toggleAttribute("aria-expanded"),o.getAttribute("data-view")=="full"?o.setAttribute("data-view","default"):o.setAttribute("data-view","full"),r.blur()}})},R=(i,e)=>{const r=e.querySelector("input[data-search]");if(!r)return!1;const o=r.getAttribute("id"),c=r.getAttribute("data-search").split(","),s=r.parentNode,a={};c.forEach((d,l)=>{Array.from(i.querySelectorAll('td[data-label="'+d.trim()+'"]')).forEach((t,h)=>{t.querySelector(".td__content")?a[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:a[t.textContent]=t.textContent})}),r.setAttribute("list",`${o}_list`),r.setAttribute("autocomplete","off"),s.querySelector("datalist")||(s.innerHTML+=`<datalist id="${o}_list"></datalist>`),s.querySelector("datalist").innerHTML=`${Object.keys(a).map(d=>`<option value="${d}"></option>`).join("")}`},V=(i,e,r,o,c)=>{let s;const a=function(t,h=!1){if(o.hasAttribute("data-no-submit")||e.classList.contains("processing"))return!1;if(Array.from(e.querySelectorAll("iam-applied-filters")).forEach((n,p)=>{const u=new Event("tags-set");n.dispatchEvent(u)}),t.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((n,p)=>{const u=n.getAttribute("data-duplicate"),b=document.getElementById(u),w=document.querySelector(`[for="${u}"] iam-card`);if(b.checked!=n.checked)if(w){const A=new Event("click");w.dispatchEvent(A)}else b.checked=n.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!h){const n=e.querySelector("[data-pagination]");n.value=1,o.setAttribute("data-page",1)}z(i,e,r,o)}else e.hasAttribute("data-submit")?e.submit():(H(i,e,o),E(i,e));if(e.hasAttribute("data-ajax-post")){const n=new FormData(e),p=new URLSearchParams(n).toString(),u=new XMLHttpRequest;u.open("GET",`${window.location.href}?ajax=true&${p}`),u.send()}};e.querySelector("iam-actionbar[data-search]")&&e.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",t=>{e.querySelector("input[data-search]")?e.querySelector("input[data-search]").value=t.detail.search:e.insertAdjacentHTML("beforeend",`<input type="hidden" name="search" data-search="${e.querySelector("iam-actionbar[data-search]").getAttribute("data-search")}" value="${t.detail.search}"/>`),clearTimeout(s),a(t)}),e.addEventListener("keyup",t=>{clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest("input[data-search]")&&(s=setTimeout(function(){a(t)},500))}),e.addEventListener("change",t=>{if(clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||N(i,e,c),a(t)),t&&t.target instanceof HTMLElement&&t.target.closest("input[data-search]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter][data-no-ajax]")?(H(i,e,o),E(i,e)):(t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&t.target.closest("form .dialog__wrapper > dialog")||t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&!t.target.closest("form dialog"))&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-show]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-mimic]")&&a(t),t&&t.target instanceof HTMLElement&&t.target.hasAttribute("id")){const h=t.target.getAttribute("id");document.querySelector(`[data-duplicate="${h}"]`)&&(document.querySelector(`[data-duplicate="${h}"]`).checked=t.target.checked)}}),e.addEventListener("click",t=>{if(clearTimeout(s),t&&t.target instanceof HTMLElement&&t.target.closest('dialog button:not([type="button"])')&&t.target.closest('dialog button:not([type="button"])').closest("dialog").close(),t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__close")&&(t.preventDefault(),t.stopPropagation()),t&&t.target instanceof HTMLElement&&t.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((n,p)=>{n.innerHTML=""});const h=e.elements;for(let n=0;n<h.length;n++)switch(h[n].type.toLowerCase()?h[n].type.toLowerCase():"text"){case"text":case"password":case"textarea":h[n].value="";break;case"radio":case"checkbox":if(h[n].checked){const u=h[n],b=u.getAttribute("id"),w=document.querySelector(`[for="${b}"`);if(w.querySelector("iam-card")){const A=w.querySelector("iam-card"),m=new Event("click");A.dispatchEvent(m)}u.checked=!1}break;case"select-one":case"select-multi":h[n].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||N(i,e,c),a(t)}}),e.addEventListener("submit",t=>{clearTimeout(s),e.hasAttribute("data-submit")||t.preventDefault(),a(t)}),e.addEventListener("force",t=>{a(t)}),e.addEventListener("paginate",t=>{a(t,!0)});const d=[],l=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((t,h)=>{const n=t.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${n}"]`)).forEach((p,u)=>{const b=p.closest("form");d.includes(b)||d.push(b),l.includes(n)||l.push(n)})}),d.forEach((t,h)=>{const n=function(){const p=[],u=new FormData(t);for(const[b,w]of u)document.querySelector(`[data-mimic="${b}"]`)&&!p.includes(b)?(p.push(b),document.querySelector(`[data-mimic="${b}"]`).value=w):document.querySelector(`[data-mimic="${b}"]`)&&(document.querySelector(`[data-mimic="${b}"]`).value+=","+w);for(const b of p){const w=new Event("force");e.dispatchEvent(w)}for(const b of l)if(!u.has(b)&&t.querySelector(`[name="${b}"]`)){document.querySelector(`[data-mimic="${b}"]`).value="";const w=new Event("force");e.dispatchEvent(w)}};t.addEventListener("force",p=>{n()}),t.addEventListener("change",p=>{n()})})},N=(i,e,r)=>{if(e.getAttribute("data-ajax"))return!1;const o=i.querySelector("tbody");let c=e.querySelector('input[type="radio"][data-sort]:checked');if(e.querySelector("select[data-sort]")){const n=e.querySelector("select[data-sort]");c=e.querySelector(`select[data-sort] option:nth-child(${n.selectedIndex+1})`)}const s=c.getAttribute("data-sort"),a=c.getAttribute("data-order"),d=c.getAttribute("data-format");if(!s)return o.innerHTML=r.innerHTML,j(i),!1;let l=[];["asc","desc","descending"].includes(a)||(l=a.split(","));let t=[];Array.from(o.querySelectorAll("tr")).forEach((n,p)=>{let u=n.querySelector('td[data-label="'+s+'"], th[data-label="'+s+'"]').textContent.trim();n.querySelector('[data-label="'+s+'"] .td__content')&&(u=n.querySelector('[data-label="'+s+'"] .td__content').textContent.trim()),l.length&&l.includes(u)&&(u=l.indexOf(u)),U(u)&&(u=B(u,10)),d&&d=="date"&&(u=new Date(u));const b={index:u,row:n};t.push(b)}),t.sort((n,p)=>n.index>p.index?1:-1),(a=="descending"||a=="desc")&&(t=t.reverse());let h="";t.forEach((n,p)=>{h+=n.row.outerHTML}),o.innerHTML=h},H=(i,e,r)=>{i.classList.remove("table--filtered");const o=P(e),c=[];let s=0;const a=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,d=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(i.querySelectorAll("tbody tr")).forEach((t,h)=>{t.classList.remove("filtered"),t.classList.remove("filtered--matched"),t.classList.remove("filtered--show"),t.removeAttribute("data-filtered-by")}),e.querySelector("input[data-search]")){const t=e.querySelector("input[data-search]");e.querySelector("input[data-search]").getAttribute("data-search").split(",").forEach((n,p)=>{c.push({column:`${n.trim()}`,value:`${t.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,h)=>{t.innerHTML="",t.parentNode.classList.remove("hover")});let l=0;Object.values(o).forEach((t,h)=>{typeof t=="object"&&Object.values(t).length?l+=Object.values(t).length:l++}),l&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,h)=>{t.innerHTML+=`(${l})`,t.parentNode.classList.add("hover")}),i.classList.add("table--filtered");for(const[t,h]of Object.entries(o))Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((n,p)=>{let u=!1;h.forEach((b,w)=>{const A=n.querySelector(`[data-label="${t}"]`);if(b.includes("-date-from")){const m=new Date(b.replace("-date-from","")),f=new Date(A.textContent.toLowerCase());m.setHours(0,0,0,0),f.setHours(0,0,0,0),f<m?(n.classList.add("less-than-from-date"),u=!1):!n.classList.contains("less-than-from-date")&&!n.classList.contains("greater-than-to-date")&&(u=!0)}else if(b.includes("-date-to")){const m=new Date(b.replace("-date-to","")),f=new Date(A.textContent.toLowerCase());m.setHours(0,0,0,0),f.setHours(0,0,0,0),f>m?(n.classList.add("greater-than-to-date"),u=!1):!n.classList.contains("less-than-from-date")&&!n.classList.contains("greater-than-to-date")&&(u=!0)}if(b&&b=="$today")b=_("date",new Date);else if(b&&b=="$yesterday"){const m=new Date;m.setDate(m.getDate()-1),b=_("date",m)}else if(b&&(b=="$thisWeek"||b=="$lastWeek")){const m=new Date,f=new Date(m.setDate(m.getDate()-(m.getDay()-1))),v=new Date(m.setDate(m.getDate()-m.getDay()+7)),g=new Date(A.textContent.toLowerCase());if(m.setHours(0,0,0,0),f.setHours(0,0,0,0),v.setHours(0,0,0,0),g.setHours(0,0,0,0),b=="$thisWeek")u=g>=f&&g<=v;else{const L=new Date(f.setDate(f.getDate()-7)),y=new Date(v.setDate(v.getDate()-7));L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=g>=L&&g<=y}}else if(b&&b=="$thisMonth"){const m=new Date,f=m.getFullYear(),v=m.getMonth(),g=new Date(f,v,1),L=new Date(f,v+1,0),y=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=g&&y<=L}else if(b&&b=="$lastMonth"){const m=new Date,f=m.getFullYear(),v=m.getMonth(),g=new Date(f,v-1,1),L=new Date(f,v,0),y=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),L.setHours(0,0,0,0),y.setHours(0,0,0,0),u=y>=g&&y<=L}A&&A.textContent.toLowerCase().includes(b.replace("-"," ").toLowerCase())&&(u=!0)}),u||(n.classList.add("filtered"),n.setAttribute("data-filtered-by",t))});Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,h)=>{let n=!(c.length>0&&c[0].value.length>=3);c.forEach((p,u)=>{const b=t.querySelector(`[data-label="${p.column}"]`);b&&p.value.length>=3&&b.textContent.toLowerCase().includes(p.value.toLowerCase())&&(n=!0)}),n||t.classList.add("filtered")}),Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,h)=>{s++,t.classList.add("filtered--matched"),Math.ceil(s/d)==parseInt(a)&&t.classList.add("filtered--show")}),r&&(r.setAttribute("data-total",s),r.setAttribute("data-show",d),r.setAttribute("data-page",a))},E=(i,e,r)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((c,s)=>{const a=c.getAttribute("data-query");let d=0;if(a=="total")r.hasAttribute("data-total")?d=r.getAttribute("data-total"):d=(i.classList.contains("table--filtered"),i.querySelectorAll("tbody tr").length);else if(!a.includes(" == ")&&a.includes(" & ")){const l=a.split(" & ");let t="";l.forEach(h=>{t+=`:not([data-filtered-by="${h}"])`}),d=Array.from(i.querySelectorAll(`tbody tr${t}`)).length}else if(!a.includes(" == "))d=Array.from(i.querySelectorAll(`tbody tr:not([data-filtered-by="${a}"])`)).length;else if(a.includes(" && ")){const l=a.split(" && ");d=Array.from(i.querySelectorAll("tbody tr:not(.filtered)")).filter(function(t){let h=!0;for(const[n,p]of Object.entries(l)){const u=p.split(" == ");(!t.querySelector(`td[data-label="${u[0]}"]`)||t.querySelector(`td[data-label="${u[0]}"]`).textContent!=`${u[1]}`)&&(h=!1)}return h}).length}else{const l=a.split(" == ");d=Array.from(i.querySelectorAll(`tbody tr.filtered--matched td[data-label="${l[0]}"], tbody tr[data-filtered-by="${l[0]}"] td[data-label="${l[0]}"]`)).filter(function(t){return t.textContent===l[1]}).length}c.hasAttribute("data-total")?c.setAttribute("data-total",d):c.innerHTML=d})},K=function(i,e,r,o){if(o.hasAttribute("data-no-submit"))return!1;r.addEventListener("update-page",c=>{const s=e.querySelector("[data-pagination]"),a=c.detail.page;if(s.value=a,e.dispatchEvent(new Event("paginate")),o.setAttribute("data-page",a),i.hasAttribute("data-show-history")){const d=new URL(location);d.searchParams.set("page",a),history.pushState({type:"pagination",form:e.getAttribute("id"),page:a},"",d)}if(!o.hasAttribute("data-no-scroll")){const l=i.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}),r.addEventListener("update-show",c=>{const s=e.querySelector("[data-show]"),a=c.detail.show;s.value=a,o.setAttribute("data-show",a),e.dispatchEvent(new Event("submit"))})},Z=(i,e)=>{if(!i)return!1;i.addEventListener("click",r=>{tt(e)})},tt=function(i){let e=[];const r=i.getElementsByTagName("tr");for(let a=0;a<r.length;a++){const d=r[a].querySelectorAll("td,th"),l=[];for(let t=0;t<d.length;t++)l.push(`"${d[t].textContent}"`);e.push(l.join(","))}e=e.join(`
|
|
5
5
|
`);const o=new Blob([e],{type:"text/csv"}),c=document.createElement("a");c.download="export.csv";const s=window.URL.createObjectURL(o);c.href=s,c.style.display="none",document.body.appendChild(c),c.click(),document.body.removeChild(c)},O=function(i,e,r,o){if(j(i),J(i,o),E(i,e,o),o&&o.classList.contains("table--cta")){let s=function(){Array.from(i.querySelectorAll("tr")).forEach((a,d)=>{const l=a.offsetHeight;a.style.setProperty("--row-height",`${l}px`)})};const c=Y(i);o.style.setProperty("--cta-width",`${c}rem`),new ResizeObserver(s).observe(i)}},P=function(i){const e=new Object;return Array.from(i.querySelectorAll("[data-filter]")).forEach((o,c)=>{if(!(o.type=="radio"&&!o.checked)&&!(o.type=="checkbox"&&!o.checked)&&o&&o.value){const s=o.getAttribute("data-filter");let a=o.value;o.hasAttribute("data-date-from")&&(a+="-date-from"),o.hasAttribute("data-date-to")&&(a+="-date-to"),e[s]||(e[s]=[]),e[s].push(a)}}),e},z=function(i,e,r,o){return X(this,void 0,void 0,function*(){const c=new FormData(e),s=new URLSearchParams(c).toString(),a=i.querySelectorAll("thead tr th:not(.expand-button-heading)"),d=i.querySelector("tbody"),l=e.getAttribute("data-ajax");o.classList.add("table--loading");const t=P(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,u)=>{p.innerHTML="",p.parentNode.classList.remove("hover")});let h=0;Object.values(t).forEach((p,u)=>{typeof p=="object"&&Object.values(p).length?h+=Object.values(p).length:h++}),h&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((p,u)=>{p.innerHTML+=`(${h})`,p.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[l]&&window.controller[l].abort(),window.controller[l]=new AbortController;const{signal:n}=controller[l];r.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(l+"?"+s,{signal:n,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(p=>p.json()).then(p=>{const u=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",b=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",w=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",A=k(p,b,15),m=k(p,w,1),f=k(p,u),v=o.hasAttribute("data-empty-msg")?o.getAttribute("data-empty-msg"):"No results found";f?(d.innerHTML="",f.forEach((g,L)=>{const y=document.createElement("tr");a.forEach((x,at)=>{let S="";const T=document.createElement("td");if(T.setAttribute("data-label",x.innerText),x.getAttribute("data-output")){var D=x.getAttribute("data-output");S=D.replace(new RegExp(/{(.*?)}/,"gm"),function(C){return k(g,C.replace("{","").replace("}",""))})}if(x.hasAttribute("data-output-array")){var D=x.getAttribute("data-output");const I=k(g,D.replace("{","").replace("}",""));S="",I.forEach((M,ot)=>{const F=x.getAttribute("data-output-array");let q="";if(x.hasAttribute("data-output-array-property")&&x.hasAttribute("data-output-array-transform")){const $=k(M,x.getAttribute("data-output-array-property")),W=JSON.parse(x.getAttribute("data-output-array-transform"))[$];q=F.replace(`{${x.getAttribute("data-output-array-property")}}`,W)}q=q.replace(new RegExp(/{(.*?)}/,"gm"),function($){return k(M,$.replace("{","").replace("}",""))}),S+=q})}x.hasAttribute("data-transform")&&(S=JSON.parse(x.getAttribute("data-transform"))[S],!S&&x.hasAttribute("data-default")&&(S=x.getAttribute("data-default"))),T.innerHTML=S,y.appendChild(T)}),d.appendChild(y)}),R(i,e),o.setAttribute("data-total",parseInt(A)),o.setAttribute("data-page",parseInt(m)),O(i,e,r,o),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((g,L)=>{const y=k(p,g.getAttribute("data-ajax-query"),"");g.hasAttribute("data-total")?g.setAttribute("data-total",y):g.innerHTML=y}),parseInt(A)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${v}</span></td></tr>`),o.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:l,formData:s})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',r.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(p){console.log(p)}})},_=(i,e)=>{switch(i){case"datetime":return new Date(e).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(e).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(e).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return e=Q(e)}};class et extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
@@ -31,8 +31,8 @@ class iamTabs extends HTMLElement {
|
|
|
31
31
|
</style>
|
|
32
32
|
<link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">
|
|
33
33
|
<div class="tabs" part="tabs">
|
|
34
|
-
<div class="tabs__links__wrapper">
|
|
35
|
-
<div class="tabs__links"></div>
|
|
34
|
+
<div class="tabs__links__wrapper" part="wrapper">
|
|
35
|
+
<div class="tabs__links" part="tab-links"></div>
|
|
36
36
|
</div>
|
|
37
37
|
<slot></slot>
|
|
38
38
|
<button part="next-button" class="btn btn-secondary btn-sm btn-compact fa-regular fa-chevron-right tabs__next">Next</button>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
|
-
*/const f=(t,l,o,r)=>{const n=Math.tan(.375*Math.PI),c=window.innerWidth||document.body.clientWidth,s=Math.max(1,Math.floor(.01*c)),e=o-t,a=r-l,i=Math.abs(e/a),d=Math.abs(a/e);if(Math.abs(e)>s||Math.abs(a)>s){if(d<=n)return e<0?"left":"right";if(i<=n)return a<0?"top":"bottom"}else return"tap"},k=function(t){t.querySelectorAll(":scope > details");const l=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(o=t.shadowRoot.querySelector(".tabs__links")),!o){o=document.createElement("div"),o.classList.add("tabs__links");const n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(o),t.prepend(n)}let r=0;l.forEach((n,c)=>{let s=document.createElement("button");if(n.matches("details")){const e=n.querySelector(":scope > summary"),a=e.classList.contains("disabled");e.classList.add("visually-hidden"),n.hasAttribute("id")&&s.setAttribute("data-id",`${n.getAttribute("id")}`),n.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${e.innerText}`,s.classList.add("link"),s.setAttribute("data-index",r),n.setAttribute("tabindex","-1"),a&&s.classList.add("disabled"),r++}else n.matches("a")&&(s=n);s.classList.add("link"),o.appendChild(s)})},g=function(t){const l=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > details > summary");let r=t.querySelector(":scope .tabs__links"),n=t.querySelectorAll(":scope .tabs__links > button"),c=t.querySelector(":scope .tabs__next");var s;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(n=t.shadowRoot.querySelectorAll(".tabs__links > button"),r=t.shadowRoot.querySelector(".tabs__links"),c=t.shadowRoot.querySelector(":scope .tabs__next")),n.forEach(e=>{e.addEventListener("click",a=>{if(a.preventDefault(),!window.isScrolling){if(window.triggered||(window.isClicked=!0),e.classList.contains("disabled"))return!1;n.forEach(i=>{const d=i==e;i.setAttribute("aria-pressed",d)}),r.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),l.forEach((i,d)=>{const u=e.getAttribute("data-index")==d;u?i.setAttribute("open",u):i.removeAttribute("open")}),e.matches(":last-child")?c.setAttribute("disabled","disabled"):c.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})}})}),r.addEventListener("scroll",e=>{window.isScrolling||(clearTimeout(s),window.isScrolling=!0)}),r.addEventListener("scrollend",e=>{window.isScrolling=!1,clearTimeout(s),s=setTimeout(function(){if(window.isClicked)return window.isClicked=!1,!1;let a=n[0],i=Math.abs(a.getBoundingClientRect().left);n.forEach(d=>{Math.abs(d.getBoundingClientRect().left)<i&&(i=Math.abs(d.getBoundingClientRect().left),a=d)}),window.triggered=!0,a.focus(),a.click(),window.triggered=!1},200)}),o.forEach((e,a)=>{e.addEventListener("click",i=>{i.preventDefault(),n[a].click()})}),c.addEventListener("click",e=>{e.preventDefault();const i=r.querySelector('[aria-pressed="true"]').nextSibling;i&&i.click()}),t.classList.contains("tabs--guided")){let e=0,a=0,i=0,d=0;l.forEach(u=>{u.addEventListener("touchstart",p=>{p.stopPropagation(),e=p.changedTouches[0].screenX,a=p.changedTouches[0].screenY}),u.addEventListener("touchend",p=>{p.stopPropagation(),i=p.changedTouches[0].screenX,d=p.changedTouches[0].screenY;const m=f(e,a,i,d),b=r.querySelector('[aria-pressed="true"]'),_=b.nextSibling,h=b.previousSibling;switch(m){case"left":_&&_.click();break;case"right":h&&h.click();break}})})}},w=function(t){if(!t.querySelector(":scope > details"))return!1;const l=t.querySelectorAll(":scope > details"),o=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(l[0].setAttribute("open",!0),o[0].setAttribute("aria-pressed",!0))},y=function(t){k(t),g(t),w(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const l=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"):`${l}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
|
|
4
|
+
*/const f=(t,l,o,r)=>{const n=Math.tan(.375*Math.PI),c=window.innerWidth||document.body.clientWidth,s=Math.max(1,Math.floor(.01*c)),e=o-t,a=r-l,i=Math.abs(e/a),d=Math.abs(a/e);if(Math.abs(e)>s||Math.abs(a)>s){if(d<=n)return e<0?"left":"right";if(i<=n)return a<0?"top":"bottom"}else return"tap"},k=function(t){t.querySelectorAll(":scope > details");const l=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(o=t.shadowRoot.querySelector(".tabs__links")),!o){o=document.createElement("div"),o.classList.add("tabs__links");const n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(o),t.prepend(n)}let r=0;l.forEach((n,c)=>{let s=document.createElement("button");if(n.matches("details")){const e=n.querySelector(":scope > summary"),a=e.classList.contains("disabled");e.classList.add("visually-hidden"),n.hasAttribute("id")&&s.setAttribute("data-id",`${n.getAttribute("id")}`),n.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${e.innerText}`,s.classList.add("link"),s.setAttribute("data-index",r),s.setAttribute("part","tab-link"),n.setAttribute("tabindex","-1"),a&&s.classList.add("disabled"),r++}else n.matches("a")&&(s=n);s.classList.add("link"),o.appendChild(s)})},g=function(t){const l=t.querySelectorAll(":scope > details"),o=t.querySelectorAll(":scope > details > summary");let r=t.querySelector(":scope .tabs__links"),n=t.querySelectorAll(":scope .tabs__links > button"),c=t.querySelector(":scope .tabs__next");var s;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(n=t.shadowRoot.querySelectorAll(".tabs__links > button"),r=t.shadowRoot.querySelector(".tabs__links"),c=t.shadowRoot.querySelector(":scope .tabs__next")),n.forEach(e=>{e.addEventListener("click",a=>{if(a.preventDefault(),!window.isScrolling){if(window.triggered||(window.isClicked=!0),e.classList.contains("disabled"))return!1;n.forEach(i=>{const d=i==e;i.setAttribute("aria-pressed",d)}),r.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),l.forEach((i,d)=>{const u=e.getAttribute("data-index")==d;u?i.setAttribute("open",u):i.removeAttribute("open")}),e.matches(":last-child")?c.setAttribute("disabled","disabled"):c.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})}})}),r.addEventListener("scroll",e=>{window.isScrolling||(clearTimeout(s),window.isScrolling=!0)}),r.addEventListener("scrollend",e=>{window.isScrolling=!1,clearTimeout(s),s=setTimeout(function(){if(window.isClicked)return window.isClicked=!1,!1;let a=n[0],i=Math.abs(a.getBoundingClientRect().left);n.forEach(d=>{Math.abs(d.getBoundingClientRect().left)<i&&(i=Math.abs(d.getBoundingClientRect().left),a=d)}),window.triggered=!0,a.focus(),a.click(),window.triggered=!1},200)}),o.forEach((e,a)=>{e.addEventListener("click",i=>{i.preventDefault(),n[a].click()})}),c.addEventListener("click",e=>{e.preventDefault();const i=r.querySelector('[aria-pressed="true"]').nextSibling;i&&i.click()}),t.classList.contains("tabs--guided")){let e=0,a=0,i=0,d=0;l.forEach(u=>{u.addEventListener("touchstart",p=>{p.stopPropagation(),e=p.changedTouches[0].screenX,a=p.changedTouches[0].screenY}),u.addEventListener("touchend",p=>{p.stopPropagation(),i=p.changedTouches[0].screenX,d=p.changedTouches[0].screenY;const m=f(e,a,i,d),b=r.querySelector('[aria-pressed="true"]'),_=b.nextSibling,h=b.previousSibling;switch(m){case"left":_&&_.click();break;case"right":h&&h.click();break}})})}},w=function(t){if(!t.querySelector(":scope > details"))return!1;const l=t.querySelectorAll(":scope > details"),o=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(l[0].setAttribute("open",!0),o[0].setAttribute("aria-pressed",!0))},y=function(t){k(t),g(t),w(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const l=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"):`${l}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
6
6
|
@import "${o}";
|
|
7
7
|
*:not(main):has(>iam-tabs){container-type:inline-size}iam-tabs details:not([open]){padding-bottom:0}iam-tabs::part(next-button){display:none}@container (width > 62em){iam-tabs.tabs--guided::part(next-button){position:absolute;top:9.375rem;right:0;display:block}}iam-tabs.tabs--guided::part(next-button):not(:hover){background:var(--colour-success)}.tabs:not(.admin-panel){position:relative}.tabs:not(.admin-panel) .tabs__links__wrapper{position:relative;margin:0 auto 2rem}.tabs:not(.admin-panel) .tabs__links__wrapper:after{content:"";left:50%;position:relative;height:1px;width:100vw;background-color:var(--colour-border);transform:translate(-50%, 0);display:block;clear:both}.tabs.admin-panel .tabs__links__wrapper:after{display:none}.tabs__links{scroll-snap-type:x mandatory;-webkit-mask-image:linear-gradient(to right, rgb(0, 0, 0) 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to right, rgb(0, 0, 0) 90%, rgba(0, 0, 0, 0) 100%)}.tabs__links{padding-bottom:3px;position:relative;display:flex;flex-wrap:nowrap;width:auto;margin:0 -1.5rem;overflow-y:clip;overflow-x:auto}.tabs__links::-webkit-scrollbar{display:none}.tabs__links .link{white-space:nowrap;scroll-snap-align:start;scroll-margin-left:var(--container-padding)}.tabs__links .link:not(.text-decoration-none):not(.btn){--is-current: 0;font-weight:bold;font-family:var(--font-heading);font-size:1.125rem;cursor:pointer;margin:0;padding:1.5rem 1.5rem .5rem 1.5rem;display:inline-block}.tabs__links .link:not(.text-decoration-none):not(.btn).disabled{cursor:not-allowed;opacity:.4}.tabs__links .link:not(.text-decoration-none):not(.btn):last-child{margin-inline-end:0}.tabs__links .link:not(.text-decoration-none):not(.btn):after{position:absolute;content:"";bottom:0;left:50%;height:3px;width:100%;transform:translate(-50%, 0) scale(0, 0);background:var(--colour-info);transition:transform .4s}.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled):hover:after,.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled):focus:after,.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled).focus:after{transform:translate(-50%, 0) scale(0.6, 1)}.tabs__links .link:not(.text-decoration-none):not(.btn):not(.disabled):is([aria-pressed=true],:active,.current):after{transform:translate(-50%, 0) scale(1, 1)}.tabs__links .link:not(.text-decoration-none):not(.btn):is([aria-pressed=true],.current){pointer-events:none;outline:var(--contrast-outline-width, 0px) solid var(--colour-primary-theme) !important}@media(min-width: 576px){.tabs__links .link:not(.text-decoration-none):not(.btn){padding:2rem 2rem .5rem 2rem}.tabs__links__wrapper{margin:0 auto 2.5rem}}.admin-panel :is(.admin-panel__links,.tabs__links){padding:0;margin:calc(var(--padding-top)*-1) calc(var(--padding-x)*-1) var(--padding-top) calc(var(--padding-x)*-1);border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;display:flex;flex-direction:column;border-bottom:1px solid var(--colour-border);overflow:hidden;outline:var(--contrast-outline-width, 0px) solid var(--colour-primary)}.admin-panel :is(.admin-panel__links,.tabs__links):after{display:none}@media screen and (min-width: 36em){.admin-panel :is(.admin-panel__links,.tabs__links){flex-direction:row}}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn){margin:0;padding:1rem var(--padding-x);width:100%;position:relative;text-align:left;flex-grow:1;--gradient-direction: -90deg;background-color:var(--colour-success)}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):not([class*=bg-]){background-image:linear-gradient(var(--gradient-direction), var(--colour-info) 0, transparent 100%)}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):is(.current,[aria-pressed=true]){color:var(--colour-primary-theme)}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):not(.current,[aria-pressed=true]){background:var(--colour-canvas-2) !important}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):after{display:none}@media screen and (min-width: 36em){.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn){margin:0}.admin-panel :is(.admin-panel__links,.tabs__links) .link:not(.text-decoration-none):not(.btn):not(:first-child){border-left:1px solid var(--colour-border) !important}}.admin-panel :is(.admin-panel__links,.tabs__links) .link:is(.current,[aria-pressed=true]){pointer-events:none}@media screen and (min-width: 36em){:host(.tabs--inline) .tabs__links{margin:0;justify-content:center}:host(.tabs--inline) .tabs__links__wrapper:after{width:100%}}/*# sourceMappingURL=assets/css/components/tabs.css.map */
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
</style>
|
|
16
16
|
<link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">
|
|
17
17
|
<div class="tabs" part="tabs">
|
|
18
|
-
<div class="tabs__links__wrapper">
|
|
19
|
-
<div class="tabs__links"></div>
|
|
18
|
+
<div class="tabs__links__wrapper" part="wrapper">
|
|
19
|
+
<div class="tabs__links" part="tab-links"></div>
|
|
20
20
|
</div>
|
|
21
21
|
<slot></slot>
|
|
22
22
|
<button part="next-button" class="btn btn-secondary btn-sm btn-compact fa-regular fa-chevron-right tabs__next">Next</button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.component.min.js","sources":["../../modules/helpers.js","../../modules/tabs.js","tabs.component.js"],"sourcesContent":["// @ts-nocheck\n/**\n * Global helper functions to help maintain and enhance framework elements.\n * @module Helpers\n */\n/**\n * Add global classes used by the CSS and later JavaScript.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addBodyClasses = (body) => {\n body.classList.add('js-enabled');\n if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n body.classList.add('ie');\n }\n return null;\n};\n/**\n * Add global events.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addGlobalEvents = (body) => {\n const checkElements = function (hash) {\n const label = document.querySelector(`label[for=\"${hash.replace('#', '')}\"]`);\n const summary = document.querySelector(hash + ' summary');\n const dialog = document.querySelector(`dialog${hash}`);\n const detail = document.querySelector(`detail${hash}`);\n if (label instanceof HTMLElement)\n label.click();\n else if (summary instanceof HTMLElement)\n summary.click();\n else if (dialog instanceof HTMLElement)\n dialog.showModal();\n else if (detail instanceof HTMLElement)\n detail.addAttribute('open');\n };\n if (location.hash)\n checkElements(location.hash);\n window.addEventListener('hashchange', function () {\n checkElements(location.hash);\n }, false);\n addEventListener('popstate', (event) => {\n if (event && event.state && event.state.type && event.state.type == 'pagination') {\n const form = document.querySelector(`#${event.state.form}`);\n const pageInput = document.querySelector(`#${event.state.form} [data-pagination]`);\n if (pageInput)\n pageInput.value = event.state.page;\n else\n form.innerHTML += `<input name=\"page\" type=\"hidden\" data-pagination=\"true\" value=\"${event.state.page}\" />`;\n form.dispatchEvent(new Event('submit'));\n }\n });\n document.addEventListener('submit', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.matches('form')) {\n const form = event.target;\n // Reset password types\n Array.from(form.querySelectorAll('[data-password-type]')).forEach((input, index) => {\n input.setAttribute('type', 'password');\n });\n if (form.querySelector(':invalid') ||\n form.querySelector('.pwd-checker[data-strength=\"1\"]') ||\n form.querySelector('.pwd-checker[data-strength=\"2\"]')) {\n form.classList.add('was-validated');\n event.preventDefault();\n }\n if (form.querySelector('iam-multiselect[data-is-required][data-error]')) {\n form.classList.add('was-validated');\n event.preventDefault();\n }\n }\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n if (document.querySelector('.dialog--transactional[open], .dialog--acknowledgement[open]')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n });\n Array.from(document.querySelectorAll('label progress')).forEach((progress, index) => {\n const label = progress.closest('label');\n label.setAttribute('data-percent', progress.getAttribute('value'));\n });\n return null;\n};\nexport const isNumeric = function (str) {\n if (typeof str != 'string')\n return false; // we only process strings!\n return (!isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\n !isNaN(parseFloat(str))); // ...and ensure strings of whitespace fail\n};\nexport const zeroPad = (num, places) => String(num).padStart(places, '0');\nexport const ucfirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);\nexport const ucwords = (str) => str\n .split(' ')\n .map((s) => ucfirst(s))\n .join(' ');\nexport const unsnake = (str) => str.replace(/_/g, ' ');\nexport const snake = (str) => str.replace(/ /g, '_');\nexport const safeID = function (str) {\n str = str.toLowerCase();\n str = snake(str);\n str = str.replace(/\\W/g, '');\n return str;\n};\nexport const numberOfDays = function (startDateString, endDateString) {\n const convertStart = startDateString.split('/');\n const convertEnd = endDateString.split('/');\n const dateStart = new Date(convertStart[1] + '/' + convertStart[0] + '/' + convertStart[2]);\n const dateEnd = new Date(convertEnd[1] + '/' + convertEnd[0] + '/' + convertEnd[2]);\n if (dateStart == 'Invalid Date')\n throw 'Start date is not a valid date';\n if (dateEnd == 'Invalid Date')\n throw 'End date is not a valid date';\n // To calculate the time difference of two dates\n const diffTime = dateEnd.getTime() - dateStart.getTime();\n const numberOfDays = diffTime / (1000 * 3600 * 24) + 1;\n if (numberOfDays < 0)\n throw 'The start date should be before the end date';\n return numberOfDays;\n};\n// Used to get values from nested json objects\nexport const resolvePath = (object, path, defaultValue) => path\n .split(/[\\.\\[\\]\\'\\\"]/)\n .filter((p) => p)\n .reduce((o, p) => (o ? o[p] : defaultValue), object);\nexport const isTraversable = (o) => Array.isArray(o) || (o !== null && ['function', 'object'].includes(typeof o));\nexport const getSwipeDirection = (touchstartX, touchstartY, touchendX, touchendY) => {\n const limit = Math.tan(((45 * 1.5) / 180) * Math.PI);\n const pageWidth = window.innerWidth || document.body.clientWidth;\n const treshold = Math.max(1, Math.floor(0.01 * pageWidth));\n const x = touchendX - touchstartX;\n const y = touchendY - touchstartY;\n const xy = Math.abs(x / y);\n const yx = Math.abs(y / x);\n if (Math.abs(x) > treshold || Math.abs(y) > treshold) {\n if (yx <= limit) {\n if (x < 0) {\n return 'left';\n }\n else {\n return 'right';\n }\n }\n if (xy <= limit) {\n if (y < 0) {\n return 'top';\n }\n else {\n return 'bottom';\n }\n }\n }\n else {\n return 'tap';\n }\n};\n","// @ts-nocheck\nimport { getSwipeDirection } from './helpers.js';\nexport const createTabsLinks = function (tabsElement) {\n const details = tabsElement.querySelectorAll(':scope > details');\n const detailsORLinks = tabsElement.querySelectorAll(':scope > details, :scope > a');\n const summaries = tabsElement.querySelectorAll(':scope > details > summary');\n let tabLinks = tabsElement.querySelector(':scope > .tabs__links');\n if (tabsElement.shadowRoot && tabsElement.shadowRoot.querySelector('.tabs__links'))\n tabLinks = tabsElement.shadowRoot.querySelector('.tabs__links');\n if (!tabLinks) {\n tabLinks = document.createElement('div');\n tabLinks.classList.add('tabs__links');\n const tabLinksWrapper = document.createElement('div');\n tabLinksWrapper.classList.add('tabs__links__wrapper');\n tabLinksWrapper.prepend(tabLinks);\n tabsElement.prepend(tabLinksWrapper);\n }\n // Create the tab buttons from the summary titles\n let tabindex = 0;\n detailsORLinks.forEach((element, index) => {\n let button = document.createElement('button');\n if (element.matches('details')) {\n const summary = element.querySelector(':scope > summary');\n const isDisabled = summary.classList.contains('disabled');\n summary.classList.add('visually-hidden');\n if (element.hasAttribute('id'))\n button.setAttribute('data-id', `${element.getAttribute('id')}`);\n if (element.hasAttribute('open')) {\n button.setAttribute('aria-pressed', true);\n }\n button.innerHTML = `${summary.innerText}`;\n button.classList.add('link');\n button.setAttribute('data-index', tabindex);\n element.setAttribute('tabindex', '-1');\n if (isDisabled) {\n button.classList.add('disabled');\n }\n tabindex++;\n }\n else if (element.matches('a')) {\n button = element;\n }\n button.classList.add('link');\n tabLinks.appendChild(button);\n });\n};\nexport const setTabsEventHandlers = function (tabsElement) {\n const details = tabsElement.querySelectorAll(':scope > details');\n const summaries = tabsElement.querySelectorAll(':scope > details > summary');\n let buttonWrapper = tabsElement.querySelector(':scope .tabs__links');\n let buttons = tabsElement.querySelectorAll(':scope .tabs__links > button');\n let nextButton = tabsElement.querySelector(':scope .tabs__next');\n var scrollTimeout;\n window.isClicked = false;\n window.isScrolling = false;\n if (tabsElement.shadowRoot) {\n buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button');\n buttonWrapper = tabsElement.shadowRoot.querySelector('.tabs__links');\n nextButton = tabsElement.shadowRoot.querySelector(':scope .tabs__next');\n }\n // Set the on click for the tab buttons, these will open the details box it matches too\n buttons.forEach((button) => {\n button.addEventListener('click', (e) => {\n e.preventDefault();\n if (window.isScrolling)\n return;\n if (!window.triggered)\n window.isClicked = true;\n if (button.classList.contains('disabled'))\n return false;\n buttons.forEach((buttonLoopItem) => {\n const buttonPressed = buttonLoopItem == button ? true : false;\n buttonLoopItem.setAttribute('aria-pressed', buttonPressed);\n });\n buttonWrapper.scroll({\n top: 0,\n left: button.offsetLeft,\n behavior: 'smooth',\n });\n details.forEach((detail, detailsIndex) => {\n const detailsOpen = button.getAttribute('data-index') == detailsIndex ? true : false;\n if (detailsOpen)\n detail.setAttribute('open', detailsOpen);\n else\n detail.removeAttribute('open');\n });\n if (button.matches(':last-child')) {\n nextButton.setAttribute('disabled', 'disabled');\n }\n else {\n nextButton.removeAttribute('disabled');\n }\n // Data layer Open Event\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'openTab',\n tabTitle: button.textContent,\n });\n });\n });\n buttonWrapper.addEventListener('scroll', (event) => {\n if (window.isScrolling)\n return;\n clearTimeout(scrollTimeout);\n window.isScrolling = true;\n });\n buttonWrapper.addEventListener('scrollend', (event) => {\n window.isScrolling = false;\n clearTimeout(scrollTimeout);\n scrollTimeout = setTimeout(function () {\n if (window.isClicked) {\n window.isClicked = false;\n return false;\n }\n let buttonToClick = buttons[0];\n let closestOffset = Math.abs(buttonToClick.getBoundingClientRect().left);\n buttons.forEach((button) => {\n if (Math.abs(button.getBoundingClientRect().left) < closestOffset) {\n closestOffset = Math.abs(button.getBoundingClientRect().left);\n buttonToClick = button;\n }\n });\n window.triggered = true;\n buttonToClick.focus();\n buttonToClick.click();\n window.triggered = false;\n }, 200);\n });\n // Make sure we dont loose existing summary functionality\n summaries.forEach((summary, index) => {\n summary.addEventListener('click', (e) => {\n e.preventDefault();\n buttons[index].click();\n });\n });\n nextButton.addEventListener('click', (e) => {\n e.preventDefault();\n const currentTab = buttonWrapper.querySelector('[aria-pressed=\"true\"]');\n const nextTab = currentTab.nextSibling;\n if (nextTab)\n nextTab.click();\n });\n if (tabsElement.classList.contains('tabs--guided')) {\n let touchstartX = 0;\n let touchstartY = 0;\n let touchendX = 0;\n let touchendY = 0;\n details.forEach((detail) => {\n detail.addEventListener('touchstart', (event) => {\n event.stopPropagation();\n touchstartX = event.changedTouches[0].screenX;\n touchstartY = event.changedTouches[0].screenY;\n });\n detail.addEventListener('touchend', (event) => {\n event.stopPropagation();\n touchendX = event.changedTouches[0].screenX;\n touchendY = event.changedTouches[0].screenY;\n const direction = getSwipeDirection(touchstartX, touchstartY, touchendX, touchendY);\n const currentTab = buttonWrapper.querySelector('[aria-pressed=\"true\"]');\n const nextTab = currentTab.nextSibling;\n const prevTab = currentTab.previousSibling;\n switch (direction) {\n case 'left':\n if (nextTab)\n nextTab.click();\n break;\n case 'right':\n if (prevTab)\n prevTab.click();\n break;\n }\n });\n });\n }\n};\nexport const openFirstTab = function (tabsElement) {\n if (!tabsElement.querySelector(':scope > details'))\n return false;\n const details = tabsElement.querySelectorAll(':scope > details');\n const buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button');\n if (location.hash &&\n tabsElement.shadowRoot.querySelector(`.tabs__links [data-id=\"${location.hash.replace('#', '')}\"]`)) {\n tabsElement.shadowRoot\n .querySelector(`[data-id=\"${location.hash.replace('#', '')}\"]`)\n .setAttribute('aria-pressed', true);\n tabsElement.querySelector(`details[id=\"${location.hash.replace('#', '')}\"]`).setAttribute('open', true);\n }\n else if (!tabsElement.querySelector(`details[open]`)) {\n details[0].setAttribute('open', true);\n buttons[0].setAttribute('aria-pressed', true);\n }\n};\nconst tabs = function (tabsElement) {\n createTabsLinks(tabsElement);\n setTabsEventHandlers(tabsElement);\n openFirstTab(tabsElement);\n};\nexport default tabs;\n","// @ts-nocheck\nimport tabs from '../../modules/tabs.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'tabs',\n});\nclass iamTabs extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css')\n ? document.body.getAttribute('data-core-css')\n : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/tabs.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n\n :host(.admin-panel){\n display: contents!important;\n }\n \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=\"tabs\" part=\"tabs\">\n <div class=\"tabs__links__wrapper\">\n <div class=\"tabs__links\"></div>\n </div>\n <slot></slot>\n <button part=\"next-button\" class=\"btn btn-secondary btn-sm btn-compact fa-regular fa-chevron-right tabs__next\">Next</button>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n const classList = this.classList.toString().replace('container', '');\n this.shadowRoot.querySelector('.tabs').setAttribute('class', `tabs ${classList}`);\n tabs(this);\n }\n}\nexport default iamTabs;\n"],"names":["getSwipeDirection","touchstartX","touchstartY","touchendX","touchendY","limit","pageWidth","treshold","x","y","xy","yx","createTabsLinks","tabsElement","detailsORLinks","tabLinks","tabLinksWrapper","tabindex","element","index","button","summary","isDisabled","setTabsEventHandlers","details","summaries","buttonWrapper","buttons","nextButton","scrollTimeout","e","buttonLoopItem","buttonPressed","detail","detailsIndex","detailsOpen","event","buttonToClick","closestOffset","nextTab","direction","currentTab","prevTab","openFirstTab","tabs","iamTabs","assetLocation","coreCSS","template","classList"],"mappings":";;;IA8HO,MAAMA,EAAoB,CAACC,EAAaC,EAAaC,EAAWC,IAAc,CACjF,MAAMC,EAAQ,KAAK,IAAM,KAAmB,KAAK,EAAE,EAC7CC,EAAY,OAAO,YAAc,SAAS,KAAK,YAC/CC,EAAW,KAAK,IAAI,EAAG,KAAK,MAAM,IAAOD,CAAS,CAAC,EACnDE,EAAIL,EAAYF,EAChBQ,EAAIL,EAAYF,E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AgB,WAAY,CAC9B,aAAc,CACV,QACA,KAAK,aAAa,CAAE,KAAM,MAAQ,CAAA,EAClC,MAAMC,EAAgB,SAAS,KAAK,aAAa,sBAAsB,EACjE,SAAS,KAAK,aAAa,sBAAsB,EACjD,UACAC,EAAU,SAAS,KAAK,aAAa,eAAe,EACpD,SAAS,KAAK,aAAa,eAAe,EAC1C,GAAGD,qBAEHE,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA,eAEdD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOT,KAAK,aAAa,KAAK,EAAI,YAAY,KAAK,aAAa,KAAK,MAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAWpE,KAAK,WAAW,YAAYC,EAAS,QAAQ,UAAU,EAAI,CAAC,CAChE,CACA,mBAAoB,CAChB,MAAMC,EAAY,KAAK,UAAU,SAAU,EAAC,QAAQ,YAAa,EAAE,EACnE,KAAK,WAAW,cAAc,OAAO,EAAE,aAAa,QAAS,QAAQA,GAAW,EAChFL,EAAK,IAAI,CACb,CACJ"}
|
|
1
|
+
{"version":3,"file":"tabs.component.min.js","sources":["../../modules/helpers.js","../../modules/tabs.js","tabs.component.js"],"sourcesContent":["// @ts-nocheck\n/**\n * Global helper functions to help maintain and enhance framework elements.\n * @module Helpers\n */\n/**\n * Add global classes used by the CSS and later JavaScript.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addBodyClasses = (body) => {\n body.classList.add('js-enabled');\n if (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0) {\n body.classList.add('ie');\n }\n return null;\n};\n/**\n * Add global events.\n * @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.\n */\nexport const addGlobalEvents = (body) => {\n const checkElements = function (hash) {\n const label = document.querySelector(`label[for=\"${hash.replace('#', '')}\"]`);\n const summary = document.querySelector(hash + ' summary');\n const dialog = document.querySelector(`dialog${hash}`);\n const detail = document.querySelector(`detail${hash}`);\n if (label instanceof HTMLElement)\n label.click();\n else if (summary instanceof HTMLElement)\n summary.click();\n else if (dialog instanceof HTMLElement)\n dialog.showModal();\n else if (detail instanceof HTMLElement)\n detail.addAttribute('open');\n };\n if (location.hash)\n checkElements(location.hash);\n window.addEventListener('hashchange', function () {\n checkElements(location.hash);\n }, false);\n addEventListener('popstate', (event) => {\n if (event && event.state && event.state.type && event.state.type == 'pagination') {\n const form = document.querySelector(`#${event.state.form}`);\n const pageInput = document.querySelector(`#${event.state.form} [data-pagination]`);\n if (pageInput)\n pageInput.value = event.state.page;\n else\n form.innerHTML += `<input name=\"page\" type=\"hidden\" data-pagination=\"true\" value=\"${event.state.page}\" />`;\n form.dispatchEvent(new Event('submit'));\n }\n });\n document.addEventListener('submit', (event) => {\n if (event && event.target instanceof HTMLElement && event.target.matches('form')) {\n const form = event.target;\n // Reset password types\n Array.from(form.querySelectorAll('[data-password-type]')).forEach((input, index) => {\n input.setAttribute('type', 'password');\n });\n if (form.querySelector(':invalid') ||\n form.querySelector('.pwd-checker[data-strength=\"1\"]') ||\n form.querySelector('.pwd-checker[data-strength=\"2\"]')) {\n form.classList.add('was-validated');\n event.preventDefault();\n }\n if (form.querySelector('iam-multiselect[data-is-required][data-error]')) {\n form.classList.add('was-validated');\n event.preventDefault();\n }\n }\n });\n document.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n if (document.querySelector('.dialog--transactional[open], .dialog--acknowledgement[open]')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n });\n Array.from(document.querySelectorAll('label progress')).forEach((progress, index) => {\n const label = progress.closest('label');\n label.setAttribute('data-percent', progress.getAttribute('value'));\n });\n return null;\n};\nexport const isNumeric = function (str) {\n if (typeof str != 'string')\n return false; // we only process strings!\n return (!isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...\n !isNaN(parseFloat(str))); // ...and ensure strings of whitespace fail\n};\nexport const zeroPad = (num, places) => String(num).padStart(places, '0');\nexport const ucfirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);\nexport const ucwords = (str) => str\n .split(' ')\n .map((s) => ucfirst(s))\n .join(' ');\nexport const unsnake = (str) => str.replace(/_/g, ' ');\nexport const snake = (str) => str.replace(/ /g, '_');\nexport const safeID = function (str) {\n str = str.toLowerCase();\n str = snake(str);\n str = str.replace(/\\W/g, '');\n return str;\n};\nexport const numberOfDays = function (startDateString, endDateString) {\n const convertStart = startDateString.split('/');\n const convertEnd = endDateString.split('/');\n const dateStart = new Date(convertStart[1] + '/' + convertStart[0] + '/' + convertStart[2]);\n const dateEnd = new Date(convertEnd[1] + '/' + convertEnd[0] + '/' + convertEnd[2]);\n if (dateStart == 'Invalid Date')\n throw 'Start date is not a valid date';\n if (dateEnd == 'Invalid Date')\n throw 'End date is not a valid date';\n // To calculate the time difference of two dates\n const diffTime = dateEnd.getTime() - dateStart.getTime();\n const numberOfDays = diffTime / (1000 * 3600 * 24) + 1;\n if (numberOfDays < 0)\n throw 'The start date should be before the end date';\n return numberOfDays;\n};\n// Used to get values from nested json objects\nexport const resolvePath = (object, path, defaultValue) => path\n .split(/[\\.\\[\\]\\'\\\"]/)\n .filter((p) => p)\n .reduce((o, p) => (o ? o[p] : defaultValue), object);\nexport const isTraversable = (o) => Array.isArray(o) || (o !== null && ['function', 'object'].includes(typeof o));\nexport const getSwipeDirection = (touchstartX, touchstartY, touchendX, touchendY) => {\n const limit = Math.tan(((45 * 1.5) / 180) * Math.PI);\n const pageWidth = window.innerWidth || document.body.clientWidth;\n const treshold = Math.max(1, Math.floor(0.01 * pageWidth));\n const x = touchendX - touchstartX;\n const y = touchendY - touchstartY;\n const xy = Math.abs(x / y);\n const yx = Math.abs(y / x);\n if (Math.abs(x) > treshold || Math.abs(y) > treshold) {\n if (yx <= limit) {\n if (x < 0) {\n return 'left';\n }\n else {\n return 'right';\n }\n }\n if (xy <= limit) {\n if (y < 0) {\n return 'top';\n }\n else {\n return 'bottom';\n }\n }\n }\n else {\n return 'tap';\n }\n};\n","// @ts-nocheck\nimport { getSwipeDirection } from './helpers.js';\nexport const createTabsLinks = function (tabsElement) {\n const details = tabsElement.querySelectorAll(':scope > details');\n const detailsORLinks = tabsElement.querySelectorAll(':scope > details, :scope > a');\n const summaries = tabsElement.querySelectorAll(':scope > details > summary');\n let tabLinks = tabsElement.querySelector(':scope > .tabs__links');\n if (tabsElement.shadowRoot && tabsElement.shadowRoot.querySelector('.tabs__links'))\n tabLinks = tabsElement.shadowRoot.querySelector('.tabs__links');\n if (!tabLinks) {\n tabLinks = document.createElement('div');\n tabLinks.classList.add('tabs__links');\n const tabLinksWrapper = document.createElement('div');\n tabLinksWrapper.classList.add('tabs__links__wrapper');\n tabLinksWrapper.prepend(tabLinks);\n tabsElement.prepend(tabLinksWrapper);\n }\n // Create the tab buttons from the summary titles\n let tabindex = 0;\n detailsORLinks.forEach((element, index) => {\n let button = document.createElement('button');\n if (element.matches('details')) {\n const summary = element.querySelector(':scope > summary');\n const isDisabled = summary.classList.contains('disabled');\n summary.classList.add('visually-hidden');\n if (element.hasAttribute('id'))\n button.setAttribute('data-id', `${element.getAttribute('id')}`);\n if (element.hasAttribute('open')) {\n button.setAttribute('aria-pressed', true);\n }\n button.innerHTML = `${summary.innerText}`;\n button.classList.add('link');\n button.setAttribute('data-index', tabindex);\n button.setAttribute('part', 'tab-link');\n element.setAttribute('tabindex', '-1');\n if (isDisabled) {\n button.classList.add('disabled');\n }\n tabindex++;\n }\n else if (element.matches('a')) {\n button = element;\n }\n button.classList.add('link');\n tabLinks.appendChild(button);\n });\n};\nexport const setTabsEventHandlers = function (tabsElement) {\n const details = tabsElement.querySelectorAll(':scope > details');\n const summaries = tabsElement.querySelectorAll(':scope > details > summary');\n let buttonWrapper = tabsElement.querySelector(':scope .tabs__links');\n let buttons = tabsElement.querySelectorAll(':scope .tabs__links > button');\n let nextButton = tabsElement.querySelector(':scope .tabs__next');\n var scrollTimeout;\n window.isClicked = false;\n window.isScrolling = false;\n if (tabsElement.shadowRoot) {\n buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button');\n buttonWrapper = tabsElement.shadowRoot.querySelector('.tabs__links');\n nextButton = tabsElement.shadowRoot.querySelector(':scope .tabs__next');\n }\n // Set the on click for the tab buttons, these will open the details box it matches too\n buttons.forEach((button) => {\n button.addEventListener('click', (e) => {\n e.preventDefault();\n if (window.isScrolling)\n return;\n if (!window.triggered)\n window.isClicked = true;\n if (button.classList.contains('disabled'))\n return false;\n buttons.forEach((buttonLoopItem) => {\n const buttonPressed = buttonLoopItem == button ? true : false;\n buttonLoopItem.setAttribute('aria-pressed', buttonPressed);\n });\n buttonWrapper.scroll({\n top: 0,\n left: button.offsetLeft,\n behavior: 'smooth',\n });\n details.forEach((detail, detailsIndex) => {\n const detailsOpen = button.getAttribute('data-index') == detailsIndex ? true : false;\n if (detailsOpen)\n detail.setAttribute('open', detailsOpen);\n else\n detail.removeAttribute('open');\n });\n if (button.matches(':last-child')) {\n nextButton.setAttribute('disabled', 'disabled');\n }\n else {\n nextButton.removeAttribute('disabled');\n }\n // Data layer Open Event\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'openTab',\n tabTitle: button.textContent,\n });\n });\n });\n buttonWrapper.addEventListener('scroll', (event) => {\n if (window.isScrolling)\n return;\n clearTimeout(scrollTimeout);\n window.isScrolling = true;\n });\n buttonWrapper.addEventListener('scrollend', (event) => {\n window.isScrolling = false;\n clearTimeout(scrollTimeout);\n scrollTimeout = setTimeout(function () {\n if (window.isClicked) {\n window.isClicked = false;\n return false;\n }\n let buttonToClick = buttons[0];\n let closestOffset = Math.abs(buttonToClick.getBoundingClientRect().left);\n buttons.forEach((button) => {\n if (Math.abs(button.getBoundingClientRect().left) < closestOffset) {\n closestOffset = Math.abs(button.getBoundingClientRect().left);\n buttonToClick = button;\n }\n });\n window.triggered = true;\n buttonToClick.focus();\n buttonToClick.click();\n window.triggered = false;\n }, 200);\n });\n // Make sure we dont loose existing summary functionality\n summaries.forEach((summary, index) => {\n summary.addEventListener('click', (e) => {\n e.preventDefault();\n buttons[index].click();\n });\n });\n nextButton.addEventListener('click', (e) => {\n e.preventDefault();\n const currentTab = buttonWrapper.querySelector('[aria-pressed=\"true\"]');\n const nextTab = currentTab.nextSibling;\n if (nextTab)\n nextTab.click();\n });\n if (tabsElement.classList.contains('tabs--guided')) {\n let touchstartX = 0;\n let touchstartY = 0;\n let touchendX = 0;\n let touchendY = 0;\n details.forEach((detail) => {\n detail.addEventListener('touchstart', (event) => {\n event.stopPropagation();\n touchstartX = event.changedTouches[0].screenX;\n touchstartY = event.changedTouches[0].screenY;\n });\n detail.addEventListener('touchend', (event) => {\n event.stopPropagation();\n touchendX = event.changedTouches[0].screenX;\n touchendY = event.changedTouches[0].screenY;\n const direction = getSwipeDirection(touchstartX, touchstartY, touchendX, touchendY);\n const currentTab = buttonWrapper.querySelector('[aria-pressed=\"true\"]');\n const nextTab = currentTab.nextSibling;\n const prevTab = currentTab.previousSibling;\n switch (direction) {\n case 'left':\n if (nextTab)\n nextTab.click();\n break;\n case 'right':\n if (prevTab)\n prevTab.click();\n break;\n }\n });\n });\n }\n};\nexport const openFirstTab = function (tabsElement) {\n if (!tabsElement.querySelector(':scope > details'))\n return false;\n const details = tabsElement.querySelectorAll(':scope > details');\n const buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button');\n if (location.hash &&\n tabsElement.shadowRoot.querySelector(`.tabs__links [data-id=\"${location.hash.replace('#', '')}\"]`)) {\n tabsElement.shadowRoot\n .querySelector(`[data-id=\"${location.hash.replace('#', '')}\"]`)\n .setAttribute('aria-pressed', true);\n tabsElement.querySelector(`details[id=\"${location.hash.replace('#', '')}\"]`).setAttribute('open', true);\n }\n else if (!tabsElement.querySelector(`details[open]`)) {\n details[0].setAttribute('open', true);\n buttons[0].setAttribute('aria-pressed', true);\n }\n};\nconst tabs = function (tabsElement) {\n createTabsLinks(tabsElement);\n setTabsEventHandlers(tabsElement);\n openFirstTab(tabsElement);\n};\nexport default tabs;\n","// @ts-nocheck\nimport tabs from '../../modules/tabs.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'tabs',\n});\nclass iamTabs extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const coreCSS = document.body.hasAttribute('data-core-css')\n ? document.body.getAttribute('data-core-css')\n : `${assetLocation}/css/core.min.css`;\n const loadCSS = `@import \"${assetLocation}/css/components/tabs.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n\n :host(.admin-panel){\n display: contents!important;\n }\n \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=\"tabs\" part=\"tabs\">\n <div class=\"tabs__links__wrapper\" part=\"wrapper\">\n <div class=\"tabs__links\" part=\"tab-links\"></div>\n </div>\n <slot></slot>\n <button part=\"next-button\" class=\"btn btn-secondary btn-sm btn-compact fa-regular fa-chevron-right tabs__next\">Next</button>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n const classList = this.classList.toString().replace('container', '');\n this.shadowRoot.querySelector('.tabs').setAttribute('class', `tabs ${classList}`);\n tabs(this);\n }\n}\nexport default iamTabs;\n"],"names":["getSwipeDirection","touchstartX","touchstartY","touchendX","touchendY","limit","pageWidth","treshold","x","y","xy","yx","createTabsLinks","tabsElement","detailsORLinks","tabLinks","tabLinksWrapper","tabindex","element","index","button","summary","isDisabled","setTabsEventHandlers","details","summaries","buttonWrapper","buttons","nextButton","scrollTimeout","e","buttonLoopItem","buttonPressed","detail","detailsIndex","detailsOpen","event","buttonToClick","closestOffset","nextTab","direction","currentTab","prevTab","openFirstTab","tabs","iamTabs","assetLocation","coreCSS","template","classList"],"mappings":";;;IA8HO,MAAMA,EAAoB,CAACC,EAAaC,EAAaC,EAAWC,IAAc,CACjF,MAAMC,EAAQ,KAAK,IAAM,KAAmB,KAAK,EAAE,EAC7CC,EAAY,OAAO,YAAc,SAAS,KAAK,YAC/CC,EAAW,KAAK,IAAI,EAAG,KAAK,MAAM,IAAOD,CAAS,CAAC,EACnDE,EAAIL,EAAYF,EAChBQ,EAAIL,EAAYF,EAChBQ,EAAK,KAAK,IAAIF,EAAIC,CAAC,EACnBE,EAAK,KAAK,IAAIF,EAAID,CAAC,EACzB,GAAI,KAAK,IAAIA,CAAC,EAAID,GAAY,KAAK,IAAIE,CAAC,EAAIF,EAAU,CAClD,GAAII,GAAMN,EACN,OAAIG,EAAI,EACG,OAGA,QAGf,GAAIE,GAAML,EACN,OAAII,EAAI,EACG,MAGA,aAKf,OAAO,KAEf,ECzJaG,EAAkB,SAAUC,EAAa,CAClCA,EAAY,iBAAiB,kBAAkB,EAC/D,MAAMC,EAAiBD,EAAY,iBAAiB,8BAA8B,EAChEA,EAAY,iBAAiB,4BAA4B,EAC3E,IAAIE,EAAWF,EAAY,cAAc,uBAAuB,EAGhE,GAFIA,EAAY,YAAcA,EAAY,WAAW,cAAc,cAAc,IAC7EE,EAAWF,EAAY,WAAW,cAAc,cAAc,GAC9D,CAACE,EAAU,CACXA,EAAW,SAAS,cAAc,KAAK,EACvCA,EAAS,UAAU,IAAI,aAAa,EACpC,MAAMC,EAAkB,SAAS,cAAc,KAAK,EACpDA,EAAgB,UAAU,IAAI,sBAAsB,EACpDA,EAAgB,QAAQD,CAAQ,EAChCF,EAAY,QAAQG,CAAe,EAGvC,IAAIC,EAAW,EACfH,EAAe,QAAQ,CAACI,EAASC,IAAU,CACvC,IAAIC,EAAS,SAAS,cAAc,QAAQ,EAC5C,GAAIF,EAAQ,QAAQ,SAAS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perty
|
|
4
4
|
*/const u=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})},p=(i,t,e)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),e.forEach(r=>{i.addEventListener(r,function(o){const a={event:r,element:t,target:o.target};Object.keys(o.detail).forEach(d=>{const n=o.detail[d];a[d]=n}),window.dataLayer.push(a)})}),!0),h=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.1.0--
|
|
2
|
+
* iamKey v7.1.0--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/(function(t){typeof define=="function"&&define.amd?define(t):t()})(function(){"use strict";var t=["accordion","header","table","tabs","card","filter-card","video-card","record-card","filterlist","applied-filters","pagination","notification","actionbar","nav","collapsible-side","address-lookup","fileupload","search","inline-edit","multiselect","multi-step","slider","carousel","marketing","barchart"],a="iam",i={rootMargin:"50px",threshold:.1},r=".component.min.js";t.forEach(e=>{if(document.getElementsByTagName("".concat(a,"-").concat(e)).length!==0){var s=l=>{l.forEach(o=>{o.intersectionRatio>0&&(console.log(e),import("./components/".concat(e,"/").concat(e).concat(r)).then(c=>{window.customElements.get("".concat(a,"-").concat(e))||window.customElements.define("".concat(a,"-").concat(e),c.default)}).catch(c=>{console.log(c.message)}),n.unobserve(o.target))})},n=new IntersectionObserver(s,i);n.observe(document.getElementsByTagName("".concat(a,"-").concat(e))[0])}})});
|
|
5
5
|
//# sourceMappingURL=components.bundle.js.map
|
|
@@ -31,6 +31,7 @@ export const createTabsLinks = function (tabsElement) {
|
|
|
31
31
|
button.innerHTML = `${summary.innerText}`;
|
|
32
32
|
button.classList.add('link');
|
|
33
33
|
button.setAttribute('data-index', tabindex);
|
|
34
|
+
button.setAttribute('part', 'tab-link');
|
|
34
35
|
element.setAttribute('tabindex', '-1');
|
|
35
36
|
if (isDisabled) {
|
|
36
37
|
button.classList.add('disabled');
|