@iamproperty/components 7.1.0--beta3 → 7.1.0--beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/assets/css/components/notification.css +1 -1
  2. package/assets/css/components/notification.css.map +1 -1
  3. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  4. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  5. package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
  6. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  7. package/assets/js/components/barchart/barchart.component.min.js +1 -1
  8. package/assets/js/components/card/card.component.min.js +1 -1
  9. package/assets/js/components/carousel/carousel.component.min.js +1 -1
  10. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  11. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  12. package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
  13. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  14. package/assets/js/components/header/header.component.min.js +1 -1
  15. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  16. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  17. package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
  18. package/assets/js/components/nav/nav.component.min.js +1 -1
  19. package/assets/js/components/notification/notification.component.js +23 -14
  20. package/assets/js/components/notification/notification.component.min.js +7 -7
  21. package/assets/js/components/notification/notification.component.min.js.map +1 -1
  22. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  23. package/assets/js/components/record-card/record-card.component.min.js +1 -1
  24. package/assets/js/components/search/search.component.min.js +1 -1
  25. package/assets/js/components/slider/slider.component.min.js +1 -1
  26. package/assets/js/components/table/table.component.min.js +1 -1
  27. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  28. package/assets/js/components/video-card/video-card.component.min.js +1 -1
  29. package/assets/js/components.bundle.js +1 -1
  30. package/assets/js/modules/notification.js +3 -1
  31. package/assets/js/scripts.bundle.js +1 -1
  32. package/assets/js/scripts.bundle.min.js +1 -1
  33. package/assets/sass/components/notification.scss +8 -0
  34. package/assets/ts/components/notification/notification.component.ts +27 -18
  35. package/assets/ts/modules/notification.ts +5 -1
  36. package/dist/components.es.js +165 -167
  37. package/dist/components.umd.js +41 -41
  38. package/package.json +1 -1
