@iamproperty/components 5.3.0-beta1 → 5.3.0-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/components/component.reset.css +1 -1
- package/assets/css/components/component.reset.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- 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/card/card.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/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.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/search/search.component.min.js +1 -1
- package/assets/js/components/table/table.component.js +1 -1
- package/assets/js/components/table/table.component.min.js +2 -2
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/dynamic.min.js +1 -1
- package/assets/js/scripts.bundle.js +2 -2
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/helpers/max-height.scss +9 -9
- package/assets/ts/components/table/table.component.ts +1 -1
- package/dist/components.es.js +725 -713
- package/dist/components.umd.js +74 -79
- package/package.json +1 -1
- package/src/components/Table/Table.vue +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v5.3.0-
|
|
2
|
+
* iamKey v5.3.0-beta2
|
|
3
3
|
* Copyright 2022-2024 iamproperty
|
|
4
4
|
*/(function(_){typeof define=="function"&&define.amd?define(_):_()})(function(){"use strict";var _=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),st=r=>{var t=function(e){var s=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),c=document.querySelector(e+" summary"),o=document.querySelector("dialog".concat(e));s instanceof HTMLElement?s.click():c instanceof HTMLElement?c.click():o instanceof HTMLElement&&o.showModal()};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",a=>{if(a&&a.state&&a.state.type&&a.state.type=="pagination"){var e=document.querySelector("#".concat(a.state.form)),s=document.querySelector("#".concat(a.state.form," [data-pagination]"));s?s.value=a.state.page:e.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(a.state.page,'" />'),e.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",a=>{if(a&&a.target instanceof HTMLElement&&a.target.matches("form")){var e=a.target;Array.from(e.querySelectorAll("[data-password-type]")).forEach((s,c)=>{s.setAttribute("type","password")}),(e.querySelector(":invalid")||e.querySelector('.pwd-checker[data-strength="1"]')||e.querySelector('.pwd-checker[data-strength="2"]'))&&(e.classList.add("was-validated"),a.preventDefault())}}),null},it=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},ot=(r,t)=>String(r).padStart(t,"0"),nt=r=>r.charAt(0).toUpperCase()+r.slice(1),k=(r,t,a)=>t.split(/[\.\[\]\'\"]/).filter(e=>e).reduce((e,s)=>e?e[s]:a,r);class ct{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(a){for(var e=a.target;e&&e!=this;e=e.parentNode)if(e.matches("a")){a.preventDefault(),U(e);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((a,e)=>{var s=new Image;s.onload=function(){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(c,o),document.body.classList.add("youtubeLoaded"),a(!0),c.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),U(n.target.closest("a")))},!1)}},s.onerror=function(){e(!1)},s.src="https://youtube.com/favicon.ico"})}}var U=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=t.getAttribute("data-id"),e=t.getAttribute("id");if(typeof e>"u"||e==null){var s=String.fromCharCode(65+Math.floor(Math.random()*26));e=s+Date.now(),t.setAttribute("id",e)}function c(){window.player=new YT.Player(e,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:o,onStateChange:d}})}c();function o(i){i.target.playVideo()}var n=!1;function d(i){if(i.data==YT.PlayerState.PLAYING&&!n){var l=document.getElementById(e);l.classList.add("player-ready"),n=!0}}},dt=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((t,a)=>{var e=t.closest(".dialog__wrapper");e||(t.removeAttribute("open"),t.showModal(),t.focus(),J(t))}),r.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var a=t.target.closest("[data-modal]"),e=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),s=document.querySelector("dialog#".concat(e));J(s),s.showModal(),s.focus();var c=s.offsetWidth;s.setAttribute("style","max-width: ".concat(c,"px;")),Array.from(s.querySelectorAll("[data-duplicate]")).forEach((v,x)=>{var L=v.getAttribute("data-duplicate"),E=document.getElementById(L);if(v.checked!=E.checked){v.checked=E.checked;var C=new Event("change");v.dispatchEvent(C)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:e})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var o=t.target.closest("dialog[open]");t.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var n=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:n.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var d=t.target.closest("dialog[open]"),i=window.getComputedStyle(d);if(i.display==="contents"&&(d=d.parentNode.closest("dialog[open]")),!d.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||d.classList.contains("dialog--multi")){var l=d.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest('input[type="radio"]')||d.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var u=t.target.closest(".dialog__wrapper > button"),f=t.target.closest(".dialog__wrapper > button").parentNode,b="openPopover",h=f.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=h&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.removeAttribute("aria-expanded")}),h.hasAttribute("open"))h.close(),b="closePopover",h.removeAttribute("style"),u.removeAttribute("aria-expanded");else{h.show(),u.setAttribute("aria-expanded",!0);var m=u.getBoundingClientRect(),p=m.top,y=m.left;if(u.closest("iam-table")){var w=u.closest("iam-table").parentNode.getBoundingClientRect();p-=w.top,y-=w.left}h.classList.contains("dialog--fix")&&h.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(y,"px; margin: 3rem 0 0 0;"))}var A=h.getBoundingClientRect(),g=A.bottom-window.scrollY,S=window.innerHeight-window.scrollY;if(g>S){var T=h.hasAttribute("style")?h.getAttribute("style")+" ":"";h.setAttribute("style",T+"transform: translate(0, calc(-100% - 4rem))"),A=h.getBoundingClientRect();var q=A.top-window.scrollY;q<100&&h.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:b,id:u.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((v,x)=>{v.removeAttribute("aria-expanded")}))}),null),J=r=>{r.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!r.classList.contains("dialog--multi")&&r.addEventListener("cancel",c=>{c.preventDefault()});var t=r.querySelector(".youtube-embed a");if(t&&U(t),r.classList.contains("dialog--multi")&&!r.querySelector(":scope > .steps")&<(r),!r.querySelector(":scope > .mh-lg")&&!r.classList.contains("dialog--multi")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var a=r.querySelector(".mh-lg"),e=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(e){var s=e.previousSibling;a.before(e),s&&e.before(s)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},lt=r=>{var t="",a=Array.from(r.querySelectorAll("fieldset[data-title]")),e=r.querySelector("form");a.forEach((i,l)=>{t+='<button data-title="'.concat(i.getAttribute("data-title"),'" type="button" class="').concat(l==0?"active":"",'" tabindex="-1">').concat(i.getAttribute("data-title"),"</button>");var u=document.createElement("div");if(u.classList.add("btn--wrapper"),i.appendChild(u),l!=0&&(u.innerHTML+='<button data-title="'.concat(a[l-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),l!=a.length-1&&(u.innerHTML+='<button data-title="'.concat(a[l+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),l==a.length-1)if(e&&e.querySelector(':scope > button[type="submit"]')){var f=e.querySelector(':scope > button[type="submit"]');f.classList.add("mb-0"),u.insertAdjacentElement("beforeend",f)}else u.innerHTML+='<button data-title="'.concat(a[l].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')}),r.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var s=Array.from(r.querySelectorAll("fieldset.was-validated")),c=0;c<s.length;c++){var o=s[c],n=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((i,l)=>{i.classList.add("active")});break}else Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((i,l)=>{i.classList.add("valid")})}r.addEventListener("invalid",function(){return function(i){i.preventDefault()}}(),!0);function d(i){var l=r.querySelector("fieldset.active")?r.querySelector("fieldset.active"):r.querySelector("fieldset[data-title]"),u=l.getAttribute("data-title"),f=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((y,w)=>{y.checkValidity()||(f=!1)}),f?Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((y,w)=>{y.classList.add("valid")}):Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((y,w)=>{y.classList.remove("valid")}),f||!i.hasAttribute("data-next")){var b=r.querySelector('fieldset[data-title="'.concat(i.getAttribute("data-title"),'"]')),h=r.querySelector('.steps button[data-title="'.concat(i.getAttribute("data-title"),'"]'));Array.from(r.querySelectorAll("button")).forEach((y,w)=>{y.classList.remove("active")}),Array.from(r.querySelectorAll("fieldset")).forEach((y,w)=>{y.classList.remove("active")}),h.classList.add("active"),b.classList.add("active")}var m=Array.from(r.querySelectorAll("fieldset")).length,p=Array.from(r.querySelectorAll("fieldset.valid")).length;r.style.setProperty("--progress","".concat(p/(m-1)*100,"%"))}r.addEventListener("keydown",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest("button")){var l=i.target.closest("button");i.keyCode==13&&l.getAttribute("type")!="submit"&&(i.preventDefault(),d(l))}if(i&&i.target instanceof HTMLElement&&i.target.closest("input")){var u=i.target.closest("input");u.classList.remove("is-invalid"),i.keyCode==13&&i.preventDefault()}}),r.addEventListener("click",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest('button[type="submit"]')){var l=i.target.closest("form");l.classList.add("was-validated")}else if(i&&i.target instanceof HTMLElement&&i.target.closest("button[data-title]")){var u=i.target.closest("button[data-title]");d(u)}return null})};function ut(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var t=r.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var a=r.target.closest("summary"),e=r.target.closest("a"),s=r.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),e&&window.dataLayer.push({event:"linkClicked",linkText:e.hasAttribute("title")?e.getAttribute("title")||"":e.textContent||"",class:e.hasAttribute("class")&&e.getAttribute("class")||"",href:e.getAttribute("href")||""}),s&&window.dataLayer.push({event:"buttonClicked",buttonText:s.textContent||"",class:s.hasAttribute("class")&&s.getAttribute("class")||""})}})}function ht(r){var t=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",t).then(function(a){for(var e=[],s=new DataView(a),c=0;c<s.byteLength;c+=4){var o=s.getUint32(c),n=o.toString(16),d="00000000",i=(d+n).slice(-d.length);e.push(i)}return e.join("")})}var ft=(r,t)=>{ht(r).then(function(a){var e=new XMLHttpRequest;e.addEventListener("load",function(){var s=this.responseText.split(`
|
|
5
5
|
`),c=a.slice(5).toUpperCase(),o=!1;for(var n in s)if(s[n].substring(0,35)==c){o=!0;break}var d=new CustomEvent("hibpCheck",{detail:o});t.dispatchEvent(d)}),e.open("GET","https://api.pwnedpasswords.com/range/"+a.substr(0,5)),e.send()})},bt=r=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((e,s)=>{e.parentElement,mt(e)}),Array.from(document.querySelectorAll("label input")).forEach((e,s)=>{!e.closest("label").querySelector(".optional-text")&&!e.hasAttribute("required")&&e.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>')}),document.querySelector('input[type="date"]')){let e=function(s){var c=s.getFullYear(),o=String(s.getMonth()+1).padStart(2,"0"),n=String(s.getDate()).padStart(2,"0");return"".concat(c,"-").concat(o,"-").concat(n)};var a=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((s,c)=>{var o=a;if(s.hasAttribute("data-start")&&(o.setDate(o.getDate()+parseInt(s.getAttribute("data-start"))),s.setAttribute("min",e(o))),s.hasAttribute("data-period")){var n=parseInt(s.getAttribute("data-period")),d=new Date;d.setDate(o.getDate()+n),s.setAttribute("max",e(d))}if(s.hasAttribute("data-allowed-days")){var i=JSON.parse("[".concat(s.getAttribute("data-allowed-days"),"]"));s.addEventListener("input",function(l){var u=new Date(this.value).getUTCDay();i.includes(u)?s.setCustomValidity(""):s.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&t(),document.onreadystatechange=()=>{document.readyState==="complete"&&t()},r.addEventListener("input",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("input,textarea,select")){var e=a.target.closest("input,textarea,select");e.parentElement,e.hasAttribute("type")&&e.getAttribute("type")=="color"&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length),e.hasAttribute("data-strength-checker")&&vt(e)}}),r.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("select")){var e=a.target.closest("select");if(e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){var s=document.getElementById(e.getAttribute("data-input")),c=e.value;Q(s,c)}}if(a&&a.target instanceof HTMLElement&&a.target.closest('dialog [type="radio"]')){var o=a.target.closest("dialog");a.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((n,d)=>{n.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((n,d)=>{n.setAttribute("autofocus",!0)})}}),r.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-type][data-input]:not(select)")){var e=a.target.closest("[data-change-type]"),s=document.getElementById(e.getAttribute("data-input")),c=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",s.getAttribute("type")),Q(s,c),e.hasAttribute("data-alt-class")){var o=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",o)}}})},mt=r=>{var t=r.parentElement,a=r.getAttribute("maxlength");t.style.setProperty("--maxlength",a);var e=r.nextElementSibling;(!e||e&&e.classList.contains("invalid-feedback"))&&(e=document.createElement("span"),t.insertBefore(e,r.nextSibling)),e.setAttribute("data-count",r.value.length)},Q=(r,t)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",t)},vt=function r(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",e=document.getElementById(t.getAttribute("data-strength-checker")),s=t.value,c=t.hasAttribute("minlength")?t.getAttribute("minlength"):12,o=1,n=["Very weak","Weak","Average","Strong","Very strong"],d="";if(s.match(/(?=.*[0-9])/)&&(o+=1),s.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(o+=1),s.match(/(?=.*[a-z])/)&&(o+=1),s.match(/(?=.*[A-Z])/)&&(o+=1),s.length<c&&(o=1,d="(must be at least ".concat(c," characters.)")),o>=3&&a=="no"){let i=function(l,u){l.detail?r(u,"danger"):r(u,"success"),u.removeEventListener("hibpCheck",i)};ft(s,t),t.addEventListener("hibpCheck",function(l){i(l,t)})}else o>=3&&a=="danger"&&(o=3,d="(this password is very common)");e&&(o<=3?e.classList.add("invalid-feedback"):e.classList.remove("invalid-feedback"),e.setAttribute("data-strength",o),e.innerHTML="Password strength: ".concat(n[o-1]," ").concat(d))},pt=r=>{if(Array.from(r.querySelectorAll("details")).forEach((a,e)=>{a.addEventListener("mouseenter",function(s){window.matchMedia("(min-width: 62em)").matches&&a.setAttribute("open","true")},!1),a.addEventListener("mouseleave",function(s){window.matchMedia("(min-width: 62em)").matches&&a.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(a=>{var[e]=a;return e.target.classList.toggle("is-stuck",e.intersectionRatio<1)},{threshold:[1]});t.observe(r)}};function yt(r){var t,a=r.querySelector(".testimonial__images"),e=a.querySelectorAll("img").length;if(e==1)return!1;r.classList.add("testimonial--multi");var s=function(o){var n=r.querySelector(".btn-next"),d=r.querySelector(".btn-prev");n.setAttribute("data-go",o+1),d.setAttribute("data-go",o-1),n.removeAttribute("disabled"),d.removeAttribute("disabled"),o==1?d.setAttribute("disabled",!0):o==e&&n.setAttribute("disabled",!0)};a.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var o=a.scrollWidth,n=a.scrollHeight,d=a.scrollLeft,i=a.scrollTop,l=Math.round(d/o*e)+1;d==0&&i!=0&&(l=Math.round(i/n*e)+1),r.setAttribute("data-show",l),s(l)},300)},!1),r.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches("[data-go]")){var n=parseInt(o.getAttribute("data-go")),d=0,i=0,l=a.scrollWidth,u=a.scrollHeight;l>u?i=Math.floor(l*((n-1)/e)):d=Math.floor(u*((n-1)/e)),a.scroll({top:d,left:i,behavior:"smooth"});break}},!1)}function gt(r,t){var a,e=r.querySelector(".carousel__inner"),s=r.querySelector(".carousel__controls"),c=t.querySelectorAll(".col").length;e.addEventListener("scroll",function(o){clearTimeout(a),a=setTimeout(function(){var n=e.clientWidth,d=e.scrollWidth,i=e.scrollLeft,l=Math.round(i/d*c)+1,u=t.querySelector(".col:last-child").offsetLeft+50;e.scrollLeft+n>=u&&(l=c),Array.from(r.querySelectorAll(".carousel__controls button")).forEach((f,b)=>{f.removeAttribute("aria-current")}),r.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?r.querySelector(".btn-prev").setAttribute("disabled","disabled"):r.querySelector(".btn-prev").removeAttribute("disabled"),l==c?r.querySelector(".btn-next").setAttribute("disabled","disabled"):r.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),s.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches("button")){o.preventDefault(),Array.from(s.querySelectorAll("button")).forEach((i,l)=>{i.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);var d=t.querySelector("*:nth-child(".concat(n.getAttribute("data-slide"),")"));e.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),r.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches(".btn-next, .btn-prev")){o.preventDefault();var d=n.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:d,behavior:"smooth"});break}},!1)}function At(r){r.addEventListener("change",function(t){var a=parseInt(r.querySelector("[data-min] select,[data-min] input").value),e=parseInt(r.querySelector("[data-max] select,[data-max] input").value);Array.from(r.querySelectorAll("[data-min] input")).forEach((s,c)=>{s.setAttribute("max",e)}),Array.from(r.querySelectorAll("[data-max] input")).forEach((s,c)=>{s.setAttribute("min",a)}),Array.from(r.querySelectorAll("[data-min] select option")).forEach((s,c)=>{parseInt(s.getAttribute("value"))>e?s.classList.add("d-none"):s.classList.remove("d-none")}),Array.from(r.querySelectorAll("[data-max] select option")).forEach((s,c)=>{parseInt(s.getAttribute("value"))<a?s.classList.add("d-none"):s.classList.remove("d-none")})},!1)}function wt(r){r.addEventListener("change",function(t){if(r.matches("[data-value-if]")){var a=r.getAttribute("data-redirect"),e=r.getAttribute("data-value-if");r.value==e&&(document.location.href=a)}else typeof r.value<"u"&&(document.location.href=r.value)},!1)}function Lt(r){var t=r.querySelector(".row"),a=t.cloneNode(!0),e=r.querySelector("[data-add]");r.addEventListener("click",function(s){for(var c=s.target;c&&c!=this;c=c.parentNode){if(c.matches("[data-add]")){var o=a.cloneNode(!0);r.insertBefore(o,c),e.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length>=e.dataset.maxfiles&&e.setAttribute("disabled","disabled");break}if(c.matches("[data-delete]")){var n=c.closest(".row");n.remove(),e.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length<e.dataset.maxfiles&&e.removeAttribute("disabled");break}}},!1)}function St(r){Array.from(r.querySelectorAll("[data-input-range]")).forEach((t,a)=>{At(t)}),Array.from(r.querySelectorAll("[data-redirect]")).forEach((t,a)=>{wt(t)}),Array.from(r.querySelectorAll(".multiple-file-uploads")).forEach((t,a)=>{Lt(t)}),r.addEventListener("change",function(t){for(var a=t.target;a&&a!=this;a=a.parentNode)if(a.matches('[type="file"][data-filesize]')&&a.files&&a.files[0]){var e=a.dataset.filesize;a.files[0].size>e&&(a.value="",alert("File too large"));break}},!1),r.addEventListener("change",function(t){Array.from(r.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((a,e)=>{var s=a.closest("[data-group]")?a.closest("[data-group]"):r,c=a.dataset.activeif,o=a.dataset.equals,n=s.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?a.removeAttribute("disabled"):(a.setAttribute("disabled","disabled"),a.value="")}),Array.from(r.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((a,e)=>{var s=a.closest("[data-group]")?a.closest("[data-group]"):r,c=a.dataset.activeif,o=a.dataset.equals,n=s.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?a.classList.remove("d-none"):a.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class Et extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var 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"):"".concat(t,"/css/core.min.css"),e='@import "'.concat(t,'/css/components/header.css";'),s=document.createElement("template");s.innerHTML=`
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
69
|
<iam-pagination class="pagination--table" `).concat(this.hasAttribute("data-page")?'data-page="'.concat(this.getAttribute("data-page"),'"'):"",` ></iam-pagination>
|
|
70
|
-
`),this.shadowRoot.appendChild(c.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(s,"</style>"))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",t.has("show")?t.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));var a=this.classList.toString();a=a.replace("table--cta",""),a=a.replace("table--loading",""),
|
|
70
|
+
`),this.shadowRoot.appendChild(c.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(s,"</style>"))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",t.has("show")?t.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));var a=this.classList.toString();a=a.replace("table--cta",""),a=a.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=" ".concat(a),this.querySelector(".actionbar__sticky")&&this.shadowRoot.querySelector(".table__wrapper").classList.add("has-actionbar"),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector("iam-pagination"),this.pagination.setAttribute("data-total",this.getAttribute("data-total")),this.pagination.setAttribute("data-page",this.getAttribute("data-page")),this.pagination.setAttribute("data-show",this.getAttribute("data-show")),this.pagination.setAttribute("data-increment",this.getAttribute("data-show")),this.hasAttribute("data-page-jump")&&this.pagination.setAttribute("data-page-jump","true"),this.hasAttribute("data-per-page")&&this.pagination.setAttribute("data-per-page","true"),this.hasAttribute("data-item-count")&&this.pagination.setAttribute("data-item-count","true"),this.hasAttribute("data-loading")&&this.pagination.setAttribute("data-loading","true"),this.classList.contains("table--fullwidth")&&this.pagination.setAttribute("data-minimal","true");var e=this.classList.contains("table--cta");if(e||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector("#".concat(this.getAttribute("data-filterby"))):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),Z(this.table,this.form),this.form.querySelector("[data-pagination]")||(this.form.innerHTML+='<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||(this.form.innerHTML+='<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),Nt(this.table),It(this.table,this.form,this.pagination,this,this.savedTableBody),jt(this.table,this.form,this.pagination,this),Bt(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))et(this.table,this.form,this.pagination,this);else{let o=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,d=Math.floor(Math.random()*Date.now()*(n+1));return d};if(this.querySelector("iam-actionbar[data-selectall]")){var s=this.querySelector("iam-actionbar[data-selectall]");Array.from(this.table.querySelectorAll("thead tr")).forEach((n,d)=>{n.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{var i="row".concat(o(d));n.insertAdjacentHTML("afterbegin",'<td class="td--fixed selectrow"><input type="checkbox" name="row" id="'.concat(i,'"/><label for="').concat(i,'"><span class="visually-hidden">Select row</span></label></td>'))}),this.table.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest(".selectrow input")){var d=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,i=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;s.setAttribute("data-selected",d==i?"all":i)}}),s.addEventListener("selected",n=>{n.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,i)=>{d.checked=!1}):n.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,i)=>{d.checked=!0})})}var c=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{if(n.querySelector(":scope > td > .dialog__wrapper")){var i=n.querySelector(":scope > td > .dialog__wrapper").parentNode;i.classList.add("td--fixed"),c=Array.from(i.parentNode.children).indexOf(i)}}),c!=-1&&(this.table.querySelector("thead tr th:nth-child(".concat(c+1,")")).classList.add("th--fixed"),Array.from(this.table.querySelectorAll("tbody tr td:nth-child(".concat(c+1,")"))).forEach((n,d)=>{n.classList.add("td--fixed")})),W(this.table,this.form,this.pagination,this),Y(this.table,this.form,this),R(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",o=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))})}static get observedAttributes(){return["data-total","data-page","data-show"]}attributeChangedCallback(t,a,e){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),t){case"data-total":{a!=e&&this.pagination.setAttribute("data-total",e);break}case"data-show":{a!=e&&this.pagination.setAttribute("data-show",e);break}case"data-page":{a!=e&&this.pagination.setAttribute("data-page",e);break}}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class Ft extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");var t=this.classList.toString(),a=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"):"".concat(a,"/css/core.min.css"),s='@import "'.concat(a,'/css/components/card.css";'),c='@import "'.concat(a,'/css/components/card.global.css";'),o=document.createElement("template");o.innerHTML=`
|
|
71
71
|
<style>
|
|
72
72
|
@import "`.concat(e,`";
|
|
73
73
|
`).concat(s,`
|