@iamproperty/components 3.7.8 → 3.7.9-beta-2
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/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/card/card.component.js +2 -1
- package/assets/js/components/card/card.component.min.js +2 -2
- package/assets/js/components/card/card.component.min.js.map +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/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js +10 -10
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/dynamic.min.js +1 -1
- package/assets/js/modules/table.js +49 -31
- package/assets/js/scripts.bundle.js +13 -13
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/ts/components/accordion/README.md +15 -0
- package/assets/ts/components/applied-filters/README.md +15 -0
- package/assets/ts/components/card/README.md +15 -0
- package/assets/ts/components/card/card.component.ts +2 -2
- package/assets/ts/components/fileupload/README.md +15 -0
- package/assets/ts/components/filterlist/README.md +15 -0
- package/assets/ts/components/header/README.md +16 -3
- package/assets/ts/components/notification/README.md +15 -0
- package/assets/ts/components/pagination/README.md +15 -0
- package/assets/ts/components/table/README.md +15 -0
- package/assets/ts/components/tabs/README.md +15 -0
- package/assets/ts/modules/table.ts +67 -44
- package/dist/components.es.js +1035 -1097
- package/dist/components.umd.js +43 -43
- package/package.json +1 -1
- package/src/components/Card/Card.vue +8 -4
package/dist/components.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { openBlock as u, createElementBlock as m, normalizeClass as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
import { openBlock as u, createElementBlock as m, normalizeClass as L, createElementVNode as d, toDisplayString as $, createCommentVNode as g, Fragment as T, renderList as M, renderSlot as v, withDirectives as N, mergeProps as H, vModelDynamic as W, vModelText as ue, vModelSelect as me, createTextVNode as he, resolveComponent as R, createVNode as q, withModifiers as fe } from "vue";
|
|
2
|
+
const S = (t, a) => {
|
|
3
|
+
const e = t.__vccOpts || t;
|
|
4
4
|
for (const [r, i] of a)
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
5
|
+
e[r] = i;
|
|
6
|
+
return e;
|
|
7
|
+
}, be = {
|
|
8
8
|
name: "Logo",
|
|
9
9
|
props: {
|
|
10
10
|
id: {
|
|
@@ -29,412 +29,421 @@ const A = (e, a) => {
|
|
|
29
29
|
return "brand brand--" + this.id;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
},
|
|
33
|
-
function
|
|
32
|
+
}, pe = ["xlink:href"], ye = ["innerHTML"];
|
|
33
|
+
function ge(t, a, e, r, i, o) {
|
|
34
34
|
return u(), m("div", {
|
|
35
|
-
class:
|
|
35
|
+
class: L(o.className)
|
|
36
36
|
}, [
|
|
37
37
|
(u(), m("svg", null, [
|
|
38
|
-
d("title", null, "iam " +
|
|
38
|
+
d("title", null, "iam " + $(e.id), 1),
|
|
39
39
|
d("use", {
|
|
40
|
-
"xlink:href":
|
|
41
|
-
}, null, 8,
|
|
40
|
+
"xlink:href": e.path + o.src
|
|
41
|
+
}, null, 8, pe)
|
|
42
42
|
])),
|
|
43
|
-
|
|
43
|
+
e.desc ? (u(), m("span", {
|
|
44
44
|
key: 0,
|
|
45
|
-
innerHTML:
|
|
46
|
-
}, null, 8,
|
|
45
|
+
innerHTML: e.desc
|
|
46
|
+
}, null, 8, ye)) : g("", !0)
|
|
47
47
|
], 2);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const _e = /* @__PURE__ */ S(be, [["render", ge]]);
|
|
50
50
|
/*!
|
|
51
|
-
* iamKey v3.7.
|
|
51
|
+
* iamKey v3.7.9-beta-2
|
|
52
52
|
* Copyright 2022-2023 iamproperty
|
|
53
53
|
*/
|
|
54
|
-
const
|
|
55
|
-
return typeof
|
|
56
|
-
},
|
|
57
|
-
if (!
|
|
54
|
+
const ve = function(t) {
|
|
55
|
+
return typeof t != "string" ? !1 : !isNaN(t) && !isNaN(parseFloat(t));
|
|
56
|
+
}, we = (t, a) => String(t).padStart(a, "0"), Ae = (t) => t.charAt(0).toUpperCase() + t.slice(1), F = function(t, a) {
|
|
57
|
+
if (!t.getAttribute("data-pages"))
|
|
58
58
|
return !1;
|
|
59
|
-
|
|
60
|
-
let
|
|
59
|
+
t.getAttribute("data-page") || t.setAttribute("data-page", 1);
|
|
60
|
+
let e = t.getAttribute("data-page"), r = t.getAttribute("data-pages"), i = t.getAttribute("data-total"), o = t.getAttribute("data-show"), s = t.getAttribute("data-increment");
|
|
61
61
|
if (r <= 1)
|
|
62
62
|
return a.innerHTML = "", !1;
|
|
63
63
|
let l = "";
|
|
64
|
-
for (let
|
|
65
|
-
|
|
64
|
+
for (let c = 1; c <= r; c++)
|
|
65
|
+
c == e ? l += `<li class="page-item active" aria-current="page"><span class="page-link">${c}</span></li>` : l += `<li class="page-item"><a href="?page=${c}" class="page-link" data-page="${c}">${c}</a></li>`;
|
|
66
66
|
return a.innerHTML = `<ul class="pagination mb-0 d-none d-sm-flex">
|
|
67
|
-
${
|
|
67
|
+
${e == 1 ? '<li class="page-item disabled"><span class="page-link">Previous</span></li>' : `<li class="page-item"><a href="?page=${parseInt(e) - 1}" class="page-link" data-page="${parseInt(e) - 1}">Previous</a></li>`}
|
|
68
68
|
${l}
|
|
69
|
-
${
|
|
69
|
+
${e == r ? '<li class="page-item disabled"><span class="page-link">Next</span></li>' : `<li class="page-item"><a href="?page=${parseInt(e) + 1}" class="page-link" data-page="${parseInt(e) + 1}">Next</a></li>`}
|
|
70
70
|
</ul>`, a.innerHTML += `<div class="d-sm-none text-center">
|
|
71
|
-
<span class="d-block pb-2">You've viewed ${
|
|
72
|
-
<a href="?show=${parseInt(
|
|
71
|
+
<span class="d-block pb-2">You've viewed ${o} of ${i} results</span>
|
|
72
|
+
<a href="?show=${parseInt(o) + parseInt(s)}" class="btn btn-primary w-100 m-0" data-show="${parseInt(o) + parseInt(s)}">Load more results</a>
|
|
73
73
|
</div>`, !0;
|
|
74
74
|
};
|
|
75
|
-
var
|
|
76
|
-
function i(
|
|
77
|
-
return
|
|
78
|
-
o
|
|
75
|
+
var Se = function(t, a, e, r) {
|
|
76
|
+
function i(o) {
|
|
77
|
+
return o instanceof e ? o : new e(function(s) {
|
|
78
|
+
s(o);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
return new (
|
|
82
|
-
function l(
|
|
81
|
+
return new (e || (e = Promise))(function(o, s) {
|
|
82
|
+
function l(f) {
|
|
83
83
|
try {
|
|
84
|
-
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
84
|
+
n(r.next(f));
|
|
85
|
+
} catch (p) {
|
|
86
|
+
s(p);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function c(f) {
|
|
90
90
|
try {
|
|
91
|
-
|
|
92
|
-
} catch (
|
|
93
|
-
|
|
91
|
+
n(r.throw(f));
|
|
92
|
+
} catch (p) {
|
|
93
|
+
s(p);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
96
|
+
function n(f) {
|
|
97
|
+
f.done ? o(f.value) : i(f.value).then(l, c);
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
n((r = r.apply(t, a || [])).next());
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
|
-
const
|
|
103
|
-
const a = Array.from(
|
|
104
|
-
Array.from(
|
|
105
|
-
const i = Array.from(
|
|
106
|
-
i.forEach((
|
|
107
|
-
const
|
|
108
|
-
if (typeof
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
let
|
|
112
|
-
|
|
102
|
+
const ee = (t) => {
|
|
103
|
+
const a = Array.from(t.querySelectorAll("thead th"));
|
|
104
|
+
Array.from(t.querySelectorAll("tbody tr")).forEach((e, r) => {
|
|
105
|
+
const i = Array.from(e.querySelectorAll("th, td")), o = ["0", "low", "medium", "high", "unknown", "n/a", "pending", "verified", "due", "overdue", "incomplete", "complete", "completed", "approval required", "upcoming", "requires approval", "to do", "on track", "not started", "warning", "error"];
|
|
106
|
+
i.forEach((s, l) => {
|
|
107
|
+
const c = a[l];
|
|
108
|
+
if (typeof c < "u") {
|
|
109
|
+
let n = document.createElement("div");
|
|
110
|
+
n.innerHTML = c.innerHTML;
|
|
111
|
+
let f = n.textContent || n.innerText || "";
|
|
112
|
+
s.setAttribute("data-label", f), c.hasAttribute("data-td-class") && s.setAttribute("class", c.getAttribute("data-td-class")), c.hasAttribute("data-format") && (s.setAttribute("data-format", c.getAttribute("data-format")), s.innerHTML = K(c.getAttribute("data-format"), s.textContent.trim())), o.includes(s.textContent.trim().toLowerCase()) && s.setAttribute("data-content", s.textContent.trim().toLowerCase());
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
|
-
},
|
|
116
|
+
}, Le = (t) => {
|
|
117
117
|
let a = 0;
|
|
118
|
-
return Array.from(
|
|
119
|
-
let i = window.getComputedStyle(document.querySelector("html")),
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
|
|
118
|
+
return Array.from(t.querySelectorAll("tbody tr")).forEach((e, r) => {
|
|
119
|
+
let i = window.getComputedStyle(document.querySelector("html")), o = e.querySelector(":scope > *:last-child > *:first-child");
|
|
120
|
+
if (o) {
|
|
121
|
+
o.classList.add("text-nowrap");
|
|
122
|
+
let s = o.offsetWidth / parseFloat(i.fontSize);
|
|
123
|
+
s += 1.7, a = a > s ? a : s;
|
|
124
124
|
}
|
|
125
125
|
}), a;
|
|
126
|
-
},
|
|
127
|
-
if (
|
|
126
|
+
}, ke = (t) => {
|
|
127
|
+
if (t.closest(".table--fullwidth") || t.querySelectorAll("thead tr th").length < 4)
|
|
128
128
|
return !1;
|
|
129
|
-
Array.from(
|
|
129
|
+
Array.from(t.querySelectorAll("tbody tr")).forEach((a, e) => {
|
|
130
130
|
let r = a.querySelector(":scope > :is(td,th):first-child"), i = r.textContent;
|
|
131
131
|
if (i != "")
|
|
132
132
|
r.innerHTML = `<span class="td__content">${i}</span><button type="button" class="d-none">${i}</button>`;
|
|
133
133
|
else {
|
|
134
|
-
let
|
|
135
|
-
|
|
134
|
+
let o = a.querySelector(":scope > :is(td,th):nth-child(2)"), s = o.textContent;
|
|
135
|
+
o.innerHTML = `<span class="td__content">${s}</span><button type="button" class="d-none">${s}</button>`;
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
-
},
|
|
139
|
-
|
|
138
|
+
}, qe = (t) => {
|
|
139
|
+
t.addEventListener("click", (a) => {
|
|
140
140
|
if (a && a.target instanceof HTMLElement && a.target.closest("tr > :is(td,th):first-child button")) {
|
|
141
|
-
let
|
|
142
|
-
r.getAttribute("data-view") == "full" ? r.setAttribute("data-view", "default") : r.setAttribute("data-view", "full"),
|
|
141
|
+
let e = a.target.closest("tr > :is(td,th):first-child button"), r = e.parentNode.closest("tr");
|
|
142
|
+
r.getAttribute("data-view") == "full" ? r.setAttribute("data-view", "default") : r.setAttribute("data-view", "full"), e.blur();
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
|
-
},
|
|
146
|
-
let
|
|
147
|
-
if (!
|
|
145
|
+
}, te = (t, a) => {
|
|
146
|
+
let e = a.querySelector("[data-search]");
|
|
147
|
+
if (!e)
|
|
148
148
|
return !1;
|
|
149
|
-
const r =
|
|
150
|
-
let
|
|
151
|
-
i.forEach((l,
|
|
152
|
-
Array.from(
|
|
153
|
-
|
|
149
|
+
const r = e.getAttribute("id"), i = e.getAttribute("data-search").split(",");
|
|
150
|
+
let o = e.parentNode, s = {};
|
|
151
|
+
i.forEach((l, c) => {
|
|
152
|
+
Array.from(t.querySelectorAll('td[data-label="' + l.trim() + '"]')).forEach((n, f) => {
|
|
153
|
+
n.querySelector(".td__content") ? s[n.querySelector(".td__content").textContent] = n.querySelector(".td__content").textContent : s[n.textContent] = n.textContent;
|
|
154
154
|
});
|
|
155
|
-
}),
|
|
156
|
-
},
|
|
157
|
-
var
|
|
158
|
-
let
|
|
155
|
+
}), e.setAttribute("list", `${r}_list`), e.setAttribute("autocomplete", "off"), o.querySelector("datalist") || (o.innerHTML += `<datalist id="${r}_list"></datalist>`), o.querySelector("datalist").innerHTML = `${Object.keys(s).map((l) => `<option value="${l}"></option>`).join("")}`;
|
|
156
|
+
}, $e = (t, a, e, r, i) => {
|
|
157
|
+
var o;
|
|
158
|
+
let s = function(n = !1) {
|
|
159
159
|
if (a.hasAttribute("data-ajax")) {
|
|
160
|
-
if (!
|
|
161
|
-
let
|
|
162
|
-
|
|
160
|
+
if (!n) {
|
|
161
|
+
let f = a.querySelector("[data-pagination]");
|
|
162
|
+
f.value = 1, r.setAttribute("data-page", 1);
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
re(t, a, e, r);
|
|
165
165
|
} else
|
|
166
|
-
a.hasAttribute("data-submit") ? a.submit() : (
|
|
166
|
+
a.hasAttribute("data-submit") ? a.submit() : (G(t, a, r), F(r, e), j(t, a));
|
|
167
|
+
if (a.hasAttribute("data-ajax-post")) {
|
|
168
|
+
let f = new FormData(a), p = new URLSearchParams(f).toString();
|
|
169
|
+
const h = new XMLHttpRequest();
|
|
170
|
+
h.open("GET", `${window.location.href}?ajax=true&${p}`), h.send();
|
|
171
|
+
}
|
|
167
172
|
};
|
|
168
|
-
a.addEventListener("keyup", (
|
|
169
|
-
clearTimeout(
|
|
170
|
-
|
|
173
|
+
a.addEventListener("keyup", (n) => {
|
|
174
|
+
clearTimeout(o), n && n.target instanceof HTMLElement && n.target.closest("[data-search]") && (o = setTimeout(function() {
|
|
175
|
+
s();
|
|
171
176
|
}, 500));
|
|
172
|
-
}), a.addEventListener("change", (
|
|
173
|
-
clearTimeout(
|
|
174
|
-
}), a.addEventListener("click", (
|
|
175
|
-
clearTimeout(
|
|
176
|
-
}), a.addEventListener("submit", (
|
|
177
|
-
clearTimeout(
|
|
178
|
-
}), a.addEventListener("force", (
|
|
179
|
-
|
|
180
|
-
}), a.addEventListener("paginate", (
|
|
181
|
-
|
|
177
|
+
}), a.addEventListener("change", (n) => {
|
|
178
|
+
clearTimeout(o), n && n.target instanceof HTMLElement && n.target.closest("[data-sort]") && (a.hasAttribute("data-submit") || J(t, a, i), s()), n && n.target instanceof HTMLElement && n.target.closest("[data-search]") && s(), n && n.target instanceof HTMLElement && n.target.closest("[data-filter][data-no-ajax]") ? (G(t, a, r), F(r, e), j(t, a)) : (n && n.target instanceof HTMLElement && n.target.closest("[data-filter]") && n.target.closest("form .dialog__wrapper > dialog") || n && n.target instanceof HTMLElement && n.target.closest("[data-filter]") && !n.target.closest("form dialog")) && s(), n && n.target instanceof HTMLElement && n.target.closest("[data-show]") && s(), n && n.target instanceof HTMLElement && n.target.closest("[data-mimic]") && s();
|
|
179
|
+
}), a.addEventListener("click", (n) => {
|
|
180
|
+
clearTimeout(o), n && n.target instanceof HTMLElement && n.target.closest('dialog button:not([type="button"])') && n.target.closest('dialog button:not([type="button"])').closest("dialog").close(), n && n.target instanceof HTMLElement && n.target.closest(".dialog__close") && (n.preventDefault(), n.stopPropagation()), n && n.target instanceof HTMLElement && n.target.closest("[data-clear]") && (a.reset(), a.hasAttribute("data-submit") || J(t, a, i), s());
|
|
181
|
+
}), a.addEventListener("submit", (n) => {
|
|
182
|
+
clearTimeout(o), a.hasAttribute("data-submit") || n.preventDefault(), s();
|
|
183
|
+
}), a.addEventListener("force", (n) => {
|
|
184
|
+
s();
|
|
185
|
+
}), a.addEventListener("paginate", (n) => {
|
|
186
|
+
s(!0);
|
|
182
187
|
});
|
|
183
|
-
let l = [],
|
|
184
|
-
Array.from(a.querySelectorAll("[data-mimic]")).forEach((
|
|
185
|
-
let
|
|
186
|
-
Array.from(document.querySelectorAll(`[name="${
|
|
187
|
-
let y =
|
|
188
|
-
l.includes(y) || l.push(y),
|
|
188
|
+
let l = [], c = [];
|
|
189
|
+
Array.from(a.querySelectorAll("[data-mimic]")).forEach((n, f) => {
|
|
190
|
+
let p = n.getAttribute("data-mimic");
|
|
191
|
+
Array.from(document.querySelectorAll(`[name="${p}"]`)).forEach((h, b) => {
|
|
192
|
+
let y = h.closest("form");
|
|
193
|
+
l.includes(y) || l.push(y), c.includes(p) || c.push(p);
|
|
189
194
|
});
|
|
190
|
-
}), l.forEach((
|
|
191
|
-
const
|
|
192
|
-
let
|
|
193
|
-
for (const [y,
|
|
194
|
-
document.querySelector(`[data-mimic="${y}"]`) && !
|
|
195
|
-
for (const y of
|
|
196
|
-
const
|
|
197
|
-
a.dispatchEvent(
|
|
195
|
+
}), l.forEach((n, f) => {
|
|
196
|
+
const p = function() {
|
|
197
|
+
let h = [], b = new FormData(n);
|
|
198
|
+
for (const [y, A] of b)
|
|
199
|
+
document.querySelector(`[data-mimic="${y}"]`) && !h.includes(y) ? (h.push(y), document.querySelector(`[data-mimic="${y}"]`).value = A) : document.querySelector(`[data-mimic="${y}"]`) && (document.querySelector(`[data-mimic="${y}"]`).value += "," + A);
|
|
200
|
+
for (const y of h) {
|
|
201
|
+
const A = new Event("force");
|
|
202
|
+
a.dispatchEvent(A);
|
|
198
203
|
}
|
|
199
|
-
for (const y of
|
|
200
|
-
if (!
|
|
204
|
+
for (const y of c)
|
|
205
|
+
if (!b.has(y) && n.querySelector(`[name="${y}"]`)) {
|
|
201
206
|
document.querySelector(`[data-mimic="${y}"]`).value = "";
|
|
202
|
-
const
|
|
203
|
-
a.dispatchEvent(
|
|
207
|
+
const A = new Event("force");
|
|
208
|
+
a.dispatchEvent(A);
|
|
204
209
|
}
|
|
205
210
|
};
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}),
|
|
209
|
-
|
|
211
|
+
n.addEventListener("force", (h) => {
|
|
212
|
+
p();
|
|
213
|
+
}), n.addEventListener("change", (h) => {
|
|
214
|
+
p();
|
|
210
215
|
});
|
|
211
216
|
});
|
|
212
|
-
}, J = (
|
|
217
|
+
}, J = (t, a, e) => {
|
|
213
218
|
if (a.getAttribute("data-ajax"))
|
|
214
219
|
return !1;
|
|
215
|
-
let r =
|
|
216
|
-
if (!
|
|
217
|
-
return r.innerHTML =
|
|
218
|
-
let
|
|
219
|
-
["asc", "desc", "descending"].includes(l) || (
|
|
220
|
-
let
|
|
221
|
-
Array.from(r.querySelectorAll("tr")).forEach((
|
|
222
|
-
let y =
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
}),
|
|
227
|
-
let
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}), r.innerHTML =
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
let r =
|
|
234
|
-
if (Array.from(
|
|
235
|
-
|
|
236
|
-
}), Array.from(a.querySelectorAll("[data-filter]")).forEach((n, c) => {
|
|
237
|
-
if (!(n.type == "radio" && !n.checked) && !(n.type == "checkbox" && !n.checked)) {
|
|
238
|
-
if (n.getAttribute("data-filter") == "multi")
|
|
239
|
-
for (const [h, f] of Object.entries(JSON.parse(n.value)))
|
|
240
|
-
r[n.getAttribute("data-filter")].push(f);
|
|
241
|
-
else if (n && n.value) {
|
|
242
|
-
let h = n.getAttribute("data-filter");
|
|
243
|
-
r[h] || (r[h] = new Array()), r[h].push(n.value);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
220
|
+
let r = t.querySelector("tbody"), i = a.querySelector("[data-sort]"), o = i.querySelector(`option:nth-child(${i.selectedIndex + 1})`), s = o.getAttribute("data-sort"), l = o.getAttribute("data-order"), c = o.getAttribute("data-format");
|
|
221
|
+
if (!s)
|
|
222
|
+
return r.innerHTML = e.innerHTML, ee(t), !1;
|
|
223
|
+
let n = [];
|
|
224
|
+
["asc", "desc", "descending"].includes(l) || (n = l.split(","));
|
|
225
|
+
let f = [];
|
|
226
|
+
Array.from(r.querySelectorAll("tr")).forEach((h, b) => {
|
|
227
|
+
let y = h.querySelector('td[data-label="' + s + '"], th[data-label="' + s + '"]').textContent.trim();
|
|
228
|
+
h.querySelector('[data-label="' + s + '"] .td__content') && (y = h.querySelector('[data-label="' + s + '"] .td__content').textContent.trim()), n.length && n.includes(y) && (y = n.indexOf(y)), ve(y) && (y = we(y, 10)), c && c == "date" && (y = new Date(y));
|
|
229
|
+
const A = { index: y, row: h };
|
|
230
|
+
f.push(A);
|
|
231
|
+
}), f.sort((h, b) => h.index > b.index ? 1 : -1), (l == "descending" || l == "desc") && (f = f.reverse());
|
|
232
|
+
let p = "";
|
|
233
|
+
f.forEach((h, b) => {
|
|
234
|
+
p += h.row.outerHTML;
|
|
235
|
+
}), r.innerHTML = p;
|
|
236
|
+
}, G = (t, a, e) => {
|
|
237
|
+
t.classList.remove("table--filtered");
|
|
238
|
+
let r = se(a), i = [], o = 0, s = a.querySelector("[data-pagination]") ? parseInt(a.querySelector("[data-pagination]").value) : 1, l = a.querySelector("[data-show]") ? parseInt(a.querySelector("[data-show]").value) : 15;
|
|
239
|
+
if (Array.from(t.querySelectorAll("tbody tr")).forEach((c, n) => {
|
|
240
|
+
c.classList.remove("filtered"), c.classList.remove("filtered--matched"), c.classList.remove("filtered--show"), c.removeAttribute("data-filtered-by");
|
|
246
241
|
}), a.querySelector("[data-search]")) {
|
|
247
|
-
let
|
|
248
|
-
a.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((
|
|
249
|
-
i.push({ column: `${
|
|
242
|
+
let c = a.querySelector("[data-search]");
|
|
243
|
+
a.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((n, f) => {
|
|
244
|
+
i.push({ column: `${n.trim()}`, value: `${c.value}` });
|
|
250
245
|
});
|
|
251
246
|
}
|
|
252
|
-
Array.from(a.querySelectorAll("[data-filter-count]")).forEach((
|
|
253
|
-
|
|
254
|
-
}), r.length && Array.from(a.querySelectorAll("[data-filter-count]")).forEach((
|
|
255
|
-
|
|
256
|
-
}),
|
|
257
|
-
for (const [
|
|
258
|
-
Array.from(
|
|
259
|
-
let
|
|
260
|
-
|
|
261
|
-
let
|
|
262
|
-
if (
|
|
263
|
-
|
|
264
|
-
else if (
|
|
265
|
-
let
|
|
266
|
-
|
|
267
|
-
} else if (
|
|
268
|
-
let
|
|
269
|
-
if (
|
|
270
|
-
|
|
247
|
+
Array.from(a.querySelectorAll("[data-filter-count]")).forEach((c, n) => {
|
|
248
|
+
c.innerHTML = "";
|
|
249
|
+
}), Object.keys(r).length && Array.from(a.querySelectorAll("[data-filter-count]")).forEach((c, n) => {
|
|
250
|
+
c.innerHTML += `(${Object.keys(r).length})`;
|
|
251
|
+
}), t.classList.add("table--filtered");
|
|
252
|
+
for (const [c, n] of Object.entries(r))
|
|
253
|
+
Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).forEach((f, p) => {
|
|
254
|
+
let h = !1;
|
|
255
|
+
n.forEach((b, y) => {
|
|
256
|
+
let A = f.querySelector(`[data-label="${c}"]`);
|
|
257
|
+
if (b && b == "$today")
|
|
258
|
+
b = K("date", /* @__PURE__ */ new Date());
|
|
259
|
+
else if (b && b == "$yesterday") {
|
|
260
|
+
let w = /* @__PURE__ */ new Date();
|
|
261
|
+
w.setDate(w.getDate() - 1), b = K("date", w);
|
|
262
|
+
} else if (b && (b == "$thisWeek" || b == "$lastWeek")) {
|
|
263
|
+
let w = /* @__PURE__ */ new Date(), x = new Date(w.setDate(w.getDate() - (w.getDay() - 1))), k = new Date(w.setDate(w.getDate() - w.getDay() + 7)), _ = new Date(A.textContent.toLowerCase());
|
|
264
|
+
if (w.setHours(0, 0, 0, 0), x.setHours(0, 0, 0, 0), k.setHours(0, 0, 0, 0), _.setHours(0, 0, 0, 0), b == "$thisWeek")
|
|
265
|
+
h = _ >= x && _ <= k;
|
|
271
266
|
else {
|
|
272
|
-
let
|
|
273
|
-
|
|
267
|
+
let B = new Date(x.setDate(x.getDate() - 7)), E = new Date(k.setDate(k.getDate() - 7));
|
|
268
|
+
B.setHours(0, 0, 0, 0), E.setHours(0, 0, 0, 0), h = _ >= B && _ <= E;
|
|
274
269
|
}
|
|
275
|
-
} else if (
|
|
276
|
-
let
|
|
277
|
-
var
|
|
278
|
-
let
|
|
279
|
-
|
|
280
|
-
} else if (
|
|
281
|
-
let
|
|
282
|
-
var
|
|
283
|
-
let
|
|
284
|
-
|
|
270
|
+
} else if (b && b == "$thisMonth") {
|
|
271
|
+
let w = /* @__PURE__ */ new Date(), x = w.getFullYear(), k = w.getMonth();
|
|
272
|
+
var C = new Date(x, k, 1), z = new Date(x, k + 1, 0);
|
|
273
|
+
let _ = new Date(A.textContent.toLowerCase());
|
|
274
|
+
C.setHours(0, 0, 0, 0), z.setHours(0, 0, 0, 0), _.setHours(0, 0, 0, 0), h = _ >= C && _ <= z;
|
|
275
|
+
} else if (b && b == "$lastMonth") {
|
|
276
|
+
let w = /* @__PURE__ */ new Date(), x = w.getFullYear(), k = w.getMonth();
|
|
277
|
+
var D = new Date(x, k - 1, 1), I = new Date(x, k, 0);
|
|
278
|
+
let _ = new Date(A.textContent.toLowerCase());
|
|
279
|
+
D.setHours(0, 0, 0, 0), I.setHours(0, 0, 0, 0), _.setHours(0, 0, 0, 0), h = _ >= D && _ <= I;
|
|
285
280
|
}
|
|
286
|
-
|
|
287
|
-
}),
|
|
281
|
+
A && A.textContent.toLowerCase().includes(b.toLowerCase()) && (h = !0);
|
|
282
|
+
}), h || (f.classList.add("filtered"), f.setAttribute("data-filtered-by", c));
|
|
288
283
|
});
|
|
289
|
-
Array.from(
|
|
290
|
-
let
|
|
291
|
-
i.forEach((
|
|
292
|
-
let
|
|
293
|
-
|
|
294
|
-
}),
|
|
295
|
-
}), Array.from(
|
|
296
|
-
|
|
297
|
-
}),
|
|
298
|
-
}, j = (
|
|
284
|
+
Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).forEach((c, n) => {
|
|
285
|
+
let f = !(i.length > 0 && i[0].value.length >= 3);
|
|
286
|
+
i.forEach((p, h) => {
|
|
287
|
+
let b = c.querySelector(`[data-label="${p.column}"]`);
|
|
288
|
+
b && p.value.length >= 3 && b.textContent.toLowerCase().includes(p.value.toLowerCase()) && (f = !0);
|
|
289
|
+
}), f || c.classList.add("filtered");
|
|
290
|
+
}), Array.from(t.querySelectorAll("tbody tr:not(.filtered")).forEach((c, n) => {
|
|
291
|
+
o++, c.classList.add("filtered--matched"), Math.ceil(o / l) == parseInt(s) && c.classList.add("filtered--show");
|
|
292
|
+
}), e && (e.setAttribute("data-page", s), e.setAttribute("data-pages", Math.ceil(o / l)), e.setAttribute("data-total", o), e.setAttribute("data-show", l));
|
|
293
|
+
}, j = (t, a, e) => {
|
|
299
294
|
Array.from(a.querySelectorAll("[data-query]")).forEach((r, i) => {
|
|
300
|
-
let
|
|
301
|
-
if (
|
|
302
|
-
|
|
303
|
-
else if (!
|
|
304
|
-
let l =
|
|
305
|
-
l.forEach((
|
|
306
|
-
|
|
307
|
-
}),
|
|
308
|
-
} else if (!
|
|
309
|
-
|
|
310
|
-
else if (
|
|
311
|
-
let l =
|
|
312
|
-
|
|
313
|
-
let
|
|
314
|
-
for (const [
|
|
315
|
-
let
|
|
316
|
-
(!
|
|
295
|
+
let o = r.getAttribute("data-query"), s;
|
|
296
|
+
if (o == "total")
|
|
297
|
+
e.hasAttribute("data-total") ? s = e.getAttribute("data-total") : s = (t.classList.contains("table--filtered"), t.querySelectorAll("tbody tr").length);
|
|
298
|
+
else if (!o.includes(" == ") && o.includes(" & ")) {
|
|
299
|
+
let l = o.split(" & "), c = "";
|
|
300
|
+
l.forEach((n) => {
|
|
301
|
+
c += `:not([data-filtered-by="${n}"])`;
|
|
302
|
+
}), s = Array.from(t.querySelectorAll(`tbody tr${c}`)).length;
|
|
303
|
+
} else if (!o.includes(" == "))
|
|
304
|
+
s = Array.from(t.querySelectorAll(`tbody tr:not([data-filtered-by="${o}"])`)).length;
|
|
305
|
+
else if (o.includes(" && ")) {
|
|
306
|
+
let l = o.split(" && ");
|
|
307
|
+
s = Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).filter(function(c) {
|
|
308
|
+
let n = !0;
|
|
309
|
+
for (const [f, p] of Object.entries(l)) {
|
|
310
|
+
let h = p.split(" == ");
|
|
311
|
+
(!c.querySelector(`td[data-label="${h[0]}"]`) || c.querySelector(`td[data-label="${h[0]}"]`).textContent != `${h[1]}`) && (n = !1);
|
|
317
312
|
}
|
|
318
|
-
return
|
|
313
|
+
return n;
|
|
319
314
|
}).length;
|
|
320
315
|
} else {
|
|
321
|
-
let l =
|
|
322
|
-
|
|
323
|
-
return
|
|
316
|
+
let l = o.split(" == ");
|
|
317
|
+
s = Array.from(t.querySelectorAll(`tbody tr.filtered--matched td[data-label="${l[0]}"], tbody tr[data-filtered-by="${l[0]}"] td[data-label="${l[0]}"]`)).filter(function(c) {
|
|
318
|
+
return c.textContent === l[1];
|
|
324
319
|
}).length;
|
|
325
320
|
}
|
|
326
|
-
r.hasAttribute("data-total") ? r.setAttribute("data-total",
|
|
321
|
+
r.hasAttribute("data-total") ? r.setAttribute("data-total", s) : r.innerHTML = s;
|
|
327
322
|
});
|
|
328
|
-
},
|
|
329
|
-
|
|
323
|
+
}, xe = function(t, a, e, r) {
|
|
324
|
+
e.addEventListener("click", (i) => {
|
|
330
325
|
if (i && i.target instanceof HTMLElement && i.target.closest("[data-page]")) {
|
|
331
326
|
i.preventDefault();
|
|
332
|
-
let
|
|
333
|
-
if (
|
|
334
|
-
const
|
|
335
|
-
|
|
327
|
+
let o = a.querySelector("[data-pagination]"), s = i.target.closest("[data-page]").getAttribute("data-page");
|
|
328
|
+
if (o.value = s, r.setAttribute("data-page", s), a.dispatchEvent(new Event("paginate")), t.hasAttribute("data-show-history")) {
|
|
329
|
+
const n = new URL(location);
|
|
330
|
+
n.searchParams.set("page", s), history.pushState({ type: "pagination", form: a.getAttribute("id"), page: s }, "", n);
|
|
336
331
|
}
|
|
337
|
-
const l = -250,
|
|
338
|
-
window.scrollTo({ top:
|
|
332
|
+
const l = -250, c = t.getBoundingClientRect().top + window.pageYOffset + l;
|
|
333
|
+
window.scrollTo({ top: c, behavior: "smooth" });
|
|
339
334
|
}
|
|
340
335
|
if (i && i.target instanceof HTMLElement && i.target.closest("[data-show]")) {
|
|
341
336
|
i.preventDefault();
|
|
342
|
-
let
|
|
343
|
-
|
|
337
|
+
let o = a.querySelector("[data-show]"), s = i.target.closest("[data-show]").getAttribute("data-show");
|
|
338
|
+
o.value = s, r.setAttribute("data-show", s), a.dispatchEvent(new Event("submit"));
|
|
344
339
|
}
|
|
345
340
|
});
|
|
346
|
-
},
|
|
347
|
-
if (!
|
|
341
|
+
}, Ee = (t, a) => {
|
|
342
|
+
if (!t)
|
|
348
343
|
return !1;
|
|
349
|
-
|
|
350
|
-
|
|
344
|
+
t.addEventListener("click", (e) => {
|
|
345
|
+
Te(a);
|
|
351
346
|
});
|
|
352
|
-
},
|
|
353
|
-
for (var a = [],
|
|
354
|
-
for (var i =
|
|
355
|
-
|
|
356
|
-
a.push(
|
|
347
|
+
}, Te = function(t) {
|
|
348
|
+
for (var a = [], e = t.getElementsByTagName("tr"), r = 0; r < e.length; r++) {
|
|
349
|
+
for (var i = e[r].querySelectorAll("td,th"), o = [], s = 0; s < i.length; s++)
|
|
350
|
+
o.push(`"${i[s].textContent}"`);
|
|
351
|
+
a.push(o.join(","));
|
|
357
352
|
}
|
|
358
353
|
a = a.join(`
|
|
359
354
|
`);
|
|
360
355
|
let l = new Blob([a], { type: "text/csv" });
|
|
361
|
-
var
|
|
362
|
-
|
|
363
|
-
var
|
|
364
|
-
|
|
365
|
-
},
|
|
366
|
-
if (
|
|
356
|
+
var c = document.createElement("a");
|
|
357
|
+
c.download = "export.csv";
|
|
358
|
+
var n = window.URL.createObjectURL(l);
|
|
359
|
+
c.href = n, c.style.display = "none", document.body.appendChild(c), c.click(), document.body.removeChild(c);
|
|
360
|
+
}, ae = function(t, a, e, r) {
|
|
361
|
+
if (ee(t), ke(t), j(t, a, r), r && r.classList.contains("table--cta")) {
|
|
367
362
|
let i = function() {
|
|
368
|
-
Array.from(
|
|
369
|
-
let
|
|
370
|
-
|
|
363
|
+
Array.from(t.querySelectorAll("tr")).forEach((s, l) => {
|
|
364
|
+
let c = s.offsetHeight;
|
|
365
|
+
s.style.setProperty("--row-height", `${c}px`);
|
|
371
366
|
});
|
|
372
367
|
};
|
|
373
|
-
const
|
|
374
|
-
r.style.setProperty("--cta-width", `${
|
|
368
|
+
const o = Le(t);
|
|
369
|
+
r.style.setProperty("--cta-width", `${o}rem`), new ResizeObserver(i).observe(t);
|
|
375
370
|
}
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
371
|
+
}, se = function(t) {
|
|
372
|
+
let a = new Object();
|
|
373
|
+
return Array.from(t.querySelectorAll("[data-filter]")).forEach((e, r) => {
|
|
374
|
+
if (!(e.type == "radio" && !e.checked) && !(e.type == "checkbox" && !e.checked) && e && e.value) {
|
|
375
|
+
let i = e.getAttribute("data-filter");
|
|
376
|
+
a[i] || (a[i] = new Array()), a[i].push(e.value);
|
|
377
|
+
}
|
|
378
|
+
}), a;
|
|
379
|
+
}, re = function(t, a, e, r) {
|
|
380
|
+
return Se(this, void 0, void 0, function* () {
|
|
381
|
+
const i = (h, b, y) => b.split(/[\.\[\]\'\"]/).filter((A) => A).reduce((A, C) => A ? A[C] : y, h);
|
|
382
|
+
let o = new FormData(a), s = new URLSearchParams(o).toString(), l = t.querySelectorAll("thead tr th"), c = t.querySelector("tbody"), n = a.getAttribute("data-ajax");
|
|
383
|
+
r.classList.add("table--loading");
|
|
384
|
+
let f = se(a);
|
|
385
|
+
Array.from(a.querySelectorAll("[data-filter-count]")).forEach((h, b) => {
|
|
386
|
+
h.innerHTML = "";
|
|
387
|
+
}), Object.keys(f).length && Array.from(a.querySelectorAll("[data-filter-count]")).forEach((h, b) => {
|
|
388
|
+
h.innerHTML += `(${Object.keys(f).length})`;
|
|
389
|
+
}), window.controller || (window.controller = []), window.controller[n] && window.controller[n].abort(), window.controller[n] = new AbortController();
|
|
390
|
+
const { signal: p } = controller[n];
|
|
382
391
|
try {
|
|
383
|
-
yield fetch(
|
|
384
|
-
let b = a.hasAttribute("data-schema") ? a.getAttribute("data-schema") : "data",
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
l.forEach((_,
|
|
392
|
+
yield fetch(n + "?" + s, { signal: p, method: "get", credentials: "same-origin", headers: new Headers({ "Content-Type": "application/json", Accept: "application/json", "X-Requested-With": "XMLHttpRequest" }) }).then((h) => h.json()).then((h) => {
|
|
393
|
+
let b = a.hasAttribute("data-schema") ? a.getAttribute("data-schema") : "data", y = a.hasAttribute("data-schema-total") ? a.getAttribute("data-schema-total") : "meta.total", A = a.hasAttribute("data-schema-page") ? a.getAttribute("data-schema-page") : "meta.current_page", C = i(h, y, 1), z = i(h, A, 1), D = i(h, b), I = r.hasAttribute("data-empty-msg") ? r.getAttribute("data-empty-msg") : "No results found";
|
|
394
|
+
D ? (c.innerHTML = "", D.forEach((w, x) => {
|
|
395
|
+
var k = document.createElement("tr");
|
|
396
|
+
l.forEach((_, B) => {
|
|
388
397
|
let E = "";
|
|
389
|
-
var
|
|
390
|
-
if (
|
|
391
|
-
var
|
|
392
|
-
E =
|
|
393
|
-
return i(
|
|
398
|
+
var O = document.createElement("td");
|
|
399
|
+
if (O.setAttribute("data-label", _.innerText), _.getAttribute("data-output")) {
|
|
400
|
+
var V = _.getAttribute("data-output");
|
|
401
|
+
E = V.replace(new RegExp(/{(.*?)}/, "gm"), function(ne) {
|
|
402
|
+
return i(w, ne.replace("{", "").replace("}", ""));
|
|
394
403
|
});
|
|
395
404
|
}
|
|
396
405
|
if (_.hasAttribute("data-output-array")) {
|
|
397
|
-
var
|
|
398
|
-
let
|
|
399
|
-
E = "",
|
|
400
|
-
let
|
|
406
|
+
var V = _.getAttribute("data-output");
|
|
407
|
+
let le = i(w, V.replace("{", "").replace("}", ""));
|
|
408
|
+
E = "", le.forEach((X, or) => {
|
|
409
|
+
let ce = _.getAttribute("data-output-array"), P = "";
|
|
401
410
|
if (_.hasAttribute("data-output-array-property") && _.hasAttribute("data-output-array-transform")) {
|
|
402
|
-
const
|
|
403
|
-
|
|
411
|
+
const U = i(X, _.getAttribute("data-output-array-property")), de = JSON.parse(_.getAttribute("data-output-array-transform"))[U];
|
|
412
|
+
P = ce.replace(`{${_.getAttribute("data-output-array-property")}}`, de);
|
|
404
413
|
}
|
|
405
|
-
|
|
406
|
-
return i(
|
|
407
|
-
}), E +=
|
|
414
|
+
P = P.replace(new RegExp(/{(.*?)}/, "gm"), function(U) {
|
|
415
|
+
return i(X, U.replace("{", "").replace("}", ""));
|
|
416
|
+
}), E += P;
|
|
408
417
|
});
|
|
409
418
|
}
|
|
410
|
-
_.hasAttribute("data-transform") && (E = JSON.parse(_.getAttribute("data-transform"))[E], !E && _.hasAttribute("data-default") && (E = _.getAttribute("data-default"))),
|
|
411
|
-
}),
|
|
412
|
-
}),
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
419
|
+
_.hasAttribute("data-transform") && (E = JSON.parse(_.getAttribute("data-transform"))[E], !E && _.hasAttribute("data-default") && (E = _.getAttribute("data-default"))), O.innerHTML = E, k.appendChild(O);
|
|
420
|
+
}), c.appendChild(k);
|
|
421
|
+
}), te(t, a), r.setAttribute("data-total", parseInt(C)), r.setAttribute("data-page", parseInt(z)), r.setAttribute("data-pages", Math.ceil(r.getAttribute("data-total") / r.getAttribute("data-show"))), ae(t, a, e, r), F(r, e), Array.from(a.querySelectorAll("[data-ajax-query]")).forEach((w, x) => {
|
|
422
|
+
let k = i(h, w.getAttribute("data-ajax-query"), "");
|
|
423
|
+
w.hasAttribute("data-total") ? w.setAttribute("data-total", k) : w.innerHTML = k;
|
|
424
|
+
}), parseInt(C) == 0 && (c.innerHTML = `<tr><td colspan="100%"><span>${I}</span></td></tr>`), r.classList.remove("table--loading"), window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "Ajax table loaded", url: n, formData: s })) : c.innerHTML = '<tr><td colspan="100%"><span>Error loading table</span></td></tr>';
|
|
416
425
|
});
|
|
417
|
-
} catch (
|
|
418
|
-
console.log(
|
|
426
|
+
} catch (h) {
|
|
427
|
+
console.log(h);
|
|
419
428
|
}
|
|
420
429
|
});
|
|
421
|
-
},
|
|
422
|
-
switch (
|
|
430
|
+
}, K = (t, a) => {
|
|
431
|
+
switch (t) {
|
|
423
432
|
case "datetime":
|
|
424
433
|
return new Date(a).toLocaleDateString("en-gb", { weekday: "short", year: "2-digit", month: "long", day: "numeric" }) + " " + new Date(a).toLocaleTimeString("en-gb", { hour: "2-digit", minute: "2-digit" });
|
|
425
434
|
case "date":
|
|
426
435
|
return new Date(a).toLocaleDateString("en-gb", { year: "2-digit", month: "long", day: "numeric" });
|
|
427
436
|
case "capitalise":
|
|
428
|
-
return a =
|
|
437
|
+
return a = Ae(a);
|
|
429
438
|
}
|
|
430
439
|
};
|
|
431
|
-
class
|
|
440
|
+
class Me extends HTMLElement {
|
|
432
441
|
constructor() {
|
|
433
442
|
super(), this.attachShadow({ mode: "open" });
|
|
434
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
443
|
+
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`, r = document.createElement("template");
|
|
435
444
|
r.innerHTML = `
|
|
436
445
|
<style>
|
|
437
|
-
@import "${
|
|
446
|
+
@import "${e}";
|
|
438
447
|
|
|
439
448
|
:host(.mh-sm){
|
|
440
449
|
max-height: none!important;
|
|
@@ -459,20 +468,20 @@ class Et extends HTMLElement {
|
|
|
459
468
|
connectedCallback() {
|
|
460
469
|
const a = new URLSearchParams(window.location.search);
|
|
461
470
|
this.hasAttribute("data-total") || this.setAttribute("data-total", this.querySelectorAll("table tbody tr").length), this.hasAttribute("data-page") || this.setAttribute("data-page", a.has("page") ? a.get("page") : 1), this.hasAttribute("data-show") || this.setAttribute("data-show", 15), this.hasAttribute("data-increment") || this.setAttribute("data-increment", 15), this.setAttribute("data-pages", Math.ceil(this.getAttribute("data-total") / this.getAttribute("data-show")));
|
|
462
|
-
let
|
|
463
|
-
|
|
471
|
+
let e = this.classList.toString();
|
|
472
|
+
e = e.replace("table--cta", ""), e = e.replace("table--loading", ""), this.shadowRoot.querySelector(".table__wrapper").className += ` ${e}`, this.table = this.querySelector("table"), this.savedTableBody = this.table.querySelector("tbody").cloneNode(!0), this.pagination = this.shadowRoot.querySelector(".table__pagination"), this.classList.contains("table--cta") || this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"), this.form = document.createElement("form"), this.hasAttribute("data-filterby") ? this.form = document.querySelector(`#${this.getAttribute("data-filterby")}`) : this.table.parentNode.insertBefore(this.form, this.table.nextSibling), this.form.hasAttribute("data-ajax") && this.table.classList.add("table--ajax"), te(this.table, this.form), this.form.querySelector("[data-page]") || (this.form.innerHTML += `<input name="page" type="hidden" value="${this.getAttribute("data-page")}" data-pagination="true" />`), this.form.querySelector("[data-show]") || (this.form.innerHTML += `<input name="show" type="hidden" value="${this.getAttribute("data-show")}" data-show="true" />`), qe(this.table), $e(this.table, this.form, this.pagination, this, this.savedTableBody), xe(this.table, this.form, this.pagination, this), Ee(this.shadowRoot.querySelector("[data-export]"), this.table), this.form.getAttribute("data-ajax") ? re(this.table, this.form, this.pagination, this) : (ae(this.table, this.form, this.pagination, this), G(this.table, this.form, this), F(this, this.pagination), j(this.table, this.form)), this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll", (r) => {
|
|
464
473
|
this.table.querySelector("dialog[open]") && (this.table.querySelector("dialog[open]").close(), this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"));
|
|
465
474
|
});
|
|
466
475
|
}
|
|
467
476
|
static get observedAttributes() {
|
|
468
477
|
return ["data-total", "data-pages", "data-page", "data-show"];
|
|
469
478
|
}
|
|
470
|
-
attributeChangedCallback(a,
|
|
479
|
+
attributeChangedCallback(a, e, r) {
|
|
471
480
|
}
|
|
472
481
|
}
|
|
473
|
-
const
|
|
474
|
-
return
|
|
475
|
-
},
|
|
482
|
+
const He = (t) => t.charAt(0).toUpperCase() + t.slice(1), Ce = (t) => t.replace(/_/g, " "), De = (t) => t.replace(/ /g, "_"), Ne = function(t) {
|
|
483
|
+
return t = t.toLowerCase(), t = De(t), t = t.replace(/\W/g, ""), t;
|
|
484
|
+
}, Re = {
|
|
476
485
|
name: "Table",
|
|
477
486
|
props: {
|
|
478
487
|
items: {
|
|
@@ -486,42 +495,42 @@ const Tt = (e) => e.charAt(0).toUpperCase() + e.slice(1), Mt = (e) => e.replace(
|
|
|
486
495
|
},
|
|
487
496
|
computed: {
|
|
488
497
|
cellHeading() {
|
|
489
|
-
return (
|
|
498
|
+
return (t) => `${He(Ce(t))}`;
|
|
490
499
|
}
|
|
491
500
|
},
|
|
492
501
|
created() {
|
|
493
502
|
this.$nextTick(function() {
|
|
494
|
-
window.customElements.get("iam-table") || window.customElements.define("iam-table",
|
|
503
|
+
window.customElements.get("iam-table") || window.customElements.define("iam-table", Me);
|
|
495
504
|
});
|
|
496
505
|
},
|
|
497
506
|
updated() {
|
|
498
507
|
}
|
|
499
|
-
},
|
|
500
|
-
function
|
|
508
|
+
}, ze = { key: 0 }, Ie = { key: 0 }, Pe = ["data-row-id"], Fe = ["innerHTML"];
|
|
509
|
+
function je(t, a, e, r, i, o) {
|
|
501
510
|
return u(), m("iam-table", null, [
|
|
502
|
-
|
|
511
|
+
e.fields ? (u(), m("table", ze, [
|
|
503
512
|
d("thead", null, [
|
|
504
513
|
d("tr", null, [
|
|
505
|
-
(u(!0), m(T, null, M(
|
|
506
|
-
key:
|
|
507
|
-
},
|
|
514
|
+
(u(!0), m(T, null, M(e.fields, (s) => (u(), m("th", {
|
|
515
|
+
key: s.key
|
|
516
|
+
}, $(o.cellHeading(s.key)), 1))), 128))
|
|
508
517
|
])
|
|
509
518
|
]),
|
|
510
|
-
|
|
511
|
-
(u(!0), m(T, null, M(
|
|
519
|
+
e.items ? (u(), m("tbody", Ie, [
|
|
520
|
+
(u(!0), m(T, null, M(e.items, (s, l) => (u(), m("tr", {
|
|
512
521
|
key: l,
|
|
513
|
-
"data-row-id":
|
|
522
|
+
"data-row-id": s.rowid
|
|
514
523
|
}, [
|
|
515
|
-
(u(!0), m(T, null, M(Object.fromEntries(Object.entries(
|
|
516
|
-
key:
|
|
517
|
-
innerHTML:
|
|
518
|
-
}, null, 8,
|
|
519
|
-
], 8,
|
|
524
|
+
(u(!0), m(T, null, M(Object.fromEntries(Object.entries(s).filter(([c]) => c !== "rowid")), (c, n) => (u(), m("td", {
|
|
525
|
+
key: n,
|
|
526
|
+
innerHTML: c
|
|
527
|
+
}, null, 8, Fe))), 128))
|
|
528
|
+
], 8, Pe))), 128))
|
|
520
529
|
])) : g("", !0)
|
|
521
|
-
])) : v(
|
|
530
|
+
])) : v(t.$slots, "default", { key: 1 })
|
|
522
531
|
]);
|
|
523
532
|
}
|
|
524
|
-
const
|
|
533
|
+
const oe = /* @__PURE__ */ S(Re, [["render", je]]), Be = {
|
|
525
534
|
name: "Input",
|
|
526
535
|
props: {
|
|
527
536
|
value: {
|
|
@@ -687,213 +696,213 @@ const rt = /* @__PURE__ */ A(Dt, [["render", Pt]]), Bt = {
|
|
|
687
696
|
get() {
|
|
688
697
|
return this.value == null && this.options != null && this.type == "select" ? this.$attrs.multiple ? [] : this.options[0].value : this.value;
|
|
689
698
|
},
|
|
690
|
-
set(
|
|
691
|
-
this.$emit("input",
|
|
699
|
+
set(t) {
|
|
700
|
+
this.$emit("input", t);
|
|
692
701
|
}
|
|
693
702
|
}
|
|
694
703
|
},
|
|
695
704
|
mounted() {
|
|
696
705
|
this.$nextTick(function() {
|
|
697
|
-
let
|
|
698
|
-
if (
|
|
706
|
+
let t = this.$refs.wrapper;
|
|
707
|
+
if (t.parentNode && t.parentNode.classList.contains("form-check") || t.classList.length == 0) {
|
|
699
708
|
const a = document.createDocumentFragment();
|
|
700
|
-
Array.from(
|
|
709
|
+
Array.from(t.childNodes).forEach((e) => a.appendChild(e)), t.parentNode.insertBefore(a, t), t.parentNode.removeChild(t);
|
|
701
710
|
}
|
|
702
711
|
});
|
|
703
712
|
},
|
|
704
713
|
methods: {
|
|
705
|
-
inputKeyup(
|
|
706
|
-
this.$emit("keyupEvent",
|
|
714
|
+
inputKeyup(t) {
|
|
715
|
+
this.$emit("keyupEvent", t);
|
|
707
716
|
},
|
|
708
717
|
clickEvent() {
|
|
709
718
|
this.$emit("bus");
|
|
710
719
|
}
|
|
711
720
|
}
|
|
712
|
-
},
|
|
721
|
+
}, Oe = ["for", "innerHTML", "title"], Ve = ["innerHTML"], Ue = ["innerHTML"], We = ["type", "name", "id", "pattern", "list"], Ge = ["type", "name", "id", "pattern"], Ke = {
|
|
713
722
|
key: 5,
|
|
714
723
|
class: "input-group"
|
|
715
|
-
},
|
|
724
|
+
}, Ye = ["type", "name", "id", "pattern", "list"], Ze = { class: "input-group-text border-0 col-2 col-sm-1 px-0" }, Xe = {
|
|
716
725
|
key: 6,
|
|
717
726
|
class: "input-group"
|
|
718
|
-
},
|
|
719
|
-
function
|
|
727
|
+
}, Je = ["type", "name", "id", "pattern", "list"], Qe = { class: "input-group-text flex-fill" }, et = ["type", "name", "id", "pattern"], tt = ["value"], at = ["type", "name", "id"], st = ["for", "innerHTML"], rt = ["type", "name", "id"], ot = ["for", "innerHTML"], it = ["innerHTML"], nt = ["id"], lt = ["value"];
|
|
728
|
+
function ct(t, a, e, r, i, o) {
|
|
720
729
|
return u(), m("div", {
|
|
721
|
-
class:
|
|
730
|
+
class: L(o.wrapperClass()),
|
|
722
731
|
ref: "wrapper"
|
|
723
732
|
}, [
|
|
724
|
-
|
|
733
|
+
o.needsLabel() ? (u(), m("label", {
|
|
725
734
|
key: 0,
|
|
726
|
-
class:
|
|
727
|
-
for:
|
|
728
|
-
innerHTML:
|
|
729
|
-
title:
|
|
730
|
-
}, null, 10,
|
|
731
|
-
|
|
735
|
+
class: L(`form-label${e.labelclass ? ` ${e.labelclass}` : ""}`),
|
|
736
|
+
for: e.id,
|
|
737
|
+
innerHTML: o.displayLabel(),
|
|
738
|
+
title: e.title
|
|
739
|
+
}, null, 10, Oe)) : g("", !0),
|
|
740
|
+
e.prefix ? (u(), m("span", {
|
|
732
741
|
key: 1,
|
|
733
|
-
class:
|
|
734
|
-
innerHTML:
|
|
742
|
+
class: L(`prefix ${this.prefixClass} ${e.size ? `prefix-${e.size}` : ""}`),
|
|
743
|
+
innerHTML: e.prefix,
|
|
735
744
|
role: "presentation"
|
|
736
|
-
}, null, 10,
|
|
737
|
-
|
|
745
|
+
}, null, 10, Ve)) : g("", !0),
|
|
746
|
+
e.suffix ? (u(), m("span", {
|
|
738
747
|
key: 2,
|
|
739
|
-
class:
|
|
740
|
-
innerHTML:
|
|
748
|
+
class: L(`suffix ${this.suffixClass} ${e.size ? `suffix-${e.size}` : ""}`),
|
|
749
|
+
innerHTML: e.suffix,
|
|
741
750
|
role: "presentation"
|
|
742
|
-
}, null, 10,
|
|
743
|
-
|
|
751
|
+
}, null, 10, Ue)) : g("", !0),
|
|
752
|
+
o.isInput() ? N((u(), m("input", H({
|
|
744
753
|
key: 3,
|
|
745
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
746
|
-
class: `form-control${
|
|
747
|
-
type:
|
|
748
|
-
name:
|
|
749
|
-
id:
|
|
750
|
-
pattern:
|
|
751
|
-
list:
|
|
752
|
-
},
|
|
753
|
-
onKeyup: a[1] || (a[1] = (...
|
|
754
|
-
}), null, 16,
|
|
755
|
-
[
|
|
754
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => o.inputVal = s),
|
|
755
|
+
class: `form-control${e.size ? ` form-control-${e.size}` : ""}${e.inputclass ? ` ${e.inputclass}` : ""}`,
|
|
756
|
+
type: e.type,
|
|
757
|
+
name: e.name ? e.name : e.id,
|
|
758
|
+
id: e.id,
|
|
759
|
+
pattern: o.needPattern(),
|
|
760
|
+
list: o.hasOptions()
|
|
761
|
+
}, t.$attrs, {
|
|
762
|
+
onKeyup: a[1] || (a[1] = (...s) => o.inputKeyup && o.inputKeyup(...s))
|
|
763
|
+
}), null, 16, We)), [
|
|
764
|
+
[W, o.inputVal]
|
|
756
765
|
]) : g("", !0),
|
|
757
|
-
|
|
766
|
+
e.type == "textarea" ? N((u(), m("textarea", H({
|
|
758
767
|
key: 4,
|
|
759
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
760
|
-
class: `form-control${
|
|
761
|
-
type:
|
|
762
|
-
name:
|
|
763
|
-
id:
|
|
764
|
-
pattern:
|
|
765
|
-
},
|
|
766
|
-
[
|
|
768
|
+
"onUpdate:modelValue": a[2] || (a[2] = (s) => o.inputVal = s),
|
|
769
|
+
class: `form-control${e.size ? ` form-control-${e.size}` : ""}${e.inputclass ? ` ${e.inputclass}` : ""}`,
|
|
770
|
+
type: e.type,
|
|
771
|
+
name: e.name ? e.name : e.id,
|
|
772
|
+
id: e.id,
|
|
773
|
+
pattern: o.needPattern()
|
|
774
|
+
}, t.$attrs), null, 16, Ge)), [
|
|
775
|
+
[ue, o.inputVal]
|
|
767
776
|
]) : g("", !0),
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
771
|
-
class: `form-range${
|
|
772
|
-
type:
|
|
773
|
-
name:
|
|
774
|
-
id:
|
|
775
|
-
pattern:
|
|
776
|
-
list:
|
|
777
|
-
},
|
|
778
|
-
[
|
|
777
|
+
e.type == "range" ? (u(), m("div", Ke, [
|
|
778
|
+
N(d("input", H({
|
|
779
|
+
"onUpdate:modelValue": a[3] || (a[3] = (s) => o.inputVal = s),
|
|
780
|
+
class: `form-range${e.inputclass ? ` ${e.inputclass}` : ""}`,
|
|
781
|
+
type: e.type,
|
|
782
|
+
name: e.name ? e.name : e.id,
|
|
783
|
+
id: e.id,
|
|
784
|
+
pattern: o.needPattern(),
|
|
785
|
+
list: o.hasOptions()
|
|
786
|
+
}, t.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Ye), [
|
|
787
|
+
[W, o.inputVal]
|
|
779
788
|
]),
|
|
780
|
-
d("output",
|
|
789
|
+
d("output", Ze, $(e.value), 1)
|
|
781
790
|
])) : g("", !0),
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
785
|
-
class: `form-control form-control-color${
|
|
786
|
-
type:
|
|
787
|
-
name:
|
|
788
|
-
id:
|
|
789
|
-
pattern:
|
|
790
|
-
list:
|
|
791
|
-
},
|
|
792
|
-
[
|
|
791
|
+
e.type == "color" ? (u(), m("div", Xe, [
|
|
792
|
+
N(d("input", H({
|
|
793
|
+
"onUpdate:modelValue": a[4] || (a[4] = (s) => o.inputVal = s),
|
|
794
|
+
class: `form-control form-control-color${e.inputclass ? ` ${e.inputclass}` : ""}`,
|
|
795
|
+
type: e.type,
|
|
796
|
+
name: e.name ? e.name : e.id,
|
|
797
|
+
id: e.id,
|
|
798
|
+
pattern: o.needPattern(),
|
|
799
|
+
list: o.hasOptions()
|
|
800
|
+
}, t.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Je), [
|
|
801
|
+
[W, o.inputVal]
|
|
793
802
|
]),
|
|
794
|
-
d("output",
|
|
803
|
+
d("output", Qe, $(e.value ? t.vale : "#000000"), 1)
|
|
795
804
|
])) : g("", !0),
|
|
796
|
-
|
|
805
|
+
e.type == "select" ? N((u(), m("select", H({
|
|
797
806
|
key: 7,
|
|
798
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
799
|
-
class: `form-select${
|
|
800
|
-
type:
|
|
801
|
-
name:
|
|
802
|
-
id:
|
|
803
|
-
pattern:
|
|
804
|
-
},
|
|
805
|
-
(u(!0), m(T, null, M(
|
|
807
|
+
"onUpdate:modelValue": a[5] || (a[5] = (s) => o.inputVal = s),
|
|
808
|
+
class: `form-select${e.size ? ` form-select-${e.size}` : ""}${e.inputclass ? ` ${e.inputclass}` : ""}`,
|
|
809
|
+
type: e.type,
|
|
810
|
+
name: e.id,
|
|
811
|
+
id: e.id,
|
|
812
|
+
pattern: o.needPattern()
|
|
813
|
+
}, t.$attrs), [
|
|
814
|
+
(u(!0), m(T, null, M(e.options, (s, l) => (u(), m("option", {
|
|
806
815
|
key: l,
|
|
807
|
-
value:
|
|
808
|
-
},
|
|
809
|
-
], 16,
|
|
810
|
-
[
|
|
816
|
+
value: s.value
|
|
817
|
+
}, $(s.display ? s.display : s.value), 9, tt))), 128))
|
|
818
|
+
], 16, et)), [
|
|
819
|
+
[me, o.inputVal]
|
|
811
820
|
]) : g("", !0),
|
|
812
|
-
|
|
821
|
+
e.type == "checkbox" || e.type == "radio" ? (u(), m("input", H({
|
|
813
822
|
key: 8,
|
|
814
823
|
class: "form-check-input",
|
|
815
|
-
type:
|
|
816
|
-
name:
|
|
817
|
-
id:
|
|
818
|
-
},
|
|
819
|
-
|
|
824
|
+
type: e.type,
|
|
825
|
+
name: e.name ? e.name : e.id,
|
|
826
|
+
id: e.id
|
|
827
|
+
}, t.$attrs), null, 16, at)) : g("", !0),
|
|
828
|
+
e.type == "checkbox" || e.type == "radio" ? (u(), m("label", {
|
|
820
829
|
key: 9,
|
|
821
|
-
class:
|
|
822
|
-
for:
|
|
823
|
-
innerHTML:
|
|
824
|
-
}, null, 10,
|
|
825
|
-
|
|
830
|
+
class: L(`form-label form-check-label${e.labelclass ? ` ${e.labelclass}` : ""}`),
|
|
831
|
+
for: e.id,
|
|
832
|
+
innerHTML: e.label
|
|
833
|
+
}, null, 10, st)) : g("", !0),
|
|
834
|
+
e.type == "checkbox-btn" || e.type == "radio-btn" ? (u(), m("input", H({
|
|
826
835
|
key: 10,
|
|
827
|
-
class: `btn-check${
|
|
828
|
-
type:
|
|
836
|
+
class: `btn-check${e.inputclass ? ` ${e.inputclass}` : ""}`,
|
|
837
|
+
type: e.type.replace("-btn", ""),
|
|
829
838
|
autocomplete: "off",
|
|
830
|
-
name:
|
|
831
|
-
id:
|
|
832
|
-
},
|
|
833
|
-
|
|
839
|
+
name: e.name ? e.name : e.id,
|
|
840
|
+
id: e.id
|
|
841
|
+
}, t.$attrs), null, 16, rt)) : g("", !0),
|
|
842
|
+
e.type == "checkbox-btn" || e.type == "radio-btn" ? (u(), m("label", {
|
|
834
843
|
key: 11,
|
|
835
|
-
class:
|
|
836
|
-
for:
|
|
837
|
-
innerHTML:
|
|
838
|
-
onClick: a[6] || (a[6] = (...
|
|
839
|
-
}, null, 10,
|
|
840
|
-
v(
|
|
841
|
-
|
|
844
|
+
class: L(`btn${e.labelclass ? ` ${e.labelclass}` : ""}`),
|
|
845
|
+
for: e.id,
|
|
846
|
+
innerHTML: e.label,
|
|
847
|
+
onClick: a[6] || (a[6] = (...s) => o.clickEvent && o.clickEvent(...s))
|
|
848
|
+
}, null, 10, ot)) : g("", !0),
|
|
849
|
+
v(t.$slots, "default"),
|
|
850
|
+
e.errormsg ? (u(), m("span", {
|
|
842
851
|
key: 12,
|
|
843
852
|
class: "invalid-feedback mb-0",
|
|
844
|
-
innerHTML:
|
|
845
|
-
}, null, 8,
|
|
846
|
-
|
|
853
|
+
innerHTML: e.errormsg
|
|
854
|
+
}, null, 8, it)) : g("", !0),
|
|
855
|
+
o.allowDatalist() ? (u(), m("datalist", {
|
|
847
856
|
key: 13,
|
|
848
|
-
id:
|
|
857
|
+
id: e.id + "-list"
|
|
849
858
|
}, [
|
|
850
|
-
(u(!0), m(T, null, M(
|
|
859
|
+
(u(!0), m(T, null, M(e.options, (s, l) => (u(), m("option", {
|
|
851
860
|
key: l,
|
|
852
|
-
value:
|
|
853
|
-
},
|
|
854
|
-
], 8,
|
|
861
|
+
value: s.value
|
|
862
|
+
}, $(s.value), 9, lt))), 128))
|
|
863
|
+
], 8, nt)) : g("", !0)
|
|
855
864
|
], 2);
|
|
856
865
|
}
|
|
857
|
-
const
|
|
858
|
-
function
|
|
859
|
-
const
|
|
860
|
-
r.append(
|
|
861
|
-
l && l.target instanceof HTMLElement && l.target.closest(".btn-primary") && (l.target.closest(".btn-primary"), (i.hasAttribute("multiple") ?
|
|
866
|
+
const Z = /* @__PURE__ */ S(Be, [["render", ct]]);
|
|
867
|
+
function dt(t, a) {
|
|
868
|
+
const e = a.querySelector(".files"), r = a.querySelector(".drop-area"), i = t.querySelector("input"), o = t.hasAttribute("data-maxsize") ? t.getAttribute("data-maxsize") : 0, s = i.cloneNode();
|
|
869
|
+
r.append(s), a.addEventListener("click", (l) => {
|
|
870
|
+
l && l.target instanceof HTMLElement && l.target.closest(".btn-primary") && (l.target.closest(".btn-primary"), (i.hasAttribute("multiple") ? s : i).click());
|
|
862
871
|
}), a.addEventListener("click", (l) => {
|
|
863
872
|
if (l && l.target instanceof HTMLElement && l.target.closest(".files button")) {
|
|
864
|
-
const
|
|
865
|
-
for (let
|
|
866
|
-
const
|
|
867
|
-
|
|
873
|
+
const c = new DataTransfer(), { files: n } = i, f = l.target.closest(".files button");
|
|
874
|
+
for (let h = 0; h < n.length; h++) {
|
|
875
|
+
const b = n[h];
|
|
876
|
+
b.name != f.getAttribute("data-file") && c.items.add(b);
|
|
868
877
|
}
|
|
869
|
-
i.files =
|
|
870
|
-
const
|
|
871
|
-
i.dispatchEvent(
|
|
878
|
+
i.files = c.files;
|
|
879
|
+
const p = new Event("change");
|
|
880
|
+
i.dispatchEvent(p);
|
|
872
881
|
}
|
|
873
|
-
}),
|
|
882
|
+
}), s.addEventListener("change", (l) => {
|
|
874
883
|
if (i.hasAttribute("multiple")) {
|
|
875
|
-
const
|
|
876
|
-
let
|
|
877
|
-
const
|
|
878
|
-
for (let
|
|
879
|
-
const
|
|
880
|
-
!
|
|
884
|
+
const n = [...i.files, ...s.files];
|
|
885
|
+
let f = [];
|
|
886
|
+
const p = new DataTransfer();
|
|
887
|
+
for (let h = 0; h < n.length; h++) {
|
|
888
|
+
const b = n[h], y = b.size / 1e3;
|
|
889
|
+
!f.includes(b.name) && (o == 0 || y < o) && p.items.add(b), f.push(b.name);
|
|
881
890
|
}
|
|
882
|
-
i.files =
|
|
891
|
+
i.files = p.files;
|
|
883
892
|
} else
|
|
884
|
-
i.files =
|
|
885
|
-
const
|
|
886
|
-
i.dispatchEvent(
|
|
887
|
-
}),
|
|
888
|
-
|
|
889
|
-
}),
|
|
890
|
-
|
|
891
|
-
}),
|
|
892
|
-
|
|
893
|
+
i.files = s.files;
|
|
894
|
+
const c = new Event("change");
|
|
895
|
+
i.dispatchEvent(c);
|
|
896
|
+
}), s.addEventListener("dragenter", (l) => {
|
|
897
|
+
s.classList.add("focus");
|
|
898
|
+
}), s.addEventListener("dragleave", (l) => {
|
|
899
|
+
s.classList.remove("focus");
|
|
900
|
+
}), s.addEventListener("drop", (l) => {
|
|
901
|
+
s.classList.remove("focus");
|
|
893
902
|
}), i.addEventListener("change", (l) => {
|
|
894
|
-
|
|
895
|
-
for (const
|
|
896
|
-
|
|
903
|
+
e.innerHTML = "";
|
|
904
|
+
for (const c of i.files)
|
|
905
|
+
e.innerHTML += `<span class="file">${c.name} <button data-file="${c.name}">Remove</button></span>`;
|
|
897
906
|
});
|
|
898
907
|
}
|
|
899
908
|
window.dataLayer = window.dataLayer || [];
|
|
@@ -901,13 +910,13 @@ window.dataLayer.push({
|
|
|
901
910
|
event: "customElementRegistered",
|
|
902
911
|
element: "fileupload"
|
|
903
912
|
});
|
|
904
|
-
class
|
|
913
|
+
class ut extends HTMLElement {
|
|
905
914
|
constructor() {
|
|
906
915
|
super(), this.attachShadow({ mode: "open" });
|
|
907
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
916
|
+
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`, r = `@import "${a}/css/components/fileupload.css";`, i = document.createElement("template");
|
|
908
917
|
i.innerHTML = `
|
|
909
918
|
<style>
|
|
910
|
-
@import "${
|
|
919
|
+
@import "${e}";
|
|
911
920
|
${r}
|
|
912
921
|
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
913
922
|
</style>
|
|
@@ -924,11 +933,11 @@ class ce extends HTMLElement {
|
|
|
924
933
|
}
|
|
925
934
|
connectedCallback() {
|
|
926
935
|
this.innerHTML += '<i class="fa-regular fa-arrow-up-from-bracket me-2" aria-hidden="true" slot="btn"></i>';
|
|
927
|
-
const a = this.shadowRoot.querySelector(".file-upload"),
|
|
928
|
-
r.innerHTML = `${this.hasAttribute("data-maxsize") ? `Max file size is ${this.getAttribute("data-maxsize")}kb. ` : ""}${
|
|
936
|
+
const a = this.shadowRoot.querySelector(".file-upload"), e = this.querySelector("input"), r = this.shadowRoot.querySelector(".helper-text");
|
|
937
|
+
r.innerHTML = `${this.hasAttribute("data-maxsize") ? `Max file size is ${this.getAttribute("data-maxsize")}kb. ` : ""}${e.hasAttribute("accept") ? `Supported file types are ${e.getAttribute("accept")}` : ""}`, dt(this, a);
|
|
929
938
|
}
|
|
930
939
|
}
|
|
931
|
-
const
|
|
940
|
+
const mt = {
|
|
932
941
|
name: "FileUpload",
|
|
933
942
|
props: {
|
|
934
943
|
maxfilesize: {
|
|
@@ -942,45 +951,45 @@ const de = {
|
|
|
942
951
|
},
|
|
943
952
|
mounted() {
|
|
944
953
|
this.$nextTick(function() {
|
|
945
|
-
window.customElements.get("iam-fileupload") || window.customElements.define("iam-fileupload",
|
|
954
|
+
window.customElements.get("iam-fileupload") || window.customElements.define("iam-fileupload", ut);
|
|
946
955
|
});
|
|
947
956
|
}
|
|
948
957
|
};
|
|
949
|
-
function
|
|
958
|
+
function ht(t, a, e, r, i, o) {
|
|
950
959
|
return u(), m("iam-fileupload", null, [
|
|
951
|
-
v(
|
|
960
|
+
v(t.$slots, "default")
|
|
952
961
|
]);
|
|
953
962
|
}
|
|
954
|
-
const
|
|
963
|
+
const nr = /* @__PURE__ */ S(mt, [["render", ht]]);
|
|
955
964
|
/*!
|
|
956
|
-
* iamKey v3.7.
|
|
965
|
+
* iamKey v3.7.9-beta-2
|
|
957
966
|
* Copyright 2022-2023 iamproperty
|
|
958
967
|
*/
|
|
959
|
-
function
|
|
960
|
-
let a =
|
|
968
|
+
function ft(t) {
|
|
969
|
+
let a = t.querySelectorAll("details"), e = t.querySelectorAll("summary");
|
|
961
970
|
if (a.forEach((r) => {
|
|
962
971
|
r.classList.add("accordion-item");
|
|
963
|
-
}),
|
|
972
|
+
}), e.forEach((r) => {
|
|
964
973
|
r.classList.add("accordion-header"), r.classList.add("accordion-button"), r.classList.add("h4");
|
|
965
|
-
}), !
|
|
966
|
-
const r =
|
|
974
|
+
}), !t.classList.contains("accordion--keep-open")) {
|
|
975
|
+
const r = t.querySelectorAll(":scope > details");
|
|
967
976
|
r.forEach((i) => {
|
|
968
977
|
i.addEventListener("click", () => {
|
|
969
|
-
r.forEach((
|
|
970
|
-
|
|
978
|
+
r.forEach((o) => {
|
|
979
|
+
o !== i && o.removeAttribute("open");
|
|
971
980
|
});
|
|
972
981
|
});
|
|
973
982
|
});
|
|
974
983
|
}
|
|
975
984
|
}
|
|
976
985
|
window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "accordion" });
|
|
977
|
-
let
|
|
986
|
+
let bt = class extends HTMLElement {
|
|
978
987
|
constructor() {
|
|
979
988
|
super(), this.attachShadow({ mode: "open" });
|
|
980
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
989
|
+
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`, r = document.createElement("template");
|
|
981
990
|
r.innerHTML = `
|
|
982
991
|
<style>
|
|
983
|
-
@import "${
|
|
992
|
+
@import "${e}";
|
|
984
993
|
\uFEFF:is(.accordion,iam-accordion){--accordion-indent: 0.75rem;--accordion-right-padding: 3rem;--accordion-y-padding: 1rem;--accordion-icon-size: 1.875rem;--accordion-icon-top: 0.75rem}@media screen and (min-width: 62em){:is(.accordion,iam-accordion){--accordion-right-padding: 6rem;--accordion-y-padding: 2rem;--accordion-icon-size: 3rem;--accordion-icon-top: 1.25rem}}.accordion-header{padding:var(--accordion-y-padding) var(--accordion-right-padding) var(--accordion-y-padding) var(--accordion-indent);color:var(--colour-heading);text-align:left;background-color:rgba(0,0,0,0);overflow-anchor:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,border-radius .15s ease;--marker-bg: var(--colour-secondary);cursor:pointer;position:relative;max-width:100%}@media(prefers-reduced-motion: reduce){.accordion-header{transition:none}}.accordion-header .badge{vertical-align:bottom;margin-left:.5em;margin-right:.5em;margin-bottom:.1em}.accordion-header:before,.accordion-header:after{content:"";position:absolute;right:var(--accordion-indent);top:var(--accordion-icon-top);margin-top:var(--accordion-icon-size-half);width:var(--accordion-icon-size);height:var(--accordion-icon-size)}.accordion-header:before{text-indent:100%;white-space:nowrap;overflow:hidden;background:var(--marker-bg);border-radius:100%}.accordion-header::after{background:currentColor;mask-image:var(--icon-arrow);mask-size:50%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-arrow);-webkit-mask-size:50%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%;transition:transform .2s ease-in-out;transform:rotate(90deg)}@media(prefers-reduced-motion: reduce){.accordion-header::after{transition:none}}@media(forced-colors: active){.accordion-header::after{content:"►";mask-image:none;-webkit-mask-image:none}}.accordion-header:hover,.accordion-header:focus{--marker-bg: var(--colour-warning);color:var(--colour-hover)}.accordion-header:hover{z-index:var(--index-focus)}.accordion-header:focus{z-index:var(--index-focus);border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}[open]>summary>.accordion-header{color:var(--colour-heading);background-color:rgba(0,0,0,0)}[open]>summary>.accordion-header::after{transform:rotate(-90deg)}.accordion-header[class*=bg-] .accordion-button{border-bottom:1px solid var(--colour-border);margin-bottom:-1px}.accordion-header[class*=bg-] .accordion-button:before{background:none !important}.accordion-header[class*=bg-]:hover .accordion-button{opacity:.8}.accordion-header[class*=bg-]+.accordion-body{padding-top:2rem}.accordion-header{margin-bottom:0}.accordion-item{background-color:rgba(0,0,0,0);border-bottom:1px solid var(--colour-border);margin-bottom:2rem}.accordion-item:first-of-type{border-top:1px solid var(--colour-border)}.accordion-item+.accordion-item{margin-top:-2rem}.accordion-item summary~*{text-align:left;padding:0 var(--accordion-indent)}.accordion--straight>details>summary:not([class*=bg-])>.accordion-button,.accordion--straight>details>.accordion-item summary~*{padding-left:0 !important}.accordion--straight .accordion-item summary~*{padding-right:0 !important}.accordion .accordion:first-child{padding-top:1rem}.accordion .accordion:last-child{padding-bottom:2rem}.accordion .accordion .accordion-button{padding:1rem 3rem 1rem var(--accordion-indent)}.accordion .accordion .accordion-button:before,.accordion .accordion .accordion-button:after{top:.75rem;height:2rem;width:2rem;right:.5rem}.accordion .accordion .accordion-button:before{background-color:var(--colour-light)}/*# sourceMappingURL=assets/css/components/accordion.css.map */
|
|
985
994
|
|
|
986
995
|
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
@@ -991,22 +1000,22 @@ let he = class extends HTMLElement {
|
|
|
991
1000
|
`, this.shadowRoot.appendChild(r.content.cloneNode(!0));
|
|
992
1001
|
}
|
|
993
1002
|
connectedCallback() {
|
|
994
|
-
|
|
1003
|
+
ft(this);
|
|
995
1004
|
}
|
|
996
1005
|
};
|
|
997
|
-
window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion",
|
|
998
|
-
const
|
|
1006
|
+
window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", bt);
|
|
1007
|
+
const pt = {
|
|
999
1008
|
name: "Accordion",
|
|
1000
1009
|
props: {},
|
|
1001
1010
|
mounted() {
|
|
1002
1011
|
}
|
|
1003
|
-
},
|
|
1004
|
-
function
|
|
1005
|
-
return u(), m("iam-accordion",
|
|
1006
|
-
v(
|
|
1012
|
+
}, yt = { ref: "wrapper" };
|
|
1013
|
+
function gt(t, a, e, r, i, o) {
|
|
1014
|
+
return u(), m("iam-accordion", yt, [
|
|
1015
|
+
v(t.$slots, "default")
|
|
1007
1016
|
], 512);
|
|
1008
1017
|
}
|
|
1009
|
-
const
|
|
1018
|
+
const cr = /* @__PURE__ */ S(pt, [["render", gt]]), _t = {
|
|
1010
1019
|
name: "AccordionItem",
|
|
1011
1020
|
props: {
|
|
1012
1021
|
title: {
|
|
@@ -1033,7 +1042,7 @@ const lo = /* @__PURE__ */ A(fe, [["render", pe]]), ye = {
|
|
|
1033
1042
|
},
|
|
1034
1043
|
computed: {
|
|
1035
1044
|
createID() {
|
|
1036
|
-
return (
|
|
1045
|
+
return (t) => `${Ne(t)}`;
|
|
1037
1046
|
}
|
|
1038
1047
|
},
|
|
1039
1048
|
data() {
|
|
@@ -1041,24 +1050,24 @@ const lo = /* @__PURE__ */ A(fe, [["render", pe]]), ye = {
|
|
|
1041
1050
|
show: !this.lazy
|
|
1042
1051
|
};
|
|
1043
1052
|
}
|
|
1044
|
-
},
|
|
1045
|
-
function
|
|
1053
|
+
}, vt = ["id"], wt = ["classList"];
|
|
1054
|
+
function At(t, a, e, r, i, o) {
|
|
1046
1055
|
return u(), m("details", {
|
|
1047
|
-
id:
|
|
1056
|
+
id: o.createID(e.title)
|
|
1048
1057
|
}, [
|
|
1049
1058
|
d("summary", {
|
|
1050
|
-
classList: `${
|
|
1059
|
+
classList: `${e.titlecolour ? `bg-${e.titlecolour}` : ""}`
|
|
1051
1060
|
}, [
|
|
1052
|
-
|
|
1053
|
-
|
|
1061
|
+
he($(e.title), 1),
|
|
1062
|
+
e.badge ? (u(), m("span", {
|
|
1054
1063
|
key: 0,
|
|
1055
|
-
class:
|
|
1056
|
-
},
|
|
1057
|
-
], 8,
|
|
1058
|
-
v(
|
|
1059
|
-
], 8,
|
|
1064
|
+
class: L(`badge bg-${e.badgecolour}`)
|
|
1065
|
+
}, $(e.badge), 3)) : g("", !0)
|
|
1066
|
+
], 8, wt),
|
|
1067
|
+
v(t.$slots, "default")
|
|
1068
|
+
], 8, vt);
|
|
1060
1069
|
}
|
|
1061
|
-
const
|
|
1070
|
+
const dr = /* @__PURE__ */ S(_t, [["render", At]]), St = {
|
|
1062
1071
|
name: "Header",
|
|
1063
1072
|
props: {
|
|
1064
1073
|
title: {
|
|
@@ -1075,163 +1084,92 @@ const co = /* @__PURE__ */ A(ye, [["render", _e]]), we = {
|
|
|
1075
1084
|
required: !1
|
|
1076
1085
|
}
|
|
1077
1086
|
}
|
|
1078
|
-
},
|
|
1079
|
-
function
|
|
1080
|
-
return u(), m("div",
|
|
1087
|
+
}, Lt = { class: "container" }, kt = { class: "row" }, qt = { class: "col-sm-6" }, $t = { class: "pt-5 pb-3 px-4" }, xt = { class: "col-sm-6 col-md-5 ms-auto" }, Et = ["src"];
|
|
1088
|
+
function Tt(t, a, e, r, i, o) {
|
|
1089
|
+
return u(), m("div", Lt, [
|
|
1081
1090
|
d("div", {
|
|
1082
|
-
class:
|
|
1091
|
+
class: L("bg-" + e.background + " mb-4")
|
|
1083
1092
|
}, [
|
|
1084
|
-
d("div",
|
|
1085
|
-
d("div",
|
|
1086
|
-
d("div",
|
|
1087
|
-
d("h2", null,
|
|
1088
|
-
v(
|
|
1093
|
+
d("div", kt, [
|
|
1094
|
+
d("div", qt, [
|
|
1095
|
+
d("div", $t, [
|
|
1096
|
+
d("h2", null, $(e.title), 1),
|
|
1097
|
+
v(t.$slots, "default")
|
|
1089
1098
|
])
|
|
1090
1099
|
]),
|
|
1091
|
-
d("div",
|
|
1092
|
-
|
|
1100
|
+
d("div", xt, [
|
|
1101
|
+
e.image ? (u(), m("img", {
|
|
1093
1102
|
key: 0,
|
|
1094
|
-
src:
|
|
1103
|
+
src: e.image,
|
|
1095
1104
|
alt: "",
|
|
1096
1105
|
class: "h-100 w-100 object-cover"
|
|
1097
|
-
}, null, 8,
|
|
1106
|
+
}, null, 8, Et)) : g("", !0)
|
|
1098
1107
|
])
|
|
1099
1108
|
])
|
|
1100
1109
|
], 2)
|
|
1101
1110
|
]);
|
|
1102
1111
|
}
|
|
1103
|
-
const
|
|
1104
|
-
/*!
|
|
1105
|
-
* iamKey v3.7.8
|
|
1106
|
-
* Copyright 2022-2023 iamproperty
|
|
1107
|
-
*/
|
|
1108
|
-
window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "Card" });
|
|
1109
|
-
let Ee = class extends HTMLElement {
|
|
1110
|
-
constructor() {
|
|
1111
|
-
super(), this.attachShadow({ mode: "open" }), this.querySelector('[class*="fa-"]') && this.classList.add("card--has-icon");
|
|
1112
|
-
let a = this.classList.toString();
|
|
1113
|
-
const t = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", r = document.body.hasAttribute("data-core-css") ? document.body.getAttribute("data-core-css") : `${t}/css/core.min.css`, i = document.createElement("template");
|
|
1114
|
-
i.innerHTML = `
|
|
1115
|
-
<style>
|
|
1116
|
-
@import "${r}";
|
|
1117
|
-
.card{--card-icon-right: 1rem;box-shadow:var(--card-box-shadow);border-radius:var(--card-border-radius);position:relative;font-weight:bold;font-size:1.125rem;line-height:1.5rem;color:var(--colour-primary);min-height:100%;width:100%;text-align:left;display:block;overflow:hidden;z-index:0;background:var(--colour-canvas-2);outline:var(--contrast-outline-width, 0px) solid var(--colour-primary);outline-offset:-1px}.card.border-0{box-shadow:none;--card-left-padding: 0rem;outline-offset:1px !important}.card__body{position:relative;padding:var(--card-top-padding) var(--card-right-padding) var(--card-bottom-padding) var(--card-left-padding);z-index:-1}.card:before,.card:after{content:"";position:absolute;right:var(--card-icon-right);bottom:var(--card-bottom-padding);height:1.5rem;width:1.5rem;background:var(--colour-warning);border-radius:50%}.card:after{background:var(--colour-primary-theme);mask-image:var(--icon-arrow);mask-size:50%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-arrow);-webkit-mask-size:50%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%;z-index:2}.card:is(:hover,:focus,.hover){--card-icon-right: 0.5rem;outline:2px solid var(--colour, var(--colour-primary));outline-offset:-2px}.card:not([class*=colour-]):is(:hover,:focus,.hover):before{background:var(--colour-primary-theme)}.card:not([class*=colour-]):is(:hover,:focus,.hover):after{background:#fff}.card:is(:active,.active){--card-icon-right: 0.5rem;outline:none}.card:is(:active,.active):before{background:var(--colour-warning)}.card:is(:active,.active):after{background:var(--colour-primary)}.card:is(:active){background:#fcfcfc}.card span{display:block;font-weight:bold;padding-top:1.5rem;font-size:1rem}.card:has(.card__illustration) .card__body{align-items:center;display:flex}.card:has(.card__illustration) .card__body .card__illustration{height:4rem;width:4rem;margin-right:1.5rem;margin-top:-1.25rem;margin-bottom:-1.25rem;position:relative}.card:has(.card__illustration) .card__body .card__illustration img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain}::slotted(i){font-size:1.5rem;margin:-3px var(--card-icon-right) 0 0;font-weight:400;vertical-align:middle}::slotted(span){display:block;font-weight:normal;padding-top:1.5rem;font-size:1rem}.card[class*=colour-],.card--filter{border-left:0.75rem solid var(--colour, var(--colour-primary))}.card--filter{--top-padding: 1.5rem;--right-padding: 1rem;--bottom-padding: 1.5rem;--left-padding: 1rem}.card--filter:has(.card__total) .card__body{align-items:center;display:flex}.card--filter:before,.card--filter:after{display:none}.card--filter:is(:hover,:focus,.hover){outline:none}.card--filter:is(:hover,:focus,.hover) .card__body{background:#eee}.card--filter:is(:active,.active) .card__body{background:#e0e0e0}.card--filter:is(:checked,.checked){outline:2px solid var(--colour, var(--colour-info));outline-offset:-2px}.card--filter:is(:checked,.checked) .card__body{background:#e0e0e0}.card--filter.card--has-icon{--bottom-padding: 1rem;border:none}.card--filter .icon{font-size:1.125rem !important;height:1.125rem !important;margin:0 0 .5rem 0 !important;font-weight:400 !important;display:block !important}.card--filter .card__total{font-size:3rem;line-height:3rem;padding-right:1rem}@media screen and (prefers-color-scheme: dark){.card--filter .card__body{background:none !important}.card--filter:is(:hover,:focus,.hover,:active,.active):not(:checked,.checked){outline:2px solid var(--colour, var(--colour-primary)) !important;outline-offset:-2px}}.card--filter ::slotted(i){display:block !important;font-size:1.125rem !important;margin:0 0 .5rem 0 !important}.card:has(.card__head) .card__head{padding-bottom:0;padding-top:27%;position:relative;overflow:hidden;background:rgba(0,0,0,.1);z-index:-1}.card:has(.card__head) .card__head>img{position:absolute;top:0;left:0;width:102%;height:102%;object-fit:cover}.card.card--lg-image:has(.card__head) .card__head{padding-top:55%}.card:has(.card__footer):after{display:none}.card:has(.card__footer) .card__footer{position:relative;background:#fff;padding:var(--card-top-padding) var(--card-right-padding) var(--card-bottom-padding) var(--card-left-padding);z-index:-1;display:block}/*# sourceMappingURL=assets/css/components/card.css.map */
|
|
1118
|
-
|
|
1119
|
-
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
1120
|
-
</style>
|
|
1121
|
-
<div class="card ${a}" tabindex="0" role="button">
|
|
1122
|
-
${this.hasAttribute("data-image") ? `<div class="card__head"><img src="${this.getAttribute("data-image")}" alt="" loading="lazy" /></div>` : ""}
|
|
1123
|
-
<div class="card__body">
|
|
1124
|
-
${this.classList.contains("card--filter") && this.hasAttribute("data-total") ? `<div class="card__total">${this.getAttribute("data-total")}</div>` : ""}
|
|
1125
|
-
${this.hasAttribute("data-illustration") ? `<div class="card__illustration"><img src="${this.getAttribute("data-illustration")}" alt="" loading="lazy" /></div>` : ""}
|
|
1126
|
-
<slot></slot>
|
|
1127
|
-
</div>
|
|
1128
|
-
${this.hasAttribute("data-cta") ? `<div class="card__footer"><span class="link">${this.getAttribute("data-cta")}</span></div>` : ""}
|
|
1129
|
-
</div>
|
|
1130
|
-
`, this.shadowRoot.appendChild(i.content.cloneNode(!0));
|
|
1131
|
-
}
|
|
1132
|
-
connectedCallback() {
|
|
1133
|
-
this.classList.add("loaded");
|
|
1134
|
-
const a = this.parentNode.closest("a, button, label"), t = this.shadowRoot.querySelector(".card");
|
|
1135
|
-
a.setAttribute("tabindex", "-1"), a.matches("label[for]") && (document.getElementById(a.getAttribute("for")).checked ? t.classList.add("checked") : t.classList.remove("checked")), t.addEventListener("click", (r) => {
|
|
1136
|
-
if (a.matches("label[for]")) {
|
|
1137
|
-
r.stopPropagation(), r.preventDefault();
|
|
1138
|
-
const i = document.getElementById(a.getAttribute("for")), s = i.getAttribute("name"), o = i.getAttribute("id");
|
|
1139
|
-
Array.from(document.querySelectorAll(`[name="${s}"]:not([id="${o}"])`)).forEach((l, n) => {
|
|
1140
|
-
document.querySelector(`[for="${l.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"));
|
|
1141
|
-
}), a.click(), i.checked ? t.classList.add("checked") : t.classList.remove("checked");
|
|
1142
|
-
}
|
|
1143
|
-
}), this.addEventListener("inactive", (r) => {
|
|
1144
|
-
t.classList.remove("checked");
|
|
1145
|
-
}), t.addEventListener("keydown", (r) => {
|
|
1146
|
-
switch (r.keyCode) {
|
|
1147
|
-
case 32:
|
|
1148
|
-
case 13:
|
|
1149
|
-
if (a.matches("label[for]")) {
|
|
1150
|
-
r.stopPropagation(), r.preventDefault();
|
|
1151
|
-
const i = document.getElementById(a.getAttribute("for")), s = i.getAttribute("name"), o = i.getAttribute("id");
|
|
1152
|
-
Array.from(document.querySelectorAll(`[name="${s}"]:not([id="${o}"])`)).forEach((l, n) => {
|
|
1153
|
-
document.querySelector(`[for="${l.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"));
|
|
1154
|
-
}), a.click(), i.checked ? t.classList.add("checked") : t.classList.remove("checked");
|
|
1155
|
-
} else
|
|
1156
|
-
a.click();
|
|
1157
|
-
break;
|
|
1158
|
-
}
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
static get observedAttributes() {
|
|
1162
|
-
return ["data-total", "class"];
|
|
1163
|
-
}
|
|
1164
|
-
attributeChangedCallback(a, t, r) {
|
|
1165
|
-
switch (a) {
|
|
1166
|
-
case "data-total": {
|
|
1167
|
-
this.shadowRoot.querySelector(".card__total").innerHTML = r;
|
|
1168
|
-
break;
|
|
1169
|
-
}
|
|
1170
|
-
case "class": {
|
|
1171
|
-
let i = this.classList.toString();
|
|
1172
|
-
this.querySelector('[class*="fa-"]') && (i += " card--has-icon"), this.shadowRoot.querySelector(".card").setAttribute("class", `card ${i}`);
|
|
1173
|
-
break;
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
};
|
|
1178
|
-
const Te = {
|
|
1112
|
+
const ur = /* @__PURE__ */ S(St, [["render", Tt]]), Mt = {
|
|
1179
1113
|
name: "Card",
|
|
1180
1114
|
mounted() {
|
|
1181
1115
|
this.$nextTick(function() {
|
|
1182
|
-
|
|
1116
|
+
import("./card.component.min-e393effa.mjs").then((t) => {
|
|
1117
|
+
window.customElements.get("iam-card") || window.customElements.define("iam-card", t.default);
|
|
1118
|
+
}).catch((t) => {
|
|
1119
|
+
console.log(t.message);
|
|
1120
|
+
});
|
|
1183
1121
|
});
|
|
1184
1122
|
}
|
|
1185
1123
|
};
|
|
1186
|
-
function
|
|
1124
|
+
function Ht(t, a, e, r, i, o) {
|
|
1187
1125
|
return u(), m("iam-card", null, [
|
|
1188
|
-
v(
|
|
1126
|
+
v(t.$slots, "default")
|
|
1189
1127
|
]);
|
|
1190
1128
|
}
|
|
1191
|
-
const
|
|
1192
|
-
function
|
|
1129
|
+
const Ct = /* @__PURE__ */ S(Mt, [["render", Ht]]);
|
|
1130
|
+
function Dt(t) {
|
|
1193
1131
|
var a;
|
|
1194
|
-
let
|
|
1195
|
-
|
|
1196
|
-
let i =
|
|
1197
|
-
|
|
1132
|
+
let e = t.querySelector(".carousel__inner"), r = t.querySelectorAll(".carousel__item").length;
|
|
1133
|
+
t.getAttribute("data-cols");
|
|
1134
|
+
let i = t.getAttribute("data-sm-cols"), o = t.getAttribute("data-md-cols");
|
|
1135
|
+
t.querySelector(".carousel__controls a").classList.add("active"), e.addEventListener("scroll", function(s) {
|
|
1198
1136
|
clearTimeout(a), a = setTimeout(function() {
|
|
1199
|
-
let l =
|
|
1200
|
-
Array.from(
|
|
1201
|
-
|
|
1202
|
-
}),
|
|
1137
|
+
let l = e.clientWidth, c = e.scrollWidth, n = e.scrollLeft, f = Math.round(n / c * r) + 1, p = t.querySelector(".carousel__item:last-child").offsetLeft;
|
|
1138
|
+
Array.from(t.querySelectorAll(".carousel__controls a")).forEach((h, b) => {
|
|
1139
|
+
h.classList.remove("active");
|
|
1140
|
+
}), t.querySelector(".control-" + f).classList.add("active"), f == 1 ? t.querySelector(".btn-prev").setAttribute("disabled", "disabled") : t.querySelector(".btn-prev").removeAttribute("disabled"), e.scrollLeft + l > p ? t.querySelector(".btn-next").setAttribute("disabled", "disabled") : t.querySelector(".btn-next").removeAttribute("disabled");
|
|
1203
1141
|
}, 100);
|
|
1204
|
-
}, !1),
|
|
1205
|
-
for (var l =
|
|
1142
|
+
}, !1), t.addEventListener("click", function(s) {
|
|
1143
|
+
for (var l = s.target; l && l != this; l = l.parentNode)
|
|
1206
1144
|
if (l.matches(".carousel__controls a")) {
|
|
1207
|
-
|
|
1208
|
-
|
|
1145
|
+
s.preventDefault(), Array.from(t.querySelectorAll(".carousel__controls a")).forEach((n, f) => {
|
|
1146
|
+
n.classList.remove("active");
|
|
1209
1147
|
}), l.classList.add("active");
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1148
|
+
const c = document.querySelector(l.getAttribute("href"));
|
|
1149
|
+
e.scroll({
|
|
1212
1150
|
top: 0,
|
|
1213
|
-
left:
|
|
1151
|
+
left: c.offsetLeft,
|
|
1214
1152
|
behavior: "smooth"
|
|
1215
1153
|
});
|
|
1216
1154
|
break;
|
|
1217
1155
|
}
|
|
1218
|
-
}, !1),
|
|
1219
|
-
for (var l =
|
|
1156
|
+
}, !1), t.addEventListener("click", function(s) {
|
|
1157
|
+
for (var l = s.target; l && l != this; l = l.parentNode)
|
|
1220
1158
|
if (l.matches(".btn-next, .btn-prev")) {
|
|
1221
|
-
|
|
1222
|
-
let
|
|
1223
|
-
|
|
1159
|
+
s.preventDefault();
|
|
1160
|
+
let c = l.classList.contains("btn-prev") ? e.scrollLeft - e.clientWidth : e.scrollLeft + e.clientWidth;
|
|
1161
|
+
e.scroll({
|
|
1224
1162
|
top: 0,
|
|
1225
|
-
left:
|
|
1163
|
+
left: c,
|
|
1226
1164
|
behavior: "smooth"
|
|
1227
1165
|
});
|
|
1228
1166
|
break;
|
|
1229
1167
|
}
|
|
1230
|
-
}, !1), r == 1 &&
|
|
1168
|
+
}, !1), r == 1 && t.classList.add("hide-btns"), i >= r && t.classList.add("hide-sm-btns"), o >= r && t.classList.add("hide-md-btns");
|
|
1231
1169
|
}
|
|
1232
|
-
const
|
|
1170
|
+
const Nt = {
|
|
1233
1171
|
components: {
|
|
1234
|
-
Card:
|
|
1172
|
+
Card: Ct
|
|
1235
1173
|
},
|
|
1236
1174
|
name: "Carousel",
|
|
1237
1175
|
data() {
|
|
@@ -1300,93 +1238,93 @@ const De = {
|
|
|
1300
1238
|
},
|
|
1301
1239
|
computed: {
|
|
1302
1240
|
content() {
|
|
1303
|
-
return (
|
|
1241
|
+
return (t) => `${t.image ? `<img src="${t.image}" alt="" />` : ""}${t.content ? t.content : ""}`;
|
|
1304
1242
|
}
|
|
1305
1243
|
},
|
|
1306
1244
|
mounted() {
|
|
1307
1245
|
this.id = this._uid, this.$nextTick(function() {
|
|
1308
|
-
|
|
1246
|
+
Dt(this.$refs.wrapper);
|
|
1309
1247
|
});
|
|
1310
1248
|
}
|
|
1311
|
-
},
|
|
1249
|
+
}, Rt = ["id", "data-cols", "data-sm-cols", "data-md-cols"], zt = { class: "carousel__wrapper" }, It = { class: "carousel__inner" }, Pt = ["id"], Ft = ["innerHTML", "id"], jt = ["href"], Bt = /* @__PURE__ */ d("button", {
|
|
1312
1250
|
class: "btn btn-prev",
|
|
1313
1251
|
"data-go": "0",
|
|
1314
1252
|
disabled: ""
|
|
1315
|
-
}, "Prev", -1),
|
|
1253
|
+
}, "Prev", -1), Ot = /* @__PURE__ */ d("button", {
|
|
1316
1254
|
class: "btn btn-next",
|
|
1317
1255
|
"data-go": "2"
|
|
1318
1256
|
}, "Next", -1);
|
|
1319
|
-
function
|
|
1320
|
-
const
|
|
1257
|
+
function Vt(t, a, e, r, i, o) {
|
|
1258
|
+
const s = R("Card");
|
|
1321
1259
|
return u(), m("div", {
|
|
1322
1260
|
class: "container carousel",
|
|
1323
1261
|
id: "carousel" + i.id,
|
|
1324
1262
|
ref: "wrapper",
|
|
1325
|
-
"data-cols":
|
|
1326
|
-
"data-sm-cols":
|
|
1327
|
-
"data-md-cols":
|
|
1263
|
+
"data-cols": e.cols,
|
|
1264
|
+
"data-sm-cols": e.smcols,
|
|
1265
|
+
"data-md-cols": e.mdcols
|
|
1328
1266
|
}, [
|
|
1329
|
-
v(
|
|
1330
|
-
d("div",
|
|
1331
|
-
d("div",
|
|
1332
|
-
|
|
1267
|
+
v(t.$slots, "default"),
|
|
1268
|
+
d("div", zt, [
|
|
1269
|
+
d("div", It, [
|
|
1270
|
+
e.type == "card" ? (u(), m("div", {
|
|
1333
1271
|
key: 0,
|
|
1334
|
-
class:
|
|
1272
|
+
class: L(`row row-cols-${e.cols} row-cols-sm-${e.smcols} row-cols-md-${e.mdcols} ${e.gap ? `g-${e.gap}` : ""}`)
|
|
1335
1273
|
}, [
|
|
1336
|
-
(u(!0), m(T, null, M(
|
|
1337
|
-
class:
|
|
1338
|
-
key:
|
|
1339
|
-
id: "carousel" + i.id + "slide" + (
|
|
1274
|
+
(u(!0), m(T, null, M(e.items, (l, c) => (u(), m("div", {
|
|
1275
|
+
class: L(`col carousel__item${e.colclass ? ` ${e.colclass}` : ""}`),
|
|
1276
|
+
key: c,
|
|
1277
|
+
id: "carousel" + i.id + "slide" + (c + 1)
|
|
1340
1278
|
}, [
|
|
1341
|
-
|
|
1342
|
-
class:
|
|
1343
|
-
type:
|
|
1344
|
-
btnyype:
|
|
1345
|
-
titleclass:
|
|
1346
|
-
ctatext:
|
|
1347
|
-
hidectatext:
|
|
1279
|
+
q(s, H(l, {
|
|
1280
|
+
class: e.cardclass,
|
|
1281
|
+
type: e.cardtype,
|
|
1282
|
+
btnyype: e.btntype,
|
|
1283
|
+
titleclass: e.titleclass,
|
|
1284
|
+
ctatext: e.ctatext,
|
|
1285
|
+
hidectatext: e.hidectatext
|
|
1348
1286
|
}), null, 16, ["class", "type", "btnyype", "titleclass", "ctatext", "hidectatext"])
|
|
1349
|
-
], 10,
|
|
1287
|
+
], 10, Pt))), 128))
|
|
1350
1288
|
], 2)) : g("", !0),
|
|
1351
|
-
|
|
1289
|
+
e.type != "card" ? (u(), m("div", {
|
|
1352
1290
|
key: 1,
|
|
1353
|
-
class:
|
|
1291
|
+
class: L(`row row-cols-${e.cols} row-cols-sm-${e.smcols} row-cols-md-${e.mdcols} ${e.gap ? `g-${e.gap}` : ""}`)
|
|
1354
1292
|
}, [
|
|
1355
|
-
(u(!0), m(T, null, M(
|
|
1356
|
-
class:
|
|
1357
|
-
key:
|
|
1358
|
-
innerHTML:
|
|
1359
|
-
id: "carousel" + i.id + "slide" + (
|
|
1360
|
-
}, null, 10,
|
|
1293
|
+
(u(!0), m(T, null, M(e.items, (l, c) => (u(), m("div", {
|
|
1294
|
+
class: L(`col carousel__item${e.colclass ? ` ${e.colclass}` : ""}`),
|
|
1295
|
+
key: c,
|
|
1296
|
+
innerHTML: o.content(l),
|
|
1297
|
+
id: "carousel" + i.id + "slide" + (c + 1)
|
|
1298
|
+
}, null, 10, Ft))), 128))
|
|
1361
1299
|
], 2)) : g("", !0)
|
|
1362
1300
|
]),
|
|
1363
1301
|
d("div", {
|
|
1364
|
-
class:
|
|
1302
|
+
class: L(`carousel__controls cols-${e.cols} cols-sm-${e.smcols} cols-md-${e.mdcols}`)
|
|
1365
1303
|
}, [
|
|
1366
|
-
(u(!0), m(T, null, M(
|
|
1367
|
-
key:
|
|
1368
|
-
href: "#carousel" + i.id + "slide" + (
|
|
1369
|
-
class:
|
|
1370
|
-
}, "Slide " +
|
|
1304
|
+
(u(!0), m(T, null, M(e.items, (l, c) => (u(), m("a", {
|
|
1305
|
+
key: c,
|
|
1306
|
+
href: "#carousel" + i.id + "slide" + (c + 1),
|
|
1307
|
+
class: L(`control-${c + 1}`)
|
|
1308
|
+
}, "Slide " + $(c + 1), 11, jt))), 128))
|
|
1371
1309
|
], 2),
|
|
1372
|
-
|
|
1373
|
-
|
|
1310
|
+
Bt,
|
|
1311
|
+
Ot
|
|
1374
1312
|
])
|
|
1375
|
-
], 8,
|
|
1313
|
+
], 8, Rt);
|
|
1376
1314
|
}
|
|
1377
|
-
const
|
|
1315
|
+
const mr = /* @__PURE__ */ S(Nt, [["render", Vt]]);
|
|
1378
1316
|
/*!
|
|
1379
|
-
* iamKey v3.7.
|
|
1317
|
+
* iamKey v3.7.9-beta-2
|
|
1380
1318
|
* Copyright 2022-2023 iamproperty
|
|
1381
1319
|
*/
|
|
1382
1320
|
window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "header" });
|
|
1383
|
-
class
|
|
1321
|
+
class Ut extends HTMLElement {
|
|
1384
1322
|
constructor() {
|
|
1385
1323
|
super(), this.attachShadow({ mode: "open" });
|
|
1386
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
1324
|
+
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`, r = document.createElement("template");
|
|
1387
1325
|
r.innerHTML = `
|
|
1388
1326
|
<style>
|
|
1389
|
-
@import "${
|
|
1327
|
+
@import "${e}";
|
|
1390
1328
|
.header-banner{background:linear-gradient(180deg, var(--colour-secondary) 0, var(--colour-info) 100%);margin-bottom:2rem;position:relative;overflow:hidden;max-width:100% !important}@media screen and (min-width: 62em){.header-banner{min-height:29.375rem}}.header-banner>.container{padding-bottom:0;position:relative}.header-banner .breadcrumb{margin-top:1.5rem;margin-bottom:-0.5rem}@media screen and (min-width: 62em){.header-banner .breadcrumb{position:absolute;top:0;left:3.75rem}}.header-banner__inner{--colour-muted: #9d9d9d;--colour-body: #595959;--colour-border: #D8D8D8;--colour-link: var(--colour-primary-theme);--colour-brand: var(--colour-primary);--colour-underline: var(--colour-secondary);--colour-heading: var(--colour-primary);--colour-focus: var(--colour-primary-theme);--colour-hover: var(--colour-primary-theme);--colour-active: var(--colour-primary-theme);--colour-selected: var(--colour-info);--colour-inverted: #FCFCFC;--colour-btn: var(--colour-primary-theme);--colour-btn-bg: var(--colour-warning);--colour-btn-border: var(--colour-warning);--colour-btn-bg-hover: transparent;--colour-btn-hover: var(--colour-primary-theme);--colour-btn-secondary: var(--colour-primary-theme);--colour-btn-secondary-border: var(--colour-primary-theme);--colour-btn-secondary-bg: transparent;--colour-btn-secondary-bg-hover: var(--colour-primary-theme);--colour-btn-secondary-hover: var(--colour-inverted);--colour-canvas-2: var(--colour-canvas);color:var(--colour-body);background:#fff;padding:2rem;margin:1.875rem 0;position:relative;z-index:var(--index-above)}.header-banner__inner .text-primary{color:var(--colour-primary) !important}@media screen and (min-width: 62em){.header-banner__inner{max-width:37.5rem;margin:7rem 0 5rem 0;padding:3.5rem 4rem}}.header-banner__inner>*:last-child{padding-bottom:0;margin-bottom:0}.header-banner picture img{display:none}@media screen and (min-width: 62em){.header-banner picture img{display:block;position:absolute;top:-0.5%;left:40%;height:101%;object-fit:cover;width:60%;pointer-events:none}}::slotted(.breadcrumb){margin-top:1.5rem !important;margin-bottom:-0.5rem !important}@media screen and (min-width: 62em){::slotted(.breadcrumb){position:absolute !important;top:0 !important;left:5.25rem !important}}::slotted(*:last-child){padding-bottom:0 !important;margin-bottom:0 !important}/*# sourceMappingURL=assets/css/components/header.css.map */
|
|
1391
1329
|
|
|
1392
1330
|
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
@@ -1409,11 +1347,11 @@ class Ve extends HTMLElement {
|
|
|
1409
1347
|
}
|
|
1410
1348
|
connectedCallback() {
|
|
1411
1349
|
this.classList.add("loaded");
|
|
1412
|
-
const a = this.shadowRoot.querySelector("picture"),
|
|
1413
|
-
this.hasAttribute("image") ?
|
|
1350
|
+
const a = this.shadowRoot.querySelector("picture"), e = this.shadowRoot.querySelector("picture source");
|
|
1351
|
+
this.hasAttribute("image") ? e.setAttribute("srcset", this.getAttribute("image")) : a.remove();
|
|
1414
1352
|
}
|
|
1415
1353
|
}
|
|
1416
|
-
const
|
|
1354
|
+
const Wt = {
|
|
1417
1355
|
name: "Header",
|
|
1418
1356
|
props: {
|
|
1419
1357
|
title: {
|
|
@@ -1427,53 +1365,53 @@ const Ue = {
|
|
|
1427
1365
|
},
|
|
1428
1366
|
mounted() {
|
|
1429
1367
|
this.$nextTick(function() {
|
|
1430
|
-
window.customElements.get("iam-header") || window.customElements.define("iam-header",
|
|
1368
|
+
window.customElements.get("iam-header") || window.customElements.define("iam-header", Ut);
|
|
1431
1369
|
});
|
|
1432
1370
|
}
|
|
1433
|
-
},
|
|
1434
|
-
function
|
|
1371
|
+
}, Gt = ["image"], Kt = ["innerHTML"];
|
|
1372
|
+
function Yt(t, a, e, r, i, o) {
|
|
1435
1373
|
return u(), m("iam-header", {
|
|
1436
1374
|
class: "bg-secondary",
|
|
1437
|
-
image:
|
|
1375
|
+
image: e.image
|
|
1438
1376
|
}, [
|
|
1439
|
-
v(
|
|
1440
|
-
|
|
1377
|
+
v(t.$slots, "breadcrumb"),
|
|
1378
|
+
e.title ? (u(), m("h1", {
|
|
1441
1379
|
key: 0,
|
|
1442
|
-
innerHTML:
|
|
1443
|
-
}, null, 8,
|
|
1444
|
-
v(
|
|
1445
|
-
], 8,
|
|
1380
|
+
innerHTML: e.title
|
|
1381
|
+
}, null, 8, Kt)) : g("", !0),
|
|
1382
|
+
v(t.$slots, "default")
|
|
1383
|
+
], 8, Gt);
|
|
1446
1384
|
}
|
|
1447
|
-
const
|
|
1448
|
-
function
|
|
1385
|
+
const hr = /* @__PURE__ */ S(Wt, [["render", Yt]]);
|
|
1386
|
+
function Zt(t) {
|
|
1449
1387
|
var a;
|
|
1450
|
-
const
|
|
1388
|
+
const e = t.querySelector(".testimonial__images"), r = e.querySelectorAll("img").length;
|
|
1451
1389
|
if (r == 1)
|
|
1452
1390
|
return !1;
|
|
1453
|
-
|
|
1454
|
-
const i = function(
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1391
|
+
t.classList.add("testimonial--multi");
|
|
1392
|
+
const i = function(o) {
|
|
1393
|
+
const s = t.querySelector(".btn-next"), l = t.querySelector(".btn-prev");
|
|
1394
|
+
s.setAttribute("data-go", o + 1), l.setAttribute("data-go", o - 1), s.removeAttribute("disabled"), l.removeAttribute("disabled"), o == 1 ? l.setAttribute("disabled", !0) : o == r && s.setAttribute("disabled", !0);
|
|
1457
1395
|
};
|
|
1458
|
-
|
|
1396
|
+
e.addEventListener("scroll", function(o) {
|
|
1459
1397
|
clearTimeout(a), a = setTimeout(function() {
|
|
1460
|
-
let
|
|
1461
|
-
|
|
1398
|
+
let s = e.scrollWidth, l = e.scrollHeight, c = e.scrollLeft, n = e.scrollTop, f = Math.round(c / s * r) + 1;
|
|
1399
|
+
c == 0 && n != 0 && (f = Math.round(n / l * r) + 1), t.setAttribute("data-show", f), i(f);
|
|
1462
1400
|
}, 300);
|
|
1463
|
-
}, !1),
|
|
1464
|
-
for (var
|
|
1465
|
-
if (
|
|
1466
|
-
let l = parseInt(
|
|
1467
|
-
|
|
1468
|
-
top:
|
|
1469
|
-
left:
|
|
1401
|
+
}, !1), t.addEventListener("click", function(o) {
|
|
1402
|
+
for (var s = o.target; s && s != this; s = s.parentNode)
|
|
1403
|
+
if (s.matches("[data-go]")) {
|
|
1404
|
+
let l = parseInt(s.getAttribute("data-go")), c = 0, n = 0, f = e.scrollWidth, p = e.scrollHeight;
|
|
1405
|
+
f > p ? n = Math.floor(f * ((l - 1) / r)) : c = Math.floor(p * ((l - 1) / r)), e.scroll({
|
|
1406
|
+
top: c,
|
|
1407
|
+
left: n,
|
|
1470
1408
|
behavior: "smooth"
|
|
1471
1409
|
});
|
|
1472
1410
|
break;
|
|
1473
1411
|
}
|
|
1474
1412
|
}, !1);
|
|
1475
1413
|
}
|
|
1476
|
-
const
|
|
1414
|
+
const Xt = {
|
|
1477
1415
|
name: "Testimonial",
|
|
1478
1416
|
props: {
|
|
1479
1417
|
items: {
|
|
@@ -1487,13 +1425,13 @@ const Ze = {
|
|
|
1487
1425
|
}
|
|
1488
1426
|
},
|
|
1489
1427
|
mounted() {
|
|
1490
|
-
|
|
1428
|
+
Zt(this.$refs.wrapper);
|
|
1491
1429
|
}
|
|
1492
|
-
},
|
|
1430
|
+
}, Jt = {
|
|
1493
1431
|
class: "container testimonial mb-5",
|
|
1494
1432
|
"data-show": "1",
|
|
1495
1433
|
ref: "wrapper"
|
|
1496
|
-
},
|
|
1434
|
+
}, Qt = { class: "row" }, ea = { class: "col-md-5 position-relative" }, ta = { class: "testimonial__images" }, aa = ["src"], sa = /* @__PURE__ */ d("div", { class: "testimonial__controls" }, [
|
|
1497
1435
|
/* @__PURE__ */ d("button", {
|
|
1498
1436
|
"data-go": "0",
|
|
1499
1437
|
disabled: "",
|
|
@@ -1503,52 +1441,52 @@ const Ze = {
|
|
|
1503
1441
|
"data-go": "2",
|
|
1504
1442
|
class: "btn-next"
|
|
1505
1443
|
}, "Next")
|
|
1506
|
-
], -1), ra = { class: "col-md-7" }, oa = /* @__PURE__ */ d("h2", null, "What our customers think…", -1),
|
|
1507
|
-
function
|
|
1508
|
-
return u(), m("div",
|
|
1444
|
+
], -1), ra = { class: "col-md-7" }, oa = /* @__PURE__ */ d("h2", null, "What our customers think…", -1), ia = { class: "testimonial__content" }, na = ["innerHTML"], la = ["innerHTML"], ca = { class: "testimonial__after" }, da = /* @__PURE__ */ d("span", { class: "circle circle--dots d-none d-md-block" }, null, -1);
|
|
1445
|
+
function ua(t, a, e, r, i, o) {
|
|
1446
|
+
return u(), m("div", Jt, [
|
|
1509
1447
|
d("div", {
|
|
1510
|
-
class:
|
|
1448
|
+
class: L("bg-" + e.background)
|
|
1511
1449
|
}, [
|
|
1512
|
-
d("div",
|
|
1513
|
-
d("div",
|
|
1450
|
+
d("div", Qt, [
|
|
1451
|
+
d("div", ea, [
|
|
1514
1452
|
d("div", ta, [
|
|
1515
|
-
(u(!0), m(T, null, M(
|
|
1453
|
+
(u(!0), m(T, null, M(e.items, (s, l) => (u(), m("img", {
|
|
1516
1454
|
key: l,
|
|
1517
|
-
src:
|
|
1455
|
+
src: s.image ? s.image : "data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",
|
|
1518
1456
|
alt: "",
|
|
1519
|
-
class:
|
|
1520
|
-
}, null, 10,
|
|
1457
|
+
class: L("h-100 w-100 object-cover" + (s.image ? "" : " opacity-0"))
|
|
1458
|
+
}, null, 10, aa))), 128))
|
|
1521
1459
|
]),
|
|
1522
|
-
|
|
1460
|
+
sa
|
|
1523
1461
|
]),
|
|
1524
1462
|
d("div", ra, [
|
|
1525
1463
|
oa,
|
|
1526
|
-
d("div",
|
|
1527
|
-
(u(!0), m(T, null, M(
|
|
1464
|
+
d("div", ia, [
|
|
1465
|
+
(u(!0), m(T, null, M(e.items, (s, l) => (u(), m("blockquote", {
|
|
1528
1466
|
key: l,
|
|
1529
|
-
class:
|
|
1467
|
+
class: L(s.class)
|
|
1530
1468
|
}, [
|
|
1531
1469
|
d("div", {
|
|
1532
|
-
innerHTML:
|
|
1533
|
-
}, null, 8,
|
|
1470
|
+
innerHTML: s.quote
|
|
1471
|
+
}, null, 8, na),
|
|
1534
1472
|
d("cite", {
|
|
1535
|
-
innerHTML:
|
|
1536
|
-
}, null, 8,
|
|
1473
|
+
innerHTML: s.cite
|
|
1474
|
+
}, null, 8, la)
|
|
1537
1475
|
], 2))), 128))
|
|
1538
1476
|
]),
|
|
1539
|
-
d("div",
|
|
1540
|
-
v(
|
|
1477
|
+
d("div", ca, [
|
|
1478
|
+
v(t.$slots, "default")
|
|
1541
1479
|
])
|
|
1542
1480
|
])
|
|
1543
1481
|
]),
|
|
1544
|
-
|
|
1482
|
+
da
|
|
1545
1483
|
], 2)
|
|
1546
1484
|
], 512);
|
|
1547
1485
|
}
|
|
1548
|
-
const
|
|
1549
|
-
const
|
|
1486
|
+
const fr = /* @__PURE__ */ S(Xt, [["render", ua]]);
|
|
1487
|
+
const ma = {
|
|
1550
1488
|
components: {
|
|
1551
|
-
Input:
|
|
1489
|
+
Input: Z
|
|
1552
1490
|
},
|
|
1553
1491
|
name: "PropertySearchbar",
|
|
1554
1492
|
props: {
|
|
@@ -1673,8 +1611,8 @@ const ua = {
|
|
|
1673
1611
|
};
|
|
1674
1612
|
},
|
|
1675
1613
|
methods: {
|
|
1676
|
-
locationKeyup: function(
|
|
1677
|
-
this.$emit("locationKeyup",
|
|
1614
|
+
locationKeyup: function(t) {
|
|
1615
|
+
this.$emit("locationKeyup", t);
|
|
1678
1616
|
}
|
|
1679
1617
|
},
|
|
1680
1618
|
computed: {
|
|
@@ -1682,8 +1620,8 @@ const ua = {
|
|
|
1682
1620
|
get() {
|
|
1683
1621
|
return this.locationSave ? this.locationSave : this.location;
|
|
1684
1622
|
},
|
|
1685
|
-
set(
|
|
1686
|
-
this.locationSave =
|
|
1623
|
+
set(t) {
|
|
1624
|
+
this.locationSave = t, this.$emit("input", t);
|
|
1687
1625
|
}
|
|
1688
1626
|
},
|
|
1689
1627
|
locationsList() {
|
|
@@ -1692,125 +1630,125 @@ const ua = {
|
|
|
1692
1630
|
];
|
|
1693
1631
|
}
|
|
1694
1632
|
}
|
|
1695
|
-
},
|
|
1633
|
+
}, ha = {
|
|
1696
1634
|
class: "container",
|
|
1697
1635
|
ref: "wrapper"
|
|
1698
|
-
},
|
|
1636
|
+
}, fa = { class: "property-searchbar" }, ba = ["action", "method"], pa = { class: "col-12 col-md-3" }, ya = { class: "col-12 col-md" }, ga = /* @__PURE__ */ d("span", { class: "form-label d-none d-md-block" }, "Price range", -1), _a = {
|
|
1699
1637
|
class: "row",
|
|
1700
1638
|
"data-input-range": ""
|
|
1701
|
-
}, va = { class: "col-12 col-md" },
|
|
1639
|
+
}, va = { class: "col-12 col-md" }, wa = /* @__PURE__ */ d("span", { class: "form-label d-none d-md-block" }, "Number of beds", -1), Aa = {
|
|
1702
1640
|
class: "row",
|
|
1703
1641
|
"data-input-range": ""
|
|
1704
|
-
},
|
|
1642
|
+
}, Sa = { class: "col-12 col-md-2" }, La = /* @__PURE__ */ d("div", { class: "col-12 col-md mw-md-fit-content d-flex property-searchbar__btn" }, [
|
|
1705
1643
|
/* @__PURE__ */ d("button", {
|
|
1706
1644
|
class: "btn w-100 me-0",
|
|
1707
1645
|
type: "submit",
|
|
1708
1646
|
value: "submit"
|
|
1709
1647
|
}, "Search")
|
|
1710
1648
|
], -1);
|
|
1711
|
-
function
|
|
1712
|
-
const
|
|
1713
|
-
return u(), m("div",
|
|
1714
|
-
v(
|
|
1715
|
-
d("div",
|
|
1649
|
+
function ka(t, a, e, r, i, o) {
|
|
1650
|
+
const s = R("Input");
|
|
1651
|
+
return u(), m("div", ha, [
|
|
1652
|
+
v(t.$slots, "default"),
|
|
1653
|
+
d("div", fa, [
|
|
1716
1654
|
d("form", {
|
|
1717
1655
|
class: "row",
|
|
1718
|
-
action:
|
|
1719
|
-
method:
|
|
1656
|
+
action: e.formaction,
|
|
1657
|
+
method: e.formmethod
|
|
1720
1658
|
}, [
|
|
1721
|
-
d("fieldset",
|
|
1722
|
-
|
|
1659
|
+
d("fieldset", pa, [
|
|
1660
|
+
q(s, {
|
|
1723
1661
|
inputClass: "input--locations",
|
|
1724
|
-
modelValue:
|
|
1725
|
-
"onUpdate:modelValue": a[0] || (a[0] = (l) =>
|
|
1662
|
+
modelValue: o.locationSet,
|
|
1663
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => o.locationSet = l),
|
|
1726
1664
|
label: "Location",
|
|
1727
1665
|
id: "location",
|
|
1728
|
-
options:
|
|
1666
|
+
options: o.locationsList(),
|
|
1729
1667
|
required: "",
|
|
1730
1668
|
placeholder: "i.e. Newcastle or NE1",
|
|
1731
|
-
onKeyupEvent: a[1] || (a[1] = (l) =>
|
|
1669
|
+
onKeyupEvent: a[1] || (a[1] = (l) => o.locationKeyup(...arguments)),
|
|
1732
1670
|
ref: "search"
|
|
1733
1671
|
}, null, 8, ["modelValue", "options"]),
|
|
1734
|
-
|
|
1672
|
+
q(s, {
|
|
1735
1673
|
class: "select--miles",
|
|
1736
1674
|
label: "Miles",
|
|
1737
1675
|
id: "miles",
|
|
1738
1676
|
type: "select",
|
|
1739
|
-
options:
|
|
1677
|
+
options: e.distances
|
|
1740
1678
|
}, null, 8, ["options"])
|
|
1741
1679
|
]),
|
|
1742
|
-
d("fieldset",
|
|
1743
|
-
|
|
1744
|
-
d("div",
|
|
1745
|
-
|
|
1680
|
+
d("fieldset", ya, [
|
|
1681
|
+
ga,
|
|
1682
|
+
d("div", _a, [
|
|
1683
|
+
q(s, {
|
|
1746
1684
|
class: "col-6",
|
|
1747
1685
|
label: "Minimum price",
|
|
1748
1686
|
id: "price-min",
|
|
1749
1687
|
"data-min": "true",
|
|
1750
1688
|
type: "select",
|
|
1751
|
-
options:
|
|
1689
|
+
options: e.pricemin
|
|
1752
1690
|
}, null, 8, ["options"]),
|
|
1753
|
-
|
|
1691
|
+
q(s, {
|
|
1754
1692
|
class: "col-6",
|
|
1755
1693
|
label: "Maximum price",
|
|
1756
1694
|
id: "price-max",
|
|
1757
1695
|
"data-max": "true",
|
|
1758
1696
|
type: "select",
|
|
1759
|
-
options:
|
|
1697
|
+
options: e.pricemax
|
|
1760
1698
|
}, null, 8, ["options"])
|
|
1761
1699
|
])
|
|
1762
1700
|
]),
|
|
1763
1701
|
d("fieldset", va, [
|
|
1764
|
-
|
|
1765
|
-
d("div",
|
|
1766
|
-
|
|
1702
|
+
wa,
|
|
1703
|
+
d("div", Aa, [
|
|
1704
|
+
q(s, {
|
|
1767
1705
|
class: "col-6",
|
|
1768
1706
|
label: "Minimum beds",
|
|
1769
1707
|
id: "beds-min",
|
|
1770
1708
|
"data-min": "true",
|
|
1771
1709
|
type: "select",
|
|
1772
|
-
options:
|
|
1710
|
+
options: e.bedsmin
|
|
1773
1711
|
}, null, 8, ["options"]),
|
|
1774
|
-
|
|
1712
|
+
q(s, {
|
|
1775
1713
|
class: "col-6",
|
|
1776
1714
|
label: "Maximum beds",
|
|
1777
1715
|
id: "beds-max",
|
|
1778
1716
|
"data-max": "true",
|
|
1779
1717
|
type: "select",
|
|
1780
|
-
options:
|
|
1718
|
+
options: e.bedsmax
|
|
1781
1719
|
}, null, 8, ["options"])
|
|
1782
1720
|
])
|
|
1783
1721
|
]),
|
|
1784
|
-
d("fieldset",
|
|
1785
|
-
|
|
1722
|
+
d("fieldset", Sa, [
|
|
1723
|
+
q(s, {
|
|
1786
1724
|
label: "Property type",
|
|
1787
1725
|
id: "property-type",
|
|
1788
1726
|
type: "select",
|
|
1789
|
-
options:
|
|
1727
|
+
options: e.propertytypes
|
|
1790
1728
|
}, null, 8, ["options"])
|
|
1791
1729
|
]),
|
|
1792
|
-
|
|
1793
|
-
], 8,
|
|
1730
|
+
La
|
|
1731
|
+
], 8, ba)
|
|
1794
1732
|
]),
|
|
1795
|
-
v(
|
|
1733
|
+
v(t.$slots, "after")
|
|
1796
1734
|
], 512);
|
|
1797
1735
|
}
|
|
1798
|
-
const
|
|
1799
|
-
Array.from(
|
|
1736
|
+
const br = /* @__PURE__ */ S(ma, [["render", ka]]), qa = (t) => {
|
|
1737
|
+
Array.from(t.querySelectorAll("details")).forEach((a, e) => {
|
|
1800
1738
|
a.addEventListener("mouseenter", function(r) {
|
|
1801
1739
|
window.matchMedia("(min-width: 62em)").matches && a.setAttribute("open", "true");
|
|
1802
1740
|
}, !1), a.addEventListener("mouseleave", function(r) {
|
|
1803
1741
|
window.matchMedia("(min-width: 62em)").matches && a.removeAttribute("open");
|
|
1804
1742
|
}, !1);
|
|
1805
1743
|
}), "IntersectionObserver" in window && new IntersectionObserver(
|
|
1806
|
-
([
|
|
1744
|
+
([e]) => e.target.classList.toggle("is-stuck", e.intersectionRatio < 1),
|
|
1807
1745
|
{ threshold: [1] }
|
|
1808
|
-
).observe(
|
|
1746
|
+
).observe(t);
|
|
1809
1747
|
};
|
|
1810
|
-
const
|
|
1748
|
+
const $a = {
|
|
1811
1749
|
components: {
|
|
1812
|
-
Input:
|
|
1813
|
-
Logo:
|
|
1750
|
+
Input: Z,
|
|
1751
|
+
Logo: _e
|
|
1814
1752
|
},
|
|
1815
1753
|
name: "Nav",
|
|
1816
1754
|
props: {
|
|
@@ -1857,8 +1795,8 @@ const xa = {
|
|
|
1857
1795
|
};
|
|
1858
1796
|
},
|
|
1859
1797
|
methods: {
|
|
1860
|
-
subIsActive(
|
|
1861
|
-
return (Array.isArray(
|
|
1798
|
+
subIsActive(t) {
|
|
1799
|
+
return (Array.isArray(t) ? t : [t]).some((e) => this.$route.path.indexOf(e) === 0);
|
|
1862
1800
|
}
|
|
1863
1801
|
},
|
|
1864
1802
|
computed: {
|
|
@@ -1880,48 +1818,48 @@ const xa = {
|
|
|
1880
1818
|
},
|
|
1881
1819
|
mounted() {
|
|
1882
1820
|
this.$nextTick(function() {
|
|
1883
|
-
|
|
1821
|
+
qa(this.$refs.wrapper);
|
|
1884
1822
|
});
|
|
1885
1823
|
}
|
|
1886
|
-
},
|
|
1824
|
+
}, xa = /* @__PURE__ */ d("input", {
|
|
1887
1825
|
type: "checkbox",
|
|
1888
1826
|
name: "showMenu",
|
|
1889
1827
|
id: "showMenu",
|
|
1890
1828
|
class: "d-none"
|
|
1891
|
-
}, null, -1),
|
|
1829
|
+
}, null, -1), Ea = /* @__PURE__ */ d("input", {
|
|
1892
1830
|
type: "checkbox",
|
|
1893
1831
|
name: "showSearch",
|
|
1894
1832
|
id: "showSearch",
|
|
1895
1833
|
class: "d-none"
|
|
1896
|
-
}, null, -1),
|
|
1834
|
+
}, null, -1), Ta = /* @__PURE__ */ d("input", {
|
|
1897
1835
|
type: "checkbox",
|
|
1898
1836
|
name: "showAccount",
|
|
1899
1837
|
id: "showAccount",
|
|
1900
1838
|
class: "d-none"
|
|
1901
|
-
}, null, -1),
|
|
1839
|
+
}, null, -1), Ma = { class: "nav__mobile-bar" }, Ha = { class: "container" }, Ca = { class: "row" }, Da = {
|
|
1902
1840
|
key: 0,
|
|
1903
1841
|
class: "col mw-md-fit-content nav__logo"
|
|
1904
|
-
},
|
|
1842
|
+
}, Na = {
|
|
1905
1843
|
key: 1,
|
|
1906
1844
|
class: "col mw-md-fit-content nav__logo"
|
|
1907
|
-
},
|
|
1845
|
+
}, Ra = {
|
|
1908
1846
|
href: "/",
|
|
1909
1847
|
class: "text-decoration-none mb-0"
|
|
1910
|
-
},
|
|
1848
|
+
}, za = /* @__PURE__ */ d("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
|
|
1911
1849
|
/* @__PURE__ */ d("label", { for: "showMenu" }, "Menu")
|
|
1912
|
-
], -1),
|
|
1850
|
+
], -1), Ia = { class: "nav__inner" }, Pa = { class: "container" }, Fa = { class: "row" }, ja = {
|
|
1913
1851
|
key: 0,
|
|
1914
1852
|
class: "col mw-md-fit-content nav__logo"
|
|
1915
|
-
},
|
|
1853
|
+
}, Ba = {
|
|
1916
1854
|
key: 1,
|
|
1917
1855
|
class: "col mw-md-fit-content nav__logo"
|
|
1918
|
-
},
|
|
1856
|
+
}, Oa = {
|
|
1919
1857
|
href: "/",
|
|
1920
1858
|
class: "text-decoration-none mb-0"
|
|
1921
|
-
},
|
|
1859
|
+
}, Va = {
|
|
1922
1860
|
key: 2,
|
|
1923
1861
|
class: "col mw-fit-content nav__search-btn flex-row align-items-center"
|
|
1924
|
-
},
|
|
1862
|
+
}, Ua = /* @__PURE__ */ d("label", { for: "showSearch" }, [
|
|
1925
1863
|
/* @__PURE__ */ d("svg", {
|
|
1926
1864
|
class: "icon",
|
|
1927
1865
|
viewBox: "0 0 32 32"
|
|
@@ -1942,14 +1880,14 @@ const xa = {
|
|
|
1942
1880
|
class: "icon__outline"
|
|
1943
1881
|
})
|
|
1944
1882
|
])
|
|
1945
|
-
], -1),
|
|
1946
|
-
|
|
1947
|
-
],
|
|
1883
|
+
], -1), Wa = [
|
|
1884
|
+
Ua
|
|
1885
|
+
], Ga = /* @__PURE__ */ d("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
|
|
1948
1886
|
/* @__PURE__ */ d("label", { for: "showMenu" }, "Menu")
|
|
1949
|
-
], -1),
|
|
1887
|
+
], -1), Ka = { class: "col-12 col-md nav__menu ms-auto flex-row align-items-center" }, Ya = {
|
|
1950
1888
|
key: 3,
|
|
1951
1889
|
class: "col nav__account-btn flex-row align-items-center"
|
|
1952
|
-
},
|
|
1890
|
+
}, Za = /* @__PURE__ */ d("label", { for: "showAccount" }, [
|
|
1953
1891
|
/* @__PURE__ */ d("svg", {
|
|
1954
1892
|
class: "icon",
|
|
1955
1893
|
viewBox: "0 0 28 28"
|
|
@@ -1964,130 +1902,130 @@ const xa = {
|
|
|
1964
1902
|
})
|
|
1965
1903
|
]),
|
|
1966
1904
|
/* @__PURE__ */ d("span", null, "My account")
|
|
1967
|
-
], -1),
|
|
1968
|
-
|
|
1905
|
+
], -1), Xa = [
|
|
1906
|
+
Za
|
|
1969
1907
|
], Ja = {
|
|
1970
1908
|
key: 4,
|
|
1971
1909
|
class: "col-12 col-md nav__btn mw-md-fit-content flex-row align-items-center"
|
|
1972
|
-
},
|
|
1910
|
+
}, Qa = ["href", "innerHTML"], es = {
|
|
1973
1911
|
key: 0,
|
|
1974
1912
|
class: "nav__menu--secondary"
|
|
1975
|
-
},
|
|
1913
|
+
}, ts = { class: "container" }, as = {
|
|
1976
1914
|
key: 1,
|
|
1977
1915
|
class: "nav__menu--search"
|
|
1978
|
-
},
|
|
1916
|
+
}, ss = { class: "bg-gradient pt-4" }, rs = { class: "container" }, os = {
|
|
1979
1917
|
key: 0,
|
|
1980
1918
|
class: "nav__menu--account"
|
|
1981
|
-
},
|
|
1919
|
+
}, is = { class: "container" }, ns = { class: "row mb-4" }, ls = {
|
|
1982
1920
|
key: 0,
|
|
1983
1921
|
class: "col mw-md-fit-content nav__logo"
|
|
1984
|
-
},
|
|
1922
|
+
}, cs = {
|
|
1985
1923
|
key: 1,
|
|
1986
1924
|
class: "col mw-md-fit-content nav__logo"
|
|
1987
|
-
},
|
|
1925
|
+
}, ds = {
|
|
1988
1926
|
href: "/",
|
|
1989
1927
|
class: "text-decoration-none mb-0"
|
|
1990
|
-
},
|
|
1928
|
+
}, us = /* @__PURE__ */ d("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
|
|
1991
1929
|
/* @__PURE__ */ d("label", { for: "showAccount" }, "Account")
|
|
1992
|
-
], -1),
|
|
1993
|
-
function
|
|
1994
|
-
const
|
|
1930
|
+
], -1), ms = { class: "container" }, hs = /* @__PURE__ */ d("span", { class: "nav__bg" }, null, -1);
|
|
1931
|
+
function fs(t, a, e, r, i, o) {
|
|
1932
|
+
const s = R("Logo");
|
|
1995
1933
|
return u(), m("nav", {
|
|
1996
|
-
class:
|
|
1934
|
+
class: L(`nav${o.hasSecondarySlot ? " has-secondary" : ""}`),
|
|
1997
1935
|
ref: "wrapper"
|
|
1998
1936
|
}, [
|
|
1999
|
-
|
|
2000
|
-
qa,
|
|
1937
|
+
xa,
|
|
2001
1938
|
Ea,
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
1939
|
+
Ta,
|
|
1940
|
+
d("div", Ma, [
|
|
1941
|
+
d("div", Ha, [
|
|
1942
|
+
d("div", Ca, [
|
|
1943
|
+
o.hasLogoSlot ? (u(), m("div", Da, [
|
|
1944
|
+
v(t.$slots, "logo")
|
|
1945
|
+
])) : (u(), m("div", Na, [
|
|
1946
|
+
d("a", Ra, [
|
|
1947
|
+
q(s, {
|
|
1948
|
+
id: e.logo,
|
|
1949
|
+
path: e.logopath,
|
|
1950
|
+
desc: e.logotext,
|
|
2013
1951
|
class: "pb-0"
|
|
2014
1952
|
}, null, 8, ["id", "path", "desc"])
|
|
2015
1953
|
])
|
|
2016
1954
|
])),
|
|
2017
|
-
|
|
1955
|
+
za
|
|
2018
1956
|
])
|
|
2019
1957
|
])
|
|
2020
1958
|
]),
|
|
2021
|
-
d("div",
|
|
2022
|
-
d("div",
|
|
2023
|
-
d("div",
|
|
2024
|
-
|
|
2025
|
-
v(
|
|
2026
|
-
])) : (u(), m("div",
|
|
2027
|
-
d("a",
|
|
2028
|
-
|
|
2029
|
-
id:
|
|
2030
|
-
path:
|
|
2031
|
-
desc:
|
|
1959
|
+
d("div", Ia, [
|
|
1960
|
+
d("div", Pa, [
|
|
1961
|
+
d("div", Fa, [
|
|
1962
|
+
o.hasLogoSlot ? (u(), m("div", ja, [
|
|
1963
|
+
v(t.$slots, "logo")
|
|
1964
|
+
])) : (u(), m("div", Ba, [
|
|
1965
|
+
d("a", Oa, [
|
|
1966
|
+
q(s, {
|
|
1967
|
+
id: e.logo,
|
|
1968
|
+
path: e.logopath,
|
|
1969
|
+
desc: e.logotext,
|
|
2032
1970
|
class: "pb-0"
|
|
2033
1971
|
}, null, 8, ["id", "path", "desc"])
|
|
2034
1972
|
])
|
|
2035
1973
|
])),
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
d("div",
|
|
2039
|
-
v(
|
|
1974
|
+
o.hasSearchSlot ? (u(), m("div", Va, Wa)) : g("", !0),
|
|
1975
|
+
Ga,
|
|
1976
|
+
d("div", Ka, [
|
|
1977
|
+
v(t.$slots, "default")
|
|
2040
1978
|
]),
|
|
2041
|
-
|
|
2042
|
-
|
|
1979
|
+
o.hasAccountSlot ? (u(), m("div", Ya, Xa)) : g("", !0),
|
|
1980
|
+
e.btnlink ? (u(), m("div", Ja, [
|
|
2043
1981
|
d("a", {
|
|
2044
|
-
href:
|
|
1982
|
+
href: e.btnlink,
|
|
2045
1983
|
class: "btn me-0",
|
|
2046
|
-
innerHTML:
|
|
2047
|
-
}, null, 8,
|
|
1984
|
+
innerHTML: e.btntext
|
|
1985
|
+
}, null, 8, Qa)
|
|
2048
1986
|
])) : g("", !0)
|
|
2049
1987
|
])
|
|
2050
1988
|
]),
|
|
2051
|
-
|
|
2052
|
-
d("div",
|
|
2053
|
-
v(
|
|
1989
|
+
o.hasSecondarySlot ? (u(), m("div", es, [
|
|
1990
|
+
d("div", ts, [
|
|
1991
|
+
v(t.$slots, "secondary")
|
|
2054
1992
|
])
|
|
2055
1993
|
])) : g("", !0),
|
|
2056
|
-
|
|
2057
|
-
d("div",
|
|
2058
|
-
d("div",
|
|
2059
|
-
v(
|
|
1994
|
+
o.hasSearchSlot ? (u(), m("div", as, [
|
|
1995
|
+
d("div", ss, [
|
|
1996
|
+
d("div", rs, [
|
|
1997
|
+
v(t.$slots, "search")
|
|
2060
1998
|
])
|
|
2061
1999
|
])
|
|
2062
2000
|
])) : g("", !0)
|
|
2063
2001
|
]),
|
|
2064
|
-
|
|
2065
|
-
d("div",
|
|
2066
|
-
d("div",
|
|
2067
|
-
|
|
2068
|
-
v(
|
|
2069
|
-
])) : (u(), m("div",
|
|
2070
|
-
d("a",
|
|
2071
|
-
|
|
2072
|
-
id:
|
|
2073
|
-
path:
|
|
2074
|
-
desc:
|
|
2002
|
+
o.hasAccountSlot ? (u(), m("div", os, [
|
|
2003
|
+
d("div", is, [
|
|
2004
|
+
d("div", ns, [
|
|
2005
|
+
o.hasLogoSlot ? (u(), m("div", ls, [
|
|
2006
|
+
v(t.$slots, "logo")
|
|
2007
|
+
])) : (u(), m("div", cs, [
|
|
2008
|
+
d("a", ds, [
|
|
2009
|
+
q(s, {
|
|
2010
|
+
id: e.logo,
|
|
2011
|
+
path: e.logopath,
|
|
2012
|
+
desc: e.logotext,
|
|
2075
2013
|
class: "pb-0"
|
|
2076
2014
|
}, null, 8, ["id", "path", "desc"])
|
|
2077
2015
|
])
|
|
2078
2016
|
])),
|
|
2079
|
-
|
|
2017
|
+
us
|
|
2080
2018
|
])
|
|
2081
2019
|
]),
|
|
2082
|
-
d("div",
|
|
2083
|
-
v(
|
|
2020
|
+
d("div", ms, [
|
|
2021
|
+
v(t.$slots, "account")
|
|
2084
2022
|
])
|
|
2085
2023
|
])) : g("", !0),
|
|
2086
|
-
|
|
2024
|
+
hs
|
|
2087
2025
|
], 2);
|
|
2088
2026
|
}
|
|
2089
|
-
const
|
|
2090
|
-
const
|
|
2027
|
+
const pr = /* @__PURE__ */ S($a, [["render", fs]]);
|
|
2028
|
+
const bs = {
|
|
2091
2029
|
name: "Stepper",
|
|
2092
2030
|
props: {
|
|
2093
2031
|
label: {
|
|
@@ -2100,25 +2038,25 @@ const fr = {
|
|
|
2100
2038
|
default: "Complete"
|
|
2101
2039
|
}
|
|
2102
2040
|
}
|
|
2103
|
-
},
|
|
2041
|
+
}, ps = { class: "container" }, ys = ["aria-label"], gs = {
|
|
2104
2042
|
key: 0,
|
|
2105
2043
|
class: "h6 stepper__start"
|
|
2106
|
-
},
|
|
2107
|
-
function
|
|
2108
|
-
return u(), m("div",
|
|
2044
|
+
}, _s = { class: "list-unstyled" }, vs = { class: "h6 stepper__end" };
|
|
2045
|
+
function ws(t, a, e, r, i, o) {
|
|
2046
|
+
return u(), m("div", ps, [
|
|
2109
2047
|
d("nav", {
|
|
2110
2048
|
class: "stepper",
|
|
2111
|
-
"aria-label":
|
|
2049
|
+
"aria-label": e.label ? e.label : "Progress"
|
|
2112
2050
|
}, [
|
|
2113
|
-
|
|
2114
|
-
d("ol",
|
|
2115
|
-
v(
|
|
2051
|
+
e.label ? (u(), m("span", gs, $(e.label), 1)) : g("", !0),
|
|
2052
|
+
d("ol", _s, [
|
|
2053
|
+
v(t.$slots, "default")
|
|
2116
2054
|
]),
|
|
2117
|
-
d("span",
|
|
2118
|
-
], 8,
|
|
2055
|
+
d("span", vs, $(e.endlabel), 1)
|
|
2056
|
+
], 8, ys)
|
|
2119
2057
|
]);
|
|
2120
2058
|
}
|
|
2121
|
-
const
|
|
2059
|
+
const yr = /* @__PURE__ */ S(bs, [["render", ws]]), As = {
|
|
2122
2060
|
name: "Stepper",
|
|
2123
2061
|
props: {
|
|
2124
2062
|
url: {
|
|
@@ -2134,74 +2072,74 @@ const go = /* @__PURE__ */ A(fr, [["render", _r]]), wr = {
|
|
|
2134
2072
|
required: !1
|
|
2135
2073
|
}
|
|
2136
2074
|
}
|
|
2137
|
-
},
|
|
2075
|
+
}, Ss = ["href", "aria-current"], Ls = {
|
|
2138
2076
|
key: 0,
|
|
2139
2077
|
class: "visually-hidden"
|
|
2140
2078
|
};
|
|
2141
|
-
function
|
|
2079
|
+
function ks(t, a, e, r, i, o) {
|
|
2142
2080
|
return u(), m("li", null, [
|
|
2143
2081
|
d("a", {
|
|
2144
|
-
href:
|
|
2145
|
-
class:
|
|
2146
|
-
"aria-current": typeof
|
|
2082
|
+
href: e.url,
|
|
2083
|
+
class: L(`${e.status ? "bg-" + e.status : ""}${typeof e.current < "u" ? "current" : ""}`),
|
|
2084
|
+
"aria-current": typeof e.current < "u"
|
|
2147
2085
|
}, [
|
|
2148
2086
|
d("span", null, [
|
|
2149
|
-
v(
|
|
2087
|
+
v(t.$slots, "default")
|
|
2150
2088
|
]),
|
|
2151
|
-
|
|
2152
|
-
], 10,
|
|
2089
|
+
e.status ? (u(), m("em", Ls, " - status: " + $(e.status), 1)) : g("", !0)
|
|
2090
|
+
], 10, Ss)
|
|
2153
2091
|
]);
|
|
2154
2092
|
}
|
|
2155
|
-
const
|
|
2093
|
+
const gr = /* @__PURE__ */ S(As, [["render", ks]]);
|
|
2156
2094
|
/*!
|
|
2157
|
-
* iamKey v3.7.
|
|
2095
|
+
* iamKey v3.7.9-beta-2
|
|
2158
2096
|
* Copyright 2022-2023 iamproperty
|
|
2159
2097
|
*/
|
|
2160
|
-
const
|
|
2161
|
-
const a =
|
|
2162
|
-
|
|
2163
|
-
let
|
|
2164
|
-
|
|
2165
|
-
let
|
|
2166
|
-
|
|
2167
|
-
let
|
|
2168
|
-
r.hasAttribute("id") && (
|
|
2098
|
+
const qs = function(t) {
|
|
2099
|
+
const a = t.querySelectorAll(":scope > details");
|
|
2100
|
+
t.querySelectorAll(":scope > details > summary");
|
|
2101
|
+
let e = t.querySelector(":scope > .tabs__links");
|
|
2102
|
+
t.shadowRoot && t.shadowRoot.querySelector(".tabs__links") && (e = t.shadowRoot.querySelector(".tabs__links")), e || (e = document.createElement("div"), e.classList.add("tabs__links"), t.prepend(e)), a.forEach((r, i) => {
|
|
2103
|
+
let o = r.querySelector(":scope > summary");
|
|
2104
|
+
o.classList.add("visually-hidden");
|
|
2105
|
+
let s = document.createElement("button");
|
|
2106
|
+
r.hasAttribute("id") && (s = document.createElement("a"), s.setAttribute("href", `#${r.getAttribute("id")}`)), r.hasAttribute("open") && s.setAttribute("aria-pressed", !0), s.innerHTML = `${o.innerText}`, s.classList.add("link"), s.setAttribute("data-index", i), s.setAttribute("tabindex", "-1"), e.appendChild(s);
|
|
2169
2107
|
});
|
|
2170
|
-
},
|
|
2171
|
-
let a =
|
|
2172
|
-
|
|
2173
|
-
i.addEventListener("click", (
|
|
2174
|
-
|
|
2175
|
-
let l =
|
|
2176
|
-
|
|
2177
|
-
}), a.forEach((
|
|
2178
|
-
let
|
|
2179
|
-
|
|
2108
|
+
}, $s = function(t) {
|
|
2109
|
+
let a = t.querySelectorAll(":scope > details"), e = t.querySelectorAll(":scope > details > summary"), r = t.querySelectorAll(":scope .tabs__links > .link");
|
|
2110
|
+
t.shadowRoot && (r = t.shadowRoot.querySelectorAll(".tabs__links > .link")), r.forEach((i) => {
|
|
2111
|
+
i.addEventListener("click", (o) => {
|
|
2112
|
+
o.preventDefault(), r.forEach((s) => {
|
|
2113
|
+
let l = s == i;
|
|
2114
|
+
s.setAttribute("aria-pressed", l);
|
|
2115
|
+
}), a.forEach((s, l) => {
|
|
2116
|
+
let c = i.getAttribute("data-index") == l;
|
|
2117
|
+
c ? s.setAttribute("open", c) : s.removeAttribute("open");
|
|
2180
2118
|
}), i.hasAttribute("href") && history.pushState(void 0, void 0, i.getAttribute("href")), window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "openTab", tabTitle: i.textContent });
|
|
2181
2119
|
});
|
|
2182
|
-
}),
|
|
2183
|
-
i.addEventListener("focus", (
|
|
2120
|
+
}), e.forEach((i, o) => {
|
|
2121
|
+
i.addEventListener("focus", (s) => {
|
|
2184
2122
|
r.forEach((l) => {
|
|
2185
2123
|
l.classList.remove("focus");
|
|
2186
|
-
}), r[
|
|
2187
|
-
}), i.addEventListener("click", (
|
|
2188
|
-
|
|
2124
|
+
}), r[o].classList.add("focus");
|
|
2125
|
+
}), i.addEventListener("click", (s) => {
|
|
2126
|
+
s.preventDefault(), r[o].click();
|
|
2189
2127
|
});
|
|
2190
2128
|
});
|
|
2191
|
-
},
|
|
2192
|
-
let a =
|
|
2193
|
-
|
|
2194
|
-
},
|
|
2195
|
-
|
|
2129
|
+
}, xs = function(t) {
|
|
2130
|
+
let a = t.querySelectorAll(":scope > details"), e = t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");
|
|
2131
|
+
t.shadowRoot && (e = t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")), location.hash && t.querySelector(`.tabs__links [href="${location.hash}"]`) ? (t.querySelector(`[href="${location.hash}"]`).setAttribute("open", !0), t.querySelector(`details[id="${location.hash.replace("#", "")}"]`).setAttribute("open", !0)) : t.querySelector("details[open]") || (a[0].setAttribute("open", !0), e[0].setAttribute("aria-pressed", !0));
|
|
2132
|
+
}, Es = function(t) {
|
|
2133
|
+
qs(t), $s(t), xs(t);
|
|
2196
2134
|
};
|
|
2197
2135
|
window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "tabs" });
|
|
2198
|
-
class
|
|
2136
|
+
class Ts extends HTMLElement {
|
|
2199
2137
|
constructor() {
|
|
2200
2138
|
super(), this.attachShadow({ mode: "open" });
|
|
2201
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
2139
|
+
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`, r = document.createElement("template");
|
|
2202
2140
|
r.innerHTML = `
|
|
2203
2141
|
<style>
|
|
2204
|
-
@import "${
|
|
2142
|
+
@import "${e}";
|
|
2205
2143
|
|
|
2206
2144
|
:host(.admin-panel){
|
|
2207
2145
|
display: contents!important;
|
|
@@ -2217,19 +2155,19 @@ class Er extends HTMLElement {
|
|
|
2217
2155
|
}
|
|
2218
2156
|
connectedCallback() {
|
|
2219
2157
|
let a = this.classList.toString().replace("container", "");
|
|
2220
|
-
this.shadowRoot.querySelector(".tabs").setAttribute("class", `tabs ${a}`),
|
|
2158
|
+
this.shadowRoot.querySelector(".tabs").setAttribute("class", `tabs ${a}`), Es(this);
|
|
2221
2159
|
}
|
|
2222
2160
|
}
|
|
2223
|
-
window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs",
|
|
2224
|
-
const
|
|
2161
|
+
window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", Ts);
|
|
2162
|
+
const Ms = {
|
|
2225
2163
|
name: "Tabs"
|
|
2226
|
-
},
|
|
2227
|
-
function
|
|
2228
|
-
return u(), m("iam-tabs",
|
|
2229
|
-
v(
|
|
2164
|
+
}, Hs = { ref: "wrapper" };
|
|
2165
|
+
function Cs(t, a, e, r, i, o) {
|
|
2166
|
+
return u(), m("iam-tabs", Hs, [
|
|
2167
|
+
v(t.$slots, "default")
|
|
2230
2168
|
], 512);
|
|
2231
2169
|
}
|
|
2232
|
-
const
|
|
2170
|
+
const _r = /* @__PURE__ */ S(Ms, [["render", Cs]]), Ds = {
|
|
2233
2171
|
name: "Tab",
|
|
2234
2172
|
props: {
|
|
2235
2173
|
title: {
|
|
@@ -2247,24 +2185,24 @@ const _o = /* @__PURE__ */ A(Tr, [["render", Hr]]), Cr = {
|
|
|
2247
2185
|
};
|
|
2248
2186
|
},
|
|
2249
2187
|
watch: {
|
|
2250
|
-
show(
|
|
2251
|
-
console.log(
|
|
2188
|
+
show(t, a) {
|
|
2189
|
+
console.log(t);
|
|
2252
2190
|
}
|
|
2253
2191
|
}
|
|
2254
|
-
},
|
|
2255
|
-
function
|
|
2256
|
-
return u(), m("details",
|
|
2257
|
-
d("summary", { innerHTML:
|
|
2258
|
-
v(
|
|
2192
|
+
}, Ns = { class: "tab" }, Rs = ["innerHTML"];
|
|
2193
|
+
function zs(t, a, e, r, i, o) {
|
|
2194
|
+
return u(), m("details", Ns, [
|
|
2195
|
+
d("summary", { innerHTML: e.title }, null, 8, Rs),
|
|
2196
|
+
v(t.$slots, "default")
|
|
2259
2197
|
]);
|
|
2260
2198
|
}
|
|
2261
|
-
const
|
|
2262
|
-
let
|
|
2263
|
-
|
|
2264
|
-
const
|
|
2199
|
+
const vr = /* @__PURE__ */ S(Ds, [["render", zs]]);
|
|
2200
|
+
let ie = oe.props;
|
|
2201
|
+
ie.fields.required = !1;
|
|
2202
|
+
const Is = {
|
|
2265
2203
|
components: {
|
|
2266
|
-
Table:
|
|
2267
|
-
Input:
|
|
2204
|
+
Table: oe,
|
|
2205
|
+
Input: Z
|
|
2268
2206
|
},
|
|
2269
2207
|
data() {
|
|
2270
2208
|
return {
|
|
@@ -2273,17 +2211,17 @@ const zr = {
|
|
|
2273
2211
|
};
|
|
2274
2212
|
},
|
|
2275
2213
|
methods: {
|
|
2276
|
-
submitForm: function(
|
|
2214
|
+
submitForm: function(t) {
|
|
2277
2215
|
console.log(this);
|
|
2278
|
-
const a = new FormData(
|
|
2279
|
-
let
|
|
2280
|
-
const r =
|
|
2281
|
-
let i =
|
|
2282
|
-
|
|
2283
|
-
date_added:
|
|
2216
|
+
const a = new FormData(t.target);
|
|
2217
|
+
let e = /* @__PURE__ */ new Date();
|
|
2218
|
+
const r = e.getFullYear();
|
|
2219
|
+
let i = e.getMonth() + 1, o = e.getDate();
|
|
2220
|
+
o < 10 && (o = "0" + o), i < 10 && (i = "0" + i), e = o + "/" + i + "/" + r, this.itemsData.unshift({
|
|
2221
|
+
date_added: e,
|
|
2284
2222
|
user: a.get("user"),
|
|
2285
2223
|
note: a.get("addNote")
|
|
2286
|
-
}), this.$emit("formSubmitted",
|
|
2224
|
+
}), this.$emit("formSubmitted", t);
|
|
2287
2225
|
}
|
|
2288
2226
|
},
|
|
2289
2227
|
name: "NoteFeed",
|
|
@@ -2292,7 +2230,7 @@ const zr = {
|
|
|
2292
2230
|
type: String,
|
|
2293
2231
|
required: !0
|
|
2294
2232
|
},
|
|
2295
|
-
...
|
|
2233
|
+
...ie,
|
|
2296
2234
|
title: {
|
|
2297
2235
|
type: String,
|
|
2298
2236
|
required: !1
|
|
@@ -2307,111 +2245,111 @@ const zr = {
|
|
|
2307
2245
|
required: !1
|
|
2308
2246
|
}
|
|
2309
2247
|
}
|
|
2310
|
-
},
|
|
2311
|
-
function
|
|
2312
|
-
const
|
|
2313
|
-
return u(), m("div",
|
|
2314
|
-
|
|
2248
|
+
}, Ps = { class: "container note-feed mb-2" }, Fs = ["innerHTML"], js = ["action", "method"], Bs = ["value"], Os = /* @__PURE__ */ d("button", { class: "btn btn-tertiary" }, "Submit note", -1);
|
|
2249
|
+
function Vs(t, a, e, r, i, o) {
|
|
2250
|
+
const s = R("Table"), l = R("Input");
|
|
2251
|
+
return u(), m("div", Ps, [
|
|
2252
|
+
e.title ? (u(), m("span", {
|
|
2315
2253
|
key: 0,
|
|
2316
2254
|
class: "h3",
|
|
2317
|
-
innerHTML:
|
|
2318
|
-
}, null, 8,
|
|
2319
|
-
|
|
2255
|
+
innerHTML: e.title
|
|
2256
|
+
}, null, 8, Fs)) : g("", !0),
|
|
2257
|
+
q(s, H({
|
|
2320
2258
|
fields: [{ key: "date_added" }, { key: "user" }, { key: "note" }],
|
|
2321
2259
|
items: i.itemsData
|
|
2322
|
-
},
|
|
2260
|
+
}, t.$props, { class: "mb-0" }), null, 16, ["items"]),
|
|
2323
2261
|
d("form", {
|
|
2324
|
-
action:
|
|
2325
|
-
method:
|
|
2326
|
-
onSubmit: a[0] || (a[0] =
|
|
2262
|
+
action: e.action,
|
|
2263
|
+
method: e.method,
|
|
2264
|
+
onSubmit: a[0] || (a[0] = fe((c) => o.submitForm(...arguments), ["prevent"]))
|
|
2327
2265
|
}, [
|
|
2328
2266
|
d("input", {
|
|
2329
2267
|
type: "hidden",
|
|
2330
|
-
value:
|
|
2268
|
+
value: e.user,
|
|
2331
2269
|
name: "user"
|
|
2332
|
-
}, null, 8,
|
|
2333
|
-
|
|
2270
|
+
}, null, 8, Bs),
|
|
2271
|
+
q(l, {
|
|
2334
2272
|
id: "addNote",
|
|
2335
2273
|
type: "textarea",
|
|
2336
2274
|
label: "Add note",
|
|
2337
2275
|
required: "",
|
|
2338
2276
|
class: "mw-100"
|
|
2339
2277
|
}),
|
|
2340
|
-
|
|
2341
|
-
], 40,
|
|
2278
|
+
Os
|
|
2279
|
+
], 40, js)
|
|
2342
2280
|
]);
|
|
2343
2281
|
}
|
|
2344
|
-
const
|
|
2282
|
+
const wr = /* @__PURE__ */ S(Is, [["render", Vs]]);
|
|
2345
2283
|
/*!
|
|
2346
|
-
* iamKey v3.7.
|
|
2284
|
+
* iamKey v3.7.9-beta-2
|
|
2347
2285
|
* Copyright 2022-2023 iamproperty
|
|
2348
2286
|
*/
|
|
2349
|
-
function
|
|
2350
|
-
function
|
|
2351
|
-
let
|
|
2352
|
-
|
|
2353
|
-
let l = r.querySelector(`[data-name="${
|
|
2354
|
-
l && i.getAttribute("type") == "checkbox" && (
|
|
2355
|
-
let
|
|
2356
|
-
if (l || (l = document.createElement("button"), r.appendChild(l)), l.setAttribute("type", "button"), l.classList.add("filter"), l.setAttribute("data-name",
|
|
2357
|
-
let
|
|
2358
|
-
if (
|
|
2359
|
-
let
|
|
2360
|
-
if (
|
|
2287
|
+
function Us(t, a) {
|
|
2288
|
+
function e(r, i) {
|
|
2289
|
+
let o = !1, s = i.getAttribute("name");
|
|
2290
|
+
s.includes("[]") && (s = s.replace("[]", `[${i.value}]`));
|
|
2291
|
+
let l = r.querySelector(`[data-name="${s}"]`);
|
|
2292
|
+
l && i.getAttribute("type") == "checkbox" && (o = !0);
|
|
2293
|
+
let c = i.getAttribute("data-filter-text");
|
|
2294
|
+
if (l || (l = document.createElement("button"), r.appendChild(l)), l.setAttribute("type", "button"), l.classList.add("filter"), l.setAttribute("data-name", s), l.innerHTML = c.replace("$value", i.value), (!i.value || o) && l.remove(), i.parentNode.closest("[data-filter-text]")) {
|
|
2295
|
+
let n = i.parentNode.closest("[data-filter-text]"), f = !0;
|
|
2296
|
+
if (s = "", n.querySelectorAll("input").forEach((p, h) => {
|
|
2297
|
+
let b = p.getAttribute("name");
|
|
2298
|
+
if (s += `${h != 0 ? "," : ""}${b}`, r.querySelector(`[data-name="${b}"]`) && r.querySelector(`[data-name="${b}"]`).remove(), p.value) {
|
|
2361
2299
|
let y = document.createElement("button");
|
|
2362
|
-
y.setAttribute("type", "button"), y.classList.add("filter"), y.setAttribute("data-name",
|
|
2300
|
+
y.setAttribute("type", "button"), y.classList.add("filter"), y.setAttribute("data-name", b), y.innerHTML = c.replace("$value", p.value), r.appendChild(y);
|
|
2363
2301
|
} else
|
|
2364
|
-
|
|
2365
|
-
}), r.querySelector(`[data-name="${
|
|
2366
|
-
let
|
|
2367
|
-
|
|
2368
|
-
let
|
|
2369
|
-
r.querySelector(`[data-name="${
|
|
2302
|
+
f = !1;
|
|
2303
|
+
}), r.querySelector(`[data-name="${s}"]`) && r.querySelector(`[data-name="${s}"]`).remove(), f) {
|
|
2304
|
+
let p = n.getAttribute("data-filter-text");
|
|
2305
|
+
n.querySelectorAll("input").forEach((b, y) => {
|
|
2306
|
+
let A = b.getAttribute("name");
|
|
2307
|
+
r.querySelector(`[data-name="${A}"]`) && r.querySelector(`[data-name="${A}"]`).remove(), p = p.replace(`$${y + 1}`, b.value);
|
|
2370
2308
|
});
|
|
2371
|
-
let
|
|
2372
|
-
|
|
2309
|
+
let h = document.createElement("button");
|
|
2310
|
+
h.setAttribute("type", "button"), h.classList.add("filter"), h.setAttribute("data-name", s), h.innerHTML = p, r.appendChild(h);
|
|
2373
2311
|
}
|
|
2374
2312
|
}
|
|
2375
2313
|
}
|
|
2376
|
-
Array.from(
|
|
2377
|
-
|
|
2378
|
-
}),
|
|
2314
|
+
Array.from(t.querySelectorAll('input[type="checkbox"]:checked')).forEach((r, i) => {
|
|
2315
|
+
e(a, r);
|
|
2316
|
+
}), t.addEventListener("change", function(r) {
|
|
2379
2317
|
if (r && r.target instanceof HTMLElement && r.target.closest("input[data-filter-text]")) {
|
|
2380
2318
|
let i = r.target.closest("input[data-filter-text]");
|
|
2381
|
-
|
|
2319
|
+
e(a, i);
|
|
2382
2320
|
}
|
|
2383
2321
|
}, !1), a.addEventListener("click", function(r) {
|
|
2384
2322
|
if (r && r.target instanceof HTMLElement && r.target.closest(".filter")) {
|
|
2385
|
-
let
|
|
2323
|
+
let s = r.target.closest(".filter"), l = s.getAttribute("data-name").split(",");
|
|
2386
2324
|
for (var i = 0; i < l.length; i++) {
|
|
2387
|
-
let
|
|
2388
|
-
|
|
2389
|
-
let
|
|
2390
|
-
for (var
|
|
2391
|
-
let
|
|
2392
|
-
if (
|
|
2393
|
-
|
|
2325
|
+
let c = l[i], n = `[name="${c}"]`;
|
|
2326
|
+
c.match(/\[(.*)\]/) && (c.replace(/\[(.*)\]/, "[]"), n = `[value="${c.replace(/.*\[(.*)\]/, "$1")}"]`);
|
|
2327
|
+
let f = t.querySelectorAll(n);
|
|
2328
|
+
for (var o = 0; o < f.length; o++) {
|
|
2329
|
+
let p = f[o];
|
|
2330
|
+
if (p.getAttribute("type") != "radio" && p.getAttribute("type") != "checkbox")
|
|
2331
|
+
p.value = "";
|
|
2394
2332
|
else {
|
|
2395
|
-
|
|
2333
|
+
p.checked = !1;
|
|
2396
2334
|
var r = new Event("force");
|
|
2397
|
-
|
|
2335
|
+
p.closest("form").dispatchEvent(r);
|
|
2398
2336
|
}
|
|
2399
2337
|
}
|
|
2400
2338
|
}
|
|
2401
|
-
|
|
2339
|
+
s.remove();
|
|
2402
2340
|
}
|
|
2403
2341
|
}, !1);
|
|
2404
2342
|
}
|
|
2405
2343
|
window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "Applied Filters" });
|
|
2406
|
-
class
|
|
2344
|
+
class Ws extends HTMLElement {
|
|
2407
2345
|
constructor() {
|
|
2408
2346
|
super(), this.attachShadow({ mode: "open" });
|
|
2409
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
2347
|
+
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`;
|
|
2410
2348
|
let r = this.classList.toString();
|
|
2411
2349
|
const i = document.createElement("template");
|
|
2412
2350
|
i.innerHTML = `
|
|
2413
2351
|
<style>
|
|
2414
|
-
@import "${
|
|
2352
|
+
@import "${e}";
|
|
2415
2353
|
.applied-filters:not(.applied-filters--compact):not(:empty):before{content:"Applied filters";font-weight:bold;font-size:1.125rem;line-height:1.375rem;color:var(--colour-header);margin-bottom:1rem;display:block}.applied-filters:not(:empty){margin-bottom:1rem}::slotted(*:last-child){margin-bottom:0}.applied-filters .filter{border:1px solid var(--colour-border);padding:1rem 1.5rem 1rem 1.5rem;background:rgba(0,0,0,0);margin-right:.5rem !important;margin-bottom:.5rem !important;line-height:1.5rem;white-space:nowrap}.applied-filters .filter:after{content:"";display:inline-block;height:1.25rem;width:1.25rem;padding:0;margin-left:1.5rem;margin-bottom:-0.25rem;border:none;z-index:var(--index-focus);background:currentColor;mask-image:var(--icon-close);mask-size:100%;mask-repeat:no-repeat;mask-position:50% 50%;-webkit-mask-image:var(--icon-close);-webkit-mask-size:100%;-webkit-mask-repeat:no-repeat;-webkit-mask-position:50% 50%}.applied-filters--compact .filter{background-color:var(--colour-light);border:none;padding:0.625rem;line-height:1rem;border-radius:0.3125rem}.applied-filters--compact .filter:after{margin-left:0.625rem;height:1rem;width:1rem;margin-bottom:-0.1rem}/*# sourceMappingURL=assets/css/components/applied-filters.css.map */
|
|
2416
2354
|
|
|
2417
2355
|
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
@@ -2421,50 +2359,50 @@ class Ur extends HTMLElement {
|
|
|
2421
2359
|
`, this.shadowRoot.appendChild(i.content.cloneNode(!0));
|
|
2422
2360
|
}
|
|
2423
2361
|
connectedCallback() {
|
|
2424
|
-
|
|
2362
|
+
Us(this, this.shadowRoot.querySelector(".applied-filters"));
|
|
2425
2363
|
}
|
|
2426
2364
|
}
|
|
2427
|
-
window.customElements.get("iam-applied-filters") || window.customElements.define("iam-applied-filters",
|
|
2428
|
-
const
|
|
2365
|
+
window.customElements.get("iam-applied-filters") || window.customElements.define("iam-applied-filters", Ws);
|
|
2366
|
+
const Gs = {
|
|
2429
2367
|
name: "Header"
|
|
2430
2368
|
};
|
|
2431
|
-
function
|
|
2369
|
+
function Ks(t, a, e, r, i, o) {
|
|
2432
2370
|
return u(), m("iam-applied-filters", null, [
|
|
2433
|
-
v(
|
|
2371
|
+
v(t.$slots, "default")
|
|
2434
2372
|
]);
|
|
2435
2373
|
}
|
|
2436
|
-
const
|
|
2374
|
+
const Ar = /* @__PURE__ */ S(Gs, [["render", Ks]]);
|
|
2437
2375
|
/*!
|
|
2438
|
-
* iamKey v3.7.
|
|
2376
|
+
* iamKey v3.7.9-beta-2
|
|
2439
2377
|
* Copyright 2022-2023 iamproperty
|
|
2440
2378
|
*/
|
|
2441
|
-
function
|
|
2442
|
-
|
|
2379
|
+
function Ys(t, a) {
|
|
2380
|
+
Zs(t, a);
|
|
2443
2381
|
}
|
|
2444
|
-
function
|
|
2445
|
-
var
|
|
2382
|
+
function Zs(t, a) {
|
|
2383
|
+
var e;
|
|
2446
2384
|
a.addEventListener("keyup", (r) => {
|
|
2447
|
-
clearTimeout(
|
|
2448
|
-
|
|
2385
|
+
clearTimeout(e), e = setTimeout(function() {
|
|
2386
|
+
Q(t, a.value);
|
|
2449
2387
|
}, 500);
|
|
2450
2388
|
}), a.addEventListener("change", (r) => {
|
|
2451
|
-
clearTimeout(
|
|
2389
|
+
clearTimeout(e), Q(t, a.value);
|
|
2452
2390
|
});
|
|
2453
2391
|
}
|
|
2454
|
-
const
|
|
2455
|
-
Array.from(
|
|
2456
|
-
let i =
|
|
2457
|
-
|
|
2392
|
+
const Q = function(t, a) {
|
|
2393
|
+
Array.from(t.querySelectorAll(":scope > li")).forEach((e, r) => {
|
|
2394
|
+
let i = e.textContent.toLowerCase();
|
|
2395
|
+
e.classList.add("d-none"), i.includes(a.toLowerCase()) && e.classList.remove("d-none");
|
|
2458
2396
|
}), window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "Filtered list", value: a });
|
|
2459
2397
|
};
|
|
2460
2398
|
window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "filterlist" });
|
|
2461
|
-
class
|
|
2399
|
+
class Xs extends HTMLElement {
|
|
2462
2400
|
constructor() {
|
|
2463
2401
|
super(), this.attachShadow({ mode: "open" });
|
|
2464
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
2402
|
+
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`, r = document.createElement("template");
|
|
2465
2403
|
r.innerHTML = `
|
|
2466
2404
|
<style>
|
|
2467
|
-
@import "${
|
|
2405
|
+
@import "${e}";
|
|
2468
2406
|
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
2469
2407
|
|
|
2470
2408
|
:host {
|
|
@@ -2493,65 +2431,65 @@ class Zr extends HTMLElement {
|
|
|
2493
2431
|
}
|
|
2494
2432
|
connectedCallback() {
|
|
2495
2433
|
let a = this.classList.toString();
|
|
2496
|
-
this.shadowRoot.querySelector(".list__wrapper").setAttribute("class", `list__wrapper ${a}`), this.querySelector("i.fa-search") || (this.innerHTML += '<i class="fa fa-light fa-search" aria-hidden="true" slot="icon"></i>'),
|
|
2434
|
+
this.shadowRoot.querySelector(".list__wrapper").setAttribute("class", `list__wrapper ${a}`), this.querySelector("i.fa-search") || (this.innerHTML += '<i class="fa fa-light fa-search" aria-hidden="true" slot="icon"></i>'), Ys(this.querySelector("ul"), this.shadowRoot.querySelector("#search"));
|
|
2497
2435
|
}
|
|
2498
2436
|
}
|
|
2499
|
-
window.customElements.get("iam-filterlist") || window.customElements.define("iam-filterlist",
|
|
2500
|
-
const
|
|
2437
|
+
window.customElements.get("iam-filterlist") || window.customElements.define("iam-filterlist", Xs);
|
|
2438
|
+
const Js = {
|
|
2501
2439
|
name: "Filter list"
|
|
2502
2440
|
};
|
|
2503
|
-
function
|
|
2441
|
+
function Qs(t, a, e, r, i, o) {
|
|
2504
2442
|
return u(), m("iam-filterlist", null, [
|
|
2505
|
-
v(
|
|
2443
|
+
v(t.$slots, "default")
|
|
2506
2444
|
]);
|
|
2507
2445
|
}
|
|
2508
|
-
const
|
|
2509
|
-
function
|
|
2510
|
-
if (
|
|
2511
|
-
let
|
|
2512
|
-
|
|
2446
|
+
const Sr = /* @__PURE__ */ S(Js, [["render", Qs]]);
|
|
2447
|
+
function er(t) {
|
|
2448
|
+
if (t.hasAttribute("data-type") && t.getAttribute("data-type") == "toast") {
|
|
2449
|
+
let e = document.querySelector(".notification__holder");
|
|
2450
|
+
e || (e = document.createElement("div"), e.classList.add("notification__holder"), e.classList.add("container"), document.querySelector("body").appendChild(e)), t.closest(".notification__holder") || e.appendChild(t);
|
|
2513
2451
|
}
|
|
2514
|
-
if (
|
|
2515
|
-
event && event.target instanceof HTMLElement && event.target.closest("[data-dismiss-button]") && (
|
|
2516
|
-
}, !1),
|
|
2517
|
-
let
|
|
2518
|
-
var a = new
|
|
2519
|
-
|
|
2520
|
-
},
|
|
2521
|
-
|
|
2452
|
+
if (t.setAttribute("role", "alert"), t.addEventListener("click", function(e) {
|
|
2453
|
+
event && event.target instanceof HTMLElement && event.target.closest("[data-dismiss-button]") && (e.preventDefault(), Y(t));
|
|
2454
|
+
}, !1), t.hasAttribute("data-timeout")) {
|
|
2455
|
+
let e = t.getAttribute("data-timeout");
|
|
2456
|
+
var a = new tr(function() {
|
|
2457
|
+
Y(t);
|
|
2458
|
+
}, e);
|
|
2459
|
+
t.addEventListener("mouseenter", (r) => {
|
|
2522
2460
|
a.pause();
|
|
2523
|
-
}),
|
|
2461
|
+
}), t.addEventListener("mouseleave", (r) => {
|
|
2524
2462
|
a.resume();
|
|
2525
2463
|
});
|
|
2526
2464
|
}
|
|
2527
2465
|
}
|
|
2528
|
-
function
|
|
2529
|
-
var
|
|
2466
|
+
function tr(t, a) {
|
|
2467
|
+
var e, r, i = a;
|
|
2530
2468
|
this.pause = function() {
|
|
2531
|
-
window.clearTimeout(
|
|
2469
|
+
window.clearTimeout(e), i -= /* @__PURE__ */ new Date() - r;
|
|
2532
2470
|
}, this.resume = function() {
|
|
2533
|
-
r = /* @__PURE__ */ new Date(), window.clearTimeout(
|
|
2471
|
+
r = /* @__PURE__ */ new Date(), window.clearTimeout(e), e = window.setTimeout(t, i);
|
|
2534
2472
|
}, this.resume();
|
|
2535
2473
|
}
|
|
2536
|
-
const
|
|
2537
|
-
|
|
2474
|
+
const Y = function(t) {
|
|
2475
|
+
t.classList.add("d-none");
|
|
2538
2476
|
};
|
|
2539
2477
|
window.dataLayer = window.dataLayer || [];
|
|
2540
2478
|
window.dataLayer.push({
|
|
2541
2479
|
event: "customElementRegistered",
|
|
2542
2480
|
element: "Notification"
|
|
2543
2481
|
});
|
|
2544
|
-
class
|
|
2482
|
+
class ar extends HTMLElement {
|
|
2545
2483
|
constructor() {
|
|
2546
2484
|
super(), this.attachShadow({ mode: "open" });
|
|
2547
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets",
|
|
2548
|
-
Array.from(i).forEach((
|
|
2549
|
-
|
|
2485
|
+
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`, r = `@import "${a}/css/components/notification.css";`, i = this.querySelectorAll("a,button");
|
|
2486
|
+
Array.from(i).forEach((s, l) => {
|
|
2487
|
+
s.setAttribute("slot", "btns"), s.classList.add("link");
|
|
2550
2488
|
}), (i.length || this.hasAttribute("data-dismiss")) && this.classList.add("notification--dismissable");
|
|
2551
|
-
const
|
|
2552
|
-
|
|
2489
|
+
const o = document.createElement("template");
|
|
2490
|
+
o.innerHTML = `
|
|
2553
2491
|
<style>
|
|
2554
|
-
@import "${
|
|
2492
|
+
@import "${e}";
|
|
2555
2493
|
${r}
|
|
2556
2494
|
${this.hasAttribute("data-css") ? `${this.getAttribute("data-css")}` : ""}
|
|
2557
2495
|
</style>
|
|
@@ -2561,14 +2499,14 @@ class eo extends HTMLElement {
|
|
|
2561
2499
|
<div class="notification__inner"><div class="notification__text"><slot></slot></div>${i.length ? '<div class="notification__btns"><slot name="btns"></slot></div>' : ""}</div>
|
|
2562
2500
|
${this.hasAttribute("data-dismiss") ? '<div class="notification__dismiss"><button data-dismiss-button>Dismiss</button></div>' : ""}
|
|
2563
2501
|
</div>
|
|
2564
|
-
`, this.shadowRoot.appendChild(
|
|
2502
|
+
`, this.shadowRoot.appendChild(o.content.cloneNode(!0));
|
|
2565
2503
|
}
|
|
2566
2504
|
connectedCallback() {
|
|
2567
|
-
const a = this.shadowRoot.querySelector("[data-dismiss-button]"),
|
|
2568
|
-
this.hasAttribute("data-type") ? this.classList.add(`bg-${
|
|
2505
|
+
const a = this.shadowRoot.querySelector("[data-dismiss-button]"), e = this.hasAttribute("data-status") ? this.getAttribute("data-status") : "white";
|
|
2506
|
+
this.hasAttribute("data-type") ? this.classList.add(`bg-${e}`) : this.classList.add(`colour-${e}`);
|
|
2569
2507
|
const r = this;
|
|
2570
2508
|
if (!this.querySelector("i"))
|
|
2571
|
-
switch (
|
|
2509
|
+
switch (e) {
|
|
2572
2510
|
case "danger":
|
|
2573
2511
|
this.innerHTML += '<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>';
|
|
2574
2512
|
break;
|
|
@@ -2581,46 +2519,46 @@ class eo extends HTMLElement {
|
|
|
2581
2519
|
default:
|
|
2582
2520
|
this.innerHTML += '<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>';
|
|
2583
2521
|
}
|
|
2584
|
-
|
|
2585
|
-
|
|
2522
|
+
er(r), a && a.addEventListener("click", function(i) {
|
|
2523
|
+
Y(r);
|
|
2586
2524
|
}, !1);
|
|
2587
2525
|
}
|
|
2588
2526
|
}
|
|
2589
|
-
const
|
|
2527
|
+
const sr = {
|
|
2590
2528
|
name: "Notification",
|
|
2591
2529
|
props: {},
|
|
2592
2530
|
created() {
|
|
2593
2531
|
this.$nextTick(function() {
|
|
2594
|
-
window.customElements.get("iam-notification") || window.customElements.define("iam-notification",
|
|
2532
|
+
window.customElements.get("iam-notification") || window.customElements.define("iam-notification", ar);
|
|
2595
2533
|
});
|
|
2596
2534
|
}
|
|
2597
2535
|
};
|
|
2598
|
-
function
|
|
2536
|
+
function rr(t, a, e, r, i, o) {
|
|
2599
2537
|
return u(), m("iam-notification", null, [
|
|
2600
|
-
v(
|
|
2538
|
+
v(t.$slots, "default")
|
|
2601
2539
|
]);
|
|
2602
2540
|
}
|
|
2603
|
-
const
|
|
2541
|
+
const Lr = /* @__PURE__ */ S(sr, [["render", rr]]);
|
|
2604
2542
|
export {
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2543
|
+
cr as Accordion,
|
|
2544
|
+
dr as AccordionItem,
|
|
2545
|
+
Ar as AppliedFilters,
|
|
2546
|
+
ur as Banner,
|
|
2547
|
+
Ct as Card,
|
|
2548
|
+
mr as Carousel,
|
|
2549
|
+
nr as FileUpload,
|
|
2550
|
+
Sr as Filterlist,
|
|
2551
|
+
hr as Header,
|
|
2552
|
+
Z as Input,
|
|
2553
|
+
_e as Logo,
|
|
2554
|
+
pr as Nav,
|
|
2555
|
+
wr as NoteFeed,
|
|
2556
|
+
Lr as Notification,
|
|
2557
|
+
br as PropertySearchbar,
|
|
2558
|
+
gr as Step,
|
|
2559
|
+
yr as Stepper,
|
|
2560
|
+
vr as Tab,
|
|
2561
|
+
oe as Table,
|
|
2562
|
+
_r as Tabs,
|
|
2563
|
+
fr as Testimonial
|
|
2626
2564
|
};
|