@@ -1 +1 @@
1
- :host,.iam-notification{display:block;padding:1.375rem 1.5rem 1.375rem 1rem !important;border-radius:0.5rem;box-shadow:2px 6px 12px rgba(0,0,0,.2);margin-bottom:1rem;font-size:0.9375rem;border:0.125rem solid var(--colour, var(--colour-info));outline:var(--contrast-outline-width, 0px) solid var(--colour-primary)}@media screen and (prefers-color-scheme: light){:host,.iam-notification{background:#e9f9fd}}:host ::slotted(i),:host i,.iam-notification ::slotted(i),.iam-notification i{color:var(--colour, currentColor)}:host([data-type]),.iam-notification[data-type]{border:0.125rem solid rgba(0,0,0,0)}:host(.colour-warning),.iam-notification.colour-warning{background:#fff6e6}:host(.colour-danger),.iam-notification.colour-danger{background:#fcebec}:host(.colour-success),.iam-notification.colour-success{background:#f8fdf6}:host(.bg-white),.iam-notification.bg-white{border:none;border-left:0.5rem solid var(--colour-info)}:host(.bg-white) ::slotted(i),:host(.bg-white) i,.iam-notification.bg-white ::slotted(i),.iam-notification.bg-white i{color:var(--colour-info)}:host([data-type=alert]),.iam-notification[data-type=alert]{border-radius:0;position:fixed;top:var(--nav-height);left:0;right:0;z-index:calc(var(--index-menu) - 1);margin-bottom:0}:host([data-type=toast]),.iam-notification[data-type=toast]{margin:auto;display:block;width:100%;max-width:22.5rem}:host([data-type=toast].notification--dismissable){max-width:28.375rem}.notification{container-type:inline-size;max-width:69.5rem;margin-inline:auto;display:flex;flex-wrap:nowrap}@media screen and (prefers-color-scheme: light){.notification{color:var(--colour-heading)}}.notification .notification__icon{margin-inline-end:1rem;flex-grow:0}.notification .notification__icon ::slotted(i){font-size:1.125rem}.notification .notification__inner{display:flex;flex-wrap:wrap;flex-grow:1}@container (width > 23.4375em){.notification .notification__inner{flex-wrap:nowrap}}.notification .notification__text{flex-grow:1;flex-shrink:1;width:100%}.notification .notification__btns{flex-grow:0;flex-shrink:0;--colour-underline: currentColor}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:1rem 1rem 0 0 !important}@container (width > 23.4375em){.notification .notification__btns{display:flex;align-items:center;border-left:1px solid currentColor;margin-left:2rem}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:0 0 0 2rem !important}}.notification .notification__dismiss{flex-grow:0;padding-left:1rem}.notification .notification__dismiss button{text-indent:300%;overflow:hidden;border:none;height:1.125rem;width:1.125rem;background:rgba(0,0,0,0);display:inline-block;position:relative;color:inherit}.notification .notification__dismiss button:after{content:"";top:0;left:0;position:absolute;display:block;height:1.125rem;width:1.125rem;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}@container (width > 23.4375em){.notification .notification__dismiss{padding-left:2rem;display:flex;align-items:center}}/*# sourceMappingURL=notification.css.map */
1
+ :host,.iam-notification{display:block;padding:1.375rem 1.5rem 1.375rem 1rem !important;border-radius:0.5rem;box-shadow:2px 6px 12px rgba(0,0,0,.2);margin-bottom:1rem;font-size:0.9375rem;border:0.125rem solid var(--colour, var(--colour-info));outline:var(--contrast-outline-width, 0px) solid var(--colour-primary)}@media screen and (prefers-color-scheme: light){:host,.iam-notification{background:#e9f9fd}}:host ::slotted(i),:host i,.iam-notification ::slotted(i),.iam-notification i{color:var(--colour, currentColor)}:host([data-type]),.iam-notification[data-type]{border:0.125rem solid rgba(0,0,0,0)}:host(.colour-warning),.iam-notification.colour-warning{background:#fff6e6}:host(.colour-danger),.iam-notification.colour-danger{background:#fcebec}:host(.colour-success),.iam-notification.colour-success{background:#f8fdf6}:host(.bg-white),.iam-notification.bg-white{border:none;border-left:0.5rem solid var(--colour-info)}:host(.bg-white) ::slotted(i),:host(.bg-white) i,.iam-notification.bg-white ::slotted(i),.iam-notification.bg-white i{color:var(--colour-info)}:host([data-type=alert]),.iam-notification[data-type=alert]{border-radius:0;position:fixed;top:var(--nav-height);left:0;right:0;z-index:calc(var(--index-menu) - 1);margin-bottom:0}:host([data-type=toast]),.iam-notification[data-type=toast]{margin:auto;display:block;width:100%;max-width:22.5rem}:host([data-type=toast].notification--dismissable){max-width:28.375rem}.notification{container-type:inline-size;max-width:69.5rem;margin-inline:auto;display:flex;flex-wrap:nowrap}@media screen and (prefers-color-scheme: light){.notification{color:var(--colour-heading)}}.notification .notification__icon{margin-inline-end:1rem;flex-grow:0}.notification .notification__icon ::slotted(i){font-size:1.125rem}.notification .notification__inner{display:flex;flex-wrap:wrap;flex-grow:1}@container (width > 23.4375em){.notification .notification__inner{flex-wrap:nowrap}}.notification .notification__text{flex-grow:1;flex-shrink:1;width:100%}.notification .notification__btns{flex-grow:0;flex-shrink:0;--colour-underline: currentColor}.notification .notification__btns.empty{display:none}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:1rem 1rem 0 0 !important}@container (width > 23.4375em){.notification .notification__btns{display:flex;align-items:center;border-left:1px solid currentColor;margin-left:2rem}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:0 0 0 2rem !important}}.notification .notification__dismiss{flex-grow:0;padding-left:1rem}.notification .notification__dismiss:empty{display:none}.notification .notification__dismiss button{text-indent:300%;overflow:hidden;border:none;height:1.125rem;width:1.125rem;background:rgba(0,0,0,0);display:inline-block;position:relative;color:inherit}.notification .notification__dismiss button:after{content:"";top:0;left:0;position:absolute;display:block;height:1.125rem;width:1.125rem;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}@container (width > 23.4375em){.notification .notification__dismiss{padding-left:2rem;display:flex;align-items:center}}/*# sourceMappingURL=notification.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../sass/components/notification.scss","../../sass/_functions/mixins.scss"],"names":[],"mappings":"AAEA,wBAEE,cACA,iDACA,qBACA,uCACA,mBACA,oBACA,wDAMA,uECwcE,gDDtdJ,wBAWI,oBAKF,8EAEE,kCAIJ,gDAEE,oCAGF,wDAEE,mBAGF,sDAEE,mBAGF,wDAEE,mBAGF,4CAEE,YACA,4CAEA,sHAEE,yBAKJ,4DAEE,gBACA,eACA,sBACA,OACA,QACA,oCACA,gBAIF,4DAEE,YACA,cAEA,WACA,kBAGF,mDACE,oBAGF,cACE,2BACA,kBACA,mBACA,aACA,iBCkYE,gDDvYJ,cAQI,6BAGF,kCACE,uBACA,YAEA,+CACE,mBAIJ,mCACE,aACA,eACA,YAEA,+BALF,mCAMI,kBAIJ,kCACE,YACA,cACA,WAGF,kCACE,YACA,cACA,iCAEA,uIAGE,gCAGF,+BAXF,kCAYI,aACA,mBACA,mCACA,iBAEA,uIAGE,8BAKN,qCACE,YACA,kBAEA,4CACE,iBACA,gBACA,YACA,gBACA,eACA,yBACA,qBACA,kBACA,cAEA,kDACE,WACA,MACA,OACA,kBACA,cACA,gBACA,eACA,2BACA,wBACA,6BACA,eACA,sBACA,sBACA,qCACA,uBACA,8BACA,8BAIJ,+BApCF,qCAqCI,kBACA,aACA","file":"notification.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../../sass/components/notification.scss","../../sass/_functions/mixins.scss"],"names":[],"mappings":"AAEA,wBAEE,cACA,iDACA,qBACA,uCACA,mBACA,oBACA,wDAMA,uECwcE,gDDtdJ,wBAWI,oBAKF,8EAEE,kCAIJ,gDAEE,oCAGF,wDAEE,mBAGF,sDAEE,mBAGF,wDAEE,mBAGF,4CAEE,YACA,4CAEA,sHAEE,yBAKJ,4DAEE,gBACA,eACA,sBACA,OACA,QACA,oCACA,gBAIF,4DAEE,YACA,cAEA,WACA,kBAGF,mDACE,oBAGF,cACE,2BACA,kBACA,mBACA,aACA,iBCkYE,gDDvYJ,cAQI,6BAGF,kCACE,uBACA,YAEA,+CACE,mBAIJ,mCACE,aACA,eACA,YAEA,+BALF,mCAMI,kBAIJ,kCACE,YACA,cACA,WAGF,kCAKE,YACA,cACA,iCANA,wCACE,aAOF,uIAGE,gCAGF,+BAfF,kCAgBI,aACA,mBACA,mCACA,iBAEA,uIAGE,8BAKN,qCAKE,YACA,kBALA,2CACE,aAMF,4CACE,iBACA,gBACA,YACA,gBACA,eACA,yBACA,qBACA,kBACA,cAEA,kDACE,WACA,MACA,OACA,kBACA,cACA,gBACA,eACA,2BACA,wBACA,6BACA,eACA,sBACA,sBACA,qCACA,uBACA,8BACA,8BAIJ,+BAxCF,qCAyCI,kBACA,aACA","file":"notification.css"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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">
@@ -18,13 +18,6 @@ class iamNotification extends HTMLElement {
18
18
  : `${assetLocation}/css/core.min.css`;
19
19
  const loadCSS = `@import "${assetLocation}/css/components/notification.css";`;
20
20
  const loadExtraCSS = `@import "${assetLocation}/css/components/notification.global.css";`;
21
- const buttons = this.querySelectorAll('a,button');
22
- Array.from(buttons).forEach((button, index) => {
23
- button.setAttribute('slot', 'btns');
24
- button.classList.add('link');
25
- });
26
- if (buttons.length || this.hasAttribute('data-dismiss'))
27
- this.classList.add('notification--dismissable');
28
21
  const template = document.createElement('template');
29
22
  template.innerHTML = `
30
23
  <style>
@@ -35,8 +28,8 @@ class iamNotification extends HTMLElement {
35
28
 
36
29
  <div class="notification">
37
30
  <div class="notification__icon"><slot name="icon"></slot></div>
38
- <div class="notification__inner"><div class="notification__text"><slot></slot></div>${buttons.length ? `<div class="notification__btns"><slot name="btns"></slot></div>` : ''}</div>
39
- ${this.hasAttribute('data-dismiss') ? `<div class="notification__dismiss"><button data-dismiss-button part="dismiss-btn">Dismiss</button></div>` : ''}
31
+ <div class="notification__inner"><div class="notification__text"><slot></slot></div><div class="notification__btns"><slot name="btns"></slot></div></div>
32
+ <div class="notification__dismiss"></div>
40
33
  </div>
41
34
  `;
42
35
  this.shadowRoot.appendChild(template.content.cloneNode(true));
@@ -45,14 +38,14 @@ class iamNotification extends HTMLElement {
45
38
  document.head.insertAdjacentHTML('beforeend', `<style id="notificationHolder">${loadExtraCSS}</style>`);
46
39
  }
47
40
  connectedCallback() {
48
- const dismissBtn = this.shadowRoot.querySelector('[data-dismiss-button]');
41
+ var _a, _b, _c, _d, _e;
42
+ const wrapper = this;
49
43
  const statusBG = this.hasAttribute('data-status') ? this.getAttribute('data-status') : 'white';
50
44
  if (this.hasAttribute('data-type'))
51
45
  this.classList.add(`bg-${statusBG}`);
52
46
  else {
53
47
  this.classList.add(`colour-${statusBG}`);
54
48
  }
55
- const wrapper = this;
56
49
  if (!this.querySelector('i')) {
57
50
  switch (statusBG) {
58
51
  case 'danger':
@@ -68,12 +61,28 @@ class iamNotification extends HTMLElement {
68
61
  this.innerHTML += '<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>';
69
62
  }
70
63
  }
71
- setupNotification(wrapper);
72
- if (dismissBtn) {
73
- dismissBtn.addEventListener('click', function (e) {
64
+ const buttons = this.querySelectorAll('a,button');
65
+ Array.from(buttons).forEach((button, index) => {
66
+ button.setAttribute('slot', 'btns');
67
+ button.classList.add('link');
68
+ });
69
+ if (buttons.length || this.hasAttribute('data-dismiss')) {
70
+ this.classList.add('notification--dismissable');
71
+ }
72
+ if (!buttons.length) {
73
+ (_b = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.notification__btns')) === null || _b === void 0 ? void 0 : _b.classList.add('empty');
74
+ }
75
+ else {
76
+ (_d = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.notification__btns')) === null || _d === void 0 ? void 0 : _d.classList.remove('empty');
77
+ }
78
+ if (this.hasAttribute('data-dismiss')) {
79
+ (_e = this.shadowRoot.querySelector('.notification__dismiss')) === null || _e === void 0 ? void 0 : _e.innerHTML =
80
+ `<button data-dismiss-button part="dismiss-btn">Dismiss</button>`;
81
+ this.shadowRoot.querySelector('.notification__dismiss [data-dismiss-button]').addEventListener('click', function (e) {
74
82
  closeNotification(wrapper);
75
83
  }, false);
76
84
  }
85
+ setupNotification(this);
77
86
  }
78
87
  }
79
88
  export default iamNotification;
@@ -1,19 +1,19 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta3
2
+ * iamKey v7.1.0--beta4
3
3
  * Copyright 2022-2025 iamproperty
4
- */function r(t){if(t.hasAttribute("data-type")&&t.getAttribute("data-type")=="toast"){let i=document.querySelector(".notification__holder");i||(i=document.createElement("div"),i.classList.add("notification__holder"),i.classList.add("container"),document.querySelector("body").appendChild(i)),t.closest(".notification__holder")||i.appendChild(t)}if(t.setAttribute("role","alert"),t.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(i.preventDefault(),a(t))},!1),t.hasAttribute("data-timeout")){const i=t.getAttribute("data-timeout"),o=new c(function(){a(t)},i);t.addEventListener("mouseenter",n=>{o.pause()}),t.addEventListener("mouseleave",n=>{o.resume()})}}function c(t,i){let o,n,e=i;this.pause=function(){window.clearTimeout(o),e-=new Date-n},this.resume=function(){n=new Date,window.clearTimeout(o),o=window.setTimeout(t,e)},this.resume()}const a=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class d extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,n=this.querySelectorAll("a,button");Array.from(n).forEach((s,l)=>{s.setAttribute("slot","btns"),s.classList.add("link")}),(n.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const e=document.createElement("template");e.innerHTML=`
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>
6
6
  @import "${o}";
7
- :host,.iam-notification{display:block;padding:1.375rem 1.5rem 1.375rem 1rem !important;border-radius:0.5rem;box-shadow:2px 6px 12px rgba(0,0,0,.2);margin-bottom:1rem;font-size:0.9375rem;border:0.125rem solid var(--colour, var(--colour-info));outline:var(--contrast-outline-width, 0px) solid var(--colour-primary)}@media screen and (prefers-color-scheme: light){:host,.iam-notification{background:#e9f9fd}}:host ::slotted(i),:host i,.iam-notification ::slotted(i),.iam-notification i{color:var(--colour, currentColor)}:host([data-type]),.iam-notification[data-type]{border:0.125rem solid rgba(0,0,0,0)}:host(.colour-warning),.iam-notification.colour-warning{background:#fff6e6}:host(.colour-danger),.iam-notification.colour-danger{background:#fcebec}:host(.colour-success),.iam-notification.colour-success{background:#f8fdf6}:host(.bg-white),.iam-notification.bg-white{border:none;border-left:0.5rem solid var(--colour-info)}:host(.bg-white) ::slotted(i),:host(.bg-white) i,.iam-notification.bg-white ::slotted(i),.iam-notification.bg-white i{color:var(--colour-info)}:host([data-type=alert]),.iam-notification[data-type=alert]{border-radius:0;position:fixed;top:var(--nav-height);left:0;right:0;z-index:calc(var(--index-menu) - 1);margin-bottom:0}:host([data-type=toast]),.iam-notification[data-type=toast]{margin:auto;display:block;width:100%;max-width:22.5rem}:host([data-type=toast].notification--dismissable){max-width:28.375rem}.notification{container-type:inline-size;max-width:69.5rem;margin-inline:auto;display:flex;flex-wrap:nowrap}@media screen and (prefers-color-scheme: light){.notification{color:var(--colour-heading)}}.notification .notification__icon{margin-inline-end:1rem;flex-grow:0}.notification .notification__icon ::slotted(i){font-size:1.125rem}.notification .notification__inner{display:flex;flex-wrap:wrap;flex-grow:1}@container (width > 23.4375em){.notification .notification__inner{flex-wrap:nowrap}}.notification .notification__text{flex-grow:1;flex-shrink:1;width:100%}.notification .notification__btns{flex-grow:0;flex-shrink:0;--colour-underline: currentColor}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:1rem 1rem 0 0 !important}@container (width > 23.4375em){.notification .notification__btns{display:flex;align-items:center;border-left:1px solid currentColor;margin-left:2rem}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:0 0 0 2rem !important}}.notification .notification__dismiss{flex-grow:0;padding-left:1rem}.notification .notification__dismiss button{text-indent:300%;overflow:hidden;border:none;height:1.125rem;width:1.125rem;background:rgba(0,0,0,0);display:inline-block;position:relative;color:inherit}.notification .notification__dismiss button:after{content:"";top:0;left:0;position:absolute;display:block;height:1.125rem;width:1.125rem;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}@container (width > 23.4375em){.notification .notification__dismiss{padding-left:2rem;display:flex;align-items:center}}/*# sourceMappingURL=assets/css/components/notification.css.map */
7
+ :host,.iam-notification{display:block;padding:1.375rem 1.5rem 1.375rem 1rem !important;border-radius:0.5rem;box-shadow:2px 6px 12px rgba(0,0,0,.2);margin-bottom:1rem;font-size:0.9375rem;border:0.125rem solid var(--colour, var(--colour-info));outline:var(--contrast-outline-width, 0px) solid var(--colour-primary)}@media screen and (prefers-color-scheme: light){:host,.iam-notification{background:#e9f9fd}}:host ::slotted(i),:host i,.iam-notification ::slotted(i),.iam-notification i{color:var(--colour, currentColor)}:host([data-type]),.iam-notification[data-type]{border:0.125rem solid rgba(0,0,0,0)}:host(.colour-warning),.iam-notification.colour-warning{background:#fff6e6}:host(.colour-danger),.iam-notification.colour-danger{background:#fcebec}:host(.colour-success),.iam-notification.colour-success{background:#f8fdf6}:host(.bg-white),.iam-notification.bg-white{border:none;border-left:0.5rem solid var(--colour-info)}:host(.bg-white) ::slotted(i),:host(.bg-white) i,.iam-notification.bg-white ::slotted(i),.iam-notification.bg-white i{color:var(--colour-info)}:host([data-type=alert]),.iam-notification[data-type=alert]{border-radius:0;position:fixed;top:var(--nav-height);left:0;right:0;z-index:calc(var(--index-menu) - 1);margin-bottom:0}:host([data-type=toast]),.iam-notification[data-type=toast]{margin:auto;display:block;width:100%;max-width:22.5rem}:host([data-type=toast].notification--dismissable){max-width:28.375rem}.notification{container-type:inline-size;max-width:69.5rem;margin-inline:auto;display:flex;flex-wrap:nowrap}@media screen and (prefers-color-scheme: light){.notification{color:var(--colour-heading)}}.notification .notification__icon{margin-inline-end:1rem;flex-grow:0}.notification .notification__icon ::slotted(i){font-size:1.125rem}.notification .notification__inner{display:flex;flex-wrap:wrap;flex-grow:1}@container (width > 23.4375em){.notification .notification__inner{flex-wrap:nowrap}}.notification .notification__text{flex-grow:1;flex-shrink:1;width:100%}.notification .notification__btns{flex-grow:0;flex-shrink:0;--colour-underline: currentColor}.notification .notification__btns.empty{display:none}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:1rem 1rem 0 0 !important}@container (width > 23.4375em){.notification .notification__btns{display:flex;align-items:center;border-left:1px solid currentColor;margin-left:2rem}.notification .notification__btns ::slotted(a),.notification .notification__btns ::slotted(button),.notification .notification__btns>*{margin:0 0 0 2rem !important}}.notification .notification__dismiss{flex-grow:0;padding-left:1rem}.notification .notification__dismiss:empty{display:none}.notification .notification__dismiss button{text-indent:300%;overflow:hidden;border:none;height:1.125rem;width:1.125rem;background:rgba(0,0,0,0);display:inline-block;position:relative;color:inherit}.notification .notification__dismiss button:after{content:"";top:0;left:0;position:absolute;display:block;height:1.125rem;width:1.125rem;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}@container (width > 23.4375em){.notification .notification__dismiss{padding-left:2rem;display:flex;align-items:center}}/*# sourceMappingURL=assets/css/components/notification.css.map */
8
8
 
9
9
  ${this.hasAttribute("data-css")?`${this.getAttribute("data-css")}`:""}
10
10
  </style>
11
11
 
12
12
  <div class="notification">
13
13
  <div class="notification__icon"><slot name="icon"></slot></div>
14
- <div class="notification__inner"><div class="notification__text"><slot></slot></div>${n.length?'<div class="notification__btns"><slot name="btns"></slot></div>':""}</div>
15
- ${this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button part="dismiss-btn">Dismiss</button></div>':""}
14
+ <div class="notification__inner"><div class="notification__text"><slot></slot></div><div class="notification__btns"><slot name="btns"></slot></div></div>
15
+ <div class="notification__dismiss"></div>
16
16
  </div>
17
- `,this.shadowRoot.appendChild(e.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",`<style id="notificationHolder">.container.notification__holder{position:fixed;top:var(--nav-height);left:50%;transform:translate(-50%, 0);bottom:0;z-index:999999;pointer-events:none;padding-top:1rem;padding-bottom:1rem;display:flex;margin:0;width:100%;flex-wrap:wrap;align-content:flex-start;flex-direction:column;align-content:flex-end;align-items:flex-end}.container.notification__holder :is(.iam-notification,iam-notification){pointer-events:all;margin:.5rem 0 .5rem 0}.container.notification__holder.bottom{flex-direction:column-reverse}.container.notification__holder.left{align-content:flex-start;align-items:flex-start}.container.notification__holder.middle{align-content:space-around;align-items:center}/*# sourceMappingURL=assets/css/components/notification.global.css.map */
18
- </style>`)}connectedCallback(){const i=this.shadowRoot.querySelector("[data-dismiss-button]"),o=this.hasAttribute("data-status")?this.getAttribute("data-status"):"white";this.hasAttribute("data-type")?this.classList.add(`bg-${o}`):this.classList.add(`colour-${o}`);const n=this;if(!this.querySelector("i"))switch(o){case"danger":this.innerHTML+='<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"warning":this.innerHTML+='<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"success":this.innerHTML+='<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>';break;default:this.innerHTML+='<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>'}r(n),i&&i.addEventListener("click",function(e){a(n)},!1)}}export{d as default};
17
+ `,this.shadowRoot.appendChild(n.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",`<style id="notificationHolder">.container.notification__holder{position:fixed;top:var(--nav-height);left:50%;transform:translate(-50%, 0);bottom:0;z-index:999999;pointer-events:none;padding-top:1rem;padding-bottom:1rem;display:flex;margin:0;width:100%;flex-wrap:wrap;align-content:flex-start;flex-direction:column;align-content:flex-end;align-items:flex-end}.container.notification__holder :is(.iam-notification,iam-notification){pointer-events:all;margin:.5rem 0 .5rem 0}.container.notification__holder.bottom{flex-direction:column-reverse}.container.notification__holder.left{align-content:flex-start;align-items:flex-start}.container.notification__holder.middle{align-content:space-around;align-items:center}/*# sourceMappingURL=assets/css/components/notification.global.css.map */
18
+ </style>`)}connectedCallback(){var t,o,n,e,a;const l=this,s=this.hasAttribute("data-status")?this.getAttribute("data-status"):"white";if(this.hasAttribute("data-type")?this.classList.add(`bg-${s}`):this.classList.add(`colour-${s}`),!this.querySelector("i"))switch(s){case"danger":this.innerHTML+='<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"warning":this.innerHTML+='<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"success":this.innerHTML+='<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>';break;default:this.innerHTML+='<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>'}const r=this.querySelectorAll("a,button");Array.from(r).forEach((c,h)=>{c.setAttribute("slot","btns"),c.classList.add("link")}),(r.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable"),r.length?(e=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(".notification__btns"))===null||e===void 0||e.classList.remove("empty"):(o=(t=this.shadowRoot)===null||t===void 0?void 0:t.querySelector(".notification__btns"))===null||o===void 0||o.classList.add("empty"),this.hasAttribute("data-dismiss")&&((a=this.shadowRoot.querySelector(".notification__dismiss"))===null||a===void 0||(a.innerHTML='<button data-dismiss-button part="dismiss-btn">Dismiss</button>'),this.shadowRoot.querySelector(".notification__dismiss [data-dismiss-button]").addEventListener("click",function(c){d(l)},!1)),f(this)}}export{u as default};
19
19
  //# sourceMappingURL=notification.component.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.component.min.js","sources":["../../modules/notification.js","notification.component.js"],"sourcesContent":["// @ts-nocheck\nfunction setupNotification(element) {\n // Add toast to notification holder\n if (element.hasAttribute('data-type') && element.getAttribute('data-type') == 'toast') {\n let holder = document.querySelector('.notification__holder');\n if (!holder) {\n holder = document.createElement('div');\n holder.classList.add('notification__holder');\n holder.classList.add('container');\n document.querySelector('body').appendChild(holder);\n }\n if (!element.closest('.notification__holder'))\n holder.appendChild(element);\n }\n element.setAttribute('role', 'alert');\n // Create a dissmissable button\n element.addEventListener('click', function (e) {\n if (event && event.target instanceof HTMLElement && event.target.closest('[data-dismiss-button]')) {\n e.preventDefault();\n closeNotification(element);\n }\n }, false);\n // Self disappearing alert\n if (element.hasAttribute('data-timeout')) {\n const timeOut = element.getAttribute('data-timeout');\n const timer = new Timer(function () {\n closeNotification(element);\n }, timeOut);\n element.addEventListener('mouseenter', (event) => {\n timer.pause();\n });\n element.addEventListener('mouseleave', (event) => {\n timer.resume();\n });\n }\n}\nfunction Timer(callback, delay) {\n let timerId, start, remaining = delay;\n this.pause = function () {\n window.clearTimeout(timerId);\n remaining -= new Date() - start;\n };\n this.resume = function () {\n start = new Date();\n window.clearTimeout(timerId);\n timerId = window.setTimeout(callback, remaining);\n };\n this.resume();\n}\nexport const closeNotification = function (element) {\n element.classList.add('d-none');\n};\nexport default setupNotification;\n","// @ts-nocheck\nimport setupNotification, { closeNotification } from '../../modules/notification.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'Notification',\n});\nclass iamNotification 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/notification.css\";`;\n const loadExtraCSS = `@import \"${assetLocation}/css/components/notification.global.css\";`;\n const buttons = this.querySelectorAll('a,button');\n Array.from(buttons).forEach((button, index) => {\n button.setAttribute('slot', 'btns');\n button.classList.add('link');\n });\n if (buttons.length || this.hasAttribute('data-dismiss'))\n this.classList.add('notification--dismissable');\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('data-css') ? `${this.getAttribute('data-css')}` : ``}\n </style>\n\n <div class=\"notification\">\n <div class=\"notification__icon\"><slot name=\"icon\"></slot></div>\n <div class=\"notification__inner\"><div class=\"notification__text\"><slot></slot></div>${buttons.length ? `<div class=\"notification__btns\"><slot name=\"btns\"></slot></div>` : ''}</div>\n ${this.hasAttribute('data-dismiss') ? `<div class=\"notification__dismiss\"><button data-dismiss-button part=\"dismiss-btn\">Dismiss</button></div>` : ''}\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n // insert extra CSS\n if (!document.getElementById('notificationHolder'))\n document.head.insertAdjacentHTML('beforeend', `<style id=\"notificationHolder\">${loadExtraCSS}</style>`);\n }\n connectedCallback() {\n const dismissBtn = this.shadowRoot.querySelector('[data-dismiss-button]');\n const statusBG = this.hasAttribute('data-status') ? this.getAttribute('data-status') : 'white';\n if (this.hasAttribute('data-type'))\n this.classList.add(`bg-${statusBG}`);\n else {\n this.classList.add(`colour-${statusBG}`);\n }\n const wrapper = this;\n if (!this.querySelector('i')) {\n switch (statusBG) {\n case 'danger':\n this.innerHTML += '<i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\" slot=\"icon\"></i>';\n break;\n case 'warning':\n this.innerHTML += '<i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\" slot=\"icon\"></i>';\n break;\n case 'success':\n this.innerHTML += '<i class=\"fa-solid fa-check-circle\" aria-hidden=\"true\" slot=\"icon\"></i>';\n break;\n default:\n this.innerHTML += '<i class=\"fa-solid fa-circle-info\" aria-hidden=\"true\" slot=\"icon\"></i>';\n }\n }\n setupNotification(wrapper);\n if (dismissBtn) {\n dismissBtn.addEventListener('click', function (e) {\n closeNotification(wrapper);\n }, false);\n }\n }\n}\nexport default iamNotification;\n"],"names":["setupNotification","element","holder","e","closeNotification","timeOut","timer","Timer","event","callback","delay","timerId","start","remaining","iamNotification","assetLocation","coreCSS","buttons","button","index","template","dismissBtn","statusBG","wrapper"],"mappings":"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"}
1
+ {"version":3,"file":"notification.component.min.js","sources":["../../modules/notification.js","notification.component.js"],"sourcesContent":["// @ts-nocheck\nfunction setupNotification(element) {\n // Add toast to notification holder\n if (element.hasAttribute('data-type') && element.getAttribute('data-type') == 'toast') {\n let holder = document.querySelector('.notification__holder');\n if (!holder) {\n holder = document.createElement('div');\n holder.classList.add('notification__holder');\n holder.classList.add('container');\n document.querySelector('body').appendChild(holder);\n }\n if (!element.closest('.notification__holder'))\n holder.appendChild(element);\n }\n element.setAttribute('role', 'alert');\n // Create a dissmissable button\n element.addEventListener('click', function (e) {\n if (event &&\n event.target instanceof HTMLElement &&\n (event.target.closest('[data-dismiss-button]') || event.target.matches('[data-dismiss-button]'))) {\n e.preventDefault();\n closeNotification(element);\n }\n }, false);\n // Self disappearing alert\n if (element.hasAttribute('data-timeout')) {\n const timeOut = element.getAttribute('data-timeout');\n const timer = new Timer(function () {\n closeNotification(element);\n }, timeOut);\n element.addEventListener('mouseenter', (event) => {\n timer.pause();\n });\n element.addEventListener('mouseleave', (event) => {\n timer.resume();\n });\n }\n}\nfunction Timer(callback, delay) {\n let timerId, start, remaining = delay;\n this.pause = function () {\n window.clearTimeout(timerId);\n remaining -= new Date() - start;\n };\n this.resume = function () {\n start = new Date();\n window.clearTimeout(timerId);\n timerId = window.setTimeout(callback, remaining);\n };\n this.resume();\n}\nexport const closeNotification = function (element) {\n element.classList.add('d-none');\n};\nexport default setupNotification;\n","// @ts-nocheck\nimport setupNotification, { closeNotification } from '../../modules/notification.js';\n// Data layer Web component created\nwindow.dataLayer = window.dataLayer || [];\nwindow.dataLayer.push({\n event: 'customElementRegistered',\n element: 'Notification',\n});\nclass iamNotification 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/notification.css\";`;\n const loadExtraCSS = `@import \"${assetLocation}/css/components/notification.global.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n @import \"${coreCSS}\";\n ${loadCSS}\n ${this.hasAttribute('data-css') ? `${this.getAttribute('data-css')}` : ``}\n </style>\n\n <div class=\"notification\">\n <div class=\"notification__icon\"><slot name=\"icon\"></slot></div>\n <div class=\"notification__inner\"><div class=\"notification__text\"><slot></slot></div><div class=\"notification__btns\"><slot name=\"btns\"></slot></div></div>\n <div class=\"notification__dismiss\"></div>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n // insert extra CSS\n if (!document.getElementById('notificationHolder'))\n document.head.insertAdjacentHTML('beforeend', `<style id=\"notificationHolder\">${loadExtraCSS}</style>`);\n }\n connectedCallback() {\n var _a, _b, _c, _d, _e;\n const wrapper = this;\n const statusBG = this.hasAttribute('data-status') ? this.getAttribute('data-status') : 'white';\n if (this.hasAttribute('data-type'))\n this.classList.add(`bg-${statusBG}`);\n else {\n this.classList.add(`colour-${statusBG}`);\n }\n if (!this.querySelector('i')) {\n switch (statusBG) {\n case 'danger':\n this.innerHTML += '<i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\" slot=\"icon\"></i>';\n break;\n case 'warning':\n this.innerHTML += '<i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\" slot=\"icon\"></i>';\n break;\n case 'success':\n this.innerHTML += '<i class=\"fa-solid fa-check-circle\" aria-hidden=\"true\" slot=\"icon\"></i>';\n break;\n default:\n this.innerHTML += '<i class=\"fa-solid fa-circle-info\" aria-hidden=\"true\" slot=\"icon\"></i>';\n }\n }\n const buttons = this.querySelectorAll('a,button');\n Array.from(buttons).forEach((button, index) => {\n button.setAttribute('slot', 'btns');\n button.classList.add('link');\n });\n if (buttons.length || this.hasAttribute('data-dismiss')) {\n this.classList.add('notification--dismissable');\n }\n if (!buttons.length) {\n (_b = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.notification__btns')) === null || _b === void 0 ? void 0 : _b.classList.add('empty');\n }\n else {\n (_d = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.notification__btns')) === null || _d === void 0 ? void 0 : _d.classList.remove('empty');\n }\n if (this.hasAttribute('data-dismiss')) {\n (_e = this.shadowRoot.querySelector('.notification__dismiss')) === null || _e === void 0 ? void 0 : _e.innerHTML =\n `<button data-dismiss-button part=\"dismiss-btn\">Dismiss</button>`;\n this.shadowRoot.querySelector('.notification__dismiss [data-dismiss-button]').addEventListener('click', function (e) {\n closeNotification(wrapper);\n }, false);\n }\n setupNotification(this);\n }\n}\nexport default iamNotification;\n"],"names":["setupNotification","element","holder","e","closeNotification","timeOut","timer","Timer","event","callback","delay","timerId","start","remaining","iamNotification","assetLocation","coreCSS","template","_a","_b","_c","_d","_e","wrapper","statusBG","buttons","button","index"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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--beta3
2
+ * iamKey v7.1.0--beta4
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=`
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta3
2
+ * iamKey v7.1.0--beta4
3
3
  * Copyright 2022-2025 iamproperty
4
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=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.1.0--beta3
2
+ * iamKey v7.1.0--beta4
3
3
  * Copyright 2022-2025 iamproperty
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--beta3
2
+ * iamKey v7.1.0--beta4
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
@@ -15,7 +15,9 @@ function setupNotification(element) {
15
15
  element.setAttribute('role', 'alert');
16
16
  // Create a dissmissable button
17
17
  element.addEventListener('click', function (e) {
18
- if (event && event.target instanceof HTMLElement && event.target.closest('[data-dismiss-button]')) {
18
+ if (event &&
19
+ event.target instanceof HTMLElement &&
20
+ (event.target.closest('[data-dismiss-button]') || event.target.matches('[data-dismiss-button]'))) {
19
21
  e.preventDefault();
20
22
  closeNotification(element);
21
23
  }