@iamproperty/components 7.0.0 → 7.1.0--beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
- package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
- package/assets/js/components/nav/nav.component.min.js +1 -1
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/record-card/record-card.component.min.js +1 -1
- package/assets/js/components/search/search.component.min.js +1 -1
- package/assets/js/components/slider/slider.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +3 -3
- package/assets/js/components/tabs/tabs.component.min.js.map +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components.bundle.js +1 -1
- package/assets/js/modules/tabs.js +39 -31
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/ts/modules/tabs.ts +56 -44
- package/dist/components.es.js +11 -11
- package/dist/components.umd.js +30 -30
- package/package.json +1 -1
|
@@ -51,52 +51,32 @@ export const setTabsEventHandlers = function (tabsElement) {
|
|
|
51
51
|
let buttons = tabsElement.querySelectorAll(':scope .tabs__links > button');
|
|
52
52
|
let nextButton = tabsElement.querySelector(':scope .tabs__next');
|
|
53
53
|
var scrollTimeout;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
window.isClicked = false;
|
|
55
|
+
window.isScrolling = false;
|
|
56
56
|
if (tabsElement.shadowRoot) {
|
|
57
57
|
buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button');
|
|
58
58
|
buttonWrapper = tabsElement.shadowRoot.querySelector('.tabs__links');
|
|
59
59
|
nextButton = tabsElement.shadowRoot.querySelector(':scope .tabs__next');
|
|
60
60
|
}
|
|
61
|
-
buttonWrapper.addEventListener('scroll', function (e) {
|
|
62
|
-
if (isClicked) {
|
|
63
|
-
isClicked = false;
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
clearTimeout(scrollTimeout);
|
|
67
|
-
let buttonToClick = buttons[0];
|
|
68
|
-
scrollTimeout = setTimeout(function () {
|
|
69
|
-
let closestOffset = Math.abs(buttonToClick.getBoundingClientRect().left);
|
|
70
|
-
buttons.forEach((button) => {
|
|
71
|
-
if (Math.abs(button.getBoundingClientRect().left) < closestOffset) {
|
|
72
|
-
closestOffset = Math.abs(button.getBoundingClientRect().left);
|
|
73
|
-
buttonToClick = button;
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
isScrolled = true;
|
|
77
|
-
buttonToClick.click();
|
|
78
|
-
buttonToClick.focus();
|
|
79
|
-
}, 100);
|
|
80
|
-
}, false);
|
|
81
61
|
// Set the on click for the tab buttons, these will open the details box it matches too
|
|
82
62
|
buttons.forEach((button) => {
|
|
83
63
|
button.addEventListener("click", (e) => {
|
|
84
64
|
e.preventDefault();
|
|
85
|
-
|
|
65
|
+
if (window.isScrolling)
|
|
66
|
+
return;
|
|
67
|
+
if (!window.triggered)
|
|
68
|
+
window.isClicked = true;
|
|
86
69
|
if (button.classList.contains('disabled'))
|
|
87
70
|
return false;
|
|
88
71
|
buttons.forEach((buttonLoopItem) => {
|
|
89
72
|
let buttonPressed = buttonLoopItem == button ? true : false;
|
|
90
73
|
buttonLoopItem.setAttribute('aria-pressed', buttonPressed);
|
|
91
74
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
isScrolled = false;
|
|
75
|
+
buttonWrapper.scroll({
|
|
76
|
+
top: 0,
|
|
77
|
+
left: button.offsetLeft,
|
|
78
|
+
behavior: 'smooth'
|
|
79
|
+
});
|
|
100
80
|
details.forEach((detail, detailsIndex) => {
|
|
101
81
|
let detailsOpen = button.getAttribute('data-index') == detailsIndex ? true : false;
|
|
102
82
|
if (detailsOpen)
|
|
@@ -118,6 +98,34 @@ export const setTabsEventHandlers = function (tabsElement) {
|
|
|
118
98
|
});
|
|
119
99
|
});
|
|
120
100
|
});
|
|
101
|
+
buttonWrapper.addEventListener("scroll", (event) => {
|
|
102
|
+
if (window.isScrolling)
|
|
103
|
+
return;
|
|
104
|
+
clearTimeout(scrollTimeout);
|
|
105
|
+
window.isScrolling = true;
|
|
106
|
+
});
|
|
107
|
+
buttonWrapper.addEventListener("scrollend", (event) => {
|
|
108
|
+
window.isScrolling = false;
|
|
109
|
+
clearTimeout(scrollTimeout);
|
|
110
|
+
scrollTimeout = setTimeout(function () {
|
|
111
|
+
if (window.isClicked) {
|
|
112
|
+
window.isClicked = false;
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
let buttonToClick = buttons[0];
|
|
116
|
+
let closestOffset = Math.abs(buttonToClick.getBoundingClientRect().left);
|
|
117
|
+
buttons.forEach((button) => {
|
|
118
|
+
if (Math.abs(button.getBoundingClientRect().left) < closestOffset) {
|
|
119
|
+
closestOffset = Math.abs(button.getBoundingClientRect().left);
|
|
120
|
+
buttonToClick = button;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
window.triggered = true;
|
|
124
|
+
buttonToClick.focus();
|
|
125
|
+
buttonToClick.click();
|
|
126
|
+
window.triggered = false;
|
|
127
|
+
}, 200);
|
|
128
|
+
});
|
|
121
129
|
// Make sure we dont loose existing summary functionality
|
|
122
130
|
summaries.forEach((summary, index) => {
|
|
123
131
|
summary.addEventListener("click", (e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.
|
|
2
|
+
* iamKey v7.1.0--beta1
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/(function(h){typeof define=="function"&&define.amd?define(h):h()})(function(){"use strict";var h=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),T=r=>{var e=function(t){var o=document.querySelector('label[for="'.concat(t.replace("#",""),'"]')),c=document.querySelector(t+" summary"),s=document.querySelector("dialog".concat(t)),n=document.querySelector("detail".concat(t));o instanceof HTMLElement?o.click():c instanceof HTMLElement?c.click():s instanceof HTMLElement?s.showModal():n instanceof HTMLElement&&n.addAttribute("open")};return location.hash&&e(location.hash),window.addEventListener("hashchange",function(){e(location.hash)},!1),addEventListener("popstate",a=>{if(a&&a.state&&a.state.type&&a.state.type=="pagination"){var t=document.querySelector("#".concat(a.state.form)),o=document.querySelector("#".concat(a.state.form," [data-pagination]"));o?o.value=a.state.page:t.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(a.state.page,'" />'),t.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",a=>{if(a&&a.target instanceof HTMLElement&&a.target.matches("form")){var t=a.target;Array.from(t.querySelectorAll("[data-password-type]")).forEach((o,c)=>{o.setAttribute("type","password")}),(t.querySelector(":invalid")||t.querySelector('.pwd-checker[data-strength="1"]')||t.querySelector('.pwd-checker[data-strength="2"]'))&&(t.classList.add("was-validated"),a.preventDefault()),t.querySelector("iam-multiselect[data-is-required][data-error]")&&(t.classList.add("was-validated"),a.preventDefault())}}),document.addEventListener("keydown",a=>{a.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(a.preventDefault(),a.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach((a,t)=>{var o=a.closest("label");o.setAttribute("data-percent",a.getAttribute("value"))}),null},C=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((e,a)=>{var t=e.closest(".dialog__wrapper");t||(e.removeAttribute("open"),e.showModal(),e.focus(),v(e))}),r.addEventListener("click",e=>{if(e.target.tagName=="IAM-ACTIONBAR")return!1;if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-modal]")){var a=e.target.closest("[data-modal]"),t=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),o=document.querySelector("dialog#".concat(t));if(v(o),o.showModal(),o.focus(),!o.querySelector("iam-multi-step")){var c=o.offsetWidth;o.setAttribute("style","max-width: ".concat(c,"px;"))}Array.from(o.querySelectorAll("[data-duplicate]")).forEach((u,p)=>{var W=u.getAttribute("data-duplicate"),M=document.getElementById(W);if(u.checked!=M.checked){u.checked=M.checked;var J=new Event("change");u.dispatchEvent(J)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:t})}if(e&&e.target instanceof HTMLElement&&e.target.closest("button.dialog__close")){var s=e.target.closest("dialog[open]");e.preventDefault(),s.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,p)=>{u.classList.remove("active")});var n=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:s.id}});e.target.dispatchEvent(n),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest('button[formmethod="dialog"]')){var i=e.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,p)=>{u.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest("dialog[open]")){var l=e.target.closest("dialog[open]"),y=window.getComputedStyle(l);if(y.display==="contents"&&(l=l.parentNode.closest("dialog[open]")),!l.classList.contains("dialog--transactional")&&!l.classList.contains("dialog--acknowledgement")){var g=l.getBoundingClientRect();(e.clientX<g.left||e.clientX>g.right||e.clientY<g.top||e.clientY>g.bottom)&&(e.target.closest("dialog *")||l.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:l.getAttribute("id")}))}}if(e&&e.target instanceof HTMLElement&&e.target.closest(".dialog__wrapper > button")){e.stopPropagation();var f=e.target.closest(".dialog__wrapper > button"),V=f.parentNode,E="openPopover",d=V.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=d&&f.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((u,p)=>{u.removeAttribute("aria-expanded")}),d.hasAttribute("open"))d.close(),E="closePopover",d.removeAttribute("style"),f.removeAttribute("aria-expanded");else{d.show(),f.setAttribute("aria-expanded",!0);var L=f.getBoundingClientRect(),q=L.top,x=L.left;if(f.closest("iam-table")){var k=f.closest("iam-table").parentNode.getBoundingClientRect();q-=k.top,x-=k.left}d.classList.contains("dialog--fix")&&d.setAttribute("style","position:fixed;top: ".concat(q,"px; left: ").concat(x,"px; margin: 3rem 0 0 0;"))}var w=d.getBoundingClientRect(),O=w.bottom-window.scrollY,Y=window.innerHeight-window.scrollY;if(O>Y){var R=d.hasAttribute("style")?d.getAttribute("style")+" ":"";d.setAttribute("style",R+"transform: translate(0, calc(-100% - 4rem))"),w=d.getBoundingClientRect();var F=w.top-window.scrollY;F<100&&d.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:E,id:f.textContent})}e&&e.target instanceof HTMLElement&&!e.target.closest("dialog[open]")&&!e.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((u,p)=>{u.removeAttribute("aria-expanded")}))}),null),v=r=>{if(!r.querySelector(":scope .mh-lg")&&!r.querySelector("iam-multi-step")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var e=r.querySelector(".mh-lg"),a=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var t=a.previousSibling;e.before(a),t&&a.before(t)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')};function H(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var e=r.target.closest("[open] summary");if(e)window.dataLayer.push({event:"closeDetails",detailsTitle:e.textContent||""});else{var a=r.target.closest("summary"),t=r.target.closest("a"),o=r.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),t&&window.dataLayer.push({event:"linkClicked",linkText:t.hasAttribute("title")?t.getAttribute("title")||"":t.textContent||"",class:t.hasAttribute("class")&&t.getAttribute("class")||"",href:t.getAttribute("href")||""}),o&&window.dataLayer.push({event:"buttonClicked",buttonText:o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||""})}})}function D(r){var e=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",e).then(function(a){for(var t=[],o=new DataView(a),c=0;c<o.byteLength;c+=4){var s=o.getUint32(c),n=s.toString(16),i="00000000",l=(i+n).slice(-i.length);t.push(l)}return t.join("")})}var _=(r,e)=>{D(r).then(function(a){var t=new XMLHttpRequest;t.addEventListener("load",function(){var o=this.responseText.split(`
|
|
5
5
|
`),c=a.slice(5).toUpperCase(),s=!1;for(var n in o)if(o[n].substring(0,35)==c){s=!0;break}var i=new CustomEvent("hibpCheck",{detail:s});e.dispatchEvent(i)}),t.open("GET","https://api.pwnedpasswords.com/range/"+a.substr(0,5)),t.send()})},B=r=>{function e(){if(Array.from(document.querySelectorAll("input[maxlength],textarea[maxlength]")).forEach((t,o)=>{t.parentElement,I(t)}),Array.from(document.querySelectorAll("label input")).forEach((t,o)=>{!t.closest("label").querySelector(".optional-text")&&!t.hasAttribute("required")&&(t.parentNode.tagName.toLowerCase()=="span"?t.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):t.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))}),document.querySelector('input[type="date"]')){let t=function(o){var c=o.getFullYear(),s=String(o.getMonth()+1).padStart(2,"0"),n=String(o.getDate()).padStart(2,"0");return"".concat(c,"-").concat(s,"-").concat(n)};var a=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((o,c)=>{var s=a;if(o.hasAttribute("data-start")&&(s.setDate(s.getDate()+parseInt(o.getAttribute("data-start"))),o.setAttribute("min",t(s))),o.hasAttribute("data-period")){var n=parseInt(o.getAttribute("data-period")),i=new Date;i.setDate(s.getDate()+n),o.setAttribute("max",t(i))}if(o.hasAttribute("data-allowed-days")){var l=JSON.parse("[".concat(o.getAttribute("data-allowed-days"),"]"));o.addEventListener("input",function(y){var g=new Date(this.value).getUTCDay();l.includes(g)?o.setCustomValidity(""):o.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&e(),document.onreadystatechange=()=>{document.readyState==="complete"&&e()},r.addEventListener("input",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("input,textarea,select")){var t=a.target.closest("input,textarea,select");t.parentElement,t.hasAttribute("type")&&t.getAttribute("type")=="color"&&(t.nextElementSibling.value=t.value),t.hasAttribute("maxlength")&&t.nextElementSibling&&t.nextElementSibling.setAttribute("data-count",t.value.length),t.hasAttribute("data-strength-checker")&&b(t)}}),r.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("select")){var t=a.target.closest("select");if(t.hasAttribute("data-change-type")&&t.hasAttribute("data-input")){var o=document.getElementById(t.getAttribute("data-input")),c=t.value;S(o,c)}}if(a&&a.target instanceof HTMLElement&&a.target.closest('dialog [type="radio"]')){var s=a.target.closest("dialog");a.target.closest('dialog [type="radio"]'),Array.from(s.querySelectorAll('[type="radio"][autofocus]')).forEach((n,i)=>{n.removeAttribute("autofocus")}),Array.from(s.querySelectorAll('[type="radio"]:checked')).forEach((n,i)=>{n.setAttribute("autofocus",!0)})}}),r.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-type][data-input]:not(select)")){var t=a.target.closest("[data-change-type]"),o=document.getElementById(t.getAttribute("data-input")),c=t.getAttribute("data-change-type");if(t.setAttribute("data-change-type",o.getAttribute("type")),S(o,c),t.hasAttribute("data-alt-class")){var s=t.getAttribute("data-alt-class");t.setAttribute("data-alt-class",t.getAttribute("class")),t.setAttribute("class",s)}}})},I=r=>{var e=r.parentElement,a=r.getAttribute("maxlength");e.style.setProperty("--maxlength",a);var t=r.nextElementSibling;(!t||t&&t.classList.contains("invalid-feedback"))&&(t=document.createElement("span"),e.insertBefore(t,r.nextSibling)),t.setAttribute("data-count",r.value.length)},S=(r,e)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",e)},b=function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",t=document.getElementById(e.getAttribute("data-strength-checker")),o=e.value,c=e.hasAttribute("minlength")?e.getAttribute("minlength"):12,s=1,n=["Very weak","Weak","Average","Strong","Very strong"],i="";if(o.match(/(?=.*[0-9])/)&&(s+=1),o.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(s+=1),o.match(/(?=.*[a-z])/)&&(s+=1),o.match(/(?=.*[A-Z])/)&&(s+=1),o.length<c&&(s=1,i="(must be at least ".concat(c," characters.)")),s>=3&&a=="no"){let l=function(y,g){y.detail?b(g,"danger"):b(g,"success"),g.removeEventListener("hibpCheck",l)};_(o,e),e.addEventListener("hibpCheck",function(y){l(y,e)})}else s>=3&&a=="danger"&&(s=3,i="(this password is very common)");t&&(s<=3?t.classList.add("invalid-feedback"):t.classList.remove("invalid-feedback"),t.setAttribute("data-strength",s),t.innerHTML="Password strength: ".concat(n[s-1]," ").concat(i))},N=()=>{document.addEventListener("change",r=>{r&&r.target instanceof HTMLElement&&r.target.closest("[data-change-events]")&&A(r.target,r.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("keyup",r=>{r&&r.target instanceof HTMLElement&&r.target.closest("[data-change-events]")&&A(r.target,r.target.closest("[data-change-events]").getAttribute("data-change-events"))}),document.addEventListener("click",r=>{r&&r.target instanceof HTMLElement&&r.target.closest("[data-click-events]")&&A(r.target,r.target.closest("[data-click-events]").getAttribute("data-click-events"))})},A=(r,e)=>{if(e||(e=r.parentNode.getAttribute("data-change-events")),!e)return!1;Array.from(JSON.parse(e)).forEach((a,t)=>{P(r,a)})},P=(r,e)=>{if("matches"in e)return e.matches=="any"||r.value==e.matches?m(r,e,"if"):m(r,e,"else"),!1;if("in-list"in e){var a=document.querySelector("".concat(e["in-list"],' option[value="').concat(r.value,'"]'));return document.querySelector("".concat(e["in-list"],' option[value="').concat(r.value,'"]'))?m(a,e,"if"):m(a,e,"else"),!1}else"event"in e&&m(r,e,"event")},m=(r,e,a)=>{if(!(a in e))return!1;switch(e[a]){case"hide":if(document.querySelector(e.target)){var t=document.querySelector(e.target);t.classList.add("js-hide"),Array.from(t.querySelectorAll("[data-required]")).forEach((n,i)=>{n.removeAttribute("required")})}break;case"show":if(document.querySelector(e.target)){var o=document.querySelector(e.target);o.classList.remove("js-hide"),Array.from(o.querySelectorAll("[data-required]")).forEach((n,i)=>{n.closest(".js-hide")||n.setAttribute("required","true")})}break;case"populate-form":j(r,e);break;case"dispatchEvent":var c=new Event(e.value);document.querySelector("".concat(e.target)).dispatchEvent(c);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(e.target))).forEach(function(n,i){n.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(n,i){n.removeAttribute(e.attribute)});break;case"updateValue":document.querySelector("".concat(e.target)).value=e.value?e.value:"";var s=new Event("change");document.querySelector("".concat(e.target)).dispatchEvent(s);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}},j=function(e,a){var t=JSON.parse(e.getAttribute("data-values")),o=document.querySelector(a.target);if(!t)return!1;Object.keys(t).forEach((c,s)=>{document.getElementById(c)&&document.getElementById(c).tagName=="SPAN"&&(document.getElementById(c).innerHTML=t[c]),o.querySelector('select[name="'.concat(c,'"] [value="').concat(t[c],'"]'))?(o.querySelector('select[name="'.concat(c,'"]')).value=t[c],e.hasAttribute("data-lock-fields")&&(o.querySelector('select[name="'.concat(c,'"]')).disabled=!0)):o.querySelector('input[name="'.concat(c,'"][type="radio"][value="').concat(t[c],'"]'))?(Array.from(o.querySelectorAll('input[name="'.concat(c,'"][type="radio"]'))).forEach(function(n,i){n.disabled=!0}),o.querySelector('input[name="'.concat(c,'"][type="radio"][value="').concat(t[c],'"]')).checked=!0,o.querySelector('input[name="'.concat(c,'"][type="radio"][value="').concat(t[c],'"]')).disabled=!1):o.querySelector('input[name="'.concat(c,'"]'))&&(o.querySelector('input[name="'.concat(c,'"]')).value=t[c],e.hasAttribute("data-lock-fields")&&o.querySelector('input[name="'.concat(c,'"]')).setAttribute("readonly","true"))})};document.addEventListener("DOMContentLoaded",function(){H(),N(),h(document.body),T(),C(document.body),B(document.body)})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.
|
|
2
|
+
* iamKey v7.1.0--beta1
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
4
|
*/
|
|
5
5
|
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e=e=>{if(!e.querySelector(":scope .mh-lg")&&!e.querySelector("iam-multi-step")){e.innerHTML='<div class="mh-lg">'.concat(e.innerHTML,"</div>");var t=e.querySelector(".mh-lg"),a=e.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var r=a.previousSibling;t.before(a),r&&a.before(r)}}e.querySelector(":scope > button:first-child")||e.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},t=(e,t)=>{(function(e){var t=new TextEncoder("utf-8").encode(e);return crypto.subtle.digest("SHA-1",t).then((function(e){for(var t=[],a=new DataView(e),r=0;r<a.byteLength;r+=4){var n=("00000000"+a.getUint32(r).toString(16)).slice(-8);t.push(n)}return t.join("")}))})(e).then((function(e){var a=new XMLHttpRequest;a.addEventListener("load",(function(){var a=this.responseText.split("\n"),r=e.slice(5).toUpperCase(),n=!1;for(var o in a)if(a[o].substring(0,35)==r){n=!0;break}var c=new CustomEvent("hibpCheck",{detail:n});t.dispatchEvent(c)})),a.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),a.send()}))},a=e=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength],textarea[maxlength]")).forEach(((e,t)=>{e.parentElement,r(e)})),Array.from(document.querySelectorAll("label input")).forEach(((e,t)=>{!e.closest("label").querySelector(".optional-text")&&!e.hasAttribute("required")&&("span"==e.parentNode.tagName.toLowerCase()?e.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):e.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))})),document.querySelector('input[type="date"]')){let t=function(e){var t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)};var e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach(((a,r)=>{var n=e;if(a.hasAttribute("data-start")&&(n.setDate(n.getDate()+parseInt(a.getAttribute("data-start"))),a.setAttribute("min",t(n))),a.hasAttribute("data-period")){var o=parseInt(a.getAttribute("data-period")),c=new Date;c.setDate(n.getDate()+o),a.setAttribute("max",t(c))}if(a.hasAttribute("data-allowed-days")){var i=JSON.parse("[".concat(a.getAttribute("data-allowed-days"),"]"));a.addEventListener("input",(function(e){var t=new Date(this.value).getUTCDay();i.includes(t)?a.setCustomValidity(""):a.setCustomValidity("That day of the week is not allowed")}))}}))}}"complete"===document.readyState&&t(),document.onreadystatechange=()=>{"complete"===document.readyState&&t()},e.addEventListener("input",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){var t=e.target.closest("input,textarea,select");t.parentElement,t.hasAttribute("type")&&"color"==t.getAttribute("type")&&(t.nextElementSibling.value=t.value),t.hasAttribute("maxlength")&&t.nextElementSibling&&t.nextElementSibling.setAttribute("data-count",t.value.length),t.hasAttribute("data-strength-checker")&&o(t)}})),e.addEventListener("change",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){var t=e.target.closest("select");if(t.hasAttribute("data-change-type")&&t.hasAttribute("data-input")){var a=document.getElementById(t.getAttribute("data-input")),r=t.value;n(a,r)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){var o=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach(((e,t)=>{e.removeAttribute("autofocus")})),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach(((e,t)=>{e.setAttribute("autofocus",!0)}))}})),e.addEventListener("click",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){var t=e.target.closest("[data-change-type]"),a=document.getElementById(t.getAttribute("data-input")),r=t.getAttribute("data-change-type");if(t.setAttribute("data-change-type",a.getAttribute("type")),n(a,r),t.hasAttribute("data-alt-class")){var o=t.getAttribute("data-alt-class");t.setAttribute("data-alt-class",t.getAttribute("class")),t.setAttribute("class",o)}}}))},r=e=>{var t=e.parentElement,a=e.getAttribute("maxlength");t.style.setProperty("--maxlength",a);var r=e.nextElementSibling;(!r||r&&r.classList.contains("invalid-feedback"))&&(r=document.createElement("span"),t.insertBefore(r,e.nextSibling)),r.setAttribute("data-count",e.value.length)},n=(e,t)=>{e.hasAttribute("type")&&"password"==e.getAttribute("type")&&e.setAttribute("data-password-type",!0),e.setAttribute("type",t)},o=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"no",r=document.getElementById(e.getAttribute("data-strength-checker")),n=e.value,c=e.hasAttribute("minlength")?e.getAttribute("minlength"):12,i=1,l="";if(n.match(/(?=.*[0-9])/)&&(i+=1),n.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(i+=1),n.match(/(?=.*[a-z])/)&&(i+=1),n.match(/(?=.*[A-Z])/)&&(i+=1),n.length<c&&(i=1,l="(must be at least ".concat(c," characters.)")),i>=3&&"no"==a){let a=function(e,t){e.detail?o(t,"danger"):o(t,"success"),t.removeEventListener("hibpCheck",a)};t(n,e),e.addEventListener("hibpCheck",(function(t){a(t,e)}))}else i>=3&&"danger"==a&&(i=3,l="(this password is very common)");r&&(i<=3?r.classList.add("invalid-feedback"):r.classList.remove("invalid-feedback"),r.setAttribute("data-strength",i),r.innerHTML="Password strength: ".concat(["Very weak","Weak","Average","Strong","Very strong"][i-1]," ").concat(l))},c=(e,t)=>{if(t||(t=e.parentNode.getAttribute("data-change-events")),!t)return!1;Array.from(JSON.parse(t)).forEach(((t,a)=>{i(e,t)}))},i=(e,t)=>{if("matches"in t)return"any"==t.matches||e.value==t.matches?l(e,t,"if"):l(e,t,"else"),!1;if("in-list"in t){var a=document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'));return document.querySelector("".concat(t["in-list"],' option[value="').concat(e.value,'"]'))?l(a,t,"if"):l(a,t,"else"),!1}"event"in t&&l(e,t,"event")},l=(e,t,a)=>{if(!(a in t))return!1;switch(t[a]){case"hide":if(document.querySelector(t.target)){var r=document.querySelector(t.target);r.classList.add("js-hide"),Array.from(r.querySelectorAll("[data-required]")).forEach(((e,t)=>{e.removeAttribute("required")}))}break;case"show":if(document.querySelector(t.target)){var n=document.querySelector(t.target);n.classList.remove("js-hide"),Array.from(n.querySelectorAll("[data-required]")).forEach(((e,t)=>{e.closest(".js-hide")||e.setAttribute("required","true")}))}break;case"populate-form":s(e,t);break;case"dispatchEvent":var o=new Event(t.value);document.querySelector("".concat(t.target)).dispatchEvent(o);break;case"setAttribute":Array.from(document.querySelectorAll("".concat(t.target))).forEach((function(e,a){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,a){e.removeAttribute(t.attribute)}));break;case"updateValue":document.querySelector("".concat(t.target)).value=t.value?t.value:"";var c=new Event("change");document.querySelector("".concat(t.target)).dispatchEvent(c);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)}},s=function(e,t){var a=JSON.parse(e.getAttribute("data-values")),r=document.querySelector(t.target);if(!a)return!1;Object.keys(a).forEach(((t,n)=>{document.getElementById(t)&&"SPAN"==document.getElementById(t).tagName&&(document.getElementById(t).innerHTML=a[t]),r.querySelector('select[name="'.concat(t,'"] [value="').concat(a[t],'"]'))?(r.querySelector('select[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&(r.querySelector('select[name="'.concat(t,'"]')).disabled=!0)):r.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]'))?(Array.from(r.querySelectorAll('input[name="'.concat(t,'"][type="radio"]'))).forEach((function(e,t){e.disabled=!0})),r.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).checked=!0,r.querySelector('input[name="'.concat(t,'"][type="radio"][value="').concat(a[t],'"]')).disabled=!1):r.querySelector('input[name="'.concat(t,'"]'))&&(r.querySelector('input[name="'.concat(t,'"]')).value=a[t],e.hasAttribute("data-lock-fields")&&r.querySelector('input[name="'.concat(t,'"]')).setAttribute("readonly","true"))}))};document.addEventListener("DOMContentLoaded",(function(){var t,r;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"),r=e.target.closest("a"),n=e.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.textContent||""}),r&&window.dataLayer.push({event:"linkClicked",linkText:r.hasAttribute("title")?r.getAttribute("title")||"":r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||"",href:r.getAttribute("href")||""}),n&&window.dataLayer.push({event:"buttonClicked",buttonText:n.textContent||"",class:n.hasAttribute("class")&&n.getAttribute("class")||""})}})),document.addEventListener("change",(e=>{e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-events]")&&c(e.target,e.target.closest("[data-change-events]").getAttribute("data-change-events"))})),document.addEventListener("keyup",(e=>{e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-events]")&&c(e.target,e.target.closest("[data-change-events]").getAttribute("data-change-events"))})),document.addEventListener("click",(e=>{e&&e.target instanceof HTMLElement&&e.target.closest("[data-click-events]")&&c(e.target,e.target.closest("[data-click-events]").getAttribute("data-click-events"))})),(r=document.body).classList.add("js-enabled"),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),t=function(e){var t=document.querySelector('label[for="'.concat(e.replace("#",""),'"]')),a=document.querySelector(e+" summary"),r=document.querySelector("dialog".concat(e)),n=document.querySelector("detail".concat(e));t instanceof HTMLElement?t.click():a instanceof HTMLElement?a.click():r instanceof HTMLElement?r.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"))}})),document.addEventListener("submit",(e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){var t=e.target;Array.from(t.querySelectorAll("[data-password-type]")).forEach(((e,t)=>{e.setAttribute("type","password")})),(t.querySelector(":invalid")||t.querySelector('.pwd-checker[data-strength="1"]')||t.querySelector('.pwd-checker[data-strength="2"]'))&&(t.classList.add("was-validated"),e.preventDefault()),t.querySelector("iam-multiselect[data-is-required][data-error]")&&(t.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,t)=>{e.closest("label").setAttribute("data-percent",e.getAttribute("value"))})),(t=>{Array.from(t.querySelectorAll("dialog[open]")).forEach(((t,a)=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),e(t))})),t.addEventListener("click",(t=>{if("IAM-ACTIONBAR"==t.target.tagName)return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var a=t.target.closest("[data-modal]"),r=a.hasAttribute("data-modal")?a.getAttribute("data-modal"):a.getAttribute("data-filter"),n=document.querySelector("dialog#".concat(r));if(e(n),n.showModal(),n.focus(),!n.querySelector("iam-multi-step")){var o=n.offsetWidth;n.setAttribute("style","max-width: ".concat(o,"px;"))}Array.from(n.querySelectorAll("[data-duplicate]")).forEach(((e,t)=>{var a=e.getAttribute("data-duplicate"),r=document.getElementById(a);if(e.checked!=r.checked){e.checked=r.checked;var n=new Event("change");e.dispatchEvent(n)}})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var c=t.target.closest("dialog[open]");t.preventDefault(),c.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((e,t)=>{e.classList.remove("active")}));var i=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:c.id}});t.target.dispatchEvent(i),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:c.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var l=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((e,t)=>{e.classList.remove("active")})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:l.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var s=t.target.closest("dialog[open]");if("contents"===window.getComputedStyle(s).display&&(s=s.parentNode.closest("dialog[open]")),!s.classList.contains("dialog--transactional")&&!s.classList.contains("dialog--acknowledgement")){var d=s.getBoundingClientRect();(t.clientX<d.left||t.clientX>d.right||t.clientY<d.top||t.clientY>d.bottom)&&(t.target.closest("dialog *")||s.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var u=t.target.closest(".dialog__wrapper > button"),g="openPopover",p=u.parentNode.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=p&&u.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(((e,t)=>{e.removeAttribute("aria-expanded")})),p.hasAttribute("open"))p.close(),g="closePopover",p.removeAttribute("style"),u.removeAttribute("aria-expanded");else{p.show(),u.setAttribute("aria-expanded",!0);var m=u.getBoundingClientRect(),y=m.top,v=m.left;if(u.closest("iam-table")){var f=u.closest("iam-table").parentNode.getBoundingClientRect();y-=f.top,v-=f.left}p.classList.contains("dialog--fix")&&p.setAttribute("style","position:fixed;top: ".concat(y,"px; left: ").concat(v,"px; margin: 3rem 0 0 0;"))}var h=p.getBoundingClientRect();if(h.bottom-window.scrollY>window.innerHeight-window.scrollY){var b=p.hasAttribute("style")?p.getAttribute("style")+" ":"";p.setAttribute("style",b+"transform: translate(0, calc(-100% - 4rem))"),(h=p.getBoundingClientRect()).top-window.scrollY<100&&p.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:g,id:u.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach(((e,t)=>{e.removeAttribute("aria-expanded")})))}))})(document.body),a(document.body)}))}));
|
|
@@ -73,8 +73,8 @@ export const setTabsEventHandlers = function(tabsElement: Element){
|
|
|
73
73
|
let nextButton = tabsElement.querySelector(':scope .tabs__next');
|
|
74
74
|
|
|
75
75
|
var scrollTimeout;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
window.isClicked = false;
|
|
77
|
+
window.isScrolling = false;
|
|
78
78
|
|
|
79
79
|
if(tabsElement.shadowRoot){
|
|
80
80
|
buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button');
|
|
@@ -82,45 +82,18 @@ export const setTabsEventHandlers = function(tabsElement: Element){
|
|
|
82
82
|
nextButton = tabsElement.shadowRoot.querySelector(':scope .tabs__next');
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
buttonWrapper.addEventListener('scroll', function(e){
|
|
86
|
-
|
|
87
|
-
if(isClicked){
|
|
88
|
-
isClicked = false;
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
clearTimeout(scrollTimeout);
|
|
93
|
-
let buttonToClick = buttons[0];
|
|
94
|
-
|
|
95
|
-
scrollTimeout = setTimeout(function(){
|
|
96
|
-
|
|
97
|
-
let closestOffset = Math.abs(buttonToClick.getBoundingClientRect().left);
|
|
98
|
-
|
|
99
|
-
buttons.forEach((button) => {
|
|
100
|
-
|
|
101
|
-
if(Math.abs(button.getBoundingClientRect().left) < closestOffset){
|
|
102
|
-
closestOffset = Math.abs(button.getBoundingClientRect().left);
|
|
103
|
-
buttonToClick = button;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
isScrolled = true;
|
|
108
|
-
buttonToClick.click();
|
|
109
|
-
buttonToClick.focus();
|
|
110
|
-
|
|
111
|
-
}, 100);
|
|
112
|
-
|
|
113
|
-
}, false);
|
|
114
|
-
|
|
115
|
-
|
|
116
85
|
// Set the on click for the tab buttons, these will open the details box it matches too
|
|
117
86
|
buttons.forEach((button) => {
|
|
118
87
|
|
|
119
88
|
button.addEventListener("click", (e) => {
|
|
120
89
|
e.preventDefault();
|
|
121
90
|
|
|
122
|
-
|
|
91
|
+
if(window.isScrolling)
|
|
92
|
+
return;
|
|
123
93
|
|
|
94
|
+
if(!window.triggered)
|
|
95
|
+
window.isClicked = true;
|
|
96
|
+
|
|
124
97
|
if (button.classList.contains('disabled'))
|
|
125
98
|
return false
|
|
126
99
|
|
|
@@ -129,16 +102,12 @@ export const setTabsEventHandlers = function(tabsElement: Element){
|
|
|
129
102
|
buttonLoopItem.setAttribute('aria-pressed', buttonPressed);
|
|
130
103
|
});
|
|
131
104
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
isScrolled = false;
|
|
141
|
-
|
|
105
|
+
buttonWrapper.scroll({
|
|
106
|
+
top: 0,
|
|
107
|
+
left: button.offsetLeft,
|
|
108
|
+
behavior: 'smooth'
|
|
109
|
+
});
|
|
110
|
+
|
|
142
111
|
details.forEach((detail, detailsIndex) => {
|
|
143
112
|
let detailsOpen = button.getAttribute('data-index') == detailsIndex ? true : false;
|
|
144
113
|
|
|
@@ -162,7 +131,50 @@ export const setTabsEventHandlers = function(tabsElement: Element){
|
|
|
162
131
|
"tabTitle": button.textContent
|
|
163
132
|
});
|
|
164
133
|
});
|
|
134
|
+
});
|
|
165
135
|
|
|
136
|
+
buttonWrapper.addEventListener("scroll", (event) => {
|
|
137
|
+
|
|
138
|
+
if(window.isScrolling)
|
|
139
|
+
return;
|
|
140
|
+
|
|
141
|
+
clearTimeout(scrollTimeout);
|
|
142
|
+
window.isScrolling = true;
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
buttonWrapper.addEventListener("scrollend", (event) => {
|
|
149
|
+
|
|
150
|
+
window.isScrolling = false;
|
|
151
|
+
clearTimeout(scrollTimeout);
|
|
152
|
+
|
|
153
|
+
scrollTimeout = setTimeout(function(){
|
|
154
|
+
|
|
155
|
+
if(window.isClicked){
|
|
156
|
+
window.isClicked = false;
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
let buttonToClick = buttons[0];
|
|
161
|
+
let closestOffset = Math.abs(buttonToClick.getBoundingClientRect().left);
|
|
162
|
+
|
|
163
|
+
buttons.forEach((button) => {
|
|
164
|
+
|
|
165
|
+
if(Math.abs(button.getBoundingClientRect().left) < closestOffset){
|
|
166
|
+
closestOffset = Math.abs(button.getBoundingClientRect().left);
|
|
167
|
+
buttonToClick = button;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
window.triggered = true;
|
|
172
|
+
buttonToClick.focus();
|
|
173
|
+
buttonToClick.click();
|
|
174
|
+
window.triggered = false;
|
|
175
|
+
|
|
176
|
+
}, 200);
|
|
177
|
+
|
|
166
178
|
});
|
|
167
179
|
|
|
168
180
|
// Make sure we dont loose existing summary functionality
|
package/dist/components.es.js
CHANGED
|
@@ -67,7 +67,7 @@ const qa = /* @__PURE__ */ m(U, [["render", G]]), Q = (t) => t.charAt(0).toUpper
|
|
|
67
67
|
},
|
|
68
68
|
created() {
|
|
69
69
|
this.$nextTick(function() {
|
|
70
|
-
import("./table.component.min-
|
|
70
|
+
import("./table.component.min-dff09b72.mjs").then((t) => {
|
|
71
71
|
window.customElements.get("iam-table") || window.customElements.define("iam-table", t.default);
|
|
72
72
|
}).catch((t) => {
|
|
73
73
|
console.log(t.message);
|
|
@@ -453,7 +453,7 @@ const N = /* @__PURE__ */ m(ne, [["render", xe]]), Se = {
|
|
|
453
453
|
},
|
|
454
454
|
created() {
|
|
455
455
|
this.$nextTick(function() {
|
|
456
|
-
import("./fileupload.component.min-
|
|
456
|
+
import("./fileupload.component.min-6859c0b0.mjs").then((t) => {
|
|
457
457
|
window.customElements.get("iam-fileupload") || window.customElements.define("iam-fileupload", t.default);
|
|
458
458
|
}).catch((t) => {
|
|
459
459
|
console.log(t.message);
|
|
@@ -483,7 +483,7 @@ const qe = {
|
|
|
483
483
|
props: {},
|
|
484
484
|
mounted() {
|
|
485
485
|
this.$nextTick(function() {
|
|
486
|
-
import("./accordion.component.min-
|
|
486
|
+
import("./accordion.component.min-b97307b4.mjs").then((t) => {
|
|
487
487
|
window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", t.default);
|
|
488
488
|
}).catch((t) => {
|
|
489
489
|
console.log(t.message);
|
|
@@ -592,7 +592,7 @@ const Ma = /* @__PURE__ */ m(Ne, [["render", Fe]]), ze = {
|
|
|
592
592
|
name: "Card",
|
|
593
593
|
created() {
|
|
594
594
|
this.$nextTick(function() {
|
|
595
|
-
import("./card.component.min-
|
|
595
|
+
import("./card.component.min-3fe7bd95.mjs").then((t) => {
|
|
596
596
|
window.customElements.get("iam-card") || window.customElements.define("iam-card", t.default);
|
|
597
597
|
}).catch((t) => {
|
|
598
598
|
console.log(t.message);
|
|
@@ -609,7 +609,7 @@ const Ca = /* @__PURE__ */ m(ze, [["render", Be]]), Oe = {
|
|
|
609
609
|
name: "Header",
|
|
610
610
|
mounted() {
|
|
611
611
|
this.$nextTick(function() {
|
|
612
|
-
import("./carousel.component.min-
|
|
612
|
+
import("./carousel.component.min-585cc0d6.mjs").then((t) => {
|
|
613
613
|
window.customElements.get("iam-carousel") || window.customElements.define("iam-carousel", t.default);
|
|
614
614
|
}).catch((t) => {
|
|
615
615
|
console.log(t.message);
|
|
@@ -636,7 +636,7 @@ const Na = /* @__PURE__ */ m(Oe, [["render", Ue]]), We = {
|
|
|
636
636
|
},
|
|
637
637
|
mounted() {
|
|
638
638
|
this.$nextTick(function() {
|
|
639
|
-
import("./header.component.min-
|
|
639
|
+
import("./header.component.min-cc847af0.mjs").then((t) => {
|
|
640
640
|
window.customElements.get("iam-header") || window.customElements.define("iam-header", t.default);
|
|
641
641
|
}).catch((t) => {
|
|
642
642
|
console.log(t.message);
|
|
@@ -1032,7 +1032,7 @@ const Ia = /* @__PURE__ */ m(ht, [["render", At]]), Lt = {
|
|
|
1032
1032
|
name: "Nav",
|
|
1033
1033
|
mounted() {
|
|
1034
1034
|
this.$nextTick(function() {
|
|
1035
|
-
import("./nav.component.min-
|
|
1035
|
+
import("./nav.component.min-97b78196.mjs").then((t) => {
|
|
1036
1036
|
window.customElements.get("iam-nav") || window.customElements.define("iam-nav", t.default);
|
|
1037
1037
|
}).catch((t) => {
|
|
1038
1038
|
console.log(t.message);
|
|
@@ -1152,7 +1152,7 @@ const Wt = {
|
|
|
1152
1152
|
name: "Tabs",
|
|
1153
1153
|
created() {
|
|
1154
1154
|
this.$nextTick(function() {
|
|
1155
|
-
import("./tabs.component.min-
|
|
1155
|
+
import("./tabs.component.min-5d758910.mjs").then((t) => {
|
|
1156
1156
|
window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", t.default);
|
|
1157
1157
|
}).catch((t) => {
|
|
1158
1158
|
console.log(t.message);
|
|
@@ -1299,7 +1299,7 @@ function oa(t, a, e, i, r, s) {
|
|
|
1299
1299
|
}
|
|
1300
1300
|
const Wa = /* @__PURE__ */ m(na, [["render", oa]]);
|
|
1301
1301
|
/*!
|
|
1302
|
-
* iamKey v7.
|
|
1302
|
+
* iamKey v7.1.0--beta1
|
|
1303
1303
|
* Copyright 2022-2025 iamproperty
|
|
1304
1304
|
*/
|
|
1305
1305
|
function la(t, a) {
|
|
@@ -1469,7 +1469,7 @@ const Ga = /* @__PURE__ */ m(fa, [["render", ba]]), ya = {
|
|
|
1469
1469
|
props: {},
|
|
1470
1470
|
mounted() {
|
|
1471
1471
|
this.$nextTick(function() {
|
|
1472
|
-
import("./actionbar.component.min-
|
|
1472
|
+
import("./actionbar.component.min-1c386fbd.mjs").then((t) => {
|
|
1473
1473
|
window.customElements.get("iam-actionbar") || window.customElements.define("iam-actionbar", t.default);
|
|
1474
1474
|
}).catch((t) => {
|
|
1475
1475
|
console.log(t.message);
|
|
@@ -1484,7 +1484,7 @@ function ga(t, a, e, i, r, s) {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
const Qa = /* @__PURE__ */ m(ya, [["render", ga]]);
|
|
1486
1486
|
/*!
|
|
1487
|
-
* iamKey v7.
|
|
1487
|
+
* iamKey v7.1.0--beta1
|
|
1488
1488
|
* Copyright 2022-2025 iamproperty
|
|
1489
1489
|
*/
|
|
1490
1490
|
class R extends HTMLElement {
|