@iamproperty/components 7.7.1--beta9 → 7.7.1--beta11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/components/table-basic.global.css +1 -1
- package/assets/css/components/table-basic.global.css.map +1 -1
- package/assets/css/components/table.global.css +1 -1
- package/assets/css/components/table.global.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.min.js +1 -1
- package/assets/js/components/advanced-select/advanced-select.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/bento-grid/bento-grid.component.min.js +1 -1
- package/assets/js/components/calendar/calendar.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/config/config.component.min.js +1 -1
- package/assets/js/components/content/content.component.min.js +1 -1
- package/assets/js/components/darkmode/darkmode.component.min.js +1 -1
- package/assets/js/components/doughnutchart/doughnutchart.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/form/form.component.js +34 -2
- package/assets/js/components/form/form.component.min.js +3 -3
- package/assets/js/components/form/form.component.min.js.map +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/input/input.component.min.js +1 -1
- package/assets/js/components/input-range/input-range.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/menu/menu.component.min.js +1 -1
- package/assets/js/components/milestone/milestone.component.min.js +1 -1
- package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
- package/assets/js/components/modal/modal.component.js +8 -7
- package/assets/js/components/modal/modal.component.min.js +3 -3
- package/assets/js/components/modal/modal.component.min.js.map +1 -1
- package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
- package/assets/js/components/multi-step-modal/multi-step-modal.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/password/password.component.min.js +1 -1
- package/assets/js/components/popover/popover.component.min.js +1 -1
- package/assets/js/components/rank/rank.component.min.js +1 -1
- package/assets/js/components/rankings/rankings.component.min.js +1 -1
- package/assets/js/components/rating/rating.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/split-button/split-button.component.min.js +1 -1
- package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +6 -6
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/table-ajax/table-ajax.component.min.js +5 -5
- package/assets/js/components/table-ajax/table-ajax.component.min.js.map +1 -1
- package/assets/js/components/table-basic/table-basic.component.min.js +5 -5
- package/assets/js/components/table-basic/table-basic.component.min.js.map +1 -1
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js +6 -6
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js.map +1 -1
- package/assets/js/components/table-submit/table-submit.component.min.js +6 -6
- package/assets/js/components/table-submit/table-submit.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/components/tag/tag.component.min.js +1 -1
- package/assets/js/components/tooltip/tooltip.component.min.js +1 -1
- package/assets/js/components/video/video.component.min.js +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components/video-modal/video-modal.component.min.js +1 -1
- package/assets/js/components/word-count/word-count.component.min.js +1 -1
- package/assets/js/modules/table.js +20 -6
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/sass/components/table-basic.global.scss +1 -1
- package/assets/sass/components/table.global.scss +7 -3
- package/assets/ts/components/form/form.component.ts +51 -2
- package/assets/ts/components/modal/modal.component.ts +8 -7
- package/assets/ts/modules/table.ts +29 -9
- package/dist/components.es.js +25 -25
- package/dist/components.umd.js +73 -73
- package/package.json +1 -1
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import { trackComponentRegistered } from '../_global';
|
|
2
2
|
trackComponentRegistered('iam-tag');
|
|
3
|
-
class
|
|
3
|
+
class iamForm extends HTMLElement {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
6
|
+
this.checkConditions = (conditions) => {
|
|
7
|
+
let meetsCondition = true;
|
|
8
|
+
JSON.parse(conditions).forEach((condition) => {
|
|
9
|
+
if (this.querySelector(`#${condition['if']}`).value != condition['equals'])
|
|
10
|
+
meetsCondition = false;
|
|
11
|
+
});
|
|
12
|
+
return meetsCondition;
|
|
13
|
+
};
|
|
14
|
+
this.showIf = () => {
|
|
15
|
+
Array.from(this.querySelectorAll('[data-show-if]')).forEach((element) => {
|
|
16
|
+
if (!this.checkConditions(element.getAttribute('data-show-if')))
|
|
17
|
+
element.classList.add('d-none');
|
|
18
|
+
else
|
|
19
|
+
element.classList.remove('d-none');
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
this.disabledIf = () => {
|
|
23
|
+
Array.from(this.querySelectorAll('[data-disabled-if]')).forEach((element) => {
|
|
24
|
+
if (!this.checkConditions(element.getAttribute('data-disabled-if')))
|
|
25
|
+
element.setAttribute('disabled', 'disabled');
|
|
26
|
+
else
|
|
27
|
+
element.removeAttribute('disabled');
|
|
28
|
+
});
|
|
29
|
+
};
|
|
6
30
|
this.attachShadow({ mode: 'open' });
|
|
7
31
|
const template = document.createElement('template');
|
|
8
32
|
template.innerHTML = `
|
|
@@ -63,6 +87,14 @@ class iamTag extends HTMLElement {
|
|
|
63
87
|
input.setAttribute('data-required', 'true');
|
|
64
88
|
});
|
|
65
89
|
});
|
|
90
|
+
// #region if
|
|
91
|
+
this.showIf();
|
|
92
|
+
this.disabledIf();
|
|
93
|
+
form.addEventListener('change', (e) => {
|
|
94
|
+
this.showIf();
|
|
95
|
+
this.disabledIf();
|
|
96
|
+
});
|
|
97
|
+
// #endregion
|
|
66
98
|
}
|
|
67
99
|
}
|
|
68
|
-
export default
|
|
100
|
+
export default iamForm;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
|
-
*/const o=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};o("iam-tag");class
|
|
4
|
+
*/const o=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};o("iam-tag");class d extends HTMLElement{constructor(){super(),this.checkConditions=e=>{let r=!0;return JSON.parse(e).forEach(i=>{this.querySelector(`#${i.if}`).value!=i.equals&&(r=!1)}),r},this.showIf=()=>{Array.from(this.querySelectorAll("[data-show-if]")).forEach(e=>{this.checkConditions(e.getAttribute("data-show-if"))?e.classList.remove("d-none"):e.classList.add("d-none")})},this.disabledIf=()=>{Array.from(this.querySelectorAll("[data-disabled-if]")).forEach(e=>{this.checkConditions(e.getAttribute("data-disabled-if"))?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")})},this.attachShadow({mode:"open"});const t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<div class="wrapper">
|
|
6
6
|
<slot></slot>
|
|
7
7
|
</div>
|
|
8
|
-
`,this.shadowRoot.appendChild(
|
|
8
|
+
`,this.shadowRoot.appendChild(t.content.cloneNode(!0))}isFormValid(t){return!(t.querySelector(":invalid")||t.querySelector('.pwd-checker[data-strength="1"]')||t.querySelector('.pwd-checker[data-strength="2"]')||t.querySelector("iam-multiselect[data-is-required][data-error]"))}connectedCallback(){const t=this.querySelector("form");if(!t)return!1;t.setAttribute("novalidate","true"),t.addEventListener("submit",e=>{var r;t.classList.add("was-validated"),this.isFormValid(t)||(console.log("hey2"),e.preventDefault(),(r=t?.querySelector("input:invalid"))===null||r===void 0||r.scrollIntoView())}),Array.from(t.querySelectorAll(".conditional [required]")).forEach(e=>{e.setAttribute("data-conditional-required","true"),e.removeAttribute("required")}),Array.from(t.querySelectorAll(".conditional [data-required]")).forEach(e=>{e.setAttribute("data-conditional-data-required","true"),e.removeAttribute("data-required")}),t.addEventListener("change",()=>{Array.from(t.querySelectorAll(".conditional [data-conditional-required], .conditional [data-conditional-data-required]")).forEach(e=>{e.removeAttribute("required"),e.removeAttribute("data-required")}),Array.from(t.querySelectorAll(".conditional [data-conditional-required]")).forEach(e=>{window.getComputedStyle(e.closest(".conditional")).getPropertyValue("display")=="block"&&e.setAttribute("required","required")}),Array.from(t.querySelectorAll(".conditional [data-conditional-data-required]")).forEach(e=>{window.getComputedStyle(e.closest(".conditional")).getPropertyValue("display")=="block"&&e.setAttribute("data-required","true")})}),this.showIf(),this.disabledIf(),t.addEventListener("change",e=>{this.showIf(),this.disabledIf()})}}export{d as default};
|
|
9
9
|
//# sourceMappingURL=form.component.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.component.min.js","sources":["../_global.js","form.component.js"],"sourcesContent":["export const trackComponentRegistered = (componentName) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementRegistered',\n element: componentName,\n });\n};\nexport const trackComponent = (component, componentName, trackEvents) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementAdded',\n element: componentName,\n });\n trackEvents.forEach((eventName) => {\n component.addEventListener(eventName, function (event) {\n const eventDetails = {\n event: eventName,\n element: componentName,\n target: event.target,\n };\n Object.keys(event.detail).forEach((eventKey) => {\n const eventDetail = event.detail[eventKey];\n eventDetails[eventKey] = eventDetail;\n });\n window.dataLayer.push(eventDetails);\n });\n });\n return true;\n};\n","import { trackComponentRegistered } from '../_global';\ntrackComponentRegistered('iam-tag');\nclass
|
|
1
|
+
{"version":3,"file":"form.component.min.js","sources":["../_global.js","form.component.js"],"sourcesContent":["export const trackComponentRegistered = (componentName) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementRegistered',\n element: componentName,\n });\n};\nexport const trackComponent = (component, componentName, trackEvents) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementAdded',\n element: componentName,\n });\n trackEvents.forEach((eventName) => {\n component.addEventListener(eventName, function (event) {\n const eventDetails = {\n event: eventName,\n element: componentName,\n target: event.target,\n };\n Object.keys(event.detail).forEach((eventKey) => {\n const eventDetail = event.detail[eventKey];\n eventDetails[eventKey] = eventDetail;\n });\n window.dataLayer.push(eventDetails);\n });\n });\n return true;\n};\n","import { trackComponentRegistered } from '../_global';\ntrackComponentRegistered('iam-tag');\nclass iamForm extends HTMLElement {\n constructor() {\n super();\n this.checkConditions = (conditions) => {\n let meetsCondition = true;\n JSON.parse(conditions).forEach((condition) => {\n if (this.querySelector(`#${condition['if']}`).value != condition['equals'])\n meetsCondition = false;\n });\n return meetsCondition;\n };\n this.showIf = () => {\n Array.from(this.querySelectorAll('[data-show-if]')).forEach((element) => {\n if (!this.checkConditions(element.getAttribute('data-show-if')))\n element.classList.add('d-none');\n else\n element.classList.remove('d-none');\n });\n };\n this.disabledIf = () => {\n Array.from(this.querySelectorAll('[data-disabled-if]')).forEach((element) => {\n if (!this.checkConditions(element.getAttribute('data-disabled-if')))\n element.setAttribute('disabled', 'disabled');\n else\n element.removeAttribute('disabled');\n });\n };\n this.attachShadow({ mode: 'open' });\n const template = document.createElement('template');\n template.innerHTML = `\n <div class=\"wrapper\">\n <slot></slot>\n </div>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n isFormValid(form) {\n if (form.querySelector(':invalid'))\n return false;\n if (form.querySelector('.pwd-checker[data-strength=\"1\"]') || form.querySelector('.pwd-checker[data-strength=\"2\"]'))\n return false;\n if (form.querySelector('iam-multiselect[data-is-required][data-error]'))\n return false;\n return true;\n }\n ;\n connectedCallback() {\n const form = this.querySelector('form');\n if (!form)\n return false;\n form.setAttribute('novalidate', 'true');\n // Form validation\n form.addEventListener('submit', (e) => {\n var _a;\n form.classList.add('was-validated');\n if (!this.isFormValid(form)) {\n console.log('hey2');\n e.preventDefault();\n (_a = form === null || form === void 0 ? void 0 : form.querySelector('input:invalid')) === null || _a === void 0 ? void 0 : _a.scrollIntoView();\n }\n });\n // conditional reveal required fields\n Array.from(form.querySelectorAll('.conditional [required]')).forEach((input) => {\n input.setAttribute('data-conditional-required', 'true');\n input.removeAttribute('required');\n });\n // conditional reveal required fields (for fields inside of components like the address lookup)\n Array.from(form.querySelectorAll('.conditional [data-required]')).forEach((input) => {\n input.setAttribute('data-conditional-data-required', 'true');\n input.removeAttribute('data-required');\n });\n form.addEventListener('change', () => {\n Array.from(form.querySelectorAll('.conditional [data-conditional-required], .conditional [data-conditional-data-required]')).forEach((input) => {\n input.removeAttribute('required');\n input.removeAttribute('data-required');\n });\n Array.from(form.querySelectorAll('.conditional [data-conditional-required]')).forEach((input) => {\n const conditionalStyles = window.getComputedStyle(input.closest('.conditional'));\n if (conditionalStyles.getPropertyValue(\"display\") == 'block')\n input.setAttribute('required', 'required');\n });\n Array.from(form.querySelectorAll('.conditional [data-conditional-data-required]')).forEach((input) => {\n const conditionalStyles = window.getComputedStyle(input.closest('.conditional'));\n if (conditionalStyles.getPropertyValue(\"display\") == 'block')\n input.setAttribute('data-required', 'true');\n });\n });\n // #region if\n this.showIf();\n this.disabledIf();\n form.addEventListener('change', (e) => {\n this.showIf();\n this.disabledIf();\n });\n // #endregion\n }\n}\nexport default iamForm;\n"],"names":["trackComponentRegistered","componentName","iamForm","conditions","meetsCondition","condition","element","template","form","_a","input"],"mappings":";;;IAAO,MAAMA,EAA4BC,GAAkB,CAEvD,OAAO,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAASA,CACjB,CAAK,CACL,ECNAD,EAAyB,SAAS,EAClC,MAAME,UAAgB,WAAY,CAC9B,aAAc,CACV,MAAK,EACL,KAAK,gBAAmBC,GAAe,CACnC,IAAIC,EAAiB,GACrB,YAAK,MAAMD,CAAU,EAAE,QAASE,GAAc,CACtC,KAAK,cAAc,IAAIA,EAAU,EAAK,EAAE,EAAE,OAASA,EAAU,SAC7DD,EAAiB,GACzB,CAAC,EACMA,CACX,EACA,KAAK,OAAS,IAAM,CAChB,MAAM,KAAK,KAAK,iBAAiB,gBAAgB,CAAC,EAAE,QAASE,GAAY,CAChE,KAAK,gBAAgBA,EAAQ,aAAa,cAAc,CAAC,EAG1DA,EAAQ,UAAU,OAAO,QAAQ,EAFjCA,EAAQ,UAAU,IAAI,QAAQ,CAGtC,CAAC,CACL,EACA,KAAK,WAAa,IAAM,CACpB,MAAM,KAAK,KAAK,iBAAiB,oBAAoB,CAAC,EAAE,QAASA,GAAY,CACpE,KAAK,gBAAgBA,EAAQ,aAAa,kBAAkB,CAAC,EAG9DA,EAAQ,gBAAgB,UAAU,EAFlCA,EAAQ,aAAa,WAAY,UAAU,CAGnD,CAAC,CACL,EACA,KAAK,aAAa,CAAE,KAAM,MAAM,CAAE,EAClC,MAAMC,EAAW,SAAS,cAAc,UAAU,EAClDA,EAAS,UAAY;AAAA;AAAA;AAAA;AAAA,MAKrB,KAAK,WAAW,YAAYA,EAAS,QAAQ,UAAU,EAAI,CAAC,CAChE,CACA,YAAYC,EAAM,CAKd,MAJI,EAAAA,EAAK,cAAc,UAAU,GAE7BA,EAAK,cAAc,iC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AAC,EAED,KAAK,OAAM,EACX,KAAK,WAAU,EACfF,EAAK,iBAAiB,SAAW,GAAM,CACnC,KAAK,OAAM,EACX,KAAK,WAAU,CACnB,CAAC,CAEL,CACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class o 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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"inline edit"});class v extends HTMLElement{constructor(){super();const t=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 class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const q=k=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:k})};q("iam-iamPrefix");class _ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const o=s=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:s})};o("iam-iamPrefix");class i extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Marketing"});class e extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const t=document.createElement("template");t.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class u extends HTMLElement{constructor(){super(),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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const l=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},m=(t,n,a)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),a.forEach(e=>{t.addEventListener(e,function(s){const d={event:e,element:n,target:s.target};Object.keys(s.detail).forEach(o=>{const i=s.detail[o];d[o]=i}),window.dataLayer.push(d)})}),!0),p=function(t){const n=t.dataset.status;if(!n)return;const a=t.shadowRoot.querySelector(".milestone-wrap"),e=document.createElement("span");e.setAttribute("part","status"),e.classList.add("milestone-status"),e.innerHTML=`${n} Step`,n==="Current"&&t.classList.add("current"),a.insertAdjacentElement("afterbegin",e)},u=function(t){const n=t.shadowRoot.querySelector(".task-wrap"),a=t.dataset.items?JSON.parse(t.dataset.items):[];a.length&&(a.forEach(e=>{const s=document.createElement("details"),d=document.createElement("summary"),o=document.createElement("div"),i=document.createElement("p");o.classList.add("task-details"),d.innerHTML=e.name,e.date_completed&&d.classList.add("complete"),s.appendChild(d),e.description&&(i.innerHTML=e.description,o.appendChild(i)),e.actions.length&&o.appendChild(h(e.actions,d)),s.appendChild(o),n.insertAdjacentElement("beforeend",s),s.addEventListener("click",()=>{s?.hasAttribute("open")?r("milestone-item-closed",e.name,t):r("milestone-item-opened",e.name,t)})}),t.appendChild(n))},r=function(t,n,a){const e=new CustomEvent(t,{detail:{title:n}});a.dispatchEvent(e)},h=function(t,n){const a=document.createElement("ul"),e=t.length,d=t.filter(o=>o.date_completed).length||0;if(!(e<1))return n.innerHTML+=` (${d}/${e})`,t.forEach(o=>{const i=document.createElement("li"),c=document.createElement("span");o.date_completed&&(i.classList.add("complete"),c.classList.add("action-date"),c.innerHTML=o.date_completed),i.innerHTML=o.action,i.appendChild(c),a.appendChild(i)}),a},w=function(t){p(t),u(t)};l("iam-milestone");class L extends HTMLElement{constructor(){var n;super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const r=t=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:t})},l=(t,s,e)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:s}),e.forEach(n=>{t.addEventListener(n,function(o){const a={event:n,element:s,target:o.target};Object.keys(o.detail).forEach(i=>{const d=o.detail[i];a[i]=d}),window.dataLayer.push(a)})}),!0),u=function(t){if(!t.dataset.showAllToggle)return;const e=document.createElement("button");e.innerHTML="Show next steps",e.classList.add("btn","btn-tertiary","show-all-toggle"),t.appendChild(e),e.addEventListener("click",()=>{t.classList.contains("show-all")?(e.innerHTML="Show next steps",t.classList.remove("show-all"),c("hide-future-items",t)):(e.innerHTML="Hide next steps",t.classList.add("show-all"),c("show-future-items",t))})},c=function(t,s){const e=new CustomEvent(t,{});s.dispatchEvent(e)},h=function(t){u(t)};r("iam-milestone-group");class m extends HTMLElement{constructor(){var s;super();const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -46,7 +46,8 @@ class iamModal extends HTMLElement {
|
|
|
46
46
|
detail: { modalId: id },
|
|
47
47
|
});
|
|
48
48
|
this.dispatchEvent(agreedEvent);
|
|
49
|
-
|
|
49
|
+
if (!this.querySelector(':invalid'))
|
|
50
|
+
closeModal(this);
|
|
50
51
|
};
|
|
51
52
|
document.addEventListener('click', (e) => {
|
|
52
53
|
if (e.target.matches(`[command="show-modal"][commandfor="${id}"]`) || e.target.matches(`[data-modal="${id}"]`)) {
|
|
@@ -72,7 +73,7 @@ class iamModal extends HTMLElement {
|
|
|
72
73
|
});
|
|
73
74
|
originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('close', (e) => {
|
|
74
75
|
e.preventDefault();
|
|
75
|
-
closeModal(
|
|
76
|
+
closeModal(this);
|
|
76
77
|
});
|
|
77
78
|
// Move the submit button so that the slot functionality works
|
|
78
79
|
if (originalDialog) {
|
|
@@ -81,21 +82,21 @@ class iamModal extends HTMLElement {
|
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
closeButton === null || closeButton === void 0 ? void 0 : closeButton.addEventListener('click', () => {
|
|
84
|
-
closeModal(
|
|
85
|
+
closeModal(this);
|
|
85
86
|
});
|
|
86
87
|
cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton.addEventListener('click', () => {
|
|
87
|
-
closeModal(
|
|
88
|
+
closeModal(this);
|
|
88
89
|
});
|
|
89
90
|
agreedButton === null || agreedButton === void 0 ? void 0 : agreedButton.addEventListener('click', () => {
|
|
90
91
|
agreed();
|
|
91
92
|
});
|
|
92
93
|
this.addEventListener('close-modal', () => {
|
|
93
|
-
closeModal(
|
|
94
|
+
closeModal(this);
|
|
94
95
|
});
|
|
95
96
|
// Hijack the default form submission
|
|
96
97
|
originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('submit', (e) => {
|
|
97
98
|
if (e.submitter && e.submitter.hasAttribute('formmethod') && e.submitter.getAttribute('formmethod') == "dialog") {
|
|
98
|
-
closeModal(
|
|
99
|
+
closeModal(this);
|
|
99
100
|
}
|
|
100
101
|
else {
|
|
101
102
|
agreed();
|
|
@@ -122,7 +123,7 @@ class iamModal extends HTMLElement {
|
|
|
122
123
|
event.clientY < dialogDimensions.top ||
|
|
123
124
|
event.clientY > dialogDimensions.bottom) {
|
|
124
125
|
if (!event.target.closest('dialog *'))
|
|
125
|
-
closeModal(
|
|
126
|
+
closeModal(this); // Weird bug when interacting with radio input fields within dialogs cuases it to close
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
|
-
*/const w=
|
|
4
|
+
*/const w=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})},y=a=>{var o;const i=(o=a.shadowRoot)===null||o===void 0?void 0:o.querySelector("dialog"),r=a.hasAttribute("id")?a.getAttribute("id"):"unknown";i?.showModal(),i?.focus();const d=new CustomEvent("modal-opened",{bubbles:!0,cancelable:!0,detail:{modalId:r}});a.dispatchEvent(d),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})},n=a=>{var o;const i=(o=a.shadowRoot)===null||o===void 0?void 0:o.querySelector("dialog"),r=a.hasAttribute("id")?a.getAttribute("id"):"unknown";i?.close();const d=new CustomEvent("modal-closed",{bubbles:!0,cancelable:!0,detail:{modalId:r}});a.dispatchEvent(d),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:r})},k='<button class="btn btn-compact btn-secondary fa-xmark-large" data-close>Close</button>';w("iam-card");class x extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
6
6
|
${this.hasAttribute("css")?`@import "${this.getAttribute("css")}";`:""}
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</dialog>
|
|
24
|
-
`,this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){var o,
|
|
24
|
+
`,this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){var o,i,r,d,p,b;const e=this.querySelector("dialog"),l=this.hasAttribute("id")?this.getAttribute("id"):e?.getAttribute("id");let c=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelector("dialog");const g=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelector("[data-close]"),h=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelector("[data-cancel]"),u=this.querySelector('button[slot="agreed-button"]')?this.querySelector('button[slot="agreed-button"]'):(d=this.shadowRoot)===null||d===void 0?void 0:d.querySelector("[data-agreed]"),s=this.hasAttribute("data-type")?this.getAttribute("data-type"):"passive",v=()=>{const t=new CustomEvent("agreed",{detail:{modalId:l}});this.dispatchEvent(t),this.querySelector(":invalid")||n(this)};document.addEventListener("click",t=>{(t.target.matches(`[command="show-modal"][commandfor="${l}"]`)||t.target.matches(`[data-modal="${l}"]`))&&y(this)}),document.addEventListener("click",t=>{t.target.matches(`[command="close"][commandfor="${l}"]`)&&n(this)}),e?.addEventListener("command",t=>{event.command=="show-modal"&&t.preventDefault()}),e?.addEventListener("command",t=>{t.preventDefault(),event.command=="close"&&n(l)}),e?.addEventListener("close",t=>{t.preventDefault(),n(this)}),e&&Array.from(e?.querySelectorAll("[slot]")).forEach(t=>{this.moveBefore(t,e)}),g?.addEventListener("click",()=>{n(this)}),h?.addEventListener("click",()=>{n(this)}),u?.addEventListener("click",()=>{v()}),this.addEventListener("close-modal",()=>{n(this)}),e?.addEventListener("submit",t=>{t.submitter&&t.submitter.hasAttribute("formmethod")&&t.submitter.getAttribute("formmethod")=="dialog"?n(this):v()}),Array.from(this.querySelectorAll('button[type="submit"]')).forEach(t=>{t.addEventListener("click",f=>{!t.closest("form")&&!t.hasAttribute("formmethod")&&v()})}),this.addEventListener("click",t=>{if(window.getComputedStyle(c).display==="contents"&&(c=c.parentNode.closest("dialog[open]")),s!="transactional"&&s!="acknowledgement"){const m=c.getBoundingClientRect();(t.clientX<m.left||t.clientX>m.right||t.clientY<m.top||t.clientY>m.bottom)&&(t.target.closest("dialog *")||n(this))}}),(s=="transactional"||s=="acknowledgement")&&((b=(p=this.shadowRoot)===null||p===void 0?void 0:p.querySelector(".scroll"))===null||b===void 0||b.insertAdjacentHTML("afterbegin",`<i class="fa-light fa-circle" aria-hidden="true">
|
|
25
25
|
<i class="fa-regular fa-${this.hasAttribute("data-icon")?this.getAttribute("data-icon"):"info"}" aria-hidden="true"></i>
|
|
26
26
|
</i>`))}}export{x as default};
|
|
27
27
|
//# sourceMappingURL=modal.component.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.component.min.js","sources":["../_global.js","../../modules/modal.js","modal.component.js"],"sourcesContent":["export const trackComponentRegistered = (componentName) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementRegistered',\n element: componentName,\n });\n};\nexport const trackComponent = (component, componentName, trackEvents) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementAdded',\n element: componentName,\n });\n trackEvents.forEach((eventName) => {\n component.addEventListener(eventName, function (event) {\n const eventDetails = {\n event: eventName,\n element: componentName,\n target: event.target,\n };\n Object.keys(event.detail).forEach((eventKey) => {\n const eventDetail = event.detail[eventKey];\n eventDetails[eventKey] = eventDetail;\n });\n window.dataLayer.push(eventDetails);\n });\n });\n return true;\n};\n","export const openModal = (modal) => {\n var _a;\n const dialog = (_a = modal.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('dialog');\n const id = modal.hasAttribute('id') ? modal.getAttribute('id') : 'unknown';\n dialog === null || dialog === void 0 ? void 0 : dialog.showModal();\n dialog === null || dialog === void 0 ? void 0 : dialog.focus();\n const closeEvent = new CustomEvent('modal-opened', {\n bubbles: true,\n cancelable: true,\n detail: { modalId: id },\n });\n modal.dispatchEvent(closeEvent);\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'openModal',\n id: id,\n });\n};\nexport const closeModal = (modal) => {\n var _a;\n const dialog = (_a = modal.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('dialog');\n const id = modal.hasAttribute('id') ? modal.getAttribute('id') : 'unknown';\n dialog === null || dialog === void 0 ? void 0 : dialog.close();\n const closeEvent = new CustomEvent('modal-closed', {\n bubbles: true,\n cancelable: true,\n detail: { modalId: id },\n });\n modal.dispatchEvent(closeEvent);\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'closeModal',\n id: id,\n });\n};\nexport const closeButtonHtml = `<button class=\"btn btn-compact btn-secondary fa-xmark-large\" data-close>Close</button>`;\n","import { trackComponentRegistered } from '../_global';\nimport { openModal, closeModal, closeButtonHtml } from '../../modules/modal';\ntrackComponentRegistered('iam-card');\nclass iamModal extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const loadCSS = `@import \"${assetLocation}/css/components/modal.component.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n \n ${loadCSS}\n </style>\n <link rel=\"stylesheet\" href=\"https://kit.fontawesome.com/8bd0fca975.css\" crossorigin=\"anonymous\" />\n <dialog>\n ${closeButtonHtml}\n <div class=\"scroll\">\n <slot></slot>\n <div class=\"btn__group\">\n <button class=\"btn btn-secondary\" data-cancel>${this.hasAttribute('data-cancel-text') ? this.getAttribute('data-cancel-text') : 'Cancel'}</button>\n <slot name=\"agreed-button\">\n <button class=\"btn btn-primary\" data-agreed>${this.hasAttribute('data-agreed-text') ? this.getAttribute('data-agreed-text') : 'Submit'}</button>\n </slot>\n </div>\n </div>\n </dialog>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n var _a, _b, _c, _d, _e, _f;\n const originalDialog = this.querySelector('dialog');\n const id = this.hasAttribute('id') ? this.getAttribute('id') : originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.getAttribute('id');\n let dialog = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('dialog');\n const closeButton = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('[data-close]');\n const cancelButton = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('[data-cancel]');\n const agreedButton = this.querySelector('button[slot=\"agreed-button\"]') ? this.querySelector('button[slot=\"agreed-button\"]') : (_d = this.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('[data-agreed]');\n const modalType = this.hasAttribute('data-type') ? this.getAttribute('data-type') : 'passive';\n const agreed = () => {\n const agreedEvent = new CustomEvent('agreed', {\n detail: { modalId: id },\n });\n this.dispatchEvent(agreedEvent);\n closeModal(id, this);\n };\n document.addEventListener('click', (e) => {\n if (e.target.matches(`[command=\"show-modal\"][commandfor=\"${id}\"]`) || e.target.matches(`[data-modal=\"${id}\"]`)) {\n openModal(this);\n }\n });\n document.addEventListener('click', (e) => {\n if (e.target.matches(`[command=\"close\"][commandfor=\"${id}\"]`)) {\n closeModal(this);\n }\n });\n // Disable the original event \n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('command', (e) => {\n if (event.command == \"show-modal\") {\n e.preventDefault();\n }\n });\n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('command', (e) => {\n e.preventDefault();\n if (event.command == \"close\") {\n closeModal(id, this);\n }\n });\n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('close', (e) => {\n e.preventDefault();\n closeModal(id, this);\n });\n // Move the submit button so that the slot functionality works\n if (originalDialog) {\n Array.from(originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.querySelectorAll('[slot]')).forEach((element) => {\n this.moveBefore(element, originalDialog);\n });\n }\n closeButton === null || closeButton === void 0 ? void 0 : closeButton.addEventListener('click', () => {\n closeModal(id, this);\n });\n cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton.addEventListener('click', () => {\n closeModal(id, this);\n });\n agreedButton === null || agreedButton === void 0 ? void 0 : agreedButton.addEventListener('click', () => {\n agreed();\n });\n this.addEventListener('close-modal', () => {\n closeModal(id, this);\n });\n // Hijack the default form submission \n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('submit', (e) => {\n if (e.submitter && e.submitter.hasAttribute('formmethod') && e.submitter.getAttribute('formmethod') == \"dialog\") {\n closeModal(id, this);\n }\n else {\n agreed();\n }\n });\n Array.from(this.querySelectorAll('button[type=\"submit\"]')).forEach((button) => {\n button.addEventListener('click', (e) => {\n if (!button.closest('form') && !button.hasAttribute('formmethod')) {\n agreed();\n }\n });\n });\n // Add click event on backdrop\n this.addEventListener('click', (event) => {\n // Small fix to make sure the dialog isn't a dialog inside of a dialog.\n const style = window.getComputedStyle(dialog);\n if (style.display === 'contents')\n dialog = dialog.parentNode.closest('dialog[open]');\n // Dont allow the backdrop to be clicked when transactional\n if (modalType != 'transactional' && modalType != 'acknowledgement') {\n const dialogDimensions = dialog.getBoundingClientRect();\n if (event.clientX < dialogDimensions.left ||\n event.clientX > dialogDimensions.right ||\n event.clientY < dialogDimensions.top ||\n event.clientY > dialogDimensions.bottom) {\n if (!event.target.closest('dialog *'))\n closeModal(id, this); // Weird bug when interacting with radio input fields within dialogs cuases it to close\n }\n }\n });\n if (modalType == 'transactional' || modalType == 'acknowledgement') {\n (_f = (_e = this.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector('.scroll')) === null || _f === void 0 ? void 0 : _f.insertAdjacentHTML('afterbegin', `<i class=\"fa-light fa-circle\" aria-hidden=\"true\">\n <i class=\"fa-regular fa-${this.hasAttribute('data-icon') ? this.getAttribute('data-icon') : 'info'}\" aria-hidden=\"true\"></i>\n </i>`);\n }\n }\n}\nexport default iamModal;\n"],"names":["trackComponentRegistered","componentName","openModal","modal","_a","dialog","id","closeEvent","closeModal","closeButtonHtml","iamModal","template","_b","_c","_d","_e","_f","originalDialog","closeButton","cancelButton","agreedButton","modalType","agreed","agreedEvent","e","element","button","event","dialogDimensions"],"mappings":";;;IAAO,MAAMA,EAA4BC,GAAkB,CAEvD,OAAO,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAASA,CACjB,CAAK,CACL,ECPaC,EAAaC,GAAU,C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M,EAClC,UAAY,aAClBA,EAASA,EAAO,WAAW,QAAQ,cAAc,GAEjDgB,GAAa,iBAAmBA,GAAa,kBAAmB,CAChE,MAAMO,EAAmBvB,EAAO,sBAAqB,GACjDsB,EAAM,QAAUC,EAAiB,MACjCD,EAAM,QAAUC,EAAiB,OACjCD,EAAM,QAAUC,EAAiB,KACjCD,EAAM,QAAUC,EAAiB,UAC5BD,EAAM,OAAO,QAAQ,UAAU,GAChCnB,EAAWF,CAAQ,EAE/B,CACJ,CAAC,GACGe,GAAa,iBAAmBA,GAAa,sBAC5CL,GAAMD,EAAK,KAAK,cAAgB,MAAQA,IAAO,OAAS,OAASA,EAAG,cAAc,SAAS,KAAO,MAAQC,IAAO,QAAkBA,EAAG,mBAAmB,aAAc;AAAA,oCAChJ,KAAK,aAAa,WAAW,EAAI,KAAK,aAAa,WAAW,EAAI,MAAM;AAAA,aAC/F,EAET,CACJ"}
|
|
1
|
+
{"version":3,"file":"modal.component.min.js","sources":["../_global.js","../../modules/modal.js","modal.component.js"],"sourcesContent":["export const trackComponentRegistered = (componentName) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementRegistered',\n element: componentName,\n });\n};\nexport const trackComponent = (component, componentName, trackEvents) => {\n // Data layer Web component created\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'customElementAdded',\n element: componentName,\n });\n trackEvents.forEach((eventName) => {\n component.addEventListener(eventName, function (event) {\n const eventDetails = {\n event: eventName,\n element: componentName,\n target: event.target,\n };\n Object.keys(event.detail).forEach((eventKey) => {\n const eventDetail = event.detail[eventKey];\n eventDetails[eventKey] = eventDetail;\n });\n window.dataLayer.push(eventDetails);\n });\n });\n return true;\n};\n","export const openModal = (modal) => {\n var _a;\n const dialog = (_a = modal.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('dialog');\n const id = modal.hasAttribute('id') ? modal.getAttribute('id') : 'unknown';\n dialog === null || dialog === void 0 ? void 0 : dialog.showModal();\n dialog === null || dialog === void 0 ? void 0 : dialog.focus();\n const closeEvent = new CustomEvent('modal-opened', {\n bubbles: true,\n cancelable: true,\n detail: { modalId: id },\n });\n modal.dispatchEvent(closeEvent);\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'openModal',\n id: id,\n });\n};\nexport const closeModal = (modal) => {\n var _a;\n const dialog = (_a = modal.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('dialog');\n const id = modal.hasAttribute('id') ? modal.getAttribute('id') : 'unknown';\n dialog === null || dialog === void 0 ? void 0 : dialog.close();\n const closeEvent = new CustomEvent('modal-closed', {\n bubbles: true,\n cancelable: true,\n detail: { modalId: id },\n });\n modal.dispatchEvent(closeEvent);\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: 'closeModal',\n id: id,\n });\n};\nexport const closeButtonHtml = `<button class=\"btn btn-compact btn-secondary fa-xmark-large\" data-close>Close</button>`;\n","import { trackComponentRegistered } from '../_global';\nimport { openModal, closeModal, closeButtonHtml } from '../../modules/modal';\ntrackComponentRegistered('iam-card');\nclass iamModal extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n const assetLocation = document.body.hasAttribute('data-assets-location')\n ? document.body.getAttribute('data-assets-location')\n : '/assets';\n const loadCSS = `@import \"${assetLocation}/css/components/modal.component.css\";`;\n const template = document.createElement('template');\n template.innerHTML = `\n <style>\n ${this.hasAttribute('css') ? `@import \"${this.getAttribute('css')}\";` : ``}\n \n ${loadCSS}\n </style>\n <link rel=\"stylesheet\" href=\"https://kit.fontawesome.com/8bd0fca975.css\" crossorigin=\"anonymous\" />\n <dialog>\n ${closeButtonHtml}\n <div class=\"scroll\">\n <slot></slot>\n <div class=\"btn__group\">\n <button class=\"btn btn-secondary\" data-cancel>${this.hasAttribute('data-cancel-text') ? this.getAttribute('data-cancel-text') : 'Cancel'}</button>\n <slot name=\"agreed-button\">\n <button class=\"btn btn-primary\" data-agreed>${this.hasAttribute('data-agreed-text') ? this.getAttribute('data-agreed-text') : 'Submit'}</button>\n </slot>\n </div>\n </div>\n </dialog>\n `;\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n }\n connectedCallback() {\n var _a, _b, _c, _d, _e, _f;\n const originalDialog = this.querySelector('dialog');\n const id = this.hasAttribute('id') ? this.getAttribute('id') : originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.getAttribute('id');\n let dialog = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('dialog');\n const closeButton = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('[data-close]');\n const cancelButton = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('[data-cancel]');\n const agreedButton = this.querySelector('button[slot=\"agreed-button\"]') ? this.querySelector('button[slot=\"agreed-button\"]') : (_d = this.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('[data-agreed]');\n const modalType = this.hasAttribute('data-type') ? this.getAttribute('data-type') : 'passive';\n const agreed = () => {\n const agreedEvent = new CustomEvent('agreed', {\n detail: { modalId: id },\n });\n this.dispatchEvent(agreedEvent);\n if (!this.querySelector(':invalid'))\n closeModal(this);\n };\n document.addEventListener('click', (e) => {\n if (e.target.matches(`[command=\"show-modal\"][commandfor=\"${id}\"]`) || e.target.matches(`[data-modal=\"${id}\"]`)) {\n openModal(this);\n }\n });\n document.addEventListener('click', (e) => {\n if (e.target.matches(`[command=\"close\"][commandfor=\"${id}\"]`)) {\n closeModal(this);\n }\n });\n // Disable the original event \n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('command', (e) => {\n if (event.command == \"show-modal\") {\n e.preventDefault();\n }\n });\n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('command', (e) => {\n e.preventDefault();\n if (event.command == \"close\") {\n closeModal(id, this);\n }\n });\n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('close', (e) => {\n e.preventDefault();\n closeModal(this);\n });\n // Move the submit button so that the slot functionality works\n if (originalDialog) {\n Array.from(originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.querySelectorAll('[slot]')).forEach((element) => {\n this.moveBefore(element, originalDialog);\n });\n }\n closeButton === null || closeButton === void 0 ? void 0 : closeButton.addEventListener('click', () => {\n closeModal(this);\n });\n cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton.addEventListener('click', () => {\n closeModal(this);\n });\n agreedButton === null || agreedButton === void 0 ? void 0 : agreedButton.addEventListener('click', () => {\n agreed();\n });\n this.addEventListener('close-modal', () => {\n closeModal(this);\n });\n // Hijack the default form submission \n originalDialog === null || originalDialog === void 0 ? void 0 : originalDialog.addEventListener('submit', (e) => {\n if (e.submitter && e.submitter.hasAttribute('formmethod') && e.submitter.getAttribute('formmethod') == \"dialog\") {\n closeModal(this);\n }\n else {\n agreed();\n }\n });\n Array.from(this.querySelectorAll('button[type=\"submit\"]')).forEach((button) => {\n button.addEventListener('click', (e) => {\n if (!button.closest('form') && !button.hasAttribute('formmethod')) {\n agreed();\n }\n });\n });\n // Add click event on backdrop\n this.addEventListener('click', (event) => {\n // Small fix to make sure the dialog isn't a dialog inside of a dialog.\n const style = window.getComputedStyle(dialog);\n if (style.display === 'contents')\n dialog = dialog.parentNode.closest('dialog[open]');\n // Dont allow the backdrop to be clicked when transactional\n if (modalType != 'transactional' && modalType != 'acknowledgement') {\n const dialogDimensions = dialog.getBoundingClientRect();\n if (event.clientX < dialogDimensions.left ||\n event.clientX > dialogDimensions.right ||\n event.clientY < dialogDimensions.top ||\n event.clientY > dialogDimensions.bottom) {\n if (!event.target.closest('dialog *'))\n closeModal(this); // Weird bug when interacting with radio input fields within dialogs cuases it to close\n }\n }\n });\n if (modalType == 'transactional' || modalType == 'acknowledgement') {\n (_f = (_e = this.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector('.scroll')) === null || _f === void 0 ? void 0 : _f.insertAdjacentHTML('afterbegin', `<i class=\"fa-light fa-circle\" aria-hidden=\"true\">\n <i class=\"fa-regular fa-${this.hasAttribute('data-icon') ? this.getAttribute('data-icon') : 'info'}\" aria-hidden=\"true\"></i>\n </i>`);\n }\n }\n}\nexport default iamModal;\n"],"names":["trackComponentRegistered","componentName","openModal","modal","_a","dialog","id","closeEvent","closeModal","closeButtonHtml","iamModal","template","_b","_c","_d","_e","_f","originalDialog","closeButton","cancelButton","agreedButton","modalType","agreed","agreedEvent","e","element","button","event","dialogDimensions"],"mappings":";;;IAAO,MAAMA,EAA4BC,GAAkB,CAEvD,OAAO,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAClB,MAAO,0BACP,QAASA,CACjB,CAAK,CACL,ECPaC,EAAaC,GAAU,CAChC,IAAIC,EACJ,MAAMC,GAAUD,EAAKD,EAAM,cAAgB,MAAQC,IAAO,OAAS,OAASA,EAAG,cAAc,QAAQ,EAC/FE,EAAKH,EAAM,aAAa,IAAI,EAAIA,EAAM,aAAa,IAAI,EAAI,UACjBE,GAAO,UAAS,EAChBA,GAAO,MAAK,EAC5D,MAAME,EAAa,IAAI,YAAY,eAAgB,CAC/C,QAAS,GACT,WAAY,GACZ,OAAQ,CAAE,QAASD,CAAE,CAC7B,CAAK,EACDH,EAAM,cAAcI,CAAU,EAC9B,OAAO,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAClB,MAAO,YACP,GAAID,CACZ,CAAK,CACL,EACaE,EAAcL,GAAU,CACjC,IAAIC,EACJ,MAAMC,GAAUD,EAAKD,EAAM,cAAgB,MAAQC,IAAO,OAAS,OAASA,EAAG,cAAc,QAAQ,EAC/FE,EAAKH,EAAM,aAAa,IAAI,EAAIA,EAAM,aAAa,IAAI,EAAI,UACjBE,GAAO,MAAK,EAC5D,MAAME,EAAa,IAAI,YAAY,eAAgB,CAC/C,QAAS,GACT,WAAY,GACZ,OAAQ,CAAE,QAASD,CAAE,CAC7B,CAAK,EACDH,EAAM,cAAcI,CAAU,EAC9B,OAAO,UAAY,O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,IAAI,CACnB,CAAC,EAE+DS,GAAe,iBAAiB,SAAWO,GAAM,CACzGA,EAAE,WAAaA,EAAE,UAAU,aAAa,YAAY,GAAKA,EAAE,UAAU,aAAa,YAAY,GAAK,SACnGhB,EAAW,IAAI,EAGfc,EAAM,CAEd,CAAC,EACD,MAAM,KAAK,KAAK,iBAAiB,uBAAuB,CAAC,EAAE,QAASI,GAAW,CAC3EA,EAAO,iBAAiB,QAAUF,GAAM,CAChC,CAACE,EAAO,QAAQ,MAAM,GAAK,CAACA,EAAO,aAAa,YAAY,GAC5DJ,EAAM,CAEd,CAAC,CACL,CAAC,EAED,KAAK,iBAAiB,QAAUK,GAAU,CAMtC,GAJc,OAAO,iBAAiBtB,CAAM,EAClC,UAAY,aAClBA,EAASA,EAAO,WAAW,QAAQ,cAAc,GAEjDgB,GAAa,iBAAmBA,GAAa,kBAAmB,CAChE,MAAMO,EAAmBvB,EAAO,sBAAqB,GACjDsB,EAAM,QAAUC,EAAiB,MACjCD,EAAM,QAAUC,EAAiB,OACjCD,EAAM,QAAUC,EAAiB,KACjCD,EAAM,QAAUC,EAAiB,UAC5BD,EAAM,OAAO,QAAQ,UAAU,GAChCnB,EAAW,IAAI,EAE3B,CACJ,CAAC,GACGa,GAAa,iBAAmBA,GAAa,sBAC5CL,GAAMD,EAAK,KAAK,cAAgB,MAAQA,IAAO,OAAS,OAASA,EAAG,cAAc,SAAS,KAAO,MAAQC,IAAO,QAAkBA,EAAG,mBAAmB,aAAc;AAAA,oCAChJ,KAAK,aAAa,WAAW,EAAI,KAAK,aAAa,WAAW,EAAI,MAAM;AAAA,aAC/F,EAET,CACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const g=c=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:c})},y=(c,e,u)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:e}),u.forEach(l=>{c.addEventListener(l,function(i){const n={event:l,element:e,target:i.target};Object.keys(i.detail).forEach(d=>{const t=i.detail[d];n[d]=t}),window.dataLayer.push(n)})}),!0);g("iam-multi-step");class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const z=b=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:b})},E=(b,n,c)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:n}),c.forEach(d=>{b.addEventListener(d,function(e){const i={event:d,element:n,target:e.target};Object.keys(e.detail).forEach(r=>{const p=e.detail[r];i[r]=p}),window.dataLayer.push(i)})}),!0);z("iam-multi-step-modal");class _ extends HTMLElement{constructor(){super(),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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function g(n){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var d in o)n[d]=o[d]}return n}var y={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function f(n,e){function o(a,s,i){if(!(typeof document>"u")){i=g({},e,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var m="";for(var r in i)i[r]&&(m+="; "+r,i[r]!==!0&&(m+="="+i[r].split(";")[0]));return document.cookie=a+"="+n.write(s,a)+m}}function d(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var s=document.cookie?document.cookie.split("; "):[],i={},m=0;m<s.length;m++){var r=s[m].split("="),h=r.slice(1).join("=");try{var c=decodeURIComponent(r[0]);if(i[c]=n.read(h,c),a===c)break}catch{}}return a?i[a]:i}}return Object.create({set:o,get:d,remove:function(a,s){o(a,"",g({},s,{expires:-1}))},withAttributes:function(a){return f(this.converter,g({},this.attributes,a))},withConverter:function(a){return f(g({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(n)}})}var k=f(y,{path:"/"}),w=function(n,e,o,d){function a(s){return s instanceof o?s:new o(function(i){i(s)})}return new(o||(o=Promise))(function(s,i){function m(c){try{h(d.next(c))}catch(t){i(t)}}function r(c){try{h(d.throw(c))}catch(t){i(t)}}function h(c){c.done?s(c.value):a(c.value).then(m,r)}h((d=d.apply(n,e||[])).next())})};const v=(n,e)=>{Array.from(n.querySelectorAll('label:not([slot="checked"])')).forEach(o=>{const a=o.querySelector("input").value,s=o.textContent;a.toLowerCase().includes(e.value.toLowerCase())||s.toLowerCase().includes(e.value.toLowerCase())?o.removeAttribute("slot"):o.setAttribute("slot","notmatched")})},x=(n,e,o)=>w(void 0,void 0,void 0,function*(){const d=e.value,a=n.getAttribute("data-url"),s=n.querySelector("input");console.log(s);const i=s&&s.hasAttribute("type")?s.getAttribute("type"):"checkbox";let m=s&&s.hasAttribute("name")?s.getAttribute("name"):"tags";n.hasAttribute("data-name")&&(m=n.hasAttribute("data-name"));const r=`${a}?search_query=${encodeURI(d)}`;window.controller||(window.controller=[]),window.controller[r]&&window.controller[r].abort(),window.controller[r]=new AbortController;const{signal:h}=controller[r];try{yield fetch(r,{signal:h,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":k.get("XSRF-TOKEN")})}).then(c=>c.json()).then(c=>{let t="";for(let l=0;l<c.data.length;l++)n.querySelector(`[value="${c.data[l].value}"]`)||(t+=`<label class="tag dropdown__option"><input type="${i}" name="${n.hasAttribute("data-name")?n.getAttribute("data-name"):m}" value="${c.data[l].value}"/>${c.data[l].title}</label>`);return n.insertAdjacentHTML("beforeend",`${t}`),o(n,e),c})}catch(c){console.log(c)}}),A=(n,e)=>{e.addEventListener("keydown",o=>{var d;switch(o.keyCode){case 40:o.stopPropagation(),o.preventDefault(),(d=n.querySelector('label:not([slot="checked"]) input'))===null||d===void 0||d.focus();break}}),n.addEventListener("keydown",o=>{var d,a,s;const i=n.querySelectorAll(':scope > a, :scope > button, :scope > details > summary, :scope > label:not([slot="checked"]) > input'),m=n.querySelectorAll('a, button, input, label:not([slot="checked"]) > input');if(o&&o.target instanceof HTMLElement&&o.target.closest('a, button, summary, label:not([slot="checked"]) > input')){const r=document.activeElement,h=Array.from(i).indexOf(r)-1,c=Array.from(i).indexOf(r)+1;switch(o.keyCode){case 27:r.closest("details")?(o.stopPropagation(),o.preventDefault(),r.closest("details").removeAttribute("open"),r.closest("details").querySelector(":scope summary").focus()):o.stopPropagation();break;case 32:case 13:break;case 35:o.stopPropagation(),o.preventDefault(),(d=n.querySelector("details[open]"))===null||d===void 0||d.removeAttribute("open"),Array.from(m)[m.length-1].focus();break;case 36:o.stopPropagation(),o.preventDefault(),(a=n.querySelector("details[open]"))===null||a===void 0||a.removeAttribute("open"),Array.from(m)[0].focus();break;case 38:if(o.stopPropagation(),o.preventDefault(),Array.from(i).indexOf(r)>-1)Array.from(i)[h]!=null?Array.from(i)[h].focus():Array.from(i)[i.length-1].focus();else if(r.closest("details")){const t=r.closest("details").querySelectorAll("a, button, :scope details > summary");subPrevIndex=Array.from(t).indexOf(r)-1,Array.from(t)[subPrevIndex]!=null?Array.from(t)[subPrevIndex].focus():Array.from(t)[t.length-1].focus()}break;case 40:if(o.stopPropagation(),o.preventDefault(),Array.from(i).indexOf(r)>-1)Array.from(i)[c]!=null?Array.from(i)[c].focus():Array.from(i)[0].focus();else if(r.closest("details")){const t=(s=r.closest("details"))===null||s===void 0?void 0:s.querySelectorAll("a, button, :scope details > summary");subNextIndex=Array.from(t).indexOf(r)+1,Array.from(t)[subNextIndex]!=null?Array.from(t)[subNextIndex].focus():Array.from(t)[0].focus()}break}}})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"mutliselect"});class z extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class g extends HTMLElement{constructor(){super();const d=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 class="styles">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/function l(e){if(e.hasAttribute("data-type")&&e.getAttribute("data-type")=="toast"){let i=document.querySelector(".notification__holder");i||(i=document.createElement("div"),i.classList.add("notification__holder"),i.classList.add("container"),document.querySelector("body").appendChild(i)),e.closest(".notification__holder")||i.appendChild(e)}if(e.setAttribute("role","alert"),e.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&(event.target.closest("[data-dismiss-button]")||event.target.matches("[data-dismiss-button]"))&&(i.preventDefault(),c(e))},!1),e.hasAttribute("data-timeout")){const i=e.getAttribute("data-timeout"),t=new m(function(){c(e)},i);e.addEventListener("mouseenter",()=>{t.pause()}),e.addEventListener("mouseleave",()=>{t.resume()})}}function m(e,i){let t,o,n=i;this.pause=function(){window.clearTimeout(t),n-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(t),t=window.setTimeout(e,n)},this.resume()}const c=function(e){e.classList.add("d-none")},f=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:e})},b=(e,i,t)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:i}),t.forEach(o=>{e.addEventListener(o,function(n){const a={event:o,element:i,target:n.target};Object.keys(n.detail).forEach(r=>{const s=n.detail[r];a[r]=s}),window.dataLayer.push(a)})}),!0);f("iam-notification");class h extends HTMLElement{constructor(){super(),this.addColour=(t,o)=>{t.hasAttribute("data-type")?t.classList.add(`bg-${o}`):t.classList.add(`colour-${o}`)},this.addIcon=(t,o)=>{switch(o){case"danger":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>');break;case"warning":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>');break;case"success":t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>');break;default:t.insertAdjacentHTML("beforeend",'<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>')}},this.addDismissBtn=t=>{var o;(o=t.shadowRoot.querySelector(".notification__dismiss"))===null||o===void 0||(o.innerHTML='<button data-dismiss-button part="dismiss-btn" class="btn btn-secondary btn-compact fa-xmark">Dismiss</button>'),t.shadowRoot.querySelector(".notification__dismiss [data-dismiss-button]").addEventListener("click",function(){c(t);const n=new CustomEvent("dismiss",{detail:{class:t.classList}});t.dispatchEvent(n)},!1)},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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class v 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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const u=c=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:c})};function m(c){var r=new TextEncoder("utf-8").encode(c);return crypto.subtle.digest("SHA-1",r).then(function(e){for(var i=[],n=new DataView(e),o=0;o<n.byteLength;o+=4){var s=n.getUint32(o),a=s.toString(16),t="00000000",p=(t+a).slice(-t.length);i.push(p)}return i.join("")})}const b=(c,r)=>{m(c).then(function(e){const i=new XMLHttpRequest;i.addEventListener("load",function(){const n=this.responseText.split(`
|
|
5
5
|
`),o=e.slice(5).toUpperCase();var s=!1;for(let t in n)if(n[t].substring(0,35)==o){s=!0;break}const a=new CustomEvent("hibpCheck",{detail:s});r.dispatchEvent(a)}),i.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),i.send()})};u("iam-password");class x extends HTMLElement{constructor(){var r;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const a=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})};a("iam-popover");class s extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const i=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})};i("iam-rank");class a extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const C=`@import "${document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets"}/css/components/rank.component.css";`,l=document.createElement("template");l.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const m=a=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:a})};m("iam-rank");class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=`@import "${document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets"}/css/components/rank.component.css";`,o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const p=n=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:n})};p("iam-rating");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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/const h=o=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:o})},p=(o,a,r)=>(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementAdded",element:a}),r.forEach(t=>{o.addEventListener(t,function(e){const d={event:t,element:a,target:e.target};Object.keys(e.detail).forEach(i=>{const c=e.detail[i];d[i]=c}),window.dataLayer.push(d)})}),!0),g=`<div class="card__head" part="head">
|
|
5
5
|
<slot name="head"></slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function w(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var u in a)t[u]=a[u]}return t}var R={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function E(t,e){function a(i,d,n){if(!(typeof document>"u")){n=w({},e,n),typeof n.expires=="number"&&(n.expires=new Date(Date.now()+n.expires*864e5)),n.expires&&(n.expires=n.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var r in n)n[r]&&(f+="; "+r,n[r]!==!0&&(f+="="+n[r].split(";")[0]));return document.cookie=i+"="+t.write(d,i)+f}}function u(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var d=document.cookie?document.cookie.split("; "):[],n={},f=0;f<d.length;f++){var r=d[f].split("="),o=r.slice(1).join("=");try{var c=decodeURIComponent(r[0]);if(n[c]=t.read(o,c),i===c)break}catch{}}return i?n[i]:n}}return Object.create({set:a,get:u,remove:function(i,d){a(i,"",w({},d,{expires:-1}))},withAttributes:function(i){return E(this.converter,w({},this.attributes,i))},withConverter:function(i){return E(w({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var M=E(R,{path:"/"});const S=t=>t.replace(/ /g,"_"),j=function(t){return t=t.toLowerCase(),t=S(t),t=t.replace(/\W/g,""),t},g=(t,e,a)=>e.split(/[\.\[\]\'\"]/).filter(u=>u).reduce((u,i)=>u?u[i]:a,t),k=t=>Array.isArray(t)||t!==null&&["function","object"].includes(typeof t);function U(t,e,a,u=!1){let i=-1;a.closest(".datalist__wrapper")&&a.closest(".datalist__wrapper"),e.setAttribute("data-list",e.getAttribute("list")),e.setAttribute("list",""),e.hasAttribute("placeholder")&&e.setAttribute("data-placeholder",e.getAttribute("placeholder")),e.hasAttribute("placeholder")&&e.setAttribute("data-original-placeholder",e.getAttribute("placeholder")),e.addEventListener("focus",function(){e.value!=""&&(e.setAttribute("placeholder",e.value),e.setAttribute("data-value",e.value)),e.value=""}),e.addEventListener("blur",function(){e.hasAttribute("data-value")&&(e.value=e.getAttribute("data-value")),e.hasAttribute("data-placeholder")&&e.setAttribute("placeholder",e.getAttribute("data-placeholder"))});for(const o of a.options)o.innerHTML==""&&(o.innerHTML=o.value);a.addEventListener("click",function(o){var c;if(o&&o.target instanceof HTMLElement&&o.target.closest("option")){const s=o.target.closest("option"),l=((c=s.textContent)===null||c===void 0?void 0:c.trim())||s.value,p=t.querySelector('input[type="hidden"]');p&&(p.value=s.value,p.setAttribute("value",s.value)),e.value=l,e.setAttribute("data-value",l),e.setAttribute("placeholder",l),typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(e);for(const h of a.options)h.classList.remove("active");s.classList.add("active"),setTimeout(()=>{t.dispatchEvent(new CustomEvent("update-value",{detail:{value:s.value,text:l}}))},0)}}),e.addEventListener("input",function(){if(e.removeAttribute("data-value"),i=-1,t.tagName!="IAM-ADDRESS-LOOKUP"){const o=e.value.toUpperCase();for(const c of a.options)(c.textContent||c.value).toUpperCase().indexOf(o)>-1?(c.style.display="block",c.classList.remove("hide")):(c.style.display="none",c.classList.add("hide"))}}),t.addEventListener("keydown",function(o){o.keyCode==40?(i++,d(a.options)):o.keyCode==38?(i--,d(a.options)):o.keyCode==13&&(o.preventDefault(),i>-1&&a.options&&a.options[i].click())});function d(o){if(!o)return!1;n(o),i>=o.length&&(i=0),i<0&&(i=o.length-1),o[i].classList.add("active")}function n(o){if(!o)return!1;for(let c=0;c<o.length;c++)o[c].classList.remove("active")}e.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const f=()=>{const o=t.querySelector('input[type="hidden"]');o&&(o.value="",o.setAttribute("value","")),e.removeAttribute("placeholder"),e.hasAttribute("data-original-placeholder")&&e.setAttribute("placeholder",e.getAttribute("data-original-placeholder")),e.removeAttribute("data-value"),e.value="";for(const s of a.options)s.classList.remove("active"),s.classList.remove("hide"),s.removeAttribute("style");const c=new CustomEvent("close-button-pressed");t.dispatchEvent(c),t.dispatchEvent(new CustomEvent("update-value",{detail:{value:"",text:""}}))};(t.querySelector(".empty")?t.querySelector(".empty"):t.shadowRoot.querySelector(".empty")).addEventListener("click",function(o){f()}),t.addEventListener("empty",function(o){f()})}var T=function(t,e,a,u){function i(d){return d instanceof a?d:new a(function(n){n(d)})}return new(a||(a=Promise))(function(d,n){function f(c){try{o(u.next(c))}catch(s){n(s)}}function r(c){try{o(u.throw(c))}catch(s){n(s)}}function o(c){c.done?d(c.value):i(c.value).then(f,r)}o((u=u.apply(t,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class $ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const e=document.createElement("template");e.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Slider"});class f 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--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*/class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.7.1--
|
|
2
|
+
* iamKey v7.7.1--beta11
|
|
3
3
|
* Copyright 2022-2026 iamproperty
|
|
4
4
|
*//*! js-cookie v3.0.5 | MIT */function H(l){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var b in r)l[b]=r[b]}return l}var lt={read:function(l){return l[0]==='"'&&(l=l.slice(1,-1)),l.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(l){return encodeURIComponent(l).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function J(l,a){function r(e,m,d){if(!(typeof document>"u")){d=H({},a,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var v="";for(var t in d)d[t]&&(v+="; "+t,d[t]!==!0&&(v+="="+d[t].split(";")[0]));return document.cookie=e+"="+l.write(m,e)+v}}function b(e){if(!(typeof document>"u"||arguments.length&&!e)){for(var m=document.cookie?document.cookie.split("; "):[],d={},v=0;v<m.length;v++){var t=m[v].split("="),o=t.slice(1).join("=");try{var i=decodeURIComponent(t[0]);if(d[i]=l.read(o,i),e===i)break}catch{}}return e?d[e]:d}}return Object.create({set:r,get:b,remove:function(e,m){r(e,"",H({},m,{expires:-1}))},withAttributes:function(e){return J(this.converter,H({},this.attributes,e))},withConverter:function(e){return J(H({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(l)}})}var dt=J(lt,{path:"/"});function ct(l,a,r,b=!1){let e=-1;r.closest(".datalist__wrapper")&&r.closest(".datalist__wrapper"),a.setAttribute("data-list",a.getAttribute("list")),a.setAttribute("list",""),a.hasAttribute("placeholder")&&a.setAttribute("data-placeholder",a.getAttribute("placeholder")),a.hasAttribute("placeholder")&&a.setAttribute("data-original-placeholder",a.getAttribute("placeholder")),a.addEventListener("focus",function(){a.value!=""&&(a.setAttribute("placeholder",a.value),a.setAttribute("data-value",a.value)),a.value=""}),a.addEventListener("blur",function(){a.hasAttribute("data-value")&&(a.value=a.getAttribute("data-value")),a.hasAttribute("data-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-placeholder"))});for(const o of r.options)o.innerHTML==""&&(o.innerHTML=o.value);r.addEventListener("click",function(o){var i;if(o&&o.target instanceof HTMLElement&&o.target.closest("option")){const n=o.target.closest("option"),x=((i=n.textContent)===null||i===void 0?void 0:i.trim())||n.value,A=l.querySelector('input[type="hidden"]');A&&(A.value=n.value,A.setAttribute("value",n.value)),a.value=x,a.setAttribute("data-value",x),a.setAttribute("placeholder",x),typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(a);for(const P of r.options)P.classList.remove("active");n.classList.add("active"),setTimeout(()=>{l.dispatchEvent(new CustomEvent("update-value",{detail:{value:n.value,text:x}}))},0)}}),a.addEventListener("input",function(){if(a.removeAttribute("data-value"),e=-1,l.tagName!="IAM-ADDRESS-LOOKUP"){const o=a.value.toUpperCase();for(const i of r.options)(i.textContent||i.value).toUpperCase().indexOf(o)>-1?(i.style.display="block",i.classList.remove("hide")):(i.style.display="none",i.classList.add("hide"))}}),l.addEventListener("keydown",function(o){o.keyCode==40?(e++,m(r.options)):o.keyCode==38?(e--,m(r.options)):o.keyCode==13&&(o.preventDefault(),e>-1&&r.options&&r.options[e].click())});function m(o){if(!o)return!1;d(o),e>=o.length&&(e=0),e<0&&(e=o.length-1),o[e].classList.add("active")}function d(o){if(!o)return!1;for(let i=0;i<o.length;i++)o[i].classList.remove("active")}a.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const v=()=>{const o=l.querySelector('input[type="hidden"]');o&&(o.value="",o.setAttribute("value","")),a.removeAttribute("placeholder"),a.hasAttribute("data-original-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-original-placeholder")),a.removeAttribute("data-value"),a.value="";for(const n of r.options)n.classList.remove("active"),n.classList.remove("hide"),n.removeAttribute("style");const i=new CustomEvent("close-button-pressed");l.dispatchEvent(i),l.dispatchEvent(new CustomEvent("update-value",{detail:{value:"",text:""}}))};(l.querySelector(".empty")?l.querySelector(".empty"):l.shadowRoot.querySelector(".empty")).addEventListener("click",function(o){v()}),l.addEventListener("empty",function(o){v()})}const ut=l=>/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi.test(l.trim());var tt=function(l,a,r,b){function e(m){return m instanceof r?m:new r(function(d){d(m)})}return new(r||(r=Promise))(function(m,d){function v(i){try{o(b.next(i))}catch(n){d(n)}}function t(i){try{o(b.throw(i))}catch(n){d(n)}}function o(i){i.done?m(i.value):e(i.value).then(v,t)}o((b=b.apply(l,a||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class mt extends HTMLElement{constructor(){var a;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const r=document.createElement("template");r.innerHTML=`
|
|
5
5
|
<style>
|