@iamproperty/components 7.7.1--beta2 → 7.7.1--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 (68) hide show
  1. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  2. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  3. package/assets/js/components/address-lookup/address-lookup.component.min.js +3 -3
  4. package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
  5. package/assets/js/components/advanced-select/advanced-select.component.js +21 -7
  6. package/assets/js/components/advanced-select/advanced-select.component.min.js +4 -4
  7. package/assets/js/components/advanced-select/advanced-select.component.min.js.map +1 -1
  8. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  9. package/assets/js/components/barchart/barchart.component.min.js +1 -1
  10. package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
  11. package/assets/js/components/calendar/calendar.component.min.js +1 -1
  12. package/assets/js/components/card/card.component.min.js +1 -1
  13. package/assets/js/components/carousel/carousel.component.min.js +1 -1
  14. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  15. package/assets/js/components/config/config.component.min.js +1 -1
  16. package/assets/js/components/content/content.component.min.js +1 -1
  17. package/assets/js/components/darkmode/darkmode.component.min.js +1 -1
  18. package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
  19. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  20. package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
  21. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  22. package/assets/js/components/form/form.component.min.js +1 -1
  23. package/assets/js/components/header/header.component.min.js +1 -1
  24. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  25. package/assets/js/components/input/input.component.min.js +1 -1
  26. package/assets/js/components/input-range/input-range.component.min.js +1 -1
  27. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  28. package/assets/js/components/menu/menu.component.min.js +1 -1
  29. package/assets/js/components/milestone/milestone.component.min.js +1 -1
  30. package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
  31. package/assets/js/components/modal/modal.component.min.js +1 -1
  32. package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
  33. package/assets/js/components/multi-step-modal/multi-step-modal.component.min.js +1 -1
  34. package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
  35. package/assets/js/components/nav/nav.component.min.js +1 -1
  36. package/assets/js/components/notification/notification.component.min.js +1 -1
  37. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  38. package/assets/js/components/password/password.component.min.js +1 -1
  39. package/assets/js/components/popover/popover.component.min.js +1 -1
  40. package/assets/js/components/rank/rank.component.min.js +1 -1
  41. package/assets/js/components/rankings/rankings.component.min.js +1 -1
  42. package/assets/js/components/rating/rating.component.min.js +1 -1
  43. package/assets/js/components/record-card/record-card.component.min.js +1 -1
  44. package/assets/js/components/search/search.component.min.js +5 -5
  45. package/assets/js/components/search/search.component.min.js.map +1 -1
  46. package/assets/js/components/slider/slider.component.min.js +1 -1
  47. package/assets/js/components/split-button/split-button.component.min.js +1 -1
  48. package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +7 -7
  49. package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js.map +1 -1
  50. package/assets/js/components/table/table.component.min.js +1 -1
  51. package/assets/js/components/table-ajax/table-ajax.component.min.js +1 -1
  52. package/assets/js/components/table-basic/table-basic.component.min.js +1 -1
  53. package/assets/js/components/table-no-submit/table-no-submit.component.min.js +1 -1
  54. package/assets/js/components/table-submit/table-submit.component.min.js +1 -1
  55. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  56. package/assets/js/components/tag/tag.component.min.js +1 -1
  57. package/assets/js/components/tooltip/tooltip.component.min.js +1 -1
  58. package/assets/js/components/video-card/video-card.component.min.js +1 -1
  59. package/assets/js/components/video-modal/video-modal.component.min.js +1 -1
  60. package/assets/js/components/word-count/word-count.component.min.js +1 -1
  61. package/assets/js/modules/advanced-select.js +31 -8
  62. package/assets/js/scripts.bundle.js +1 -1
  63. package/assets/js/scripts.bundle.min.js +1 -1
  64. package/assets/ts/components/advanced-select/advanced-select.component.ts +25 -7
  65. package/assets/ts/modules/advanced-select.ts +38 -17
  66. package/dist/components.es.js +24 -24
  67. package/dist/components.umd.js +98 -98
  68. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const O=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},B=(t,e)=>String(t).padStart(e,"0"),F=t=>t.charAt(0).toUpperCase()+t.slice(1),p=(t,e,a)=>e.split(/[\.\[\]\'\"]/).filter(i=>i).reduce((i,o)=>i?i[o]:a,t),T=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1));var W=function(t,e,a,i){function o(r){return r instanceof a?r:new a(function(b){b(r)})}return new(a||(a=Promise))(function(r,b){function s(m){try{n(i.next(m))}catch(d){b(d)}}function l(m){try{n(i.throw(m))}catch(d){b(d)}}function n(m){m.done?r(m.value):o(m.value).then(s,l)}n((i=i.apply(t,e||[])).next())})};const U=(t,e)=>{switch(t){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=F(e)}},V=function(t){const e=new Object;return Array.from(t.querySelectorAll("[data-filter]")).forEach(i=>{if(!(i.type=="radio"&&!i.checked)&&!(i.type=="checkbox"&&!i.checked)&&i&&i.value){const o=i.getAttribute("data-filter");let r=i.value;i.hasAttribute("data-date-from")&&(r+="-date-from"),i.hasAttribute("data-date-to")&&(r+="-date-to"),e[o]||(e[o]=[]),e[o].push(r)}}),e},J=t=>{let e=document.createElement("form");const a=t.querySelector("table");t.hasAttribute("data-filterby")?e=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?e=t.closest("form"):a.parentNode.insertBefore(e,a.nextSibling),e.hasAttribute("data-ajax")&&t.setAttribute("data-ajax",e.getAttribute("data-ajax")),e.hasAttribute("data-schema")&&t.setAttribute("data-schema",e.getAttribute("data-schema"))},w=(t,e,a,i,o)=>{a.querySelector("[name=show]")||a.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),a.querySelector("[name=page]")||a.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),i.addEventListener("update-show",r=>{if(a.querySelector("[name=show]").value!=r.detail.show){a.querySelector("[name=show]").value=r.detail.show;const b=new CustomEvent("update-show",{detail:{show:r.detail.show}});t.dispatchEvent(b),H(t,i),o()}}),i.addEventListener("update-page",r=>{if(a.querySelector("[name=page]").value!=r.detail.page){a.querySelector("[name=page]").value=r.detail.page;const b=new CustomEvent("update-page",{detail:{page:r.detail.page}});if(t.dispatchEvent(b),H(t,i),o(),!t.hasAttribute("data-no-scroll")){const l=e.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}})},X=(t,e)=>{let a=document.createElement("form");return t.hasAttribute("data-filterby")?a=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?a=t.closest("form"):t.querySelector("form")?a=t.querySelector("form"):e.parentNode.insertBefore(a,e.nextSibling),t.hasAttribute("data-ajax")&&a.setAttribute("data-ajax",t.getAttribute("data-ajax")),a},M=(t,e,a,i)=>{const o=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),G(t,i),$(e),K(t,e),t.classList.contains("mh-sm")&&o.classList.add("mh-sm"),t.classList.contains("mh-md")&&o.classList.add("mh-md"),t.classList.contains("mh-lg")&&o.classList.add("mh-lg"),t.classList.contains("table--cta")&&(Q(t,e),Z(t,e)),Y(t)},Y=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(e=>{e.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
5
5
  <td colspan="100%"><i class="fa-solid fa-star"></i> ${e.getAttribute("data-highlight")}</td>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const R=t=>t.charAt(0).toUpperCase()+t.slice(1),p=(t,i,a)=>i.split(/[\.\[\]\'\"]/).filter(e=>e).reduce((e,b)=>e?e[b]:a,t),q=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1));var P=function(t,i,a,e){function b(o){return o instanceof a?o:new a(function(s){s(o)})}return new(a||(a=Promise))(function(o,s){function r(m){try{n(e.next(m))}catch(d){s(d)}}function l(m){try{n(e.throw(m))}catch(d){s(d)}}function n(m){m.done?o(m.value):b(m.value).then(r,l)}n((e=e.apply(t,i||[])).next())})};const I=(t,i)=>{switch(t){case"datetime":return new Date(i).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(i).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(i).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return i=R(i)}},O=function(t){const i=new Object;return Array.from(t.querySelectorAll("[data-filter]")).forEach(e=>{if(!(e.type=="radio"&&!e.checked)&&!(e.type=="checkbox"&&!e.checked)&&e&&e.value){const b=e.getAttribute("data-filter");let o=e.value;e.hasAttribute("data-date-from")&&(o+="-date-from"),e.hasAttribute("data-date-to")&&(o+="-date-to"),i[b]||(i[b]=[]),i[b].push(o)}}),i},N=(t,i,a,e,b)=>{a.querySelector("[name=show]")||a.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),a.querySelector("[name=page]")||a.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),e.addEventListener("update-show",o=>{if(a.querySelector("[name=show]").value!=o.detail.show){a.querySelector("[name=show]").value=o.detail.show;const s=new CustomEvent("update-show",{detail:{show:o.detail.show}});t.dispatchEvent(s),T(t,e),b()}}),e.addEventListener("update-page",o=>{if(a.querySelector("[name=page]").value!=o.detail.page){a.querySelector("[name=page]").value=o.detail.page;const s=new CustomEvent("update-page",{detail:{page:o.detail.page}});if(t.dispatchEvent(s),T(t,e),b(),!t.hasAttribute("data-no-scroll")){const l=i.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}})},F=(t,i)=>{let a=document.createElement("form");return t.hasAttribute("data-filterby")?a=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?a=t.closest("form"):t.querySelector("form")?a=t.querySelector("form"):i.parentNode.insertBefore(a,i.nextSibling),t.hasAttribute("data-ajax")&&a.setAttribute("data-ajax",t.getAttribute("data-ajax")),a},E=(t,i,a,e)=>{const b=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),U(t,e),W(i),V(t,i),t.classList.contains("mh-sm")&&b.classList.add("mh-sm"),t.classList.contains("mh-md")&&b.classList.add("mh-md"),t.classList.contains("mh-lg")&&b.classList.add("mh-lg"),t.classList.contains("table--cta")&&(J(t,i),X(t,i)),B(t)},B=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(i=>{i.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
5
5
  <td colspan="100%"><i class="fa-solid fa-star"></i> ${i.getAttribute("data-highlight")}</td>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const h=t=>t.charAt(0).toUpperCase()+t.slice(1),u=(t,a)=>{switch(t){case"datetime":return new Date(a).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(a).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(a).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return a=h(a)}},p=(t,a,e,i,o)=>{e.querySelector("[name=show]")||e.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),e.querySelector("[name=page]")||e.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),i.addEventListener("update-show",b=>{if(e.querySelector("[name=show]").value!=b.detail.show){e.querySelector("[name=show]").value=b.detail.show;const l=new CustomEvent("update-show",{detail:{show:b.detail.show}});t.dispatchEvent(l),c(t,i),o()}}),i.addEventListener("update-page",b=>{if(e.querySelector("[name=page]").value!=b.detail.page){e.querySelector("[name=page]").value=b.detail.page;const l=new CustomEvent("update-page",{detail:{page:b.detail.page}});if(t.dispatchEvent(l),c(t,i),o(),!t.hasAttribute("data-no-scroll")){const r=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:r,behavior:"smooth"})}}})},g=(t,a)=>{let e=document.createElement("form");return t.hasAttribute("data-filterby")?e=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?e=t.closest("form"):t.querySelector("form")?e=t.querySelector("form"):a.parentNode.insertBefore(e,a.nextSibling),t.hasAttribute("data-ajax")&&e.setAttribute("data-ajax",t.getAttribute("data-ajax")),e},f=(t,a,e,i)=>{const o=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),x(t,i),v(a),k(t,a),t.classList.contains("mh-sm")&&o.classList.add("mh-sm"),t.classList.contains("mh-md")&&o.classList.add("mh-md"),t.classList.contains("mh-lg")&&o.classList.add("mh-lg"),t.classList.contains("table--cta")&&(A(t,a),j(t,a)),w(t)},w=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(a=>{a.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
5
5
  <td colspan="100%"><i class="fa-solid fa-star"></i> ${a.getAttribute("data-highlight")}</td>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const v=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},k=(t,a)=>String(t).padStart(a,"0"),A=t=>t.charAt(0).toUpperCase()+t.slice(1),u=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1)),j=(t,a)=>{switch(t){case"datetime":return new Date(a).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(a).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(a).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return a=A(a)}},_=(t,a)=>{let i=document.createElement("form");return t.hasAttribute("data-filterby")?i=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?i=t.closest("form"):t.querySelector("form")?i=t.querySelector("form"):a.parentNode.insertBefore(i,a.nextSibling),t.hasAttribute("data-ajax")&&i.setAttribute("data-ajax",t.getAttribute("data-ajax")),i},h=(t,a,i,e)=>{const b=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),q(t,e),f(a),L(t,a),t.classList.contains("mh-sm")&&b.classList.add("mh-sm"),t.classList.contains("mh-md")&&b.classList.add("mh-md"),t.classList.contains("mh-lg")&&b.classList.add("mh-lg"),t.classList.contains("table--cta")&&(E(t,a),T(t,a)),S(t)},S=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(a=>{a.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
5
5
  <td colspan="100%"><i class="fa-solid fa-star"></i> ${a.getAttribute("data-highlight")}</td>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const g=t=>t.charAt(0).toUpperCase()+t.slice(1),u=(t=1)=>Math.floor(Math.random()*Date.now()*(t+1)),f=(t,a)=>{switch(t){case"datetime":return new Date(a).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(a).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(a).toLocaleDateString("en-gb",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return a=g(a)}},x=(t,a,i,e,b)=>{i.querySelector("[name=show]")||i.insertAdjacentHTML("beforeend",`<input name="show" type="hidden" value="${t.getAttribute("data-show")}" />`),i.querySelector("[name=page]")||i.insertAdjacentHTML("beforeend",`<input name="page" type="hidden" value="${t.getAttribute("data-page")}" />`),e.addEventListener("update-show",m=>{if(i.querySelector("[name=show]").value!=m.detail.show){i.querySelector("[name=show]").value=m.detail.show;const s=new CustomEvent("update-show",{detail:{show:m.detail.show}});t.dispatchEvent(s),h(t,e),b()}}),e.addEventListener("update-page",m=>{if(i.querySelector("[name=page]").value!=m.detail.page){i.querySelector("[name=page]").value=m.detail.page;const s=new CustomEvent("update-page",{detail:{page:m.detail.page}});if(t.dispatchEvent(s),h(t,e),b(),!t.hasAttribute("data-no-scroll")){const l=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}})},y=(t,a)=>{let i=document.createElement("form");return t.hasAttribute("data-filterby")?i=document.querySelector(`#${t.getAttribute("data-filterby")}`):t.closest("form")?i=t.closest("form"):t.querySelector("form")?i=t.querySelector("form"):a.parentNode.insertBefore(i,a.nextSibling),t.hasAttribute("data-ajax")&&i.setAttribute("data-ajax",t.getAttribute("data-ajax")),i},w=(t,a,i,e)=>{const b=t.shadowRoot.querySelector(".table__wrapper");t.hasAttribute("data-total")||t.setAttribute("data-total",t.querySelectorAll("tbody tr").length),t.hasAttribute("data-page")||t.setAttribute("data-page",1),t.hasAttribute("data-show")||t.setAttribute("data-show",15),t.hasAttribute("data-increment")||t.setAttribute("data-increment",t.getAttribute("data-show")),k(t,e),A(a),j(t,a),t.classList.contains("mh-sm")&&b.classList.add("mh-sm"),t.classList.contains("mh-md")&&b.classList.add("mh-md"),t.classList.contains("mh-lg")&&b.classList.add("mh-lg"),t.classList.contains("table--cta")&&(_(t,a),S(t,a)),v(t)},v=t=>{Array.from(t.querySelectorAll("tr[data-highlight]")).forEach(a=>{a.insertAdjacentHTML("afterend",`<tr role="presentation" class="tr--highlight">
5
5
  <td colspan="100%"><i class="fa-solid fa-star"></i> ${a.getAttribute("data-highlight")}</td>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const k=(t,a,i,o)=>{const r=Math.tan(.375*Math.PI),s=window.innerWidth||document.body.clientWidth,n=Math.max(1,Math.floor(.01*s)),d=i-t,e=o-a,c=Math.abs(d/e),l=Math.abs(e/d);if(Math.abs(d)>n||Math.abs(e)>n){if(l<=r)return d<0?"left":"right";if(c<=r)return e<0?"top":"bottom"}else return"tap"},w=function(t){const a=t.querySelectorAll(":scope > details, :scope > a");let i=t.querySelector(":scope > .tabs__links"),o=t.querySelector(":scope .tabs__dropdown");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(i=t.shadowRoot.querySelector(".tabs__links")),!i){i=document.createElement("div"),i.classList.add("tabs__links");const s=document.createElement("div");s.classList.add("tabs__links__wrapper"),s.prepend(i),t.prepend(s)}o||(o=document.createElement("select"),o.classList.add("tabs__dropdown"),t.prepend(o));let r=0;a.forEach(s=>{let n=document.createElement("button");const d=document.createElement("option");if(s.matches("details")){const e=s.querySelector(":scope > summary"),c=e.classList.contains("disabled");e.classList.add("visually-hidden"),s.hasAttribute("id")&&n.setAttribute("data-id",`${s.getAttribute("id")}`),s.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML=`${e.innerText}`,n.classList.add("link"),n.setAttribute("data-index",r),n.setAttribute("part","tab-link"),d.innerHTML=`${e.innerText}`,d.value=e.innerText.replace(/\s+/g,"-").toLowerCase(),d.setAttribute("data-index",r),s.setAttribute("tabindex","-1"),c&&n.classList.add("disabled"),r++}else s.matches("a")&&(n=s);n.classList.add("link"),i.appendChild(n),o.appendChild(d)})},y=function(t){const a=t.querySelectorAll(":scope > details"),i=t.querySelectorAll(":scope > details > summary");let o=t.querySelector(":scope .tabs__links"),r=t.querySelectorAll(":scope .tabs__links > button");const s=t.querySelector(":scope .tabs__dropdown");let n=t.querySelector(":scope .tabs__next"),d;if(window.isClicked=!1,window.isScrolling=!1,t.shadowRoot&&(r=t.shadowRoot.querySelectorAll(".tabs__links > button"),o=t.shadowRoot.querySelector(".tabs__links"),n=t.shadowRoot.querySelector(".tabs__next")),r.forEach(e=>{e.addEventListener("click",c=>{if(c.preventDefault(),window.isClicked=!0,e.classList.contains("disabled"))return!1;r.forEach(l=>{const m=l==e;l.setAttribute("aria-pressed",m)}),o.scroll({top:0,left:e.offsetLeft,behavior:"smooth"}),f(a,e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent}),e.matches(":last-child")?n?.setAttribute("disabled","disabled"):n?.removeAttribute("disabled")}),_(a,s)}),o.addEventListener("scrollend",()=>{clearTimeout(d),d=setTimeout(function(){let e=r[0],c=Math.abs(e.getBoundingClientRect().left);if(r.forEach(l=>{Math.abs(l.getBoundingClientRect().left)<c&&(c=Math.abs(l.getBoundingClientRect().left),e=l)}),window.isClicked)return window.isClicked=!1,!1;e.click(),e.focus()},500)}),i.forEach((e,c)=>{e.addEventListener("click",l=>{l.preventDefault(),r[c].click()})}),n?.addEventListener("click",e=>{e.preventDefault();const l=o.querySelector('[aria-pressed="true"]').nextSibling;l&&l.click()}),t.classList.contains("tabs--guided")){let e=0,c=0,l=0,m=0;a.forEach(p=>{p.addEventListener("touchstart",b=>{b.stopPropagation(),e=b.changedTouches[0].screenX,c=b.changedTouches[0].screenY}),p.addEventListener("touchend",b=>{b.stopPropagation(),l=b.changedTouches[0].screenX,m=b.changedTouches[0].screenY;const v=k(e,c,l,m),h=o.querySelector('[aria-pressed="true"]'),u=h.nextSibling,g=h.previousSibling;switch(v){case"left":u&&u.click();break;case"right":g&&g.click();break}})})}},f=function(t,a){t.forEach((i,o)=>{const r=a.getAttribute("data-index")==o;r?i.setAttribute("open",r):i.removeAttribute("open")})},_=function(t,a){a.addEventListener("change",i=>{i.preventDefault();const o=a.options[a.selectedIndex];f(t,o),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:o.innerText})})},x=function(t){if(!t.querySelector(":scope > details"))return!1;const a=t.querySelectorAll(":scope > details"),i=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]")||(a[0].setAttribute("open",!0),i[0].setAttribute("aria-pressed",!0))},z=function(t){w(t),y(t),x(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class L extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const v=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})};/*! js-cookie v3.0.5 | MIT */function h(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var a in t)e[a]=t[a]}return e}var f={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function u(e,i){function t(o,l,r){if(!(typeof document>"u")){r=h({},i,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var n in r)r[n]&&(c+="; "+n,r[n]!==!0&&(c+="="+r[n].split(";")[0]));return document.cookie=o+"="+e.write(l,o)+c}}function a(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var l=document.cookie?document.cookie.split("; "):[],r={},c=0;c<l.length;c++){var n=l[c].split("="),p=n.slice(1).join("=");try{var d=decodeURIComponent(n[0]);if(r[d]=e.read(p,d),o===d)break}catch{}}return o?r[o]:r}}return Object.create({set:t,get:a,remove:function(o,l){t(o,"",h({},l,{expires:-1}))},withAttributes:function(o){return u(this.converter,h({},this.attributes,o))},withConverter:function(o){return u(h({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(e)}})}var y=u(f,{path:"/"}),k=function(e,i,t,a){function o(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function c(d){try{p(a.next(d))}catch(s){r(s)}}function n(d){try{p(a.throw(d))}catch(s){r(s)}}function p(d){d.done?l(d.value):o(d.value).then(c,n)}p((a=a.apply(e,i||[])).next())})};const b=(e,i)=>{Array.from(e.querySelectorAll('label:not([slot="checked"])')).forEach(t=>{const o=t.querySelector("input").value,l=t.textContent;o.toLowerCase().includes(i.value.toLowerCase())||l.toLowerCase().includes(i.value.toLowerCase())?t.removeAttribute("slot"):t.setAttribute("slot","notmatched")})},x=(e,i,t)=>k(void 0,void 0,void 0,function*(){const a=i.value,o=e.getAttribute("data-url"),l=e.querySelector("input");console.log(l);const r=l&&l.hasAttribute("type")?l.getAttribute("type"):"checkbox";let c=l&&l.hasAttribute("name")?l.getAttribute("name"):"tags";e.hasAttribute("data-name")&&(c=e.hasAttribute("data-name"));const n=`${o}?search_query=${encodeURI(a)}`;window.controller||(window.controller=[]),window.controller[n]&&window.controller[n].abort(),window.controller[n]=new AbortController;const{signal:p}=controller[n];try{yield fetch(n,{signal:p,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":y.get("XSRF-TOKEN")})}).then(d=>d.json()).then(d=>{let s="";for(let m=0;m<d.data.length;m++)e.querySelector(`[value="${d.data[m].value}"]`)||(s+=`<label class="tag dropdown__option"><input type="${r}" name="${e.hasAttribute("data-name")?e.getAttribute("data-name"):c}" value="${d.data[m].value}"/>${d.data[m].title}</label>`);return e.insertAdjacentHTML("beforeend",`${s}`),t(e,i),d})}catch(d){console.log(d)}}),g=e=>{const i=e.querySelector(":checked"),t=i?.getAttribute("name");e.setAttribute("slot","checked"),e.setAttribute("data-content",e.textContent);let a=[];localStorage.getItem("tags-"+t)!=null&&(a=JSON.parse(localStorage.getItem("tags-"+t))),a.includes(e.textContent)||(a.push(e.textContent),localStorage.setItem("tags-"+t,JSON.stringify(a)));let o=a.indexOf(e.textContent)+1;o>23&&(o=1),e?.classList.add(`wider-colour-${o+1}`)},w=(e,i)=>{i.addEventListener("keydown",t=>{var a;switch(t.keyCode){case 40:t.stopPropagation(),t.preventDefault(),(a=e.querySelector('label:not([slot="checked"]) input'))===null||a===void 0||a.focus();break}}),e.addEventListener("keydown",t=>{var a,o,l;const r=e.querySelectorAll(':scope > a, :scope > button, :scope > details > summary, :scope > label:not([slot="checked"]) > input'),c=e.querySelectorAll('a, button, input, label:not([slot="checked"]) > input');if(t&&t.target instanceof HTMLElement&&t.target.closest('a, button, summary, label:not([slot="checked"]) > input')){const n=document.activeElement,p=Array.from(r).indexOf(n)-1,d=Array.from(r).indexOf(n)+1;switch(t.keyCode){case 27:n.closest("details")?(t.stopPropagation(),t.preventDefault(),n.closest("details").removeAttribute("open"),n.closest("details").querySelector(":scope summary").focus()):t.stopPropagation();break;case 32:case 13:break;case 35:t.stopPropagation(),t.preventDefault(),(a=e.querySelector("details[open]"))===null||a===void 0||a.removeAttribute("open"),Array.from(c)[c.length-1].focus();break;case 36:t.stopPropagation(),t.preventDefault(),(o=e.querySelector("details[open]"))===null||o===void 0||o.removeAttribute("open"),Array.from(c)[0].focus();break;case 38:if(t.stopPropagation(),t.preventDefault(),Array.from(r).indexOf(n)>-1)Array.from(r)[p]!=null?Array.from(r)[p].focus():Array.from(r)[r.length-1].focus();else if(n.closest("details")){const s=n.closest("details").querySelectorAll("a, button, :scope details > summary");subPrevIndex=Array.from(s).indexOf(n)-1,Array.from(s)[subPrevIndex]!=null?Array.from(s)[subPrevIndex].focus():Array.from(s)[s.length-1].focus()}break;case 40:if(t.stopPropagation(),t.preventDefault(),Array.from(r).indexOf(n)>-1)Array.from(r)[d]!=null?Array.from(r)[d].focus():Array.from(r)[0].focus();else if(n.closest("details")){const s=(l=n.closest("details"))===null||l===void 0?void 0:l.querySelectorAll("a, button, :scope details > summary");subNextIndex=Array.from(s).indexOf(n)+1,Array.from(s)[subNextIndex]!=null?Array.from(s)[subNextIndex].focus():Array.from(s)[0].focus()}break}}})};v("iam-tag");class z extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const a=n=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:n})};a("iam-tooltip");class l 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.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const p=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},h=(o,t,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:t}),a.forEach(e=>{o.addEventListener(e,function(r){const i={event:e,element:t,target:r.target};Object.keys(r.detail).forEach(d=>{const s=r.detail[d];i[d]=s}),window.dataLayer.push(i)})}),!0),b=`<div class="card__head" part="head">
5
5
  <slot name="head"></slot>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const g=r=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:r})};var b=function(r,n,e,t){function a(o){return o instanceof e?o:new e(function(i){i(o)})}return new(e||(e=Promise))(function(o,i){function s(d){try{l(t.next(d))}catch(c){i(c)}}function p(d){try{l(t.throw(d))}catch(c){i(c)}}function l(d){d.done?o(d.value):a(d.value).then(s,p)}l((t=t.apply(r,n||[])).next())})};const u=()=>b(void 0,void 0,void 0,function*(){return new Promise((r,n)=>{const e=new Image;e.onload=function(){const t=document.createElement("script");t.src="https://www.youtube.com/iframe_api";const a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(t,a),document.body.classList.add("youtubeLoaded"),r(!0)},e.onerror=function(){n(!1)},e.src="https://youtube.com/favicon.ico"})}),v=(r,n)=>b(void 0,void 0,void 0,function*(){if(typeof window.player>"u"&&(window.player=[]),typeof window.player[n]<"u"&&typeof window.player[n].pauseVideo=="function")return window.player[n].playVideo(),!1;window.player[n]=new YT.Player(n,{height:"100%",width:"100%",videoId:n,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:e,onStateChange:a}});function e(o){o.target.playVideo()}let t=!1;function a(o){o.data==YT.PlayerState.PLAYING&&!t&&(document.getElementById(n).classList.add("player-ready"),t=!0)}}),h=(r,n)=>{var e;const t=(e=n.shadowRoot)===null||e===void 0?void 0:e.querySelector("dialog");t?.showModal(),t?.focus();const a=new CustomEvent("modal-opened",{bubbles:!0,cancelable:!0,detail:{modalId:r}});n.dispatchEvent(a),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})},f=(r,n)=>{var e;const t=(e=n.shadowRoot)===null||e===void 0?void 0:e.querySelector("dialog");t?.close();const a=new CustomEvent("modal-closed",{bubbles:!0,cancelable:!0,detail:{modalId:r}});n.dispatchEvent(a),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:r})},w='<button class="btn btn-compact btn-secondary fa-xmark-large" data-close>Close</button>';var m=function(r,n,e,t){function a(o){return o instanceof e?o:new e(function(i){i(o)})}return new(e||(e=Promise))(function(o,i){function s(d){try{l(t.next(d))}catch(c){i(c)}}function p(d){try{l(t.throw(d))}catch(c){i(c)}}function l(d){d.done?o(d.value):a(d.value).then(s,p)}l((t=t.apply(r,n||[])).next())})};g("iam-video-modal");class y extends HTMLElement{constructor(){super(),this.openYoutubeVideo=(e,t)=>m(this,void 0,void 0,function*(){const a=t.querySelector(".embed");h(e,t);const o=t.getAttribute("data-youtube");document.body.classList.contains("youtubeLoaded")||(yield u());const i=new CustomEvent("play-video",{detail:{"Video Type":"YoutTube",ID:o}});t.dispatchEvent(i);const s=setInterval(()=>{typeof YT<"u"&&(clearInterval(s),v(a,o))},200);setTimeout(function(){clearInterval(s)},2e3)}),this.openVimeoVideo=(e,t)=>m(this,void 0,void 0,function*(){const a=t.querySelector(".embed");h(e,t);const o=t.getAttribute("data-vimeo"),i=new CustomEvent("play-video",{detail:{"Video Type":"Vimeo",ID:o}});t.dispatchEvent(i),window.dataLayer.push(i.detail),a.querySelector("iframe")||(a.innerHTML=`<iframe src="https://player.vimeo.com/video/${o}?autoplay=1" width="100%" height="100%" frameborder="0" allow="autoplay; encrypted-media" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>`)}),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */const o=i=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:i})};o("iam-word-count");class n 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>
@@ -15,11 +15,6 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
15
15
  }
16
16
  displayInputField.value = '';
17
17
  });
18
- displayInputField.addEventListener('keyup', function () {
19
- if (displayInputField.value != "") {
20
- displayInputField.setAttribute('data-value', displayInputField.value);
21
- }
22
- });
23
18
  displayInputField.addEventListener('blur', function () {
24
19
  if (displayInputField.hasAttribute('data-value')) {
25
20
  displayInputField.value = displayInputField.getAttribute('data-value');
@@ -32,9 +27,20 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
32
27
  option.innerHTML = option.value;
33
28
  }
34
29
  datalist.addEventListener('click', function (event) {
30
+ var _a;
35
31
  if (event && event.target instanceof HTMLElement && event.target.closest('option')) {
36
32
  const option = event.target.closest('option');
37
- displayInputField.value = option.value;
33
+ const optionText = ((_a = option.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || option.value;
34
+ // Store actual value on the original input
35
+ const originalInput = advancedSelect.querySelector('input[type="hidden"]');
36
+ if (originalInput) {
37
+ originalInput.value = option.value;
38
+ originalInput.setAttribute('value', option.value);
39
+ }
40
+ // Show label text in the visible field
41
+ displayInputField.value = optionText;
42
+ displayInputField.setAttribute('data-value', optionText);
43
+ displayInputField.setAttribute('placeholder', optionText);
38
44
  if (typeof window.triggerDynamicEvent == 'function')
39
45
  window.triggerDynamicEvent(displayInputField);
40
46
  for (const optionInner of datalist.options) {
@@ -43,7 +49,10 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
43
49
  option.classList.add('active');
44
50
  setTimeout(() => {
45
51
  advancedSelect.dispatchEvent(new CustomEvent('update-value', {
46
- detail: { value: option.value },
52
+ detail: {
53
+ value: option.value,
54
+ text: optionText,
55
+ },
47
56
  }));
48
57
  }, 0);
49
58
  }
@@ -54,7 +63,8 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
54
63
  if (advancedSelect.tagName != "IAM-ADDRESS-LOOKUP") {
55
64
  const text = displayInputField.value.toUpperCase();
56
65
  for (const option of datalist.options) {
57
- if (option.value.toUpperCase().indexOf(text) > -1) {
66
+ const optionText = (option.textContent || option.value).toUpperCase();
67
+ if (optionText.indexOf(text) > -1) {
58
68
  option.style.display = 'block';
59
69
  option.classList.remove('hide');
60
70
  }
@@ -105,6 +115,11 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
105
115
  .closest('label')
106
116
  .insertAdjacentHTML('beforeend', '<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');
107
117
  const emptyField = () => {
118
+ const originalInput = advancedSelect.querySelector('input[type="hidden"]');
119
+ if (originalInput) {
120
+ originalInput.value = '';
121
+ originalInput.setAttribute('value', '');
122
+ }
108
123
  displayInputField.removeAttribute('placeholder');
109
124
  if (displayInputField.hasAttribute('data-original-placeholder'))
110
125
  displayInputField.setAttribute('placeholder', displayInputField.getAttribute('data-original-placeholder'));
@@ -112,10 +127,18 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
112
127
  displayInputField.value = '';
113
128
  for (const optionInner of datalist.options) {
114
129
  optionInner.classList.remove('active');
130
+ optionInner.classList.remove('hide');
115
131
  optionInner.removeAttribute('style');
116
132
  }
117
133
  const updateEvent = new CustomEvent('close-button-pressed');
118
134
  advancedSelect.dispatchEvent(updateEvent);
135
+ // Notify consumers the value was cleared
136
+ advancedSelect.dispatchEvent(new CustomEvent('update-value', {
137
+ detail: {
138
+ value: '',
139
+ text: '',
140
+ },
141
+ }));
119
142
  };
120
143
  const closeBtn = advancedSelect.querySelector('.empty') ? advancedSelect.querySelector('.empty') : advancedSelect.shadowRoot.querySelector('.empty');
121
144
  closeBtn.addEventListener('click', function (e) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */(function(w){typeof define=="function"&&define.amd?define(w):w()})((function(){"use strict";var w=a=>{a.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie")},H=a=>{var e=function(n){var r=document.querySelector('label[for="'.concat(n.replace("#",""),'"]')),s=document.querySelector(n+" summary"),u=document.querySelector("dialog".concat(n)),i=document.querySelector("detail".concat(n));r instanceof HTMLElement?r.click():s instanceof HTMLElement?s.click():u instanceof HTMLElement?u.showModal():i instanceof HTMLElement&&i.addAttribute("open")};location.hash&&e(location.hash),window.addEventListener("hashchange",function(){e(location.hash)},!1),addEventListener("popstate",o=>{if(o&&o.state&&o.state.type&&o.state.type=="pagination"){var n=document.querySelector("#".concat(o.state.form)),r=document.querySelector("#".concat(o.state.form," [data-pagination]"));r?r.value=o.state.page:n.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(o.state.page,'" />'),n.dispatchEvent(new Event("submit"))}}),Array.from(document.querySelectorAll("form")).forEach(o=>{o?.closest("iam-form")||o.addEventListener("submit",n=>{var r;o.querySelector(":invalid")&&(o.classList.add("was-validated"),(r=o?.querySelector("input:invalid"))===null||r===void 0||r.scrollIntoView(),n.preventDefault())})}),document.addEventListener("click",o=>{var n;if(o&&o.target instanceof HTMLElement&&o.target.matches("form button:not([type=button])")){var r=o.target.closest("form");r?.closest("iam-form")||(Array.from(r.querySelectorAll("[data-password-type]")).forEach(s=>{s.setAttribute("type","password")}),(r.querySelector(":invalid")||r.querySelector('.pwd-checker[data-strength="1"]')||r.querySelector('.pwd-checker[data-strength="2"]'))&&(r.classList.add("was-validated"),(n=r?.querySelector("input:invalid"))===null||n===void 0||n.scrollIntoView(),o.preventDefault()),r.querySelector("iam-multiselect[data-is-required][data-error]")&&(r.classList.add("was-validated"),o.preventDefault()))}}),document.addEventListener("keydown",o=>{o.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(o.preventDefault(),o.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach(o=>{var n=o.closest("label");n.setAttribute("data-percent",o.getAttribute("value"))})};function N(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",a=>{var e=a.target.closest("[open] summary");if(e)window.dataLayer.push({event:"closeDetails",detailsTitle:e.textContent||""});else{var o=a.target.closest("summary"),n=a.target.closest("a"),r=a.target.closest("button");o&&window.dataLayer.push({event:"openDetails",detailsTitle:o.textContent||""}),n&&window.dataLayer.push({event:"linkClicked",linkText:n.hasAttribute("title")?n.getAttribute("title")||"":n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||"",href:n.getAttribute("href")||""}),r&&window.dataLayer.push({event:"buttonClicked",buttonText:r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||""})}})}window.triggerDynamicEvent=function(a){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"change";console.log("event"),a.hasAttribute("data-change-events")&&e=="change"&&v(a,a.getAttribute("data-change-events")),a.hasAttribute("data-click-events")&&e=="click"&&v(a,a.getAttribute("data-click-events"))};var M=()=>{document.addEventListener("change",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-events]")&&v(a.target,a.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-events]")&&v(a.target,a.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("[data-click-events]")&&v(a.target,a.target.closest("[data-click-events]").getAttribute("data-click-events"))})},v=(a,e)=>{if(e||(e=a.parentNode.getAttribute("data-change-events")),!e)return!1;Array.from(JSON.parse(e)).forEach(o=>{C(a,o)})},C=(a,e)=>{if("matches"in e)return e.matches=="any"||a.value==e.matches?f(a,e,"if"):f(a,e,"else"),!1;if("in-list"in e){var o=document.querySelector("".concat(e["in-list"],' option[value="').concat(a.value,'"]'));return document.querySelector("".concat(e["in-list"],' option[value="').concat(a.value,'"]'))?f(o,e,"if"):f(o,e,"else"),!1}else"event"in e&&f(a,e,"event")},f=(a,e,o)=>{if(!(o in e))return!1;switch(e[o]){case"hide":if(document.querySelector(e.target)){var n=document.querySelector(e.target);n.classList.add("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(i=>{i.removeAttribute("required")})}break;case"show":if(document.querySelector(e.target)){var r=document.querySelector(e.target);r.classList.remove("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(i=>{i.closest(".js-hide")||i.setAttribute("required","true")})}break;case"populate-form":D(a,e);break;case"dispatchEvent":var s=new Event(e.value);document.querySelector("".concat(e.target)).dispatchEvent(s);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(i){i.setAttribute(e.attribute,e.value)});break;case"focus":document.querySelector("".concat(e.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(i){i.removeAttribute(e.attribute)});break;case"updateValue":document.querySelector("".concat(e.target)).value=e.value?e.value:"";var u=new Event("change");document.querySelector("".concat(e.target)).dispatchEvent(u);break;case"submitForm":document.querySelector("".concat(e.target)).submit();break;case"openLink":document.querySelector("".concat(e.target)).value&&(window.location.href=document.querySelector("".concat(e.target)).value);break}},D=function(e,o){var n=JSON.parse(e.getAttribute("data-values")),r=document.querySelector(o.target);if(!n)return!1;Object.keys(n).forEach(s=>{document.getElementById(s)&&document.getElementById(s).tagName=="SPAN"&&(document.getElementById(s).innerHTML=n[s]),r.querySelector('select[name="'.concat(s,'"] [value="').concat(n[s],'"]'))?(r.querySelector('select[name="'.concat(s,'"]')).value=n[s],e.hasAttribute("data-lock-fields")&&(r.querySelector('select[name="'.concat(s,'"]')).disabled=!0)):r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]'))?(Array.from(r.querySelectorAll('input[name="'.concat(s,'"][type="radio"]'))).forEach(function(u){u.disabled=!0}),r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]')).checked=!0,r.querySelector('input[name="'.concat(s,'"][type="radio"][value="').concat(n[s],'"]')).disabled=!1):r.querySelector('input[name="'.concat(s,'"]'))&&(r.querySelector('input[name="'.concat(s,'"]')).value=n[s],e.hasAttribute("data-lock-fields")&&r.querySelector('input[name="'.concat(s,'"]')).setAttribute("readonly","true"))})},F=()=>{var a=[],e={},o="These tests run against mark-up and content meant to test how a component or element has been integrated. Making sure that guidance setout in the design system is being followed.";window.integrationTestsIntro=o,console.log("%cVirgin Money Framework Tests","color: #E10A0A; font-size: 24px; font-weight: bold; margin-top: 20px; margin-bottom: 10px;"),console.log("%c"+o,"font-size: 14px; margin-bottom: 20px;"),console.log("%cKey","font-size: 16px;font-weight:bold;"),console.log("%c %cSuccessfully implemented","background-color: green; margin-right: 10px","background-color: transparent"),console.log("%c %cNOT implemented correctly","background-color: red; margin-right: 10px","background-color: transparent"),console.log("%c %cN/A","background-color: grey; margin-right: 10px","background-color: transparent"),console.log("%c %cWarning - No action needed","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("%c ? %cWarning - Action needed","background-color: orange; margin-right: 10px","background-color: transparent"),e={Test:"Each card with in a card deck has a footer with some CTA text via a button link",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".card-deck .card")).forEach((t,c)=>{if(t.closest(".navbar")==null){var l=t.querySelector(".btn-link");l!=null&&l.textContent.length?e.Passes++:e.Fails++}}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Article Decks need to have a background colour applied",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".article-deck")).forEach((t,c)=>{var l=t.closest(".container");l!=null&&l.matches('[class*="bg-"]')?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Tabs Carousel has a h2 title with a display-4 class. It should always have a strapline next to it also.",Total:0,Passes:0,Fails:0,Notes:"The site nav contains cards without a footer by design."},Array.from(document.querySelectorAll(".tabs__container--carousel")).forEach((t,c)=>{var l=t.querySelector("h2.display-4:first-child"),d=t.querySelector("h2.display-4:first-child + .strapline");l!=null&&d!=null?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Split Containers can only have multiple of two columns. So either 2, 4, 6 and so on.",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--split")).forEach((t,c)=>{t.querySelectorAll(':scope > .row > [class*="col"]').length%2===0?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"Statement Containers with only one paragraph or text element should have the class of .h6",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--statement")).forEach((t,c)=>{t.querySelectorAll(":scope > *").length==1&&t.querySelectorAll(":scope > .h6:first-child").length==1?e.Passes++:t.querySelectorAll(":scope > *").length==1&&e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),e={Test:"CTA Containers title should always have the class of .h1",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--cta")).forEach((t,c)=>{t.querySelectorAll("h2.h1:first-child").length==1?e.Passes++:e.Fails++}),e.Total=e.Passes+e.Fails,a.push(e),console.log("%cImplementation Tests","font-size: 16px;font-weight:bold; margin-top: 20px;"),a.forEach(function(t){var c="green";t.Total===0?c="grey":t.Fails!=0&&(c="red"),t.Type=="warning"&&(c="orange"),console.groupCollapsed("%c %c"+t.Test,"background-color: "+c+"; margin-right: 10px","background-color: transparent"),console.table({Passed:{value:t.Passes},Failed:{value:t.Fails},Total:{value:t.Total}}),t.Notes!=""&&console.log(t.Notes),console.groupEnd()}),window.integrationTests=a;var n=[];e={Test:"There are XX padding classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="p-"],[class*="pt-"],[class*="pb-"],[class*="pl-"],[class*="pr-"],[class*="px-"],[class*="py-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),e={Test:"There are XX margin classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="m-"],[class*="mt-"],[class*="mb-"],[class*="ml-"],[class*="mr-"],[class*="mx-"],[class*="my-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),e={Test:"There are XX text modifier classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="text-"]')).forEach((t,c)=>{e.Total++}),e.Test=e.Test.replace("XX",e.Total),n.push(e),console.log("%cUtility classes","font-size: 16px;font-weight:bold;"),console.log("The use of certain utility classes is necessary at times but the over use of these classes will lead to design/layout inconsistencies."),n.forEach(function(t){var c="green";t.Total===0?c="grey":t.Fails!=0&&(c="red"),t.Type=="warning"&&(c="orange"),console.groupCollapsed("%c %c"+t.Test,"background-color: "+c+"; margin-right: 10px","background-color: transparent"),console.table({Total:{value:t.Total}}),t.Notes!=""&&console.log(t.Notes),console.groupEnd()}),console.log("%cAccessibility and Best practice Tests","font-size: 16px;font-weight:bold;");var r="green",s=1,u={};Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6")).forEach((t,c)=>{var l=1,d=t.textContent;t.matches("h2")?l=2:t.matches("h3")?l=3:t.matches("h4")?l=4:t.matches("h5")?l=5:t.matches("h6")&&(l=6);var h=l-s<=1;c==0&&l!=1&&(h=!1);var p={"Heading Level":l,"In order":h};h?s=l:r="red",u[d]=p}),console.groupCollapsed("%c %cHeadings are in the correct order","background-color: "+r+"; margin-right: 10px","background-color: transparent"),console.table(u),console.groupEnd(),console.groupCollapsed("%c ? %cDo all of the headings make sense out of context and do they introduce the content that follows?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("You should be able to read the below table and get an understanding of what the page content consists of. The titles should make sense when read in order and child titles should be relevant to the parent title."),console.table(u),console.groupEnd();var i={};Array.from(document.querySelectorAll("a")).forEach((t,c)=>{var l=t.getAttribute("href"),d=t.textContent,h=t.getAttribute("title"),p={Text:d,Title:h};i[l]=p}),console.groupCollapsed("%c ? %cDo all of the links make sense out of context and do they describe the page/section that it links to?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(i),console.groupEnd();var A={},m={};Array.from(document.querySelectorAll("img[alt]")).forEach((t,c)=>{var l=t.getAttribute("src"),d=t.getAttribute("alt");if(d!=""){var h={Alt:d};A[l]=h}else{var l=t.getAttribute("src"),p={};m[l]=p}}),console.groupCollapsed("%c ? %cDo all of the images with an alt tag make sense out of context and describes the image appropriately?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(A),console.log("%cImages with an empty alt tag:","font-weight: bold;"),console.table(m),console.groupEnd(),console.groupCollapsed("%c ? %cCan you navigation the page links by tabbing through the page?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("Are all of the links, input fields and buttons accessible through using the keyboard only?"),console.groupEnd(),console.log("%cLighthouse","font-size: 16px;font-weight:bold;"),console.groupCollapsed("%c ? %cHave you ran a lighthouse report on this page","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("If you are in a modern version of chrome you can a lighthouse report by opening the lighthouse window within the devtools. This should appear as a tab link above."),console.log("This report will give you more detail about the above the tests aswell as extra tests. "),console.groupEnd(),console.log("%cImage sizes","font-size: 16px;font-weight:bold;"),console.log("The below tests work from the current screen size, so if you have your screen at a mobile viewport the scaling and sizes of images will reflect that. It is worth running the image tests in both mobile and desktop views. Simply change the screen size and refresh the page."),Array.from(document.querySelectorAll("img")).forEach((t,c)=>{if(!t.matches("[src*='http']")&&!t.matches("[src$='.svg']")){var l=t.getAttribute("src"),d=new XMLHttpRequest;d.open("HEAD",l,!0),d.onreadystatechange=function(){if(d.readyState==4)if(d.status==200){var h=d.getResponseHeader("Content-Length");if(h>1024){var p=t.naturalWidth,P=t.naturalHeight,S=t.clientWidth,O=t.clientHeight,k=(S/p).toFixed(2)=="0.00"?"Hidden":(S/p).toFixed(2),B=Math.floor(h/1024),E=(h/(p*P)).toFixed(2),b="green",L="green",q="green",x="",T="";E>.5?(b="red",L="red",x="The image has a VERY large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."):E>.2&&(b="orange",L="orange",x="The image has a large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."),k>1.2?(b="red",q="red",T="The image size is smaller than the size shown on screen this may cause the image to appear blurry and low quality."):k<.5?(b="red",q="red",T="The image size is VERY large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."):k<.8&&(b="orange",q="orange",T="The image size is large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."),console.log("%c %c "+t.src,"background: url("+t.src+"); border: 3px solid "+b+"; line-height: 30px; width: 30px; background-size: cover;","background-color: transparent"),x!=""&&console.log("%c %c"+x,"background-color: "+L+"; margin-right: 10px","background-color: transparent"),T!=""&&console.log("%c %c"+T,"background-color: "+q+"; margin-right: 10px","background-color: transparent"),console.table({Image:{Dimensions:p+"x"+P,"Scaled to":S+"x"+O,Scale:k,Filesize:B+"Kb","Bytes per pixel":E}}),console.groupEnd()}}else console.log("%c %c"+t.src+" not loaded","background-color: red; margin-right: 10px","background-color: transparent")},d.send(null)}});var g=[];if(typeof window.integrationTests<"u"&&window.integrationTests.forEach(function(t){t.Total!=0&&t.Type!="warning"&&g.push(t.Test)}),g.length!=0){var y=document.querySelector("#vmtests-display");if(y!=null){y.innerHTML=`<div class="container">
5
5
  <h2>Integration notes</h2>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v7.7.1--beta2
2
+ * iamKey v7.7.1--beta4
3
3
  * Copyright 2022-2026 iamproperty
4
4
  */
5
5
  !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";window.triggerDynamicEvent=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change";console.log("event"),t.hasAttribute("data-change-events")&&"change"==a&&e(t,t.getAttribute("data-change-events")),t.hasAttribute("data-click-events")&&"click"==a&&e(t,t.getAttribute("data-click-events"))};var e=(e,a)=>{if(a||(a=e.parentNode.getAttribute("data-change-events")),!a)return!1;Array.from(JSON.parse(a)).forEach(a=>{t(e,a)})},t=(e,t)=>{if("matches"in t)return"any"==t.matches||e.value==t.matches?a(e,t,"if"):a(e,t,"else"),!1;if("in-list"in t){var o=document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'));return document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'))?a(o,t,"if"):a(o,t,"else"),!1}"event"in t&&a(e,t,"event")},a=(e,t,a)=>{if(!(a in t))return!1;switch(t[a]){case"hide":if(document.querySelector(t.target)){var n=document.querySelector(t.target);n.classList.add("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(e=>{e.removeAttribute("required")})}break;case"show":if(document.querySelector(t.target)){var r=document.querySelector(t.target);r.classList.remove("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(e=>{e.closest(".js-hide")||e.setAttribute("required","true")})}break;case"populate-form":o(e,t);break;case"dispatchEvent":var s=new Event(t.value);document.querySelector("".concat(t.target)).dispatchEvent(s);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach(function(e){e.setAttribute(t.attribute,t.value)});break;case"focus":document.querySelector("".concat(t.target)).focus();break;case"removeAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach(function(e){e.removeAttribute(t.attribute)});break;case"updateValue":document.querySelector("".concat(t.target)).value=t.value?t.value:"";var l=new Event("change");document.querySelector("".concat(t.target)).dispatchEvent(l);break;case"submitForm":document.querySelector("".concat(t.target)).submit();break;case"openLink":document.querySelector("".concat(t.target)).value&&(window.location.href=document.querySelector("".concat(t.target)).value)}},o=function(e,t){var a=JSON.parse(e.getAttribute("data-values")),o=document.querySelector(t.target);if(!a)return!1;Object.keys(a).forEach(t=>{document.getElementById(t)&&"SPAN"==document.getElementById(t).tagName&&(document.getElementById(t).innerHTML=a[t]),o.querySelector('select[name="'.concat(t,'"] [value="').concat(a[t],'"]'))?(o.querySelector('select[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&(o.querySelector('select[name="'.concat(t,'"]')).disabled=!0)):o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]'))?(Array.from(o.querySelectorAll('input[name="'.concat(t,'"][type="radio"]'))).forEach(function(e){e.disabled=!0}),o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).checked=!0,o.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).disabled=!1):o.querySelector('input[name="'.concat(t,'"]'))&&(o.querySelector('input[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&o.querySelector('input[name="'.concat(t,'"]')).setAttribute("readonly","true"))})},n=()=>{var e=[],t={},a="These tests run against mark-up and content meant to test how a component or element has been integrated. Making sure that guidance setout in the design system is being followed.";window.integrationTestsIntro=a,console.log("%cVirgin Money Framework Tests","color: #E10A0A; font-size: 24px; font-weight: bold; margin-top: 20px; margin-bottom: 10px;"),console.log("%c"+a,"font-size: 14px; margin-bottom: 20px;"),console.log("%cKey","font-size: 16px;font-weight:bold;"),console.log("%c %cSuccessfully implemented","background-color: green; margin-right: 10px","background-color: transparent"),console.log("%c %cNOT implemented correctly","background-color: red; margin-right: 10px","background-color: transparent"),console.log("%c %cN/A","background-color: grey; margin-right: 10px","background-color: transparent"),console.log("%c %cWarning - No action needed","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("%c ? %cWarning - Action needed","background-color: orange; margin-right: 10px","background-color: transparent"),t={Test:"Each card with in a card deck has a footer with some CTA text via a button link",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".card-deck .card")).forEach((e,a)=>{if(null==e.closest(".navbar")){var o=e.querySelector(".btn-link");null!=o&&o.textContent.length?t.Passes++:t.Fails++}}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Article Decks need to have a background colour applied",Total:0,Passes:0,Fails:0},Array.from(document.querySelectorAll(".article-deck")).forEach((e,a)=>{var o=e.closest(".container");null!=o&&o.matches('[class*="bg-"]')?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Tabs Carousel has a h2 title with a display-4 class. It should always have a strapline next to it also.",Total:0,Passes:0,Fails:0,Notes:"The site nav contains cards without a footer by design."},Array.from(document.querySelectorAll(".tabs__container--carousel")).forEach((e,a)=>{var o=e.querySelector("h2.display-4:first-child"),n=e.querySelector("h2.display-4:first-child + .strapline");null!=o&&null!=n?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Split Containers can only have multiple of two columns. So either 2, 4, 6 and so on.",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--split")).forEach((e,a)=>{e.querySelectorAll(':scope > .row > [class*="col"]').length%2==0?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"Statement Containers with only one paragraph or text element should have the class of .h6",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--statement")).forEach((e,a)=>{1==e.querySelectorAll(":scope > *").length&&1==e.querySelectorAll(":scope > .h6:first-child").length?t.Passes++:1==e.querySelectorAll(":scope > *").length&&t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),t={Test:"CTA Containers title should always have the class of .h1",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll(".container.container--cta")).forEach((e,a)=>{1==e.querySelectorAll("h2.h1:first-child").length?t.Passes++:t.Fails++}),t.Total=t.Passes+t.Fails,e.push(t),console.log("%cImplementation Tests","font-size: 16px;font-weight:bold; margin-top: 20px;"),e.forEach(function(e){var t="green";0===e.Total?t="grey":0!=e.Fails&&(t="red"),"warning"==e.Type&&(t="orange"),console.groupCollapsed("%c %c"+e.Test,"background-color: "+t+"; margin-right: 10px","background-color: transparent"),console.table({Passed:{value:e.Passes},Failed:{value:e.Fails},Total:{value:e.Total}}),""!=e.Notes&&console.log(e.Notes),console.groupEnd()}),window.integrationTests=e;var o=[];t={Test:"There are XX padding classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="p-"],[class*="pt-"],[class*="pb-"],[class*="pl-"],[class*="pr-"],[class*="px-"],[class*="py-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),t={Test:"There are XX margin classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="m-"],[class*="mt-"],[class*="mb-"],[class*="ml-"],[class*="mr-"],[class*="mx-"],[class*="my-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),t={Test:"There are XX text modifier classes being used on this page",Type:"warning",Total:0,Passes:0,Fails:0,Notes:""},Array.from(document.querySelectorAll('[class*="text-"]')).forEach((e,a)=>{t.Total++}),t.Test=t.Test.replace("XX",t.Total),o.push(t),console.log("%cUtility classes","font-size: 16px;font-weight:bold;"),console.log("The use of certain utility classes is necessary at times but the over use of these classes will lead to design/layout inconsistencies."),o.forEach(function(e){var t="green";0===e.Total?t="grey":0!=e.Fails&&(t="red"),"warning"==e.Type&&(t="orange"),console.groupCollapsed("%c %c"+e.Test,"background-color: "+t+"; margin-right: 10px","background-color: transparent"),console.table({Total:{value:e.Total}}),""!=e.Notes&&console.log(e.Notes),console.groupEnd()}),console.log("%cAccessibility and Best practice Tests","font-size: 16px;font-weight:bold;");var n="green",r=1,s={};Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6")).forEach((e,t)=>{var a=1,o=e.textContent;e.matches("h2")?a=2:e.matches("h3")?a=3:e.matches("h4")?a=4:e.matches("h5")?a=5:e.matches("h6")&&(a=6);var l=a-r<=1;0==t&&1!=a&&(l=!1);var c={"Heading Level":a,"In order":l};l?r=a:n="red",s[o]=c}),console.groupCollapsed("%c %cHeadings are in the correct order","background-color: "+n+"; margin-right: 10px","background-color: transparent"),console.table(s),console.groupEnd(),console.groupCollapsed("%c ? %cDo all of the headings make sense out of context and do they introduce the content that follows?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("You should be able to read the below table and get an understanding of what the page content consists of. The titles should make sense when read in order and child titles should be relevant to the parent title."),console.table(s),console.groupEnd();var l={};Array.from(document.querySelectorAll("a")).forEach((e,t)=>{var a=e.getAttribute("href"),o={Text:e.textContent,Title:e.getAttribute("title")};l[a]=o}),console.groupCollapsed("%c ? %cDo all of the links make sense out of context and do they describe the page/section that it links to?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(l),console.groupEnd();var c={},i={};Array.from(document.querySelectorAll("img[alt]")).forEach((e,t)=>{var a=e.getAttribute("src"),o=e.getAttribute("alt");if(""!=o){var n={Alt:o};c[a]=n}else a=e.getAttribute("src"),i[a]={}}),console.groupCollapsed("%c ? %cDo all of the images with an alt tag make sense out of context and describes the image appropriately?","background-color: orange; margin-right: 10px","background-color: transparent"),console.table(c),console.log("%cImages with an empty alt tag:","font-weight: bold;"),console.table(i),console.groupEnd(),console.groupCollapsed("%c ? %cCan you navigation the page links by tabbing through the page?","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("Are all of the links, input fields and buttons accessible through using the keyboard only?"),console.groupEnd(),console.log("%cLighthouse","font-size: 16px;font-weight:bold;"),console.groupCollapsed("%c ? %cHave you ran a lighthouse report on this page","background-color: orange; margin-right: 10px","background-color: transparent"),console.log("If you are in a modern version of chrome you can a lighthouse report by opening the lighthouse window within the devtools. This should appear as a tab link above."),console.log("This report will give you more detail about the above the tests aswell as extra tests. "),console.groupEnd(),console.log("%cImage sizes","font-size: 16px;font-weight:bold;"),console.log("The below tests work from the current screen size, so if you have your screen at a mobile viewport the scaling and sizes of images will reflect that. It is worth running the image tests in both mobile and desktop views. Simply change the screen size and refresh the page."),Array.from(document.querySelectorAll("img")).forEach((e,t)=>{if(!e.matches("[src*='http']")&&!e.matches("[src$='.svg']")){var a=e.getAttribute("src"),o=new XMLHttpRequest;o.open("HEAD",a,!0),o.onreadystatechange=function(){if(4==o.readyState)if(200==o.status){var t=o.getResponseHeader("Content-Length");if(t>1024){var a=e.naturalWidth,n=e.naturalHeight,r=e.clientWidth,s=e.clientHeight,l="0.00"==(r/a).toFixed(2)?"Hidden":(r/a).toFixed(2),c=Math.floor(t/1024),i=(t/(a*n)).toFixed(2),u="green",d="green",g="green",h="",p="";i>.5?(u="red",d="red",h="The image has a VERY large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."):i>.2&&(u="orange",d="orange",h="The image has a large 'Bytes per pixel' score, trying optimising the image using https://tinypng.com/."),l>1.2?(u="red",g="red",p="The image size is smaller than the size shown on screen this may cause the image to appear blurry and low quality."):l<.5?(u="red",g="red",p="The image size is VERY large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."):l<.8&&(u="orange",g="orange",p="The image size is large compared to the size shown on screen, this means unnecessary kb's are being downloaded. Try resizing the image in photoshop or other image editing software."),console.log("%c %c "+e.src,"background: url("+e.src+"); border: 3px solid "+u+"; line-height: 30px; width: 30px; background-size: cover;","background-color: transparent"),""!=h&&console.log("%c %c"+h,"background-color: "+d+"; margin-right: 10px","background-color: transparent"),""!=p&&console.log("%c %c"+p,"background-color: "+g+"; margin-right: 10px","background-color: transparent"),console.table({Image:{Dimensions:a+"x"+n,"Scaled to":r+"x"+s,Scale:l,Filesize:c+"Kb","Bytes per pixel":i}}),console.groupEnd()}}else console.log("%c %c"+e.src+" not loaded","background-color: red; margin-right: 10px","background-color: transparent")},o.send(null)}});var u=[];if(typeof window.integrationTests<"u"&&window.integrationTests.forEach(function(e){0!=e.Total&&"warning"!=e.Type&&u.push(e.Test)}),0!=u.length){var d=document.querySelector("#vmtests-display");if(null!=d){d.innerHTML='<div class="container">\n <h2>Integration notes</h2>\n <ul id="integrationTests"></ul>\n </div>';var g=document.getElementById("integrationTests");null!=g&&u.forEach(function(e){g.innerHTML+="<li>"+e+"</li>"})}}return null},r=Object.freeze({__proto__:null,default:n});["localhost"].includes(window.location.hostname)&&Promise.resolve().then(function(){return r}).then(e=>{window.iamTest=()=>{n()}}).catch(e=>{console.log(e.message)}),document.addEventListener("DOMContentLoaded",()=>{return t=void 0,a=void 0,n=function*(){var t,a;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",e=>{var t=e.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var a=e.target.closest("summary"),o=e.target.closest("a"),n=e.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),o&&window.dataLayer.push({event:"linkClicked",linkText:o.hasAttribute("title")?o.getAttribute("title")||"":o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||"",href:o.getAttribute("href")||""}),n&&window.dataLayer.push({event:"buttonClicked",buttonText:n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||""})}}),document.addEventListener("change",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-events]")&&e(t.target,t.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-events]")&&e(t.target,t.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",t=>{t&&t.target instanceof HTMLElement&&t.target.closest("[data-click-events]")&&e(t.target,t.target.closest("[data-click-events]").getAttribute("data-click-events"))}),(a=document.body).classList.add("js-enabled"),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie"),t=function(e){var t=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),a=document.querySelector(e+" summary"),o=document.querySelector("dialog".concat(e)),n=document.querySelector("detail".concat(e));t instanceof HTMLElement?t.click():a instanceof HTMLElement?a.click():o instanceof HTMLElement?o.showModal():n instanceof HTMLElement&&n.addAttribute("open")},location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&"pagination"==e.state.type){var t=document.querySelector("#".concat(e.state.form)),a=document.querySelector("#".concat(e.state.form," [data-pagination]"));a?a.value=e.state.page:t.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),t.dispatchEvent(new Event("submit"))}}),Array.from(document.querySelectorAll("form")).forEach(e=>{e?.closest("iam-form")||e.addEventListener("submit",t=>{var a;e.querySelector(":invalid")&&(e.classList.add("was-validated"),null===(a=e?.querySelector("input:invalid"))||void 0===a||a.scrollIntoView(),t.preventDefault())})}),document.addEventListener("click",e=>{var t;if(e&&e.target instanceof HTMLElement&&e.target.matches("form button:not([type=button])")){var a=e.target.closest("form");a?.closest("iam-form")||(Array.from(a.querySelectorAll("[data-password-type]")).forEach(e=>{e.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),null===(t=a?.querySelector("input:invalid"))||void 0===t||t.scrollIntoView(),e.preventDefault()),a.querySelector("iam-multiselect[data-is-required][data-error]")&&(a.classList.add("was-validated"),e.preventDefault()))}}),document.addEventListener("keydown",e=>{"Escape"===e.key&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach(e=>{e.closest("label").setAttribute("data-percent",e.getAttribute("value"))})},new((o=void 0)||(o=Promise))(function(e,r){function s(e){try{c(n.next(e))}catch(e){r(e)}}function l(e){try{c(n.throw(e))}catch(e){r(e)}}function c(t){t.done?e(t.value):function(e){return e instanceof o?e:new o(function(t){t(e)})}(t.value).then(s,l)}c((n=n.apply(t,a||[])).next())});var t,a,o,n})});
@@ -49,6 +49,8 @@ class iamAdvancedSelect extends HTMLElement {
49
49
  if (!inputField) return;
50
50
 
51
51
  const displayInputField = inputField.cloneNode() as HTMLInputElement;
52
+ displayInputField.value = '';
53
+ displayInputField.removeAttribute('value');
52
54
  displayInputField.setAttribute('name', `${inputField.getAttribute('name')}Alt`);
53
55
  inputField.removeAttribute('data-change-events');
54
56
  displayInputField.removeAttribute('id');
@@ -68,30 +70,46 @@ class iamAdvancedSelect extends HTMLElement {
68
70
  searchWrapper.appendChild(datalist);
69
71
 
70
72
  displayInputField.setAttribute('list', listID);
73
+ } else {
74
+ displayInputField.setAttribute('list', datalist.id);
71
75
  }
72
76
 
73
- if(datalist.querySelector(`[value="${inputField.value}"]`))
77
+ if (datalist && datalist.querySelector(`[value="${inputField.value}"]`)) {
74
78
  datalist.querySelector(`[value="${inputField.value}"]`)?.classList.add('active');
79
+ }
75
80
 
76
81
  advancedSelect(this, displayInputField, datalist);
77
82
 
78
- // Apply initial value passed to the component host
79
- const initialValue = this.getAttribute('value') || '';
80
- if (!initialValue) return;
83
+ // Apply initial value passed to the component host or original input
84
+ const initialValue = this.getAttribute('value') || inputField.value || '';
85
+
86
+ if (!initialValue)
87
+ return;
81
88
 
82
89
  inputField.value = initialValue;
83
90
  inputField.setAttribute('value', initialValue);
84
91
 
85
- displayInputField.value = '';
86
- displayInputField.setAttribute('placeholder', initialValue);
87
- displayInputField.setAttribute('data-value', initialValue);
92
+ let displayValue = initialValue;
88
93
 
89
94
  if (datalist) {
95
+ const selectedOption = Array.from(datalist.querySelectorAll('option')).find((option) => {
96
+ return option.getAttribute('value') === initialValue;
97
+ }) as HTMLOptionElement | undefined;
98
+
99
+ if (selectedOption) {
100
+ displayValue = selectedOption.textContent?.trim() || selectedOption.value;
101
+ }
102
+
90
103
  Array.from(datalist.querySelectorAll('option')).forEach((option) => {
91
104
  const isMatch = option.getAttribute('value') === initialValue;
92
105
  option.classList.toggle('active', isMatch);
93
106
  });
94
107
  }
108
+
109
+ displayInputField.value = displayValue;
110
+ displayInputField.setAttribute('placeholder', displayValue);
111
+ displayInputField.setAttribute('data-value', displayValue);
112
+ displayInputField.removeAttribute('value');
95
113
  }
96
114
  }
97
115
 
@@ -24,13 +24,6 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
24
24
 
25
25
  });
26
26
 
27
- displayInputField.addEventListener('keyup', function () {
28
-
29
- if(displayInputField.value != ""){
30
- displayInputField.setAttribute('data-value', displayInputField.value);
31
- }
32
- });
33
-
34
27
  displayInputField.addEventListener('blur', function () {
35
28
  if (displayInputField.hasAttribute('data-value')) {
36
29
  displayInputField.value = displayInputField.getAttribute('data-value');
@@ -46,9 +39,20 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
46
39
 
47
40
  datalist.addEventListener('click', function (event) {
48
41
  if (event && event.target instanceof HTMLElement && event.target.closest('option')) {
49
- const option = event.target.closest('option');
42
+ const option = event.target.closest('option') as HTMLOptionElement;
43
+ const optionText = option.textContent?.trim() || option.value;
44
+
45
+ // Store actual value on the original input
46
+ const originalInput = advancedSelect.querySelector('input[type="hidden"]') as HTMLInputElement | null;
47
+ if (originalInput) {
48
+ originalInput.value = option.value;
49
+ originalInput.setAttribute('value', option.value);
50
+ }
50
51
 
51
- displayInputField.value = option.value;
52
+ // Show label text in the visible field
53
+ displayInputField.value = optionText;
54
+ displayInputField.setAttribute('data-value', optionText);
55
+ displayInputField.setAttribute('placeholder', optionText);
52
56
 
53
57
  if (typeof window.triggerDynamicEvent == 'function') window.triggerDynamicEvent(displayInputField);
54
58
 
@@ -60,7 +64,10 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
60
64
 
61
65
  setTimeout(() => {
62
66
  advancedSelect.dispatchEvent(new CustomEvent('update-value', {
63
- detail: { value: option.value },
67
+ detail: {
68
+ value: option.value,
69
+ text: optionText,
70
+ },
64
71
  }));
65
72
  }, 0);
66
73
  }
@@ -70,19 +77,21 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
70
77
  displayInputField.removeAttribute('data-value');
71
78
  currentFocus = -1;
72
79
 
73
- if(advancedSelect.tagName != "IAM-ADDRESS-LOOKUP"){
80
+ if (advancedSelect.tagName != "IAM-ADDRESS-LOOKUP") {
74
81
  const text = displayInputField.value.toUpperCase();
82
+
75
83
  for (const option of datalist.options) {
76
- if (option.value.toUpperCase().indexOf(text) > -1) {
84
+ const optionText = (option.textContent || option.value).toUpperCase();
85
+
86
+ if (optionText.indexOf(text) > -1) {
77
87
  option.style.display = 'block';
78
88
  option.classList.remove('hide');
79
89
  } else {
80
90
  option.style.display = 'none';
81
91
  option.classList.add('hide');
82
92
  }
83
- }
93
+ }
84
94
  }
85
-
86
95
  });
87
96
 
88
97
  advancedSelect.addEventListener('keydown', function (e) {
@@ -127,6 +136,12 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
127
136
 
128
137
 
129
138
  const emptyField = (): void => {
139
+ const originalInput = advancedSelect.querySelector('input[type="hidden"]') as HTMLInputElement | null;
140
+
141
+ if (originalInput) {
142
+ originalInput.value = '';
143
+ originalInput.setAttribute('value', '');
144
+ }
130
145
 
131
146
  displayInputField.removeAttribute('placeholder');
132
147
 
@@ -139,15 +154,21 @@ function advancedSelect(advancedSelect, displayInputField, datalist, isSearch =
139
154
 
140
155
  for (const optionInner of datalist.options) {
141
156
  optionInner.classList.remove('active');
157
+ optionInner.classList.remove('hide');
142
158
  optionInner.removeAttribute('style');
143
159
  }
144
160
 
145
161
  const updateEvent = new CustomEvent('close-button-pressed');
146
162
  advancedSelect.dispatchEvent(updateEvent);
147
- }
148
-
149
-
150
163
 
164
+ // Notify consumers the value was cleared
165
+ advancedSelect.dispatchEvent(new CustomEvent('update-value', {
166
+ detail: {
167
+ value: '',
168
+ text: '',
169
+ },
170
+ }));
171
+ }
151
172
 
152
173
  const closeBtn = advancedSelect.querySelector('.empty') ? advancedSelect.querySelector('.empty') : advancedSelect.shadowRoot.querySelector('.empty');
153
174