@iamproperty/components 3.7.0 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/components/table.css +1 -1
- package/assets/css/components/table.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/table/table.component.js +8 -1
- package/assets/js/components/table/table.component.min.js +13 -13
- 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 +2 -2
- package/assets/js/dynamic.min.js.map +1 -1
- package/assets/js/modules/applied-filters.js +1 -1
- package/assets/js/modules/dialogs.js +12 -1
- package/assets/js/modules/table.js +103 -29
- package/assets/js/scripts.bundle.js +19 -19
- 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/js/tests/table.spec.js +19 -13
- package/assets/sass/components/table.scss +80 -53
- package/assets/sass/foundations/reboot.scss +7 -3
- package/assets/ts/components/table/table.component.ts +12 -1
- package/assets/ts/modules/applied-filters.ts +1 -1
- package/assets/ts/modules/dialogs.ts +16 -5
- package/assets/ts/modules/table.ts +139 -34
- package/assets/ts/tests/table.spec.ts +6 -6
- package/dist/components.es.js +758 -724
- package/dist/components.umd.js +21 -21
- package/package.json +1 -1
package/dist/components.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const
|
|
1
|
+
import { openBlock as u, createElementBlock as h, normalizeClass as A, createElementVNode as c, toDisplayString as x, createCommentVNode as g, Fragment as T, renderList as H, renderSlot as _, withDirectives as R, mergeProps as M, vModelDynamic as F, vModelText as st, vModelSelect as it, resolveComponent as D, createVNode as k, createTextVNode as rt, normalizeStyle as lt, withModifiers as nt } from "vue";
|
|
2
|
+
const w = (e, a) => {
|
|
3
3
|
const t = e.__vccOpts || e;
|
|
4
|
-
for (const [
|
|
5
|
-
t[
|
|
4
|
+
for (const [i, l] of a)
|
|
5
|
+
t[i] = l;
|
|
6
6
|
return t;
|
|
7
|
-
},
|
|
7
|
+
}, ot = {
|
|
8
8
|
name: "Logo",
|
|
9
9
|
props: {
|
|
10
10
|
id: {
|
|
@@ -30,246 +30,281 @@ const A = (e, a) => {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}, ct = ["xlink:href"], dt = ["innerHTML"];
|
|
33
|
-
function ut(e, a, t,
|
|
34
|
-
return
|
|
35
|
-
class:
|
|
33
|
+
function ut(e, a, t, i, l, r) {
|
|
34
|
+
return u(), h("div", {
|
|
35
|
+
class: A(r.className)
|
|
36
36
|
}, [
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"xlink:href": t.path +
|
|
37
|
+
(u(), h("svg", null, [
|
|
38
|
+
c("title", null, "iam " + x(t.id), 1),
|
|
39
|
+
c("use", {
|
|
40
|
+
"xlink:href": t.path + r.src
|
|
41
41
|
}, null, 8, ct)
|
|
42
42
|
])),
|
|
43
|
-
t.desc ? (
|
|
43
|
+
t.desc ? (u(), h("span", {
|
|
44
44
|
key: 0,
|
|
45
45
|
innerHTML: t.desc
|
|
46
|
-
}, null, 8, dt)) :
|
|
46
|
+
}, null, 8, dt)) : g("", !0)
|
|
47
47
|
], 2);
|
|
48
48
|
}
|
|
49
|
-
const ht = /* @__PURE__ */
|
|
49
|
+
const ht = /* @__PURE__ */ w(ot, [["render", ut]]), mt = function(e) {
|
|
50
50
|
return typeof e != "string" ? !1 : !isNaN(e) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
51
51
|
!isNaN(parseFloat(e));
|
|
52
|
-
}, ft = (e, a) => String(e).padStart(a, "0"), bt = (e) => e.charAt(0).toUpperCase() + e.slice(1),
|
|
52
|
+
}, ft = (e, a) => String(e).padStart(a, "0"), bt = (e) => e.charAt(0).toUpperCase() + e.slice(1), j = function(e, a) {
|
|
53
53
|
if (!e.getAttribute("data-pages"))
|
|
54
54
|
return !1;
|
|
55
55
|
e.getAttribute("data-page") || e.setAttribute("data-page", 1);
|
|
56
|
-
let t = e.getAttribute("data-page"),
|
|
57
|
-
if (
|
|
56
|
+
let t = e.getAttribute("data-page"), i = e.getAttribute("data-pages"), l = e.getAttribute("data-total"), r = e.getAttribute("data-show"), s = e.getAttribute("data-increment");
|
|
57
|
+
if (i <= 1)
|
|
58
58
|
return a.innerHTML = "", !1;
|
|
59
|
-
let
|
|
60
|
-
for (let
|
|
61
|
-
|
|
59
|
+
let o = "";
|
|
60
|
+
for (let n = 1; n <= i; n++)
|
|
61
|
+
n == t ? o += `<li class="page-item active" aria-current="page"><span class="page-link">${n}</span></li>` : o += `<li class="page-item"><a href="?page=${n}" class="page-link" data-page="${n}">${n}</a></li>`;
|
|
62
62
|
return a.innerHTML = `<ul class="pagination mb-0 d-none d-sm-flex">
|
|
63
63
|
${t == 1 ? '<li class="page-item disabled"><span class="page-link">Previous</span></li>' : `<li class="page-item"><a href="?page=${parseInt(t) - 1}" class="page-link" data-page="${parseInt(t) - 1}">Previous</a></li>`}
|
|
64
|
-
${
|
|
65
|
-
${t ==
|
|
64
|
+
${o}
|
|
65
|
+
${t == i ? '<li class="page-item disabled"><span class="page-link">Next</span></li>' : `<li class="page-item"><a href="?page=${parseInt(t) + 1}" class="page-link" data-page="${parseInt(t) + 1}">Next</a></li>`}
|
|
66
66
|
</ul>`, a.innerHTML += `<div class="d-sm-none text-center">
|
|
67
|
-
<span class="d-block pb-2">You've viewed ${
|
|
68
|
-
<a href="?show=${parseInt(
|
|
67
|
+
<span class="d-block pb-2">You've viewed ${r} of ${l} results</span>
|
|
68
|
+
<a href="?show=${parseInt(r) + parseInt(s)}" class="btn btn-primary w-100 m-0" data-show="${parseInt(r) + parseInt(s)}">Load more results</a>
|
|
69
69
|
</div>`, !0;
|
|
70
70
|
}, Q = (e) => {
|
|
71
71
|
const a = Array.from(e.querySelectorAll("thead th"));
|
|
72
|
-
Array.from(e.querySelectorAll("tbody tr")).forEach((
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
if (typeof
|
|
72
|
+
Array.from(e.querySelectorAll("tbody tr")).forEach((i, l) => {
|
|
73
|
+
const r = Array.from(i.querySelectorAll("th, td")), s = ["0", "low", "medium", "high", "unknown", "n/a", "pending", "verified", "incomplete", "completed", "requires approval"];
|
|
74
|
+
r.forEach((o, n) => {
|
|
75
|
+
const d = a[n];
|
|
76
|
+
if (typeof d < "u") {
|
|
77
77
|
let f = document.createElement("div");
|
|
78
|
-
f.innerHTML =
|
|
78
|
+
f.innerHTML = d.innerHTML;
|
|
79
79
|
let m = f.textContent || f.innerText || "";
|
|
80
|
-
|
|
80
|
+
o.setAttribute("data-label", m), d.hasAttribute("data-td-class") && o.setAttribute("class", d.getAttribute("data-td-class")), d.hasAttribute("data-format") && (o.setAttribute("data-format", d.getAttribute("data-format")), o.innerHTML = V(d.getAttribute("data-format"), o.textContent.trim())), s.includes(o.textContent.trim().toLowerCase()) && o.setAttribute("data-content", o.textContent.trim().toLowerCase());
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
84
|
}, yt = (e) => {
|
|
85
85
|
let a = 0;
|
|
86
|
-
return Array.from(e.querySelectorAll("tr")).forEach((t,
|
|
87
|
-
let
|
|
88
|
-
if (
|
|
89
|
-
let
|
|
90
|
-
|
|
86
|
+
return Array.from(e.querySelectorAll("tr")).forEach((t, i) => {
|
|
87
|
+
let l = window.getComputedStyle(document.querySelector("html")), r = t.querySelector(":scope > *:last-child > *:first-child");
|
|
88
|
+
if (r) {
|
|
89
|
+
let o = r.offsetWidth / parseFloat(l.fontSize);
|
|
90
|
+
o += 1.5, a = a > o ? a : o;
|
|
91
91
|
}
|
|
92
|
-
let
|
|
93
|
-
t.style.setProperty("--row-height", `${
|
|
92
|
+
let s = t.offsetHeight / parseFloat(l.fontSize);
|
|
93
|
+
t.style.setProperty("--row-height", `${s}rem`);
|
|
94
94
|
}), a;
|
|
95
95
|
}, pt = (e) => {
|
|
96
96
|
if (e.closest(".table--fullwidth") || e.querySelectorAll("thead tr th").length < 4)
|
|
97
97
|
return !1;
|
|
98
98
|
Array.from(e.querySelectorAll("tbody tr")).forEach((a, t) => {
|
|
99
|
-
let
|
|
100
|
-
if (
|
|
101
|
-
|
|
99
|
+
let i = a.querySelector(":scope > :is(td,th):first-child"), l = i.textContent;
|
|
100
|
+
if (l != "")
|
|
101
|
+
i.innerHTML = `<span class="td__content">${l}</span><button type="button" class="d-none">${l}</button>`;
|
|
102
102
|
else {
|
|
103
|
-
let
|
|
104
|
-
|
|
103
|
+
let r = a.querySelector(":scope > :is(td,th):nth-child(2)"), s = r.textContent;
|
|
104
|
+
r.innerHTML = `<span class="td__content">${s}</span><button type="button" class="d-none">${s}</button>`;
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
-
},
|
|
107
|
+
}, gt = (e) => {
|
|
108
108
|
e.addEventListener("click", (a) => {
|
|
109
109
|
if (a && a.target instanceof HTMLElement && a.target.closest("tr > :is(td,th):first-child button")) {
|
|
110
|
-
let t = a.target.closest("tr > :is(td,th):first-child button"),
|
|
111
|
-
|
|
110
|
+
let t = a.target.closest("tr > :is(td,th):first-child button"), i = t.parentNode.closest("tr");
|
|
111
|
+
i.getAttribute("data-view") == "full" ? i.setAttribute("data-view", "default") : i.setAttribute("data-view", "full"), t.blur();
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
}, Y = (e, a) => {
|
|
115
115
|
let t = a.querySelector("[data-search]");
|
|
116
116
|
if (!t)
|
|
117
117
|
return !1;
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
Array.from(e.querySelectorAll('td[data-label="' +
|
|
122
|
-
|
|
118
|
+
const i = t.getAttribute("id"), l = t.getAttribute("data-search").split(",");
|
|
119
|
+
let r = t.parentNode, s = {};
|
|
120
|
+
l.forEach((o, n) => {
|
|
121
|
+
Array.from(e.querySelectorAll('td[data-label="' + o.trim() + '"]')).forEach((d, f) => {
|
|
122
|
+
d.querySelector(".td__content") ? s[d.querySelector(".td__content").textContent] = d.querySelector(".td__content").textContent : s[d.textContent] = d.textContent;
|
|
123
123
|
});
|
|
124
|
-
}), t.setAttribute("list", `${
|
|
125
|
-
},
|
|
126
|
-
var
|
|
127
|
-
let
|
|
128
|
-
|
|
124
|
+
}), t.setAttribute("list", `${i}_list`), t.setAttribute("autocomplete", "off"), r.querySelector("datalist") || (r.innerHTML += `<datalist id="${i}_list"></datalist>`), r.querySelector("datalist").innerHTML = `${Object.keys(s).map((o) => `<option value="${o}"></option>`).join("")}`;
|
|
125
|
+
}, _t = (e, a, t, i, l) => {
|
|
126
|
+
var r;
|
|
127
|
+
let s = function(n = !1) {
|
|
128
|
+
if (a.hasAttribute("data-ajax")) {
|
|
129
|
+
if (!n) {
|
|
130
|
+
let d = a.querySelector("[data-pagination]");
|
|
131
|
+
d.value = 1, i.setAttribute("data-page", 1);
|
|
132
|
+
}
|
|
133
|
+
J(e, a, t, i);
|
|
134
|
+
} else
|
|
135
|
+
a.hasAttribute("data-submit") ? a.submit() : (Z(e, a, i), j(i, t), W(e, a));
|
|
129
136
|
};
|
|
130
|
-
a.addEventListener("keyup", (
|
|
131
|
-
clearTimeout(
|
|
132
|
-
|
|
137
|
+
a.addEventListener("keyup", (n) => {
|
|
138
|
+
clearTimeout(r), n && n.target instanceof HTMLElement && n.target.closest("[data-search]") && (r = setTimeout(function() {
|
|
139
|
+
s();
|
|
133
140
|
}, 500));
|
|
134
|
-
}), a.addEventListener("change", (
|
|
135
|
-
clearTimeout(
|
|
136
|
-
}), a.addEventListener("click", (
|
|
137
|
-
clearTimeout(
|
|
138
|
-
}), a.addEventListener("submit", (
|
|
139
|
-
clearTimeout(
|
|
140
|
-
}), a.addEventListener("force", (
|
|
141
|
-
|
|
141
|
+
}), a.addEventListener("change", (n) => {
|
|
142
|
+
clearTimeout(r), n && n.target instanceof HTMLElement && n.target.closest("[data-sort]") && (a.hasAttribute("data-submit") || K(e, a, l), s()), n && n.target instanceof HTMLElement && n.target.closest("[data-search]") && s(), n && n.target instanceof HTMLElement && n.target.closest("[data-filter]") && n.target.closest("form .dialog__wrapper > dialog") && s(), 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();
|
|
143
|
+
}), a.addEventListener("click", (n) => {
|
|
144
|
+
clearTimeout(r), 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") || K(e, a, l), s());
|
|
145
|
+
}), a.addEventListener("submit", (n) => {
|
|
146
|
+
clearTimeout(r), a.hasAttribute("data-submit") || n.preventDefault(), s();
|
|
147
|
+
}), a.addEventListener("force", (n) => {
|
|
148
|
+
s();
|
|
149
|
+
}), a.addEventListener("paginate", (n) => {
|
|
150
|
+
s(!0);
|
|
151
|
+
});
|
|
152
|
+
let o = [];
|
|
153
|
+
Array.from(a.querySelectorAll("[data-mimic]")).forEach((n, d) => {
|
|
154
|
+
let f = n.getAttribute("data-mimic");
|
|
155
|
+
Array.from(document.querySelectorAll(`[name="${f}"]`)).forEach((m, p) => {
|
|
156
|
+
let y = m.closest("form");
|
|
157
|
+
o.includes(y) || o.push(y);
|
|
158
|
+
});
|
|
159
|
+
}), o.forEach((n, d) => {
|
|
160
|
+
const f = function() {
|
|
161
|
+
let m = [], p = new FormData(n);
|
|
162
|
+
for (const [y, b] of p)
|
|
163
|
+
document.querySelector(`[data-mimic="${y}"]`) && !m.includes(y) ? (m.push(y), document.querySelector(`[data-mimic="${y}"]`).value = b) : document.querySelector(`[data-mimic="${y}"]`) && (document.querySelector(`[data-mimic="${y}"]`).value += "," + b);
|
|
164
|
+
for (const y of m) {
|
|
165
|
+
const b = new Event("force");
|
|
166
|
+
a.dispatchEvent(b);
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
n.addEventListener("force", (m) => {
|
|
170
|
+
f();
|
|
171
|
+
}), n.addEventListener("change", (m) => {
|
|
172
|
+
f();
|
|
173
|
+
});
|
|
142
174
|
});
|
|
143
175
|
}, K = (e, a, t) => {
|
|
144
176
|
if (a.getAttribute("data-ajax"))
|
|
145
177
|
return !1;
|
|
146
|
-
let
|
|
147
|
-
if (!
|
|
148
|
-
return
|
|
149
|
-
let
|
|
150
|
-
["asc", "desc", "descending"].includes(
|
|
178
|
+
let i = e.querySelector("tbody"), l = a.querySelector("[data-sort]"), r = l.querySelector(`option:nth-child(${l.selectedIndex + 1})`), s = r.getAttribute("data-sort"), o = r.getAttribute("data-order"), n = r.getAttribute("data-format");
|
|
179
|
+
if (!s)
|
|
180
|
+
return i.innerHTML = t.innerHTML, Q(e), !1;
|
|
181
|
+
let d = [];
|
|
182
|
+
["asc", "desc", "descending"].includes(o) || (d = o.split(","));
|
|
151
183
|
let f = [];
|
|
152
|
-
Array.from(
|
|
153
|
-
let b =
|
|
154
|
-
|
|
155
|
-
const
|
|
184
|
+
Array.from(i.querySelectorAll("tr")).forEach((p, y) => {
|
|
185
|
+
let b = p.querySelector('td[data-label="' + s + '"], th[data-label="' + s + '"]').textContent.trim();
|
|
186
|
+
d.length && d.includes(b) && (b = d.indexOf(b)), mt(b) && (b = ft(b, 10)), n && n == "date" && (b = new Date(b));
|
|
187
|
+
const E = {
|
|
156
188
|
index: b,
|
|
157
|
-
row:
|
|
189
|
+
row: p
|
|
158
190
|
};
|
|
159
|
-
f.push(
|
|
160
|
-
}), f.sort((
|
|
191
|
+
f.push(E);
|
|
192
|
+
}), f.sort((p, y) => p.index > y.index ? 1 : -1), (o == "descending" || o == "desc") && (f = f.reverse());
|
|
161
193
|
let m = "";
|
|
162
|
-
f.forEach((
|
|
163
|
-
m +=
|
|
164
|
-
}),
|
|
194
|
+
f.forEach((p, y) => {
|
|
195
|
+
m += p.row.outerHTML;
|
|
196
|
+
}), i.innerHTML = m;
|
|
165
197
|
}, Z = (e, a, t) => {
|
|
166
198
|
e.classList.remove("table--filtered");
|
|
167
|
-
let
|
|
168
|
-
if (Array.from(e.querySelectorAll("tbody tr")).forEach((
|
|
169
|
-
|
|
170
|
-
}), Array.from(a.querySelectorAll("[data-filter]")).forEach((
|
|
171
|
-
if (!(
|
|
172
|
-
if (
|
|
173
|
-
for (const [m,
|
|
174
|
-
|
|
175
|
-
else
|
|
176
|
-
|
|
199
|
+
let i = [], l = [], r = 0, s = a.querySelector("[data-pagination]") ? parseInt(a.querySelector("[data-pagination]").value) : 1, o = a.querySelector("[data-show]") ? parseInt(a.querySelector("[data-show]").value) : 15;
|
|
200
|
+
if (Array.from(e.querySelectorAll("tbody tr")).forEach((d, f) => {
|
|
201
|
+
d.classList.remove("filtered"), d.classList.remove("filtered--matched"), d.classList.remove("filtered--show"), d.removeAttribute("data-filtered-by");
|
|
202
|
+
}), Array.from(a.querySelectorAll("[data-filter]")).forEach((d, f) => {
|
|
203
|
+
if (!(d.type == "radio" && !d.checked) && !(d.type == "checkbox" && !d.checked)) {
|
|
204
|
+
if (d.getAttribute("data-filter") == "multi")
|
|
205
|
+
for (const [m, p] of Object.entries(JSON.parse(d.value)))
|
|
206
|
+
i[d.getAttribute("data-filter")].push(p);
|
|
207
|
+
else if (d && d.value) {
|
|
208
|
+
let m = d.getAttribute("data-filter");
|
|
209
|
+
i[m] || (i[m] = new Array()), i[m].push(d.value);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
177
212
|
}), a.querySelector("[data-search]")) {
|
|
178
|
-
let
|
|
179
|
-
a.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((m,
|
|
180
|
-
|
|
213
|
+
let d = a.querySelector("[data-search]");
|
|
214
|
+
a.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((m, p) => {
|
|
215
|
+
l.push({ column: `${m.trim()}`, value: `${d.value}` });
|
|
181
216
|
});
|
|
182
217
|
}
|
|
183
|
-
Array.from(a.querySelectorAll("[data-filter-count]")).forEach((
|
|
184
|
-
|
|
185
|
-
}),
|
|
186
|
-
|
|
218
|
+
Array.from(a.querySelectorAll("[data-filter-count]")).forEach((d, f) => {
|
|
219
|
+
d.innerHTML = "";
|
|
220
|
+
}), i.length && Array.from(a.querySelectorAll("[data-filter-count]")).forEach((d, f) => {
|
|
221
|
+
d.innerHTML += `(${i.length})`;
|
|
187
222
|
}), e.classList.add("table--filtered");
|
|
188
|
-
for (const [
|
|
189
|
-
Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach((m,
|
|
190
|
-
let
|
|
191
|
-
f.forEach((b,
|
|
192
|
-
let C = m.querySelector(`[data-label="${
|
|
223
|
+
for (const [d, f] of Object.entries(i))
|
|
224
|
+
Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach((m, p) => {
|
|
225
|
+
let y = !1;
|
|
226
|
+
f.forEach((b, E) => {
|
|
227
|
+
let C = m.querySelector(`[data-label="${d}"]`);
|
|
193
228
|
if (b && b == "$today")
|
|
194
|
-
b =
|
|
229
|
+
b = V("date", /* @__PURE__ */ new Date());
|
|
195
230
|
else if (b && b == "$yesterday") {
|
|
196
|
-
let
|
|
197
|
-
|
|
231
|
+
let v = /* @__PURE__ */ new Date();
|
|
232
|
+
v.setDate(v.getDate() - 1), b = V("date", v);
|
|
198
233
|
} else if (b && (b == "$thisWeek" || b == "$lastWeek")) {
|
|
199
|
-
let
|
|
200
|
-
if (
|
|
201
|
-
|
|
234
|
+
let v = /* @__PURE__ */ new Date(), L = new Date(v.setDate(v.getDate() - (v.getDay() - 1))), q = new Date(v.setDate(v.getDate() - v.getDay() + 7)), S = new Date(C.textContent.toLowerCase());
|
|
235
|
+
if (v.setHours(0, 0, 0, 0), L.setHours(0, 0, 0, 0), q.setHours(0, 0, 0, 0), S.setHours(0, 0, 0, 0), b == "$thisWeek")
|
|
236
|
+
y = S >= L && S <= q;
|
|
202
237
|
else {
|
|
203
|
-
let O = new Date(
|
|
204
|
-
O.setHours(0, 0, 0, 0), U.setHours(0, 0, 0, 0),
|
|
238
|
+
let O = new Date(L.setDate(L.getDate() - 7)), U = new Date(q.setDate(q.getDate() - 7));
|
|
239
|
+
O.setHours(0, 0, 0, 0), U.setHours(0, 0, 0, 0), y = S >= O && S <= U;
|
|
205
240
|
}
|
|
206
241
|
} else if (b && b == "$thisMonth") {
|
|
207
|
-
let
|
|
208
|
-
var
|
|
209
|
-
let
|
|
210
|
-
|
|
242
|
+
let v = /* @__PURE__ */ new Date(), L = v.getFullYear(), q = v.getMonth();
|
|
243
|
+
var z = new Date(L, q, 1), N = new Date(L, q + 1, 0);
|
|
244
|
+
let S = new Date(C.textContent.toLowerCase());
|
|
245
|
+
z.setHours(0, 0, 0, 0), N.setHours(0, 0, 0, 0), S.setHours(0, 0, 0, 0), y = S >= z && S <= N;
|
|
211
246
|
} else if (b && b == "$lastMonth") {
|
|
212
|
-
let
|
|
213
|
-
var
|
|
214
|
-
let
|
|
215
|
-
|
|
247
|
+
let v = /* @__PURE__ */ new Date(), L = v.getFullYear(), q = v.getMonth();
|
|
248
|
+
var $ = new Date(L, q - 1, 1), I = new Date(L, q, 0);
|
|
249
|
+
let S = new Date(C.textContent.toLowerCase());
|
|
250
|
+
$.setHours(0, 0, 0, 0), I.setHours(0, 0, 0, 0), S.setHours(0, 0, 0, 0), y = S >= $ && S <= I;
|
|
216
251
|
}
|
|
217
|
-
C && C.textContent.toLowerCase().includes(b.toLowerCase()) && (
|
|
218
|
-
}),
|
|
252
|
+
C && C.textContent.toLowerCase().includes(b.toLowerCase()) && (y = !0);
|
|
253
|
+
}), y || (m.classList.add("filtered"), m.setAttribute("data-filtered-by", d));
|
|
219
254
|
});
|
|
220
|
-
Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach((
|
|
221
|
-
let m = !(
|
|
222
|
-
|
|
223
|
-
let b =
|
|
224
|
-
b &&
|
|
225
|
-
}), m ||
|
|
226
|
-
}), Array.from(e.querySelectorAll("tbody tr:not(.filtered")).forEach((
|
|
227
|
-
|
|
228
|
-
}), t && (t.setAttribute("data-page",
|
|
229
|
-
},
|
|
230
|
-
Array.from(a.querySelectorAll("[data-query]")).forEach((
|
|
231
|
-
let
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
else if (!
|
|
235
|
-
let
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}),
|
|
239
|
-
} else if (!
|
|
240
|
-
|
|
241
|
-
else if (
|
|
242
|
-
let
|
|
243
|
-
|
|
244
|
-
let
|
|
245
|
-
for (const [
|
|
246
|
-
let y =
|
|
247
|
-
(!
|
|
255
|
+
Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).forEach((d, f) => {
|
|
256
|
+
let m = !(l.length > 0 && l[0].value.length >= 3);
|
|
257
|
+
l.forEach((p, y) => {
|
|
258
|
+
let b = d.querySelector(`[data-label="${p.column}"]`);
|
|
259
|
+
b && p.value.length >= 3 && b.textContent.toLowerCase().includes(p.value.toLowerCase()) && (m = !0);
|
|
260
|
+
}), m || d.classList.add("filtered");
|
|
261
|
+
}), Array.from(e.querySelectorAll("tbody tr:not(.filtered")).forEach((d, f) => {
|
|
262
|
+
r++, d.classList.add("filtered--matched"), Math.ceil(r / o) == parseInt(s) && d.classList.add("filtered--show");
|
|
263
|
+
}), t && (t.setAttribute("data-page", s), t.setAttribute("data-pages", Math.ceil(r / o)), t.setAttribute("data-total", r), t.setAttribute("data-show", o));
|
|
264
|
+
}, W = (e, a, t) => {
|
|
265
|
+
Array.from(a.querySelectorAll("[data-query]")).forEach((l, r) => {
|
|
266
|
+
let s = l.getAttribute("data-query"), o;
|
|
267
|
+
if (s == "total")
|
|
268
|
+
t.hasAttribute("data-total") ? o = t.getAttribute("data-total") : o = (e.classList.contains("table--filtered"), e.querySelectorAll("tbody tr").length);
|
|
269
|
+
else if (!s.includes(" == ") && s.includes(" & ")) {
|
|
270
|
+
let n = s.split(" & "), d = "";
|
|
271
|
+
n.forEach((f) => {
|
|
272
|
+
d += `:not([data-filtered-by="${f}"])`;
|
|
273
|
+
}), o = Array.from(e.querySelectorAll(`tbody tr${d}`)).length;
|
|
274
|
+
} else if (!s.includes(" == "))
|
|
275
|
+
o = Array.from(e.querySelectorAll(`tbody tr:not([data-filtered-by="${s}"])`)).length;
|
|
276
|
+
else if (s.includes(" && ")) {
|
|
277
|
+
let n = s.split(" && ");
|
|
278
|
+
o = Array.from(e.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d) {
|
|
279
|
+
let f = !0;
|
|
280
|
+
for (const [m, p] of Object.entries(n)) {
|
|
281
|
+
let y = p.split(" == ");
|
|
282
|
+
(!d.querySelector(`td[data-label="${y[0]}"]`) || d.querySelector(`td[data-label="${y[0]}"]`).textContent != `${y[1]}`) && (f = !1);
|
|
248
283
|
}
|
|
249
|
-
return
|
|
284
|
+
return f;
|
|
250
285
|
}).length;
|
|
251
286
|
} else {
|
|
252
|
-
let
|
|
253
|
-
|
|
254
|
-
return
|
|
287
|
+
let n = s.split(" == ");
|
|
288
|
+
o = Array.from(e.querySelectorAll(`tbody tr.filtered--matched td[data-label="${n[0]}"], tbody tr[data-filtered-by="${n[0]}"] td[data-label="${n[0]}"]`)).filter(function(d) {
|
|
289
|
+
return d.textContent === n[1];
|
|
255
290
|
}).length;
|
|
256
291
|
}
|
|
257
|
-
|
|
292
|
+
l.hasAttribute("data-total") ? l.setAttribute("data-total", o) : l.innerHTML = o;
|
|
258
293
|
});
|
|
259
|
-
}, vt = function(e, a, t,
|
|
260
|
-
t.addEventListener("click", (
|
|
261
|
-
if (
|
|
262
|
-
|
|
263
|
-
let
|
|
264
|
-
if (
|
|
265
|
-
const
|
|
266
|
-
|
|
294
|
+
}, vt = function(e, a, t, i) {
|
|
295
|
+
t.addEventListener("click", (l) => {
|
|
296
|
+
if (l && l.target instanceof HTMLElement && l.target.closest("[data-page]")) {
|
|
297
|
+
l.preventDefault();
|
|
298
|
+
let r = a.querySelector("[data-pagination]"), s = l.target.closest("[data-page]").getAttribute("data-page");
|
|
299
|
+
if (r.value = s, i.setAttribute("data-page", s), a.dispatchEvent(new Event("paginate")), e.hasAttribute("data-show-history")) {
|
|
300
|
+
const o = new URL(location);
|
|
301
|
+
o.searchParams.set("page", s), history.pushState({ type: "pagination", form: a.getAttribute("id"), page: s }, "", o);
|
|
267
302
|
}
|
|
268
303
|
}
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
let
|
|
272
|
-
|
|
304
|
+
if (l && l.target instanceof HTMLElement && l.target.closest("[data-show]")) {
|
|
305
|
+
l.preventDefault();
|
|
306
|
+
let r = a.querySelector("[data-show]"), s = l.target.closest("[data-show]").getAttribute("data-show");
|
|
307
|
+
r.value = s, i.setAttribute("data-show", s), a.dispatchEvent(new Event("submit"));
|
|
273
308
|
}
|
|
274
309
|
});
|
|
275
310
|
}, At = (e, a) => {
|
|
@@ -279,30 +314,29 @@ const ht = /* @__PURE__ */ A(nt, [["render", ut]]), mt = function(e) {
|
|
|
279
314
|
wt(a);
|
|
280
315
|
});
|
|
281
316
|
}, wt = function(e) {
|
|
282
|
-
for (var a = [], t = e.getElementsByTagName("tr"),
|
|
283
|
-
for (var
|
|
284
|
-
|
|
285
|
-
a.push(
|
|
317
|
+
for (var a = [], t = e.getElementsByTagName("tr"), i = 0; i < t.length; i++) {
|
|
318
|
+
for (var l = t[i].querySelectorAll("td,th"), r = [], s = 0; s < l.length; s++)
|
|
319
|
+
r.push(`"${l[s].textContent}"`);
|
|
320
|
+
a.push(r.join(","));
|
|
286
321
|
}
|
|
287
322
|
a = a.join(`
|
|
288
323
|
`);
|
|
289
|
-
let
|
|
324
|
+
let o = new Blob([a], {
|
|
290
325
|
type: "text/csv"
|
|
291
326
|
});
|
|
292
|
-
var
|
|
293
|
-
|
|
294
|
-
var
|
|
295
|
-
|
|
296
|
-
}, X = function(e, a, t,
|
|
297
|
-
if (
|
|
298
|
-
const
|
|
299
|
-
|
|
327
|
+
var n = document.createElement("a");
|
|
328
|
+
n.download = "export.csv";
|
|
329
|
+
var d = window.URL.createObjectURL(o);
|
|
330
|
+
n.href = d, n.style.display = "none", document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
331
|
+
}, X = function(e, a, t, i) {
|
|
332
|
+
if (Q(e), pt(e), W(e, a, i), i && i.classList.contains("table--cta")) {
|
|
333
|
+
const l = yt(e);
|
|
334
|
+
i.style.setProperty("--cta-width", `${l}rem`);
|
|
300
335
|
}
|
|
301
|
-
}, J = function(e, a, t,
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
fetch(a.getAttribute("data-ajax"), {
|
|
336
|
+
}, J = function(e, a, t, i) {
|
|
337
|
+
const l = (d, f, m) => f.split(/[\.\[\]\'\"]/).filter((p) => p).reduce((p, y) => p ? p[y] : m, d);
|
|
338
|
+
let r = new FormData(a), s = new URLSearchParams(r).toString(), o = e.querySelectorAll("thead tr th"), n = e.querySelector("tbody");
|
|
339
|
+
if (i.classList.add("table--loading"), fetch(a.getAttribute("data-ajax") + "?" + s, {
|
|
306
340
|
method: "get",
|
|
307
341
|
credentials: "same-origin",
|
|
308
342
|
headers: new Headers({
|
|
@@ -310,41 +344,44 @@ const ht = /* @__PURE__ */ A(nt, [["render", ut]]), mt = function(e) {
|
|
|
310
344
|
Accept: "application/json",
|
|
311
345
|
"X-Requested-With": "XMLHttpRequest"
|
|
312
346
|
})
|
|
313
|
-
}).then((
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
347
|
+
}).then((d) => d.json()).then((d) => {
|
|
348
|
+
let f = a.hasAttribute("data-schema") ? a.getAttribute("data-schema") : "data", m = a.hasAttribute("data-schema-total") ? a.getAttribute("data-schema-total") : "meta.total", p = a.hasAttribute("data-schema-page") ? a.getAttribute("data-schema-page") : "meta.current_page", y = l(d, m, 1), b = l(d, p, 1), E = l(d, f);
|
|
349
|
+
E ? (n.innerHTML = "", E.forEach((C, z) => {
|
|
350
|
+
var N = document.createElement("tr");
|
|
351
|
+
o.forEach(($, I) => {
|
|
352
|
+
let v = "";
|
|
353
|
+
var L = document.createElement("td");
|
|
354
|
+
if (L.setAttribute("data-label", $.innerText), $.getAttribute("data-output")) {
|
|
355
|
+
var q = $.getAttribute("data-output");
|
|
356
|
+
v = q.replace(new RegExp(/{(.*?)}/, "gm"), function(S) {
|
|
357
|
+
return l(C, S.replace("{", "").replace("}", ""));
|
|
323
358
|
});
|
|
324
359
|
}
|
|
325
|
-
|
|
326
|
-
}),
|
|
327
|
-
}), Y(e, a),
|
|
328
|
-
})
|
|
329
|
-
|
|
360
|
+
$.hasAttribute("data-transform") && (v = JSON.parse($.getAttribute("data-transform"))[v], !v && $.hasAttribute("data-default") && (v = $.getAttribute("data-default"))), L.innerHTML = v, N.appendChild(L);
|
|
361
|
+
}), n.appendChild(N);
|
|
362
|
+
}), Y(e, a), i.setAttribute("data-total", parseInt(y)), i.setAttribute("data-page", parseInt(b)), i.setAttribute("data-pages", Math.ceil(i.getAttribute("data-total") / i.getAttribute("data-show"))), X(e, a, t, i), j(i, t), d.data.length == 0 && (n.innerHTML = '<tr><td colspan="100%"><span class="h4 m-0">No results found</span></td></tr>'), i.classList.remove("table--loading")) : n.innerHTML = '<tr><td colspan="100%"><span class="h6 m-0">Error loading table</span></td></tr>';
|
|
363
|
+
}), a.hasAttribute("data-ajax-post")) {
|
|
364
|
+
const d = new XMLHttpRequest();
|
|
365
|
+
d.open("GET", `${window.location.href}?ajax=true&${s}`), d.send();
|
|
366
|
+
}
|
|
367
|
+
}, V = (e, a) => {
|
|
330
368
|
switch (e) {
|
|
369
|
+
case "datetime":
|
|
370
|
+
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" });
|
|
331
371
|
case "date":
|
|
332
|
-
|
|
333
|
-
break;
|
|
372
|
+
return new Date(a).toLocaleDateString("en-gb", { year: "2-digit", month: "long", day: "numeric" });
|
|
334
373
|
case "capitalise":
|
|
335
|
-
a = bt(a);
|
|
336
|
-
break;
|
|
374
|
+
return a = bt(a);
|
|
337
375
|
}
|
|
338
|
-
return a;
|
|
339
376
|
};
|
|
340
377
|
class St extends HTMLElement {
|
|
341
378
|
constructor() {
|
|
342
379
|
super(), this.attachShadow({ mode: "open" });
|
|
343
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", t = this.classList.contains("table--cta"),
|
|
344
|
-
let
|
|
345
|
-
|
|
346
|
-
const
|
|
347
|
-
|
|
380
|
+
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", t = this.classList.contains("table--cta"), i = this.classList.contains("table--export");
|
|
381
|
+
let l = this.classList.toString();
|
|
382
|
+
l = l.replace("table--cta", "");
|
|
383
|
+
const r = document.createElement("template");
|
|
384
|
+
r.innerHTML = `
|
|
348
385
|
<style>
|
|
349
386
|
@import "${a}/css/core.min.css";
|
|
350
387
|
|
|
@@ -359,25 +396,25 @@ class St extends HTMLElement {
|
|
|
359
396
|
}
|
|
360
397
|
</style>
|
|
361
398
|
${t ? '<div class="table--cta">' : ""}
|
|
362
|
-
<div class="table__wrapper ${
|
|
399
|
+
<div class="table__wrapper ${l}">
|
|
363
400
|
<slot></slot>
|
|
364
401
|
</div>
|
|
365
402
|
${t ? "</div>" : ""}
|
|
366
|
-
${
|
|
403
|
+
${i ? '<button class="link" type="button" data-export>Export table as CSV</button>' : ""}
|
|
367
404
|
<div class="table__pagination"></div>
|
|
368
|
-
`, this.shadowRoot.appendChild(
|
|
369
|
-
const
|
|
370
|
-
this.hasAttribute("data-total") || this.setAttribute("data-total", this.querySelectorAll("table tbody tr").length), this.hasAttribute("data-page") || this.setAttribute("data-page",
|
|
405
|
+
`, this.shadowRoot.appendChild(r.content.cloneNode(!0));
|
|
406
|
+
const s = new URLSearchParams(window.location.search);
|
|
407
|
+
this.hasAttribute("data-total") || this.setAttribute("data-total", this.querySelectorAll("table tbody tr").length), this.hasAttribute("data-page") || this.setAttribute("data-page", s.has("page") ? s.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")));
|
|
371
408
|
}
|
|
372
409
|
connectedCallback() {
|
|
373
|
-
this.table = this.querySelector("table"), this.savedTableBody = this.table.querySelector("tbody").cloneNode(!0), this.pagination = this.shadowRoot.querySelector(".table__pagination"), 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), Y(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" />`),
|
|
374
|
-
this.table.querySelector("dialog[open]") && this.table.querySelector("dialog[open]").close();
|
|
410
|
+
this.table = this.querySelector("table"), this.savedTableBody = this.table.querySelector("tbody").cloneNode(!0), this.pagination = this.shadowRoot.querySelector(".table__pagination"), 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"), Y(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" />`), gt(this.table), _t(this.table, this.form, this.pagination, this, this.savedTableBody), vt(this.table, this.form, this.pagination, this), At(this.shadowRoot.querySelector("[data-export]"), this.table), this.form.getAttribute("data-ajax") ? J(this.table, this.form, this.pagination, this) : (X(this.table, this.form, this.pagination, this), Z(this.table, this.form, this), j(this, this.pagination), W(this.table, this.form)), this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll", (a) => {
|
|
411
|
+
this.table.querySelector("dialog[open]") && (this.table.querySelector("dialog[open]").close(), this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"));
|
|
375
412
|
});
|
|
376
413
|
}
|
|
377
414
|
static get observedAttributes() {
|
|
378
415
|
return ["data-total", "data-pages", "data-page", "data-show"];
|
|
379
416
|
}
|
|
380
|
-
attributeChangedCallback(a, t,
|
|
417
|
+
attributeChangedCallback(a, t, i) {
|
|
381
418
|
}
|
|
382
419
|
}
|
|
383
420
|
const Lt = (e) => e.charAt(0).toUpperCase() + e.slice(1), kt = (e) => e.replace(/_/g, " "), xt = (e) => e.replace(/ /g, "_"), qt = function(e) {
|
|
@@ -406,32 +443,32 @@ const Lt = (e) => e.charAt(0).toUpperCase() + e.slice(1), kt = (e) => e.replace(
|
|
|
406
443
|
},
|
|
407
444
|
updated() {
|
|
408
445
|
}
|
|
409
|
-
}, Tt = { key: 0 }, Ht = { key: 0 }, Mt = ["data-row-id"],
|
|
410
|
-
function
|
|
411
|
-
return
|
|
412
|
-
t.fields ? (
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
(
|
|
416
|
-
key:
|
|
417
|
-
},
|
|
446
|
+
}, Tt = { key: 0 }, Ht = { key: 0 }, Mt = ["data-row-id"], Et = ["innerHTML"];
|
|
447
|
+
function Ct(e, a, t, i, l, r) {
|
|
448
|
+
return u(), h("iam-table", null, [
|
|
449
|
+
t.fields ? (u(), h("table", Tt, [
|
|
450
|
+
c("thead", null, [
|
|
451
|
+
c("tr", null, [
|
|
452
|
+
(u(!0), h(T, null, H(t.fields, (s) => (u(), h("th", {
|
|
453
|
+
key: s.key
|
|
454
|
+
}, x(r.cellHeading(s.key)), 1))), 128))
|
|
418
455
|
])
|
|
419
456
|
]),
|
|
420
|
-
t.items ? (
|
|
421
|
-
(
|
|
422
|
-
key:
|
|
423
|
-
"data-row-id":
|
|
457
|
+
t.items ? (u(), h("tbody", Ht, [
|
|
458
|
+
(u(!0), h(T, null, H(t.items, (s, o) => (u(), h("tr", {
|
|
459
|
+
key: o,
|
|
460
|
+
"data-row-id": s.rowid
|
|
424
461
|
}, [
|
|
425
|
-
(
|
|
426
|
-
key:
|
|
427
|
-
innerHTML:
|
|
428
|
-
}, null, 8,
|
|
462
|
+
(u(!0), h(T, null, H(Object.fromEntries(Object.entries(s).filter(([n]) => n !== "rowid")), (n, d) => (u(), h("td", {
|
|
463
|
+
key: d,
|
|
464
|
+
innerHTML: n
|
|
465
|
+
}, null, 8, Et))), 128))
|
|
429
466
|
], 8, Mt))), 128))
|
|
430
|
-
])) :
|
|
467
|
+
])) : g("", !0)
|
|
431
468
|
])) : _(e.$slots, "default", { key: 1 })
|
|
432
469
|
]);
|
|
433
470
|
}
|
|
434
|
-
const tt = /* @__PURE__ */
|
|
471
|
+
const tt = /* @__PURE__ */ w($t, [["render", Ct]]), Dt = {
|
|
435
472
|
name: "Input",
|
|
436
473
|
props: {
|
|
437
474
|
value: {
|
|
@@ -615,154 +652,154 @@ const tt = /* @__PURE__ */ A($t, [["render", Et]]), Nt = {
|
|
|
615
652
|
this.$emit("bus");
|
|
616
653
|
}
|
|
617
654
|
}
|
|
618
|
-
},
|
|
655
|
+
}, Nt = ["for", "innerHTML", "title"], Rt = ["innerHTML"], Pt = ["innerHTML"], zt = ["type", "name", "id", "pattern", "list"], It = ["type", "name", "id", "pattern"], Ft = {
|
|
619
656
|
key: 5,
|
|
620
657
|
class: "input-group"
|
|
621
|
-
}, Bt = ["type", "name", "id", "pattern", "list"], Vt = { class: "input-group-text border-0 col-2 col-sm-1 px-0" },
|
|
658
|
+
}, Bt = ["type", "name", "id", "pattern", "list"], Vt = { class: "input-group-text border-0 col-2 col-sm-1 px-0" }, jt = {
|
|
622
659
|
key: 6,
|
|
623
660
|
class: "input-group"
|
|
624
|
-
},
|
|
625
|
-
function ee(e, a, t,
|
|
626
|
-
return
|
|
627
|
-
class:
|
|
661
|
+
}, Wt = ["type", "name", "id", "pattern", "list"], Ot = { class: "input-group-text flex-fill" }, Ut = ["type", "name", "id", "pattern"], Kt = ["value"], Gt = ["id"], Qt = ["value"], Yt = ["type", "name", "id"], Zt = ["for", "innerHTML"], Xt = ["type", "name", "id"], Jt = ["for", "innerHTML"], te = ["innerHTML"];
|
|
662
|
+
function ee(e, a, t, i, l, r) {
|
|
663
|
+
return u(), h("div", {
|
|
664
|
+
class: A(r.wrapperClass()),
|
|
628
665
|
ref: "wrapper"
|
|
629
666
|
}, [
|
|
630
|
-
|
|
667
|
+
r.needsLabel() ? (u(), h("label", {
|
|
631
668
|
key: 0,
|
|
632
|
-
class:
|
|
669
|
+
class: A(`form-label${t.labelclass ? ` ${t.labelclass}` : ""}`),
|
|
633
670
|
for: t.id,
|
|
634
|
-
innerHTML:
|
|
671
|
+
innerHTML: r.displayLabel(),
|
|
635
672
|
title: t.title
|
|
636
|
-
}, null, 10,
|
|
637
|
-
t.prefix ? (
|
|
673
|
+
}, null, 10, Nt)) : g("", !0),
|
|
674
|
+
t.prefix ? (u(), h("span", {
|
|
638
675
|
key: 1,
|
|
639
|
-
class:
|
|
676
|
+
class: A(`prefix ${this.prefixClass} ${t.size ? `prefix-${t.size}` : ""}`),
|
|
640
677
|
innerHTML: t.prefix,
|
|
641
678
|
role: "presentation"
|
|
642
|
-
}, null, 10, Rt)) :
|
|
643
|
-
t.suffix ? (
|
|
679
|
+
}, null, 10, Rt)) : g("", !0),
|
|
680
|
+
t.suffix ? (u(), h("span", {
|
|
644
681
|
key: 2,
|
|
645
|
-
class:
|
|
682
|
+
class: A(`suffix ${this.suffixClass} ${t.size ? `suffix-${t.size}` : ""}`),
|
|
646
683
|
innerHTML: t.suffix,
|
|
647
684
|
role: "presentation"
|
|
648
|
-
}, null, 10, Pt)) :
|
|
649
|
-
|
|
685
|
+
}, null, 10, Pt)) : g("", !0),
|
|
686
|
+
r.isInput() ? R((u(), h("input", M({
|
|
650
687
|
key: 3,
|
|
651
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
688
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => r.inputVal = s),
|
|
652
689
|
class: `form-control${t.size ? ` form-control-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
|
|
653
690
|
type: t.type,
|
|
654
691
|
name: t.name ? t.name : t.id,
|
|
655
692
|
id: t.id,
|
|
656
|
-
pattern:
|
|
657
|
-
list:
|
|
693
|
+
pattern: r.needPattern(),
|
|
694
|
+
list: r.hasOptions()
|
|
658
695
|
}, e.$attrs, {
|
|
659
|
-
onKeyup: a[1] || (a[1] = (...
|
|
696
|
+
onKeyup: a[1] || (a[1] = (...s) => r.inputKeyup && r.inputKeyup(...s))
|
|
660
697
|
}), null, 16, zt)), [
|
|
661
|
-
[
|
|
662
|
-
]) :
|
|
663
|
-
t.type == "textarea" ?
|
|
698
|
+
[F, r.inputVal]
|
|
699
|
+
]) : g("", !0),
|
|
700
|
+
t.type == "textarea" ? R((u(), h("textarea", M({
|
|
664
701
|
key: 4,
|
|
665
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
702
|
+
"onUpdate:modelValue": a[2] || (a[2] = (s) => r.inputVal = s),
|
|
666
703
|
class: `form-control${t.size ? ` form-control-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
|
|
667
704
|
type: t.type,
|
|
668
705
|
name: t.name ? t.name : t.id,
|
|
669
706
|
id: t.id,
|
|
670
|
-
pattern:
|
|
671
|
-
}, e.$attrs), null, 16,
|
|
672
|
-
[st,
|
|
673
|
-
]) :
|
|
674
|
-
t.type == "range" ? (
|
|
675
|
-
|
|
676
|
-
"onUpdate:modelValue": a[3] || (a[3] = (
|
|
707
|
+
pattern: r.needPattern()
|
|
708
|
+
}, e.$attrs), null, 16, It)), [
|
|
709
|
+
[st, r.inputVal]
|
|
710
|
+
]) : g("", !0),
|
|
711
|
+
t.type == "range" ? (u(), h("div", Ft, [
|
|
712
|
+
R(c("input", M({
|
|
713
|
+
"onUpdate:modelValue": a[3] || (a[3] = (s) => r.inputVal = s),
|
|
677
714
|
class: `form-range${t.inputclass ? ` ${t.inputclass}` : ""}`,
|
|
678
715
|
type: t.type,
|
|
679
716
|
name: t.name ? t.name : t.id,
|
|
680
717
|
id: t.id,
|
|
681
|
-
pattern:
|
|
682
|
-
list:
|
|
718
|
+
pattern: r.needPattern(),
|
|
719
|
+
list: r.hasOptions()
|
|
683
720
|
}, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Bt), [
|
|
684
|
-
[
|
|
721
|
+
[F, r.inputVal]
|
|
685
722
|
]),
|
|
686
|
-
|
|
687
|
-
])) :
|
|
688
|
-
t.type == "color" ? (
|
|
689
|
-
|
|
690
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
723
|
+
c("output", Vt, x(t.value), 1)
|
|
724
|
+
])) : g("", !0),
|
|
725
|
+
t.type == "color" ? (u(), h("div", jt, [
|
|
726
|
+
R(c("input", M({
|
|
727
|
+
"onUpdate:modelValue": a[4] || (a[4] = (s) => r.inputVal = s),
|
|
691
728
|
class: `form-control form-control-color${t.inputclass ? ` ${t.inputclass}` : ""}`,
|
|
692
729
|
type: t.type,
|
|
693
730
|
name: t.name ? t.name : t.id,
|
|
694
731
|
id: t.id,
|
|
695
|
-
pattern:
|
|
696
|
-
list:
|
|
697
|
-
}, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16,
|
|
698
|
-
[
|
|
732
|
+
pattern: r.needPattern(),
|
|
733
|
+
list: r.hasOptions()
|
|
734
|
+
}, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Wt), [
|
|
735
|
+
[F, r.inputVal]
|
|
699
736
|
]),
|
|
700
|
-
|
|
701
|
-
])) :
|
|
702
|
-
t.type == "select" ?
|
|
737
|
+
c("output", Ot, x(t.value ? e.vale : "#000000"), 1)
|
|
738
|
+
])) : g("", !0),
|
|
739
|
+
t.type == "select" ? R((u(), h("select", M({
|
|
703
740
|
key: 7,
|
|
704
|
-
"onUpdate:modelValue": a[5] || (a[5] = (
|
|
741
|
+
"onUpdate:modelValue": a[5] || (a[5] = (s) => r.inputVal = s),
|
|
705
742
|
class: `form-select${t.size ? ` form-select-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
|
|
706
743
|
type: t.type,
|
|
707
744
|
name: t.id,
|
|
708
745
|
id: t.id,
|
|
709
|
-
pattern:
|
|
746
|
+
pattern: r.needPattern()
|
|
710
747
|
}, e.$attrs), [
|
|
711
|
-
(
|
|
712
|
-
key:
|
|
713
|
-
value:
|
|
714
|
-
},
|
|
748
|
+
(u(!0), h(T, null, H(t.options, (s, o) => (u(), h("option", {
|
|
749
|
+
key: o,
|
|
750
|
+
value: s.value
|
|
751
|
+
}, x(s.display ? s.display : s.value), 9, Kt))), 128))
|
|
715
752
|
], 16, Ut)), [
|
|
716
|
-
[it,
|
|
717
|
-
]) :
|
|
718
|
-
|
|
753
|
+
[it, r.inputVal]
|
|
754
|
+
]) : g("", !0),
|
|
755
|
+
r.allowDatalist() ? (u(), h("datalist", {
|
|
719
756
|
key: 8,
|
|
720
757
|
id: t.id + "-list"
|
|
721
758
|
}, [
|
|
722
|
-
(
|
|
723
|
-
key:
|
|
724
|
-
value:
|
|
725
|
-
},
|
|
726
|
-
], 8, Gt)) :
|
|
727
|
-
t.type == "checkbox" || t.type == "radio" ? (
|
|
759
|
+
(u(!0), h(T, null, H(t.options, (s, o) => (u(), h("option", {
|
|
760
|
+
key: o,
|
|
761
|
+
value: s.value
|
|
762
|
+
}, x(s.value), 9, Qt))), 128))
|
|
763
|
+
], 8, Gt)) : g("", !0),
|
|
764
|
+
t.type == "checkbox" || t.type == "radio" ? (u(), h("input", M({
|
|
728
765
|
key: 9,
|
|
729
766
|
class: "form-check-input",
|
|
730
767
|
type: t.type,
|
|
731
768
|
name: t.name ? t.name : t.id,
|
|
732
769
|
id: t.id
|
|
733
|
-
}, e.$attrs), null, 16, Yt)) :
|
|
734
|
-
t.type == "checkbox" || t.type == "radio" ? (
|
|
770
|
+
}, e.$attrs), null, 16, Yt)) : g("", !0),
|
|
771
|
+
t.type == "checkbox" || t.type == "radio" ? (u(), h("label", {
|
|
735
772
|
key: 10,
|
|
736
|
-
class:
|
|
773
|
+
class: A(`form-label form-check-label${t.labelclass ? ` ${t.labelclass}` : ""}`),
|
|
737
774
|
for: t.id,
|
|
738
775
|
innerHTML: t.label
|
|
739
|
-
}, null, 10, Zt)) :
|
|
740
|
-
t.type == "checkbox-btn" || t.type == "radio-btn" ? (
|
|
776
|
+
}, null, 10, Zt)) : g("", !0),
|
|
777
|
+
t.type == "checkbox-btn" || t.type == "radio-btn" ? (u(), h("input", M({
|
|
741
778
|
key: 11,
|
|
742
779
|
class: `btn-check${t.inputclass ? ` ${t.inputclass}` : ""}`,
|
|
743
780
|
type: t.type.replace("-btn", ""),
|
|
744
781
|
autocomplete: "off",
|
|
745
782
|
name: t.name ? t.name : t.id,
|
|
746
783
|
id: t.id
|
|
747
|
-
}, e.$attrs), null, 16, Xt)) :
|
|
748
|
-
t.type == "checkbox-btn" || t.type == "radio-btn" ? (
|
|
784
|
+
}, e.$attrs), null, 16, Xt)) : g("", !0),
|
|
785
|
+
t.type == "checkbox-btn" || t.type == "radio-btn" ? (u(), h("label", {
|
|
749
786
|
key: 12,
|
|
750
|
-
class:
|
|
787
|
+
class: A(`btn${t.labelclass ? ` ${t.labelclass}` : ""}`),
|
|
751
788
|
for: t.id,
|
|
752
789
|
innerHTML: t.label,
|
|
753
|
-
onClick: a[6] || (a[6] = (...
|
|
754
|
-
}, null, 10, Jt)) :
|
|
755
|
-
t.errormsg ? (
|
|
790
|
+
onClick: a[6] || (a[6] = (...s) => r.clickEvent && r.clickEvent(...s))
|
|
791
|
+
}, null, 10, Jt)) : g("", !0),
|
|
792
|
+
t.errormsg ? (u(), h("p", {
|
|
756
793
|
key: 13,
|
|
757
794
|
class: "invalid-feedback mb-0",
|
|
758
795
|
innerHTML: t.errormsg
|
|
759
|
-
}, null, 8, te)) :
|
|
796
|
+
}, null, 8, te)) : g("", !0),
|
|
760
797
|
_(e.$slots, "default")
|
|
761
798
|
], 2);
|
|
762
799
|
}
|
|
763
|
-
const
|
|
800
|
+
const P = /* @__PURE__ */ w(Dt, [["render", ee]]), ae = {
|
|
764
801
|
components: {
|
|
765
|
-
Input:
|
|
802
|
+
Input: P
|
|
766
803
|
},
|
|
767
804
|
name: "FileUploads",
|
|
768
805
|
props: {
|
|
@@ -783,21 +820,21 @@ const R = /* @__PURE__ */ A(Nt, [["render", ee]]), ae = {
|
|
|
783
820
|
required: !1
|
|
784
821
|
}
|
|
785
822
|
}
|
|
786
|
-
}, se = { class: "multiple-file-uploads mb-4" }, ie = { class: "row" }, re = { class: "col-12 col-md me-auto" }, le = /* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
823
|
+
}, se = { class: "multiple-file-uploads mb-4" }, ie = { class: "row" }, re = { class: "col-12 col-md me-auto" }, le = /* @__PURE__ */ c("div", { class: "col mw-fit-content" }, [
|
|
824
|
+
/* @__PURE__ */ c("button", {
|
|
788
825
|
type: "button",
|
|
789
826
|
class: "btn btn-tertiary me-0",
|
|
790
827
|
"data-delete": ""
|
|
791
828
|
}, "Delete")
|
|
792
|
-
], -1),
|
|
793
|
-
function
|
|
794
|
-
const
|
|
795
|
-
return
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
class:
|
|
829
|
+
], -1), ne = ["data-maxfiles"];
|
|
830
|
+
function oe(e, a, t, i, l, r) {
|
|
831
|
+
const s = D("Input");
|
|
832
|
+
return u(), h("div", se, [
|
|
833
|
+
c("div", ie, [
|
|
834
|
+
c("div", {
|
|
835
|
+
class: A(`${t.inputcolclass ? t.inputcolclass : "col-12 col-sm-4"}`)
|
|
799
836
|
}, [
|
|
800
|
-
|
|
837
|
+
k(s, {
|
|
801
838
|
type: "file",
|
|
802
839
|
id: t.id,
|
|
803
840
|
name: `${t.id}[]`,
|
|
@@ -808,32 +845,32 @@ function ne(e, a, t, s, o, l) {
|
|
|
808
845
|
"data-filesize": t.maxfilesize
|
|
809
846
|
}, null, 8, ["id", "name", "data-filesize"])
|
|
810
847
|
], 2),
|
|
811
|
-
|
|
848
|
+
c("div", re, [
|
|
812
849
|
_(e.$slots, "default")
|
|
813
850
|
]),
|
|
814
851
|
le
|
|
815
852
|
]),
|
|
816
|
-
|
|
853
|
+
c("button", {
|
|
817
854
|
type: "button",
|
|
818
855
|
class: "btn btn-secondary me-0",
|
|
819
856
|
"data-add": "",
|
|
820
857
|
"data-maxfiles": t.maxfiles
|
|
821
|
-
}, "+ Add file", 8,
|
|
858
|
+
}, "+ Add file", 8, ne)
|
|
822
859
|
]);
|
|
823
860
|
}
|
|
824
|
-
const si = /* @__PURE__ */
|
|
861
|
+
const si = /* @__PURE__ */ w(ae, [["render", oe]]);
|
|
825
862
|
function ce(e) {
|
|
826
863
|
let a = e.querySelectorAll("details"), t = e.querySelectorAll("summary");
|
|
827
|
-
if (a.forEach((
|
|
828
|
-
|
|
829
|
-
}), t.forEach((
|
|
830
|
-
|
|
864
|
+
if (a.forEach((i) => {
|
|
865
|
+
i.classList.add("accordion-item");
|
|
866
|
+
}), t.forEach((i) => {
|
|
867
|
+
i.classList.add("accordion-header"), i.classList.add("accordion-button"), i.classList.add("h4");
|
|
831
868
|
}), !e.classList.contains("accordion--keep-open")) {
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
869
|
+
const i = e.querySelectorAll(":scope > details");
|
|
870
|
+
i.forEach((l) => {
|
|
871
|
+
l.addEventListener("click", () => {
|
|
872
|
+
i.forEach((r) => {
|
|
873
|
+
r !== l && r.removeAttribute("open");
|
|
837
874
|
});
|
|
838
875
|
});
|
|
839
876
|
});
|
|
@@ -844,15 +881,15 @@ window.dataLayer.push({
|
|
|
844
881
|
event: "customElementRegistered",
|
|
845
882
|
element: "accordion"
|
|
846
883
|
});
|
|
847
|
-
const
|
|
884
|
+
const B = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets";
|
|
848
885
|
class de extends HTMLElement {
|
|
849
886
|
constructor() {
|
|
850
887
|
super(), this.attachShadow({ mode: "open" });
|
|
851
888
|
const a = document.createElement("template");
|
|
852
889
|
a.innerHTML = `
|
|
853
890
|
<style>
|
|
854
|
-
@import "${
|
|
855
|
-
@import "${
|
|
891
|
+
@import "${B}/css/core.min.css";
|
|
892
|
+
@import "${B}/css/components/accordion.css";
|
|
856
893
|
${this.hasAttribute("css") ? `@import "${this.getAttribute("css")}";` : ""}
|
|
857
894
|
</style>
|
|
858
895
|
<div class="accordion">
|
|
@@ -861,7 +898,7 @@ class de extends HTMLElement {
|
|
|
861
898
|
`, this.shadowRoot.appendChild(a.content.cloneNode(!0));
|
|
862
899
|
}
|
|
863
900
|
connectedCallback() {
|
|
864
|
-
ce(this), this.insertAdjacentHTML("beforebegin", `<link rel="stylesheet" href="${
|
|
901
|
+
ce(this), this.insertAdjacentHTML("beforebegin", `<link rel="stylesheet" href="${B}/css/components/accordion.css">`);
|
|
865
902
|
}
|
|
866
903
|
}
|
|
867
904
|
window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", de);
|
|
@@ -871,12 +908,12 @@ const ue = {
|
|
|
871
908
|
mounted() {
|
|
872
909
|
}
|
|
873
910
|
}, he = { ref: "wrapper" };
|
|
874
|
-
function me(e, a, t,
|
|
875
|
-
return
|
|
911
|
+
function me(e, a, t, i, l, r) {
|
|
912
|
+
return u(), h("iam-accordion", he, [
|
|
876
913
|
_(e.$slots, "default")
|
|
877
914
|
], 512);
|
|
878
915
|
}
|
|
879
|
-
const ii = /* @__PURE__ */
|
|
916
|
+
const ii = /* @__PURE__ */ w(ue, [["render", me]]), fe = {
|
|
880
917
|
name: "AccordionItem",
|
|
881
918
|
props: {
|
|
882
919
|
title: {
|
|
@@ -912,23 +949,23 @@ const ii = /* @__PURE__ */ A(ue, [["render", me]]), fe = {
|
|
|
912
949
|
};
|
|
913
950
|
}
|
|
914
951
|
}, be = ["id"], ye = ["classList"];
|
|
915
|
-
function pe(e, a, t,
|
|
916
|
-
return
|
|
917
|
-
id:
|
|
952
|
+
function pe(e, a, t, i, l, r) {
|
|
953
|
+
return u(), h("details", {
|
|
954
|
+
id: r.createID(t.title)
|
|
918
955
|
}, [
|
|
919
|
-
|
|
956
|
+
c("summary", {
|
|
920
957
|
classList: `${t.titlecolour ? `bg-${t.titlecolour}` : ""}`
|
|
921
958
|
}, [
|
|
922
|
-
rt(
|
|
923
|
-
t.badge ? (
|
|
959
|
+
rt(x(t.title), 1),
|
|
960
|
+
t.badge ? (u(), h("span", {
|
|
924
961
|
key: 0,
|
|
925
|
-
class:
|
|
926
|
-
},
|
|
962
|
+
class: A(`badge bg-${t.badgecolour}`)
|
|
963
|
+
}, x(t.badge), 3)) : g("", !0)
|
|
927
964
|
], 8, ye),
|
|
928
965
|
_(e.$slots, "default")
|
|
929
966
|
], 8, be);
|
|
930
967
|
}
|
|
931
|
-
const ri = /* @__PURE__ */
|
|
968
|
+
const ri = /* @__PURE__ */ w(fe, [["render", pe]]), ge = {
|
|
932
969
|
name: "Header",
|
|
933
970
|
props: {
|
|
934
971
|
title: {
|
|
@@ -945,34 +982,34 @@ const ri = /* @__PURE__ */ A(fe, [["render", pe]]), _e = {
|
|
|
945
982
|
required: !1
|
|
946
983
|
}
|
|
947
984
|
}
|
|
948
|
-
},
|
|
949
|
-
function ke(e, a, t,
|
|
950
|
-
return
|
|
951
|
-
|
|
952
|
-
class:
|
|
985
|
+
}, _e = { class: "container" }, ve = { class: "row" }, Ae = { class: "col-sm-6" }, we = { class: "pt-5 pb-3 px-4" }, Se = { class: "col-sm-6 col-md-5 ms-auto" }, Le = ["src"];
|
|
986
|
+
function ke(e, a, t, i, l, r) {
|
|
987
|
+
return u(), h("div", _e, [
|
|
988
|
+
c("div", {
|
|
989
|
+
class: A("bg-" + t.background + " mb-4")
|
|
953
990
|
}, [
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
991
|
+
c("div", ve, [
|
|
992
|
+
c("div", Ae, [
|
|
993
|
+
c("div", we, [
|
|
994
|
+
c("h2", null, x(t.title), 1),
|
|
958
995
|
_(e.$slots, "default")
|
|
959
996
|
])
|
|
960
997
|
]),
|
|
961
|
-
|
|
962
|
-
t.image ? (
|
|
998
|
+
c("div", Se, [
|
|
999
|
+
t.image ? (u(), h("img", {
|
|
963
1000
|
key: 0,
|
|
964
1001
|
src: t.image,
|
|
965
1002
|
alt: "",
|
|
966
1003
|
class: "h-100 w-100 object-cover"
|
|
967
|
-
}, null, 8, Le)) :
|
|
1004
|
+
}, null, 8, Le)) : g("", !0)
|
|
968
1005
|
])
|
|
969
1006
|
])
|
|
970
1007
|
], 2)
|
|
971
1008
|
]);
|
|
972
1009
|
}
|
|
973
|
-
const li = /* @__PURE__ */
|
|
1010
|
+
const li = /* @__PURE__ */ w(ge, [["render", ke]]);
|
|
974
1011
|
/*!
|
|
975
|
-
* iamKey v3.7.
|
|
1012
|
+
* iamKey v3.7.1
|
|
976
1013
|
* Copyright 2022-2023 iamproperty
|
|
977
1014
|
*/
|
|
978
1015
|
class xe extends HTMLElement {
|
|
@@ -981,8 +1018,8 @@ class xe extends HTMLElement {
|
|
|
981
1018
|
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets";
|
|
982
1019
|
this.querySelector('[class*="fa-"]') && this.classList.add("card--has-icon");
|
|
983
1020
|
let t = this.classList.toString();
|
|
984
|
-
const
|
|
985
|
-
|
|
1021
|
+
const i = document.createElement("template");
|
|
1022
|
+
i.innerHTML = `
|
|
986
1023
|
<style>
|
|
987
1024
|
@import "${a}/css/core.min.css";
|
|
988
1025
|
.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){--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){--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;background:#eee}.card--filter:is(:hover,:focus,.hover) .card__body{background:#eee}.card--filter:is(:active,.active){outline:2px solid var(--colour, var(--colour-primary));outline-offset:-2px}.card--filter:is(:active,.active) .card__body{background:#fff}.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}.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:101%;height:101%;object-fit:cover}.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 */
|
|
@@ -998,14 +1035,14 @@ class xe extends HTMLElement {
|
|
|
998
1035
|
</div>
|
|
999
1036
|
${this.hasAttribute("data-cta") ? `<div class="card__footer"><span class="link">${this.getAttribute("data-cta")}</span></div>` : ""}
|
|
1000
1037
|
</div>
|
|
1001
|
-
`, this.shadowRoot.appendChild(
|
|
1038
|
+
`, this.shadowRoot.appendChild(i.content.cloneNode(!0));
|
|
1002
1039
|
}
|
|
1003
1040
|
connectedCallback() {
|
|
1004
1041
|
const a = this.parentNode.closest("a, button, label"), t = this.shadowRoot.querySelector(".card");
|
|
1005
|
-
a.setAttribute("tabindex", "-1"), a.matches("label[for]") && document.getElementById(a.getAttribute("for")).checked && t.classList.add("active"), t.addEventListener("click", (
|
|
1042
|
+
a.setAttribute("tabindex", "-1"), a.matches("label[for]") && document.getElementById(a.getAttribute("for")).checked && t.classList.add("active"), t.addEventListener("click", (i) => {
|
|
1006
1043
|
a.matches("label[for]") ? document.getElementById(a.getAttribute("for")).checked ? t.classList.remove("active") : t.classList.add("active") : a.click();
|
|
1007
|
-
}), t.addEventListener("keydown", (
|
|
1008
|
-
switch (
|
|
1044
|
+
}), t.addEventListener("keydown", (i) => {
|
|
1045
|
+
switch (i.keyCode) {
|
|
1009
1046
|
case 32:
|
|
1010
1047
|
case 13:
|
|
1011
1048
|
a.matches("label[for]") ? document.getElementById(a.getAttribute("for")).checked ? t.classList.remove("active") : t.classList.add("active") : a.click();
|
|
@@ -1016,15 +1053,15 @@ class xe extends HTMLElement {
|
|
|
1016
1053
|
static get observedAttributes() {
|
|
1017
1054
|
return ["data-total", "class"];
|
|
1018
1055
|
}
|
|
1019
|
-
attributeChangedCallback(a, t,
|
|
1056
|
+
attributeChangedCallback(a, t, i) {
|
|
1020
1057
|
switch (a) {
|
|
1021
1058
|
case "data-total": {
|
|
1022
|
-
this.shadowRoot.querySelector(".card__total").innerHTML =
|
|
1059
|
+
this.shadowRoot.querySelector(".card__total").innerHTML = i;
|
|
1023
1060
|
break;
|
|
1024
1061
|
}
|
|
1025
1062
|
case "class": {
|
|
1026
|
-
let
|
|
1027
|
-
this.querySelector('[class*="fa-"]') && (
|
|
1063
|
+
let l = this.classList.toString();
|
|
1064
|
+
this.querySelector('[class*="fa-"]') && (l += " card--has-icon"), this.shadowRoot.querySelector(".card").setAttribute("class", `card ${l}`);
|
|
1028
1065
|
break;
|
|
1029
1066
|
}
|
|
1030
1067
|
}
|
|
@@ -1038,51 +1075,51 @@ const qe = {
|
|
|
1038
1075
|
});
|
|
1039
1076
|
}
|
|
1040
1077
|
};
|
|
1041
|
-
function $e(e, a, t,
|
|
1042
|
-
return
|
|
1078
|
+
function $e(e, a, t, i, l, r) {
|
|
1079
|
+
return u(), h("iam-card", null, [
|
|
1043
1080
|
_(e.$slots, "default")
|
|
1044
1081
|
]);
|
|
1045
1082
|
}
|
|
1046
|
-
const Te = /* @__PURE__ */
|
|
1083
|
+
const Te = /* @__PURE__ */ w(qe, [["render", $e]]);
|
|
1047
1084
|
function He(e) {
|
|
1048
1085
|
var a;
|
|
1049
|
-
let t = e.querySelector(".carousel__inner"),
|
|
1086
|
+
let t = e.querySelector(".carousel__inner"), i = e.querySelectorAll(".carousel__item").length;
|
|
1050
1087
|
e.getAttribute("data-cols");
|
|
1051
|
-
let
|
|
1052
|
-
e.querySelector(".carousel__controls a").classList.add("active"), t.addEventListener("scroll", function(
|
|
1088
|
+
let l = e.getAttribute("data-sm-cols"), r = e.getAttribute("data-md-cols");
|
|
1089
|
+
e.querySelector(".carousel__controls a").classList.add("active"), t.addEventListener("scroll", function(s) {
|
|
1053
1090
|
clearTimeout(a), a = setTimeout(function() {
|
|
1054
|
-
let
|
|
1055
|
-
Array.from(e.querySelectorAll(".carousel__controls a")).forEach((
|
|
1056
|
-
|
|
1057
|
-
}), e.querySelector(".control-" + f).classList.add("active"), f == 1 ? e.querySelector(".btn-prev").setAttribute("disabled", "disabled") : e.querySelector(".btn-prev").removeAttribute("disabled"), t.scrollLeft +
|
|
1091
|
+
let o = t.clientWidth, n = t.scrollWidth, d = t.scrollLeft, f = Math.round(d / n * i) + 1, m = e.querySelector(".carousel__item:last-child").offsetLeft;
|
|
1092
|
+
Array.from(e.querySelectorAll(".carousel__controls a")).forEach((p, y) => {
|
|
1093
|
+
p.classList.remove("active");
|
|
1094
|
+
}), e.querySelector(".control-" + f).classList.add("active"), f == 1 ? e.querySelector(".btn-prev").setAttribute("disabled", "disabled") : e.querySelector(".btn-prev").removeAttribute("disabled"), t.scrollLeft + o > m ? e.querySelector(".btn-next").setAttribute("disabled", "disabled") : e.querySelector(".btn-next").removeAttribute("disabled");
|
|
1058
1095
|
}, 100);
|
|
1059
|
-
}, !1), e.addEventListener("click", function(
|
|
1060
|
-
for (var
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
}),
|
|
1065
|
-
const
|
|
1096
|
+
}, !1), e.addEventListener("click", function(s) {
|
|
1097
|
+
for (var o = s.target; o && o != this; o = o.parentNode)
|
|
1098
|
+
if (o.matches(".carousel__controls a")) {
|
|
1099
|
+
s.preventDefault(), Array.from(e.querySelectorAll(".carousel__controls a")).forEach((d, f) => {
|
|
1100
|
+
d.classList.remove("active");
|
|
1101
|
+
}), o.classList.add("active");
|
|
1102
|
+
const n = document.querySelector(o.getAttribute("href"));
|
|
1066
1103
|
t.scroll({
|
|
1067
1104
|
top: 0,
|
|
1068
|
-
left:
|
|
1105
|
+
left: n.offsetLeft,
|
|
1069
1106
|
behavior: "smooth"
|
|
1070
1107
|
});
|
|
1071
1108
|
break;
|
|
1072
1109
|
}
|
|
1073
|
-
}, !1), e.addEventListener("click", function(
|
|
1074
|
-
for (var
|
|
1075
|
-
if (
|
|
1076
|
-
|
|
1077
|
-
let
|
|
1110
|
+
}, !1), e.addEventListener("click", function(s) {
|
|
1111
|
+
for (var o = s.target; o && o != this; o = o.parentNode)
|
|
1112
|
+
if (o.matches(".btn-next, .btn-prev")) {
|
|
1113
|
+
s.preventDefault();
|
|
1114
|
+
let n = o.classList.contains("btn-prev") ? t.scrollLeft - t.clientWidth : t.scrollLeft + t.clientWidth;
|
|
1078
1115
|
t.scroll({
|
|
1079
1116
|
top: 0,
|
|
1080
|
-
left:
|
|
1117
|
+
left: n,
|
|
1081
1118
|
behavior: "smooth"
|
|
1082
1119
|
});
|
|
1083
1120
|
break;
|
|
1084
1121
|
}
|
|
1085
|
-
}, !1),
|
|
1122
|
+
}, !1), i == 1 && e.classList.add("hide-btns"), l >= i && e.classList.add("hide-sm-btns"), r >= i && e.classList.add("hide-md-btns");
|
|
1086
1123
|
}
|
|
1087
1124
|
const Me = {
|
|
1088
1125
|
components: {
|
|
@@ -1163,37 +1200,37 @@ const Me = {
|
|
|
1163
1200
|
He(this.$refs.wrapper);
|
|
1164
1201
|
});
|
|
1165
1202
|
}
|
|
1166
|
-
},
|
|
1203
|
+
}, Ee = ["id", "data-cols", "data-sm-cols", "data-md-cols"], Ce = { class: "carousel__wrapper" }, De = { class: "carousel__inner" }, Ne = ["id"], Re = ["innerHTML", "id"], Pe = ["href"], ze = /* @__PURE__ */ c("button", {
|
|
1167
1204
|
class: "btn btn-prev",
|
|
1168
1205
|
"data-go": "0",
|
|
1169
1206
|
disabled: ""
|
|
1170
|
-
}, "Prev", -1),
|
|
1207
|
+
}, "Prev", -1), Ie = /* @__PURE__ */ c("button", {
|
|
1171
1208
|
class: "btn btn-next",
|
|
1172
1209
|
"data-go": "2"
|
|
1173
1210
|
}, "Next", -1);
|
|
1174
|
-
function
|
|
1175
|
-
const
|
|
1176
|
-
return
|
|
1211
|
+
function Fe(e, a, t, i, l, r) {
|
|
1212
|
+
const s = D("Card");
|
|
1213
|
+
return u(), h("div", {
|
|
1177
1214
|
class: "container carousel",
|
|
1178
|
-
id: "carousel" +
|
|
1215
|
+
id: "carousel" + l.id,
|
|
1179
1216
|
ref: "wrapper",
|
|
1180
1217
|
"data-cols": t.cols,
|
|
1181
1218
|
"data-sm-cols": t.smcols,
|
|
1182
1219
|
"data-md-cols": t.mdcols
|
|
1183
1220
|
}, [
|
|
1184
1221
|
_(e.$slots, "default"),
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
t.type == "card" ? (
|
|
1222
|
+
c("div", Ce, [
|
|
1223
|
+
c("div", De, [
|
|
1224
|
+
t.type == "card" ? (u(), h("div", {
|
|
1188
1225
|
key: 0,
|
|
1189
|
-
class:
|
|
1226
|
+
class: A(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap ? `g-${t.gap}` : ""}`)
|
|
1190
1227
|
}, [
|
|
1191
|
-
(
|
|
1192
|
-
class:
|
|
1193
|
-
key:
|
|
1194
|
-
id: "carousel" +
|
|
1228
|
+
(u(!0), h(T, null, H(t.items, (o, n) => (u(), h("div", {
|
|
1229
|
+
class: A(`col carousel__item${t.colclass ? ` ${t.colclass}` : ""}`),
|
|
1230
|
+
key: n,
|
|
1231
|
+
id: "carousel" + l.id + "slide" + (n + 1)
|
|
1195
1232
|
}, [
|
|
1196
|
-
|
|
1233
|
+
k(s, M(o, {
|
|
1197
1234
|
class: t.cardclass,
|
|
1198
1235
|
type: t.cardtype,
|
|
1199
1236
|
btnyype: t.btntype,
|
|
@@ -1201,35 +1238,35 @@ function Ie(e, a, t, s, o, l) {
|
|
|
1201
1238
|
ctatext: t.ctatext,
|
|
1202
1239
|
hidectatext: t.hidectatext
|
|
1203
1240
|
}), null, 16, ["class", "type", "btnyype", "titleclass", "ctatext", "hidectatext"])
|
|
1204
|
-
], 10,
|
|
1205
|
-
], 2)) :
|
|
1206
|
-
t.type != "card" ? (
|
|
1241
|
+
], 10, Ne))), 128))
|
|
1242
|
+
], 2)) : g("", !0),
|
|
1243
|
+
t.type != "card" ? (u(), h("div", {
|
|
1207
1244
|
key: 1,
|
|
1208
|
-
class:
|
|
1245
|
+
class: A(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap ? `g-${t.gap}` : ""}`)
|
|
1209
1246
|
}, [
|
|
1210
|
-
(
|
|
1211
|
-
class:
|
|
1212
|
-
key:
|
|
1213
|
-
innerHTML:
|
|
1214
|
-
id: "carousel" +
|
|
1247
|
+
(u(!0), h(T, null, H(t.items, (o, n) => (u(), h("div", {
|
|
1248
|
+
class: A(`col carousel__item${t.colclass ? ` ${t.colclass}` : ""}`),
|
|
1249
|
+
key: n,
|
|
1250
|
+
innerHTML: r.content(o),
|
|
1251
|
+
id: "carousel" + l.id + "slide" + (n + 1)
|
|
1215
1252
|
}, null, 10, Re))), 128))
|
|
1216
|
-
], 2)) :
|
|
1253
|
+
], 2)) : g("", !0)
|
|
1217
1254
|
]),
|
|
1218
|
-
|
|
1219
|
-
class:
|
|
1255
|
+
c("div", {
|
|
1256
|
+
class: A(`carousel__controls cols-${t.cols} cols-sm-${t.smcols} cols-md-${t.mdcols}`)
|
|
1220
1257
|
}, [
|
|
1221
|
-
(
|
|
1222
|
-
key:
|
|
1223
|
-
href: "#carousel" +
|
|
1224
|
-
class:
|
|
1225
|
-
}, "Slide " +
|
|
1258
|
+
(u(!0), h(T, null, H(t.items, (o, n) => (u(), h("a", {
|
|
1259
|
+
key: n,
|
|
1260
|
+
href: "#carousel" + l.id + "slide" + (n + 1),
|
|
1261
|
+
class: A(`control-${n + 1}`)
|
|
1262
|
+
}, "Slide " + x(n + 1), 11, Pe))), 128))
|
|
1226
1263
|
], 2),
|
|
1227
1264
|
ze,
|
|
1228
|
-
|
|
1265
|
+
Ie
|
|
1229
1266
|
])
|
|
1230
|
-
], 8,
|
|
1267
|
+
], 8, Ee);
|
|
1231
1268
|
}
|
|
1232
|
-
const
|
|
1269
|
+
const ni = /* @__PURE__ */ w(Me, [["render", Fe]]);
|
|
1233
1270
|
window.dataLayer = window.dataLayer || [];
|
|
1234
1271
|
window.dataLayer.push({
|
|
1235
1272
|
event: "customElementRegistered",
|
|
@@ -1238,8 +1275,8 @@ window.dataLayer.push({
|
|
|
1238
1275
|
class Be extends HTMLElement {
|
|
1239
1276
|
constructor() {
|
|
1240
1277
|
super(), this.attachShadow({ mode: "open" });
|
|
1241
|
-
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", t = `@import "${a}/css/components/header.css";`,
|
|
1242
|
-
|
|
1278
|
+
const a = document.body.hasAttribute("data-assets-location") ? document.body.getAttribute("data-assets-location") : "/assets", t = `@import "${a}/css/components/header.css";`, i = document.createElement("template");
|
|
1279
|
+
i.innerHTML = `
|
|
1243
1280
|
<style>
|
|
1244
1281
|
@import "${a}/css/core.min.css";
|
|
1245
1282
|
${t}
|
|
@@ -1263,7 +1300,7 @@ class Be extends HTMLElement {
|
|
|
1263
1300
|
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="" lazy="" />
|
|
1264
1301
|
</picture>
|
|
1265
1302
|
</div>
|
|
1266
|
-
`, this.shadowRoot.appendChild(
|
|
1303
|
+
`, this.shadowRoot.appendChild(i.content.cloneNode(!0));
|
|
1267
1304
|
}
|
|
1268
1305
|
connectedCallback() {
|
|
1269
1306
|
const a = this.shadowRoot.querySelector("picture"), t = this.shadowRoot.querySelector("picture source");
|
|
@@ -1283,43 +1320,43 @@ const Ve = {
|
|
|
1283
1320
|
required: !1
|
|
1284
1321
|
}
|
|
1285
1322
|
}
|
|
1286
|
-
},
|
|
1287
|
-
function Oe(e, a, t,
|
|
1288
|
-
return
|
|
1323
|
+
}, je = ["image"], We = ["innerHTML"];
|
|
1324
|
+
function Oe(e, a, t, i, l, r) {
|
|
1325
|
+
return u(), h("iam-header", {
|
|
1289
1326
|
class: "bg-secondary",
|
|
1290
1327
|
image: t.image
|
|
1291
1328
|
}, [
|
|
1292
1329
|
_(e.$slots, "breadcrumb"),
|
|
1293
|
-
t.title ? (
|
|
1330
|
+
t.title ? (u(), h("h1", {
|
|
1294
1331
|
key: 0,
|
|
1295
1332
|
innerHTML: t.title
|
|
1296
|
-
}, null, 8,
|
|
1333
|
+
}, null, 8, We)) : g("", !0),
|
|
1297
1334
|
_(e.$slots, "default")
|
|
1298
|
-
], 8,
|
|
1335
|
+
], 8, je);
|
|
1299
1336
|
}
|
|
1300
|
-
const
|
|
1337
|
+
const oi = /* @__PURE__ */ w(Ve, [["render", Oe]]);
|
|
1301
1338
|
function Ue(e) {
|
|
1302
1339
|
var a;
|
|
1303
|
-
const t = e.querySelector(".testimonial__images"),
|
|
1304
|
-
if (
|
|
1340
|
+
const t = e.querySelector(".testimonial__images"), i = t.querySelectorAll("img").length;
|
|
1341
|
+
if (i == 1)
|
|
1305
1342
|
return !1;
|
|
1306
1343
|
e.classList.add("testimonial--multi");
|
|
1307
|
-
const
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1344
|
+
const l = function(r) {
|
|
1345
|
+
const s = e.querySelector(".btn-next"), o = e.querySelector(".btn-prev");
|
|
1346
|
+
s.setAttribute("data-go", r + 1), o.setAttribute("data-go", r - 1), s.removeAttribute("disabled"), o.removeAttribute("disabled"), r == 1 ? o.setAttribute("disabled", !0) : r == i && s.setAttribute("disabled", !0);
|
|
1310
1347
|
};
|
|
1311
|
-
t.addEventListener("scroll", function(
|
|
1348
|
+
t.addEventListener("scroll", function(r) {
|
|
1312
1349
|
clearTimeout(a), a = setTimeout(function() {
|
|
1313
|
-
let
|
|
1314
|
-
|
|
1350
|
+
let s = t.scrollWidth, o = t.scrollHeight, n = t.scrollLeft, d = t.scrollTop, f = Math.round(n / s * i) + 1;
|
|
1351
|
+
n == 0 && d != 0 && (f = Math.round(d / o * i) + 1), e.setAttribute("data-show", f), l(f);
|
|
1315
1352
|
}, 300);
|
|
1316
|
-
}, !1), e.addEventListener("click", function(
|
|
1317
|
-
for (var
|
|
1318
|
-
if (
|
|
1319
|
-
let
|
|
1320
|
-
f > m ?
|
|
1321
|
-
top:
|
|
1322
|
-
left:
|
|
1353
|
+
}, !1), e.addEventListener("click", function(r) {
|
|
1354
|
+
for (var s = r.target; s && s != this; s = s.parentNode)
|
|
1355
|
+
if (s.matches("[data-go]")) {
|
|
1356
|
+
let o = parseInt(s.getAttribute("data-go")), n = 0, d = 0, f = t.scrollWidth, m = t.scrollHeight;
|
|
1357
|
+
f > m ? d = Math.floor(f * ((o - 1) / i)) : n = Math.floor(m * ((o - 1) / i)), t.scroll({
|
|
1358
|
+
top: n,
|
|
1359
|
+
left: d,
|
|
1323
1360
|
behavior: "smooth"
|
|
1324
1361
|
});
|
|
1325
1362
|
break;
|
|
@@ -1346,50 +1383,50 @@ const Ke = {
|
|
|
1346
1383
|
class: "container testimonial mb-5",
|
|
1347
1384
|
"data-show": "1",
|
|
1348
1385
|
ref: "wrapper"
|
|
1349
|
-
}, Qe = { class: "row" }, Ye = { class: "col-md-5 position-relative" }, Ze = { class: "testimonial__images" }, Xe = ["src"], Je = /* @__PURE__ */
|
|
1350
|
-
/* @__PURE__ */
|
|
1386
|
+
}, Qe = { class: "row" }, Ye = { class: "col-md-5 position-relative" }, Ze = { class: "testimonial__images" }, Xe = ["src"], Je = /* @__PURE__ */ c("div", { class: "testimonial__controls" }, [
|
|
1387
|
+
/* @__PURE__ */ c("button", {
|
|
1351
1388
|
"data-go": "0",
|
|
1352
1389
|
disabled: "",
|
|
1353
1390
|
class: "btn-prev"
|
|
1354
1391
|
}, "Previous"),
|
|
1355
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ c("button", {
|
|
1356
1393
|
"data-go": "2",
|
|
1357
1394
|
class: "btn-next"
|
|
1358
1395
|
}, "Next")
|
|
1359
|
-
], -1), ta = { class: "col-md-7" }, ea = /* @__PURE__ */
|
|
1360
|
-
function
|
|
1361
|
-
return
|
|
1362
|
-
|
|
1363
|
-
class:
|
|
1396
|
+
], -1), ta = { class: "col-md-7" }, ea = /* @__PURE__ */ c("h2", null, "What our customers think…", -1), aa = { class: "testimonial__content" }, sa = ["innerHTML"], ia = ["innerHTML"], ra = { class: "testimonial__after" }, la = /* @__PURE__ */ c("span", { class: "circle circle--dots d-none d-md-block" }, null, -1);
|
|
1397
|
+
function na(e, a, t, i, l, r) {
|
|
1398
|
+
return u(), h("div", Ge, [
|
|
1399
|
+
c("div", {
|
|
1400
|
+
class: A("bg-" + t.background)
|
|
1364
1401
|
}, [
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
(
|
|
1369
|
-
key:
|
|
1370
|
-
src:
|
|
1402
|
+
c("div", Qe, [
|
|
1403
|
+
c("div", Ye, [
|
|
1404
|
+
c("div", Ze, [
|
|
1405
|
+
(u(!0), h(T, null, H(t.items, (s, o) => (u(), h("img", {
|
|
1406
|
+
key: o,
|
|
1407
|
+
src: s.image ? s.image : "data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",
|
|
1371
1408
|
alt: "",
|
|
1372
|
-
class:
|
|
1409
|
+
class: A("h-100 w-100 object-cover" + (s.image ? "" : " opacity-0"))
|
|
1373
1410
|
}, null, 10, Xe))), 128))
|
|
1374
1411
|
]),
|
|
1375
1412
|
Je
|
|
1376
1413
|
]),
|
|
1377
|
-
|
|
1414
|
+
c("div", ta, [
|
|
1378
1415
|
ea,
|
|
1379
|
-
|
|
1380
|
-
(
|
|
1381
|
-
key:
|
|
1382
|
-
class:
|
|
1416
|
+
c("div", aa, [
|
|
1417
|
+
(u(!0), h(T, null, H(t.items, (s, o) => (u(), h("blockquote", {
|
|
1418
|
+
key: o,
|
|
1419
|
+
class: A(s.class)
|
|
1383
1420
|
}, [
|
|
1384
|
-
|
|
1385
|
-
innerHTML:
|
|
1421
|
+
c("div", {
|
|
1422
|
+
innerHTML: s.quote
|
|
1386
1423
|
}, null, 8, sa),
|
|
1387
|
-
|
|
1388
|
-
innerHTML:
|
|
1424
|
+
c("cite", {
|
|
1425
|
+
innerHTML: s.cite
|
|
1389
1426
|
}, null, 8, ia)
|
|
1390
1427
|
], 2))), 128))
|
|
1391
1428
|
]),
|
|
1392
|
-
|
|
1429
|
+
c("div", ra, [
|
|
1393
1430
|
_(e.$slots, "default")
|
|
1394
1431
|
])
|
|
1395
1432
|
])
|
|
@@ -1398,10 +1435,10 @@ function oa(e, a, t, s, o, l) {
|
|
|
1398
1435
|
], 2)
|
|
1399
1436
|
], 512);
|
|
1400
1437
|
}
|
|
1401
|
-
const ci = /* @__PURE__ */
|
|
1402
|
-
const
|
|
1438
|
+
const ci = /* @__PURE__ */ w(Ke, [["render", na]]);
|
|
1439
|
+
const oa = {
|
|
1403
1440
|
components: {
|
|
1404
|
-
Input:
|
|
1441
|
+
Input: P
|
|
1405
1442
|
},
|
|
1406
1443
|
name: "PropertySearchbar",
|
|
1407
1444
|
props: {
|
|
@@ -1548,43 +1585,43 @@ const na = {
|
|
|
1548
1585
|
}, ca = {
|
|
1549
1586
|
class: "container",
|
|
1550
1587
|
ref: "wrapper"
|
|
1551
|
-
}, da = { class: "property-searchbar" }, ua = ["action", "method"], ha = { class: "col-12 col-md-3" }, ma = { class: "col-12 col-md" }, fa = /* @__PURE__ */
|
|
1588
|
+
}, da = { class: "property-searchbar" }, ua = ["action", "method"], ha = { class: "col-12 col-md-3" }, ma = { class: "col-12 col-md" }, fa = /* @__PURE__ */ c("span", { class: "form-label d-none d-md-block" }, "Price range", -1), ba = {
|
|
1552
1589
|
class: "row",
|
|
1553
1590
|
"data-input-range": ""
|
|
1554
|
-
}, ya = { class: "col-12 col-md" }, pa = /* @__PURE__ */
|
|
1591
|
+
}, ya = { class: "col-12 col-md" }, pa = /* @__PURE__ */ c("span", { class: "form-label d-none d-md-block" }, "Number of beds", -1), ga = {
|
|
1555
1592
|
class: "row",
|
|
1556
1593
|
"data-input-range": ""
|
|
1557
|
-
},
|
|
1558
|
-
/* @__PURE__ */
|
|
1594
|
+
}, _a = { class: "col-12 col-md-2" }, va = /* @__PURE__ */ c("div", { class: "col-12 col-md mw-md-fit-content d-flex property-searchbar__btn" }, [
|
|
1595
|
+
/* @__PURE__ */ c("button", {
|
|
1559
1596
|
class: "btn w-100 me-0",
|
|
1560
1597
|
type: "submit",
|
|
1561
1598
|
value: "submit"
|
|
1562
1599
|
}, "Search")
|
|
1563
1600
|
], -1);
|
|
1564
|
-
function Aa(e, a, t,
|
|
1565
|
-
const
|
|
1566
|
-
return
|
|
1601
|
+
function Aa(e, a, t, i, l, r) {
|
|
1602
|
+
const s = D("Input");
|
|
1603
|
+
return u(), h("div", ca, [
|
|
1567
1604
|
_(e.$slots, "default"),
|
|
1568
|
-
|
|
1569
|
-
|
|
1605
|
+
c("div", da, [
|
|
1606
|
+
c("form", {
|
|
1570
1607
|
class: "row",
|
|
1571
1608
|
action: t.formaction,
|
|
1572
1609
|
method: t.formmethod
|
|
1573
1610
|
}, [
|
|
1574
|
-
|
|
1575
|
-
|
|
1611
|
+
c("fieldset", ha, [
|
|
1612
|
+
k(s, {
|
|
1576
1613
|
inputClass: "input--locations",
|
|
1577
|
-
modelValue:
|
|
1578
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
1614
|
+
modelValue: r.locationSet,
|
|
1615
|
+
"onUpdate:modelValue": a[0] || (a[0] = (o) => r.locationSet = o),
|
|
1579
1616
|
label: "Location",
|
|
1580
1617
|
id: "location",
|
|
1581
|
-
options:
|
|
1618
|
+
options: r.locationsList(),
|
|
1582
1619
|
required: "",
|
|
1583
1620
|
placeholder: "i.e. Newcastle or NE1",
|
|
1584
|
-
onKeyupEvent: a[1] || (a[1] = (
|
|
1621
|
+
onKeyupEvent: a[1] || (a[1] = (o) => r.locationKeyup(...arguments)),
|
|
1585
1622
|
ref: "search"
|
|
1586
1623
|
}, null, 8, ["modelValue", "options"]),
|
|
1587
|
-
|
|
1624
|
+
k(s, {
|
|
1588
1625
|
class: "select--miles",
|
|
1589
1626
|
label: "Miles",
|
|
1590
1627
|
id: "miles",
|
|
@@ -1592,10 +1629,10 @@ function Aa(e, a, t, s, o, l) {
|
|
|
1592
1629
|
options: t.distances
|
|
1593
1630
|
}, null, 8, ["options"])
|
|
1594
1631
|
]),
|
|
1595
|
-
|
|
1632
|
+
c("fieldset", ma, [
|
|
1596
1633
|
fa,
|
|
1597
|
-
|
|
1598
|
-
|
|
1634
|
+
c("div", ba, [
|
|
1635
|
+
k(s, {
|
|
1599
1636
|
class: "col-6",
|
|
1600
1637
|
label: "Minimum price",
|
|
1601
1638
|
id: "price-min",
|
|
@@ -1603,7 +1640,7 @@ function Aa(e, a, t, s, o, l) {
|
|
|
1603
1640
|
type: "select",
|
|
1604
1641
|
options: t.pricemin
|
|
1605
1642
|
}, null, 8, ["options"]),
|
|
1606
|
-
|
|
1643
|
+
k(s, {
|
|
1607
1644
|
class: "col-6",
|
|
1608
1645
|
label: "Maximum price",
|
|
1609
1646
|
id: "price-max",
|
|
@@ -1613,10 +1650,10 @@ function Aa(e, a, t, s, o, l) {
|
|
|
1613
1650
|
}, null, 8, ["options"])
|
|
1614
1651
|
])
|
|
1615
1652
|
]),
|
|
1616
|
-
|
|
1653
|
+
c("fieldset", ya, [
|
|
1617
1654
|
pa,
|
|
1618
|
-
|
|
1619
|
-
|
|
1655
|
+
c("div", ga, [
|
|
1656
|
+
k(s, {
|
|
1620
1657
|
class: "col-6",
|
|
1621
1658
|
label: "Minimum beds",
|
|
1622
1659
|
id: "beds-min",
|
|
@@ -1624,7 +1661,7 @@ function Aa(e, a, t, s, o, l) {
|
|
|
1624
1661
|
type: "select",
|
|
1625
1662
|
options: t.bedsmin
|
|
1626
1663
|
}, null, 8, ["options"]),
|
|
1627
|
-
|
|
1664
|
+
k(s, {
|
|
1628
1665
|
class: "col-6",
|
|
1629
1666
|
label: "Maximum beds",
|
|
1630
1667
|
id: "beds-max",
|
|
@@ -1634,8 +1671,8 @@ function Aa(e, a, t, s, o, l) {
|
|
|
1634
1671
|
}, null, 8, ["options"])
|
|
1635
1672
|
])
|
|
1636
1673
|
]),
|
|
1637
|
-
|
|
1638
|
-
|
|
1674
|
+
c("fieldset", _a, [
|
|
1675
|
+
k(s, {
|
|
1639
1676
|
label: "Property type",
|
|
1640
1677
|
id: "property-type",
|
|
1641
1678
|
type: "select",
|
|
@@ -1648,11 +1685,11 @@ function Aa(e, a, t, s, o, l) {
|
|
|
1648
1685
|
_(e.$slots, "after")
|
|
1649
1686
|
], 512);
|
|
1650
1687
|
}
|
|
1651
|
-
const di = /* @__PURE__ */
|
|
1688
|
+
const di = /* @__PURE__ */ w(oa, [["render", Aa]]), wa = (e) => {
|
|
1652
1689
|
Array.from(e.querySelectorAll("details")).forEach((a, t) => {
|
|
1653
|
-
a.addEventListener("mouseenter", function(
|
|
1690
|
+
a.addEventListener("mouseenter", function(i) {
|
|
1654
1691
|
window.matchMedia("(min-width: 62em)").matches && a.setAttribute("open", "true");
|
|
1655
|
-
}, !1), a.addEventListener("mouseleave", function(
|
|
1692
|
+
}, !1), a.addEventListener("mouseleave", function(i) {
|
|
1656
1693
|
window.matchMedia("(min-width: 62em)").matches && a.removeAttribute("open");
|
|
1657
1694
|
}, !1);
|
|
1658
1695
|
}), "IntersectionObserver" in window && new IntersectionObserver(
|
|
@@ -1662,7 +1699,7 @@ const di = /* @__PURE__ */ A(na, [["render", Aa]]), wa = (e) => {
|
|
|
1662
1699
|
};
|
|
1663
1700
|
const Sa = {
|
|
1664
1701
|
components: {
|
|
1665
|
-
Input:
|
|
1702
|
+
Input: P,
|
|
1666
1703
|
Logo: ht
|
|
1667
1704
|
},
|
|
1668
1705
|
name: "Nav",
|
|
@@ -1736,17 +1773,17 @@ const Sa = {
|
|
|
1736
1773
|
wa(this.$refs.wrapper);
|
|
1737
1774
|
});
|
|
1738
1775
|
}
|
|
1739
|
-
}, La = /* @__PURE__ */
|
|
1776
|
+
}, La = /* @__PURE__ */ c("input", {
|
|
1740
1777
|
type: "checkbox",
|
|
1741
1778
|
name: "showMenu",
|
|
1742
1779
|
id: "showMenu",
|
|
1743
1780
|
class: "d-none"
|
|
1744
|
-
}, null, -1), ka = /* @__PURE__ */
|
|
1781
|
+
}, null, -1), ka = /* @__PURE__ */ c("input", {
|
|
1745
1782
|
type: "checkbox",
|
|
1746
1783
|
name: "showSearch",
|
|
1747
1784
|
id: "showSearch",
|
|
1748
1785
|
class: "d-none"
|
|
1749
|
-
}, null, -1), xa = /* @__PURE__ */
|
|
1786
|
+
}, null, -1), xa = /* @__PURE__ */ c("input", {
|
|
1750
1787
|
type: "checkbox",
|
|
1751
1788
|
name: "showAccount",
|
|
1752
1789
|
id: "showAccount",
|
|
@@ -1757,37 +1794,37 @@ const Sa = {
|
|
|
1757
1794
|
}, Ma = {
|
|
1758
1795
|
key: 1,
|
|
1759
1796
|
class: "col mw-md-fit-content nav__logo"
|
|
1760
|
-
},
|
|
1797
|
+
}, Ea = {
|
|
1761
1798
|
href: "/",
|
|
1762
1799
|
class: "text-decoration-none mb-0"
|
|
1763
|
-
},
|
|
1764
|
-
/* @__PURE__ */
|
|
1765
|
-
], -1),
|
|
1800
|
+
}, Ca = /* @__PURE__ */ c("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
|
|
1801
|
+
/* @__PURE__ */ c("label", { for: "showMenu" }, "Menu")
|
|
1802
|
+
], -1), Da = { class: "nav__inner" }, Na = { class: "container" }, Ra = { class: "row" }, Pa = {
|
|
1766
1803
|
key: 0,
|
|
1767
1804
|
class: "col mw-md-fit-content nav__logo"
|
|
1768
1805
|
}, za = {
|
|
1769
1806
|
key: 1,
|
|
1770
1807
|
class: "col mw-md-fit-content nav__logo"
|
|
1771
|
-
},
|
|
1808
|
+
}, Ia = {
|
|
1772
1809
|
href: "/",
|
|
1773
1810
|
class: "text-decoration-none mb-0"
|
|
1774
|
-
},
|
|
1811
|
+
}, Fa = {
|
|
1775
1812
|
key: 2,
|
|
1776
1813
|
class: "col mw-fit-content nav__search-btn flex-row align-items-center"
|
|
1777
|
-
}, Ba = /* @__PURE__ */
|
|
1778
|
-
/* @__PURE__ */
|
|
1814
|
+
}, Ba = /* @__PURE__ */ c("label", { for: "showSearch" }, [
|
|
1815
|
+
/* @__PURE__ */ c("svg", {
|
|
1779
1816
|
class: "icon",
|
|
1780
1817
|
viewBox: "0 0 32 32"
|
|
1781
1818
|
}, [
|
|
1782
|
-
/* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ c("title", null, "Search"),
|
|
1820
|
+
/* @__PURE__ */ c("ellipse", {
|
|
1784
1821
|
cx: "14.92",
|
|
1785
1822
|
cy: "13.81",
|
|
1786
1823
|
rx: "11.92",
|
|
1787
1824
|
ry: "11.81",
|
|
1788
1825
|
class: "icon__outline"
|
|
1789
1826
|
}),
|
|
1790
|
-
/* @__PURE__ */
|
|
1827
|
+
/* @__PURE__ */ c("line", {
|
|
1791
1828
|
x1: "22.68",
|
|
1792
1829
|
y1: "22.75",
|
|
1793
1830
|
x2: "30",
|
|
@@ -1797,26 +1834,26 @@ const Sa = {
|
|
|
1797
1834
|
])
|
|
1798
1835
|
], -1), Va = [
|
|
1799
1836
|
Ba
|
|
1800
|
-
],
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
], -1),
|
|
1837
|
+
], ja = /* @__PURE__ */ c("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
|
|
1838
|
+
/* @__PURE__ */ c("label", { for: "showMenu" }, "Menu")
|
|
1839
|
+
], -1), Wa = { class: "col-12 col-md nav__menu ms-auto flex-row align-items-center" }, Oa = {
|
|
1803
1840
|
key: 3,
|
|
1804
1841
|
class: "col nav__account-btn flex-row align-items-center"
|
|
1805
|
-
}, Ua = /* @__PURE__ */
|
|
1806
|
-
/* @__PURE__ */
|
|
1842
|
+
}, Ua = /* @__PURE__ */ c("label", { for: "showAccount" }, [
|
|
1843
|
+
/* @__PURE__ */ c("svg", {
|
|
1807
1844
|
class: "icon",
|
|
1808
1845
|
viewBox: "0 0 28 28"
|
|
1809
1846
|
}, [
|
|
1810
|
-
/* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ c("path", {
|
|
1811
1848
|
d: "M14,28a13.861,13.861,0,0,1-9.268-3.533l-.023.047-.721-.738L3.62,23.4l.012-.023a14,14,0,1,1,20.735,0l.012.023-.367.377-.722.738-.024-.045A13.855,13.855,0,0,1,14,28Zm0-9.58a10.5,10.5,0,0,0-1.368.092c-.085.012-.17.03-.252.047-.061.013-.124.026-.187.037l-.077.013c-.266.047-.54.095-.8.165-.108.029-.215.065-.318.1-.063.022-.125.043-.188.063l-.08.026c-.223.071-.454.144-.671.234-.125.05-.245.11-.362.168l-.146.072-.045.021c-.208.1-.423.2-.623.312-.131.074-.257.158-.379.239l-.106.07-.068.044c-.176.114-.359.232-.528.359-.137.1-.267.218-.393.327l-.054.047c-.174.15-.355.306-.519.47-.132.134-.258.277-.38.416l-.018.021c-.16.184-.3.35-.437.527-.12.161-.23.33-.337.494-.076.117-.146.238-.214.356a12.495,12.495,0,0,0,17.109,0l-.022-.037c-.061-.1-.125-.212-.192-.315-.1-.156-.214-.333-.338-.5-.141-.188-.293-.363-.436-.526-.113-.13-.253-.292-.4-.438-.161-.162-.337-.314-.517-.468l-.08-.069c-.118-.1-.24-.209-.368-.307-.183-.137-.379-.264-.568-.387l-.026-.017-.106-.07c-.125-.083-.251-.166-.381-.24-.207-.118-.429-.222-.643-.322l-.024-.011-.152-.074c-.116-.057-.235-.116-.356-.165-.214-.087-.438-.159-.656-.229l-.1-.031c-.066-.021-.132-.043-.2-.066-.1-.035-.2-.07-.309-.1-.264-.07-.538-.118-.8-.165l-.078-.014c-.063-.011-.126-.024-.187-.037-.082-.017-.167-.035-.252-.047A10.483,10.483,0,0,0,14,18.421Zm0-1.473a11.871,11.871,0,0,1,1.54.1c.1.013.192.033.284.052.069.014.139.028.209.04.34.058.672.118,1,.2.14.036.278.082.412.127l.151.05c.309.1.587.188.859.3.148.059.293.127.433.194l.13.061c.306.142.553.266.775.389.188.107.368.22.535.328.26.166.489.322.7.478.156.117.316.244.49.389.209.176.412.361.622.567.156.154.3.293.43.443.209.23.4.472.542.657l.051.066c.1.134.21.272.308.416.021.031.045.061.068.09a1.267,1.267,0,0,1,.085.117,12.525,12.525,0,1,0-19.24,0c.026-.04.056-.078.084-.114s.05-.064.073-.1c.1-.141.2-.278.3-.409l.046-.059c.2-.264.378-.478.555-.672.137-.152.281-.3.417-.43.215-.21.422-.4.635-.578.18-.15.332-.271.479-.381.208-.155.433-.31.709-.486.174-.111.346-.219.526-.319.274-.153.55-.285.783-.393l.112-.053c.144-.069.293-.14.445-.2.282-.113.578-.208.864-.3l.159-.052c.132-.044.265-.088.4-.124.331-.087.675-.148,1-.2.068-.012.137-.026.2-.039.094-.019.191-.039.288-.052A11.827,11.827,0,0,1,14,16.948Z",
|
|
1812
1849
|
transform: "translate(0 -0.001)"
|
|
1813
1850
|
}),
|
|
1814
|
-
/* @__PURE__ */
|
|
1851
|
+
/* @__PURE__ */ c("path", {
|
|
1815
1852
|
d: "M5.2,10.4a5.2,5.2,0,1,1,5.2-5.2A5.206,5.206,0,0,1,5.2,10.4Zm0-8.915A3.714,3.714,0,1,0,8.915,5.2,3.719,3.719,0,0,0,5.2,1.486Z",
|
|
1816
1853
|
transform: "translate(8.8 4.8)"
|
|
1817
1854
|
})
|
|
1818
1855
|
]),
|
|
1819
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ c("span", null, "My account")
|
|
1820
1857
|
], -1), Ka = [
|
|
1821
1858
|
Ua
|
|
1822
1859
|
], Ga = {
|
|
@@ -1840,26 +1877,26 @@ const Sa = {
|
|
|
1840
1877
|
}, ls = {
|
|
1841
1878
|
href: "/",
|
|
1842
1879
|
class: "text-decoration-none mb-0"
|
|
1843
|
-
},
|
|
1844
|
-
/* @__PURE__ */
|
|
1845
|
-
], -1),
|
|
1846
|
-
function ds(e, a, t,
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1849
|
-
class:
|
|
1880
|
+
}, ns = /* @__PURE__ */ c("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
|
|
1881
|
+
/* @__PURE__ */ c("label", { for: "showAccount" }, "Account")
|
|
1882
|
+
], -1), os = { class: "container" }, cs = /* @__PURE__ */ c("span", { class: "nav__bg" }, null, -1);
|
|
1883
|
+
function ds(e, a, t, i, l, r) {
|
|
1884
|
+
const s = D("Logo");
|
|
1885
|
+
return u(), h("nav", {
|
|
1886
|
+
class: A(`nav${r.hasSecondarySlot ? " has-secondary" : ""}`),
|
|
1850
1887
|
ref: "wrapper"
|
|
1851
1888
|
}, [
|
|
1852
1889
|
La,
|
|
1853
1890
|
ka,
|
|
1854
1891
|
xa,
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1892
|
+
c("div", qa, [
|
|
1893
|
+
c("div", $a, [
|
|
1894
|
+
c("div", Ta, [
|
|
1895
|
+
r.hasLogoSlot ? (u(), h("div", Ha, [
|
|
1859
1896
|
_(e.$slots, "logo")
|
|
1860
|
-
])) : (
|
|
1861
|
-
|
|
1862
|
-
|
|
1897
|
+
])) : (u(), h("div", Ma, [
|
|
1898
|
+
c("a", Ea, [
|
|
1899
|
+
k(s, {
|
|
1863
1900
|
id: t.logo,
|
|
1864
1901
|
path: t.logopath,
|
|
1865
1902
|
desc: t.logotext,
|
|
@@ -1867,18 +1904,18 @@ function ds(e, a, t, s, o, l) {
|
|
|
1867
1904
|
}, null, 8, ["id", "path", "desc"])
|
|
1868
1905
|
])
|
|
1869
1906
|
])),
|
|
1870
|
-
|
|
1907
|
+
Ca
|
|
1871
1908
|
])
|
|
1872
1909
|
])
|
|
1873
1910
|
]),
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1911
|
+
c("div", Da, [
|
|
1912
|
+
c("div", Na, [
|
|
1913
|
+
c("div", Ra, [
|
|
1914
|
+
r.hasLogoSlot ? (u(), h("div", Pa, [
|
|
1878
1915
|
_(e.$slots, "logo")
|
|
1879
|
-
])) : (
|
|
1880
|
-
|
|
1881
|
-
|
|
1916
|
+
])) : (u(), h("div", za, [
|
|
1917
|
+
c("a", Ia, [
|
|
1918
|
+
k(s, {
|
|
1882
1919
|
id: t.logo,
|
|
1883
1920
|
path: t.logopath,
|
|
1884
1921
|
desc: t.logotext,
|
|
@@ -1886,42 +1923,42 @@ function ds(e, a, t, s, o, l) {
|
|
|
1886
1923
|
}, null, 8, ["id", "path", "desc"])
|
|
1887
1924
|
])
|
|
1888
1925
|
])),
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1926
|
+
r.hasSearchSlot ? (u(), h("div", Fa, Va)) : g("", !0),
|
|
1927
|
+
ja,
|
|
1928
|
+
c("div", Wa, [
|
|
1892
1929
|
_(e.$slots, "default")
|
|
1893
1930
|
]),
|
|
1894
|
-
|
|
1895
|
-
t.btnlink ? (
|
|
1896
|
-
|
|
1931
|
+
r.hasAccountSlot ? (u(), h("div", Oa, Ka)) : g("", !0),
|
|
1932
|
+
t.btnlink ? (u(), h("div", Ga, [
|
|
1933
|
+
c("a", {
|
|
1897
1934
|
href: t.btnlink,
|
|
1898
1935
|
class: "btn me-0",
|
|
1899
1936
|
innerHTML: t.btntext
|
|
1900
1937
|
}, null, 8, Qa)
|
|
1901
|
-
])) :
|
|
1938
|
+
])) : g("", !0)
|
|
1902
1939
|
])
|
|
1903
1940
|
]),
|
|
1904
|
-
|
|
1905
|
-
|
|
1941
|
+
r.hasSecondarySlot ? (u(), h("div", Ya, [
|
|
1942
|
+
c("div", Za, [
|
|
1906
1943
|
_(e.$slots, "secondary")
|
|
1907
1944
|
])
|
|
1908
|
-
])) :
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1945
|
+
])) : g("", !0),
|
|
1946
|
+
r.hasSearchSlot ? (u(), h("div", Xa, [
|
|
1947
|
+
c("div", Ja, [
|
|
1948
|
+
c("div", ts, [
|
|
1912
1949
|
_(e.$slots, "search")
|
|
1913
1950
|
])
|
|
1914
1951
|
])
|
|
1915
|
-
])) :
|
|
1952
|
+
])) : g("", !0)
|
|
1916
1953
|
]),
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1954
|
+
r.hasAccountSlot ? (u(), h("div", es, [
|
|
1955
|
+
c("div", as, [
|
|
1956
|
+
c("div", ss, [
|
|
1957
|
+
r.hasLogoSlot ? (u(), h("div", is, [
|
|
1921
1958
|
_(e.$slots, "logo")
|
|
1922
|
-
])) : (
|
|
1923
|
-
|
|
1924
|
-
|
|
1959
|
+
])) : (u(), h("div", rs, [
|
|
1960
|
+
c("a", ls, [
|
|
1961
|
+
k(s, {
|
|
1925
1962
|
id: t.logo,
|
|
1926
1963
|
path: t.logopath,
|
|
1927
1964
|
desc: t.logotext,
|
|
@@ -1929,17 +1966,17 @@ function ds(e, a, t, s, o, l) {
|
|
|
1929
1966
|
}, null, 8, ["id", "path", "desc"])
|
|
1930
1967
|
])
|
|
1931
1968
|
])),
|
|
1932
|
-
|
|
1969
|
+
ns
|
|
1933
1970
|
])
|
|
1934
1971
|
]),
|
|
1935
|
-
|
|
1972
|
+
c("div", os, [
|
|
1936
1973
|
_(e.$slots, "account")
|
|
1937
1974
|
])
|
|
1938
|
-
])) :
|
|
1975
|
+
])) : g("", !0),
|
|
1939
1976
|
cs
|
|
1940
1977
|
], 2);
|
|
1941
1978
|
}
|
|
1942
|
-
const ui = /* @__PURE__ */
|
|
1979
|
+
const ui = /* @__PURE__ */ w(Sa, [["render", ds]]);
|
|
1943
1980
|
const us = {
|
|
1944
1981
|
name: "Stepper",
|
|
1945
1982
|
props: {
|
|
@@ -1957,21 +1994,21 @@ const us = {
|
|
|
1957
1994
|
key: 0,
|
|
1958
1995
|
class: "h6 stepper__start"
|
|
1959
1996
|
}, bs = { class: "list-unstyled" }, ys = { class: "h6 stepper__end" };
|
|
1960
|
-
function ps(e, a, t,
|
|
1961
|
-
return
|
|
1962
|
-
|
|
1997
|
+
function ps(e, a, t, i, l, r) {
|
|
1998
|
+
return u(), h("div", hs, [
|
|
1999
|
+
c("nav", {
|
|
1963
2000
|
class: "stepper",
|
|
1964
2001
|
"aria-label": t.label ? t.label : "Progress"
|
|
1965
2002
|
}, [
|
|
1966
|
-
t.label ? (
|
|
1967
|
-
|
|
2003
|
+
t.label ? (u(), h("span", fs, x(t.label), 1)) : g("", !0),
|
|
2004
|
+
c("ol", bs, [
|
|
1968
2005
|
_(e.$slots, "default")
|
|
1969
2006
|
]),
|
|
1970
|
-
|
|
2007
|
+
c("span", ys, x(t.endlabel), 1)
|
|
1971
2008
|
], 8, ms)
|
|
1972
2009
|
]);
|
|
1973
2010
|
}
|
|
1974
|
-
const hi = /* @__PURE__ */
|
|
2011
|
+
const hi = /* @__PURE__ */ w(us, [["render", ps]]), gs = {
|
|
1975
2012
|
name: "Stepper",
|
|
1976
2013
|
props: {
|
|
1977
2014
|
url: {
|
|
@@ -1987,56 +2024,56 @@ const hi = /* @__PURE__ */ A(us, [["render", ps]]), _s = {
|
|
|
1987
2024
|
required: !1
|
|
1988
2025
|
}
|
|
1989
2026
|
}
|
|
1990
|
-
},
|
|
2027
|
+
}, _s = ["href", "aria-current"], vs = {
|
|
1991
2028
|
key: 0,
|
|
1992
2029
|
class: "visually-hidden"
|
|
1993
2030
|
};
|
|
1994
|
-
function As(e, a, t,
|
|
1995
|
-
return
|
|
1996
|
-
|
|
2031
|
+
function As(e, a, t, i, l, r) {
|
|
2032
|
+
return u(), h("li", null, [
|
|
2033
|
+
c("a", {
|
|
1997
2034
|
href: t.url,
|
|
1998
|
-
class:
|
|
2035
|
+
class: A(`${t.status ? "bg-" + t.status : ""}${typeof t.current < "u" ? "current" : ""}`),
|
|
1999
2036
|
"aria-current": typeof t.current < "u"
|
|
2000
2037
|
}, [
|
|
2001
|
-
|
|
2038
|
+
c("span", null, [
|
|
2002
2039
|
_(e.$slots, "default")
|
|
2003
2040
|
]),
|
|
2004
|
-
t.status ? (
|
|
2005
|
-
], 10,
|
|
2041
|
+
t.status ? (u(), h("em", vs, " - status: " + x(t.status), 1)) : g("", !0)
|
|
2042
|
+
], 10, _s)
|
|
2006
2043
|
]);
|
|
2007
2044
|
}
|
|
2008
|
-
const mi = /* @__PURE__ */
|
|
2045
|
+
const mi = /* @__PURE__ */ w(gs, [["render", As]]), ws = function(e) {
|
|
2009
2046
|
const a = e.querySelectorAll(":scope > details");
|
|
2010
2047
|
e.querySelectorAll(":scope > details > summary");
|
|
2011
2048
|
let t = e.querySelector(":scope > .tabs__links");
|
|
2012
|
-
e.shadowRoot && e.shadowRoot.querySelector(".tabs__links") && (t = e.shadowRoot.querySelector(".tabs__links")), t || (t = document.createElement("div"), t.classList.add("tabs__links"), e.prepend(t)), a.forEach((
|
|
2013
|
-
let
|
|
2014
|
-
|
|
2015
|
-
let
|
|
2016
|
-
|
|
2049
|
+
e.shadowRoot && e.shadowRoot.querySelector(".tabs__links") && (t = e.shadowRoot.querySelector(".tabs__links")), t || (t = document.createElement("div"), t.classList.add("tabs__links"), e.prepend(t)), a.forEach((i, l) => {
|
|
2050
|
+
let r = i.querySelector(":scope > summary");
|
|
2051
|
+
r.classList.add("visually-hidden");
|
|
2052
|
+
let s = document.createElement("button");
|
|
2053
|
+
i.hasAttribute("id") && (s = document.createElement("a"), s.setAttribute("href", `#${i.getAttribute("id")}`)), i.hasAttribute("open") && s.setAttribute("aria-pressed", !0), s.innerHTML = `${r.innerText}`, s.classList.add("link"), s.setAttribute("data-index", l), s.setAttribute("tabindex", "-1"), t.appendChild(s);
|
|
2017
2054
|
});
|
|
2018
2055
|
}, Ss = function(e) {
|
|
2019
|
-
let a = e.querySelectorAll(":scope > details"), t = e.querySelectorAll(":scope > details > summary"),
|
|
2020
|
-
e.shadowRoot && (
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
let
|
|
2024
|
-
|
|
2025
|
-
}), a.forEach((
|
|
2026
|
-
let
|
|
2027
|
-
|
|
2028
|
-
}),
|
|
2056
|
+
let a = e.querySelectorAll(":scope > details"), t = e.querySelectorAll(":scope > details > summary"), i = e.querySelectorAll(":scope .tabs__links > .link");
|
|
2057
|
+
e.shadowRoot && (i = e.shadowRoot.querySelectorAll(".tabs__links > .link")), i.forEach((l) => {
|
|
2058
|
+
l.addEventListener("click", (r) => {
|
|
2059
|
+
r.preventDefault(), i.forEach((s) => {
|
|
2060
|
+
let o = s == l;
|
|
2061
|
+
s.setAttribute("aria-pressed", o);
|
|
2062
|
+
}), a.forEach((s, o) => {
|
|
2063
|
+
let n = l.getAttribute("data-index") == o;
|
|
2064
|
+
n ? s.setAttribute("open", n) : s.removeAttribute("open");
|
|
2065
|
+
}), l.hasAttribute("href") && history.pushState(void 0, void 0, l.getAttribute("href")), window.dataLayer = window.dataLayer || [], window.dataLayer.push({
|
|
2029
2066
|
event: "openTab",
|
|
2030
|
-
tabTitle:
|
|
2067
|
+
tabTitle: l.textContent
|
|
2031
2068
|
});
|
|
2032
2069
|
});
|
|
2033
|
-
}), t.forEach((
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
}),
|
|
2038
|
-
}),
|
|
2039
|
-
|
|
2070
|
+
}), t.forEach((l, r) => {
|
|
2071
|
+
l.addEventListener("focus", (s) => {
|
|
2072
|
+
i.forEach((o) => {
|
|
2073
|
+
o.classList.remove("focus");
|
|
2074
|
+
}), i[r].classList.add("focus");
|
|
2075
|
+
}), l.addEventListener("click", (s) => {
|
|
2076
|
+
s.preventDefault(), i[r].click();
|
|
2040
2077
|
});
|
|
2041
2078
|
});
|
|
2042
2079
|
}, Ls = function(e) {
|
|
@@ -2079,12 +2116,12 @@ window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs"
|
|
|
2079
2116
|
const qs = {
|
|
2080
2117
|
name: "Tabs"
|
|
2081
2118
|
}, $s = { ref: "wrapper" };
|
|
2082
|
-
function Ts(e, a, t,
|
|
2083
|
-
return
|
|
2119
|
+
function Ts(e, a, t, i, l, r) {
|
|
2120
|
+
return u(), h("iam-tabs", $s, [
|
|
2084
2121
|
_(e.$slots, "default")
|
|
2085
2122
|
], 512);
|
|
2086
2123
|
}
|
|
2087
|
-
const fi = /* @__PURE__ */
|
|
2124
|
+
const fi = /* @__PURE__ */ w(qs, [["render", Ts]]), Hs = {
|
|
2088
2125
|
name: "Tab",
|
|
2089
2126
|
props: {
|
|
2090
2127
|
title: {
|
|
@@ -2106,18 +2143,18 @@ const fi = /* @__PURE__ */ A(qs, [["render", Ts]]), Hs = {
|
|
|
2106
2143
|
console.log(e);
|
|
2107
2144
|
}
|
|
2108
2145
|
}
|
|
2109
|
-
}, Ms = { class: "tab" },
|
|
2110
|
-
function
|
|
2111
|
-
return
|
|
2112
|
-
|
|
2146
|
+
}, Ms = { class: "tab" }, Es = ["innerHTML"];
|
|
2147
|
+
function Cs(e, a, t, i, l, r) {
|
|
2148
|
+
return u(), h("details", Ms, [
|
|
2149
|
+
c("summary", { innerHTML: t.title }, null, 8, Es),
|
|
2113
2150
|
_(e.$slots, "default")
|
|
2114
2151
|
]);
|
|
2115
2152
|
}
|
|
2116
|
-
const bi = /* @__PURE__ */
|
|
2117
|
-
function
|
|
2153
|
+
const bi = /* @__PURE__ */ w(Hs, [["render", Cs]]);
|
|
2154
|
+
function Ds(e) {
|
|
2118
2155
|
if (e.addEventListener("click", function(t) {
|
|
2119
|
-
for (var
|
|
2120
|
-
if (
|
|
2156
|
+
for (var i = t.target; i && i != this; i = i.parentNode)
|
|
2157
|
+
if (i.matches(".btn-close")) {
|
|
2121
2158
|
t.preventDefault(), e.classList.remove("show"), setTimeout(function() {
|
|
2122
2159
|
e.remove();
|
|
2123
2160
|
}, 300);
|
|
@@ -2139,7 +2176,7 @@ function Ns(e) {
|
|
|
2139
2176
|
let a = document.querySelector(".alert__holder");
|
|
2140
2177
|
e.classList.contains("alert--fixed") && !e.parentNode.classList.contains("alert__wrapper") && a.appendChild(e);
|
|
2141
2178
|
}
|
|
2142
|
-
const
|
|
2179
|
+
const Ns = {
|
|
2143
2180
|
name: "Alert",
|
|
2144
2181
|
props: {
|
|
2145
2182
|
dismissible: {
|
|
@@ -2158,7 +2195,7 @@ const Ds = {
|
|
|
2158
2195
|
}
|
|
2159
2196
|
},
|
|
2160
2197
|
mounted() {
|
|
2161
|
-
|
|
2198
|
+
Ds(this.$refs.wrapper);
|
|
2162
2199
|
}
|
|
2163
2200
|
}, Rs = ["data-timeout"], Ps = {
|
|
2164
2201
|
key: 0,
|
|
@@ -2167,29 +2204,29 @@ const Ds = {
|
|
|
2167
2204
|
"data-bs-dismiss": "alert",
|
|
2168
2205
|
"aria-label": "Close"
|
|
2169
2206
|
};
|
|
2170
|
-
function zs(e, a, t,
|
|
2171
|
-
return
|
|
2172
|
-
class:
|
|
2207
|
+
function zs(e, a, t, i, l, r) {
|
|
2208
|
+
return u(), h("div", {
|
|
2209
|
+
class: A(`container alert pb-0 ${t.dismissible ? "alert--dismissible fade show" : ""}`),
|
|
2173
2210
|
ref: "wrapper",
|
|
2174
2211
|
"data-timeout": t.timeout,
|
|
2175
2212
|
style: lt(t.timeout ? `--animation-length: ${t.timeout}ms` : "")
|
|
2176
2213
|
}, [
|
|
2177
|
-
|
|
2178
|
-
class:
|
|
2214
|
+
c("div", {
|
|
2215
|
+
class: A(`alert__inner bg-${t.colour}`),
|
|
2179
2216
|
role: "alert"
|
|
2180
2217
|
}, [
|
|
2181
|
-
t.dismissible ? (
|
|
2218
|
+
t.dismissible ? (u(), h("button", Ps)) : g("", !0),
|
|
2182
2219
|
_(e.$slots, "default")
|
|
2183
2220
|
], 2)
|
|
2184
2221
|
], 14, Rs);
|
|
2185
2222
|
}
|
|
2186
|
-
const yi = /* @__PURE__ */
|
|
2223
|
+
const yi = /* @__PURE__ */ w(Ns, [["render", zs]]);
|
|
2187
2224
|
let et = tt.props;
|
|
2188
2225
|
et.fields.required = !1;
|
|
2189
|
-
const
|
|
2226
|
+
const Is = {
|
|
2190
2227
|
components: {
|
|
2191
2228
|
Table: tt,
|
|
2192
|
-
Input:
|
|
2229
|
+
Input: P
|
|
2193
2230
|
},
|
|
2194
2231
|
data() {
|
|
2195
2232
|
return {
|
|
@@ -2202,9 +2239,9 @@ const Fs = {
|
|
|
2202
2239
|
console.log(this);
|
|
2203
2240
|
const a = new FormData(e.target);
|
|
2204
2241
|
let t = /* @__PURE__ */ new Date();
|
|
2205
|
-
const
|
|
2206
|
-
let
|
|
2207
|
-
|
|
2242
|
+
const i = t.getFullYear();
|
|
2243
|
+
let l = t.getMonth() + 1, r = t.getDate();
|
|
2244
|
+
r < 10 && (r = "0" + r), l < 10 && (l = "0" + l), t = r + "/" + l + "/" + i, this.itemsData.unshift({
|
|
2208
2245
|
date_added: t,
|
|
2209
2246
|
user: a.get("user"),
|
|
2210
2247
|
note: a.get("addNote")
|
|
@@ -2232,97 +2269,94 @@ const Fs = {
|
|
|
2232
2269
|
required: !1
|
|
2233
2270
|
}
|
|
2234
2271
|
}
|
|
2235
|
-
},
|
|
2236
|
-
function Os(e, a, t,
|
|
2237
|
-
const
|
|
2238
|
-
return
|
|
2239
|
-
t.title ? (
|
|
2272
|
+
}, Fs = { class: "container note-feed mb-2" }, Bs = ["innerHTML"], Vs = ["action", "method"], js = ["value"], Ws = /* @__PURE__ */ c("button", { class: "btn btn-tertiary" }, "Submit note", -1);
|
|
2273
|
+
function Os(e, a, t, i, l, r) {
|
|
2274
|
+
const s = D("Table"), o = D("Input");
|
|
2275
|
+
return u(), h("div", Fs, [
|
|
2276
|
+
t.title ? (u(), h("span", {
|
|
2240
2277
|
key: 0,
|
|
2241
2278
|
class: "h3",
|
|
2242
2279
|
innerHTML: t.title
|
|
2243
|
-
}, null, 8, Bs)) :
|
|
2244
|
-
|
|
2280
|
+
}, null, 8, Bs)) : g("", !0),
|
|
2281
|
+
k(s, M({
|
|
2245
2282
|
fields: [{ key: "date_added" }, { key: "user" }, { key: "note" }],
|
|
2246
|
-
items:
|
|
2283
|
+
items: l.itemsData
|
|
2247
2284
|
}, e.$props, { class: "mb-0" }), null, 16, ["items"]),
|
|
2248
|
-
|
|
2285
|
+
c("form", {
|
|
2249
2286
|
action: t.action,
|
|
2250
2287
|
method: t.method,
|
|
2251
|
-
onSubmit: a[0] || (a[0] =
|
|
2288
|
+
onSubmit: a[0] || (a[0] = nt((n) => r.submitForm(...arguments), ["prevent"]))
|
|
2252
2289
|
}, [
|
|
2253
|
-
|
|
2290
|
+
c("input", {
|
|
2254
2291
|
type: "hidden",
|
|
2255
2292
|
value: t.user,
|
|
2256
2293
|
name: "user"
|
|
2257
|
-
}, null, 8,
|
|
2258
|
-
|
|
2294
|
+
}, null, 8, js),
|
|
2295
|
+
k(o, {
|
|
2259
2296
|
id: "addNote",
|
|
2260
2297
|
type: "textarea",
|
|
2261
2298
|
label: "Add note",
|
|
2262
2299
|
required: "",
|
|
2263
2300
|
class: "mw-100"
|
|
2264
2301
|
}),
|
|
2265
|
-
|
|
2302
|
+
Ws
|
|
2266
2303
|
], 40, Vs)
|
|
2267
2304
|
]);
|
|
2268
2305
|
}
|
|
2269
|
-
const pi = /* @__PURE__ */
|
|
2306
|
+
const pi = /* @__PURE__ */ w(Is, [["render", Os]]);
|
|
2270
2307
|
function Us(e, a) {
|
|
2271
|
-
function t(
|
|
2272
|
-
let
|
|
2273
|
-
|
|
2274
|
-
let
|
|
2275
|
-
|
|
2276
|
-
let
|
|
2277
|
-
if (
|
|
2278
|
-
let
|
|
2279
|
-
if (
|
|
2280
|
-
let
|
|
2281
|
-
if (
|
|
2308
|
+
function t(i, l) {
|
|
2309
|
+
let r = !1, s = l.getAttribute("name");
|
|
2310
|
+
s.includes("[]") && (s = s.replace("[]", `[${l.value}]`));
|
|
2311
|
+
let o = i.querySelector(`[data-name="${s}"]`);
|
|
2312
|
+
o && l.getAttribute("type") == "checkbox" && (r = !0);
|
|
2313
|
+
let n = l.getAttribute("data-filter-text");
|
|
2314
|
+
if (o || (o = document.createElement("button"), i.appendChild(o)), o.setAttribute("type", "button"), o.classList.add("filter"), o.setAttribute("data-name", s), o.innerHTML = n.replace("$value", l.value), (!l.value || r) && o.remove(), l.parentNode.closest("[data-filter-text]")) {
|
|
2315
|
+
let d = l.parentNode.closest("[data-filter-text]"), f = !0;
|
|
2316
|
+
if (s = "", d.querySelectorAll("input").forEach((m, p) => {
|
|
2317
|
+
let y = m.getAttribute("name");
|
|
2318
|
+
if (s += `${p != 0 ? "," : ""}${y}`, i.querySelector(`[data-name="${y}"]`) && i.querySelector(`[data-name="${y}"]`).remove(), m.value) {
|
|
2282
2319
|
let b = document.createElement("button");
|
|
2283
|
-
b.setAttribute("type", "button"), b.classList.add("filter"), b.setAttribute("data-name",
|
|
2320
|
+
b.setAttribute("type", "button"), b.classList.add("filter"), b.setAttribute("data-name", y), b.innerHTML = n.replace("$value", m.value), i.appendChild(b);
|
|
2284
2321
|
} else
|
|
2285
2322
|
f = !1;
|
|
2286
|
-
}),
|
|
2287
|
-
let m =
|
|
2288
|
-
|
|
2289
|
-
let
|
|
2290
|
-
|
|
2323
|
+
}), i.querySelector(`[data-name="${s}"]`) && i.querySelector(`[data-name="${s}"]`).remove(), f) {
|
|
2324
|
+
let m = d.getAttribute("data-filter-text");
|
|
2325
|
+
d.querySelectorAll("input").forEach((y, b) => {
|
|
2326
|
+
let E = y.getAttribute("name");
|
|
2327
|
+
i.querySelector(`[data-name="${E}"]`) && i.querySelector(`[data-name="${E}"]`).remove(), m = m.replace(`$${b + 1}`, y.value);
|
|
2291
2328
|
});
|
|
2292
|
-
let
|
|
2293
|
-
|
|
2329
|
+
let p = document.createElement("button");
|
|
2330
|
+
p.setAttribute("type", "button"), p.classList.add("filter"), p.setAttribute("data-name", s), p.innerHTML = m, i.appendChild(p);
|
|
2294
2331
|
}
|
|
2295
2332
|
}
|
|
2296
2333
|
}
|
|
2297
|
-
Array.from(e.querySelectorAll('input[type="checkbox"]:checked')).forEach((
|
|
2298
|
-
t(a,
|
|
2299
|
-
}), e.addEventListener("change", function(
|
|
2300
|
-
if (
|
|
2301
|
-
let
|
|
2302
|
-
t(a,
|
|
2334
|
+
Array.from(e.querySelectorAll('input[type="checkbox"]:checked')).forEach((i, l) => {
|
|
2335
|
+
t(a, i);
|
|
2336
|
+
}), e.addEventListener("change", function(i) {
|
|
2337
|
+
if (i && i.target instanceof HTMLElement && i.target.closest("input[data-filter-text]")) {
|
|
2338
|
+
let l = i.target.closest("input[data-filter-text]");
|
|
2339
|
+
t(a, l);
|
|
2303
2340
|
}
|
|
2304
|
-
}, !1), a.addEventListener("click", function(
|
|
2305
|
-
if (
|
|
2306
|
-
let
|
|
2307
|
-
for (var
|
|
2308
|
-
let
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
let f = e.querySelectorAll(c);
|
|
2314
|
-
for (var l = 0; l < f.length; l++) {
|
|
2315
|
-
let m = f[l];
|
|
2341
|
+
}, !1), a.addEventListener("click", function(i) {
|
|
2342
|
+
if (i && i.target instanceof HTMLElement && i.target.closest(".filter")) {
|
|
2343
|
+
let s = i.target.closest(".filter"), o = s.getAttribute("data-name").split(",");
|
|
2344
|
+
for (var l = 0; l < o.length; l++) {
|
|
2345
|
+
let n = o[l], d = `[name="${n}"]`;
|
|
2346
|
+
n.match(/\[(.*)\]/) && (n.replace(/\[(.*)\]/, "[]"), d = `[value="${n.replace(/.*\[(.*)\]/, "$1")}"]`);
|
|
2347
|
+
let f = e.querySelectorAll(d);
|
|
2348
|
+
for (var r = 0; r < f.length; r++) {
|
|
2349
|
+
let m = f[r];
|
|
2316
2350
|
if (m.getAttribute("type") != "radio" && m.getAttribute("type") != "checkbox")
|
|
2317
2351
|
m.value = "";
|
|
2318
2352
|
else {
|
|
2319
2353
|
m.checked = !1;
|
|
2320
|
-
var
|
|
2321
|
-
m.closest("form").dispatchEvent(
|
|
2354
|
+
var i = new Event("force");
|
|
2355
|
+
m.closest("form").dispatchEvent(i);
|
|
2322
2356
|
}
|
|
2323
2357
|
}
|
|
2324
2358
|
}
|
|
2325
|
-
|
|
2359
|
+
s.remove();
|
|
2326
2360
|
}
|
|
2327
2361
|
}, !1);
|
|
2328
2362
|
}
|
|
@@ -2350,29 +2384,29 @@ window.customElements.get("iam-applied-filters") || window.customElements.define
|
|
|
2350
2384
|
const Qs = {
|
|
2351
2385
|
name: "Header"
|
|
2352
2386
|
};
|
|
2353
|
-
function Ys(e, a, t,
|
|
2354
|
-
return
|
|
2387
|
+
function Ys(e, a, t, i, l, r) {
|
|
2388
|
+
return u(), h("iam-applied-filters", null, [
|
|
2355
2389
|
_(e.$slots, "default")
|
|
2356
2390
|
]);
|
|
2357
2391
|
}
|
|
2358
|
-
const
|
|
2392
|
+
const gi = /* @__PURE__ */ w(Qs, [["render", Ys]]);
|
|
2359
2393
|
function Zs(e, a) {
|
|
2360
2394
|
Xs(e, a);
|
|
2361
2395
|
}
|
|
2362
2396
|
function Xs(e, a) {
|
|
2363
2397
|
var t;
|
|
2364
|
-
a.addEventListener("keyup", (
|
|
2398
|
+
a.addEventListener("keyup", (i) => {
|
|
2365
2399
|
clearTimeout(t), t = setTimeout(function() {
|
|
2366
2400
|
G(e, a.value);
|
|
2367
2401
|
}, 500);
|
|
2368
|
-
}), a.addEventListener("change", (
|
|
2402
|
+
}), a.addEventListener("change", (i) => {
|
|
2369
2403
|
clearTimeout(t), G(e, a.value);
|
|
2370
2404
|
});
|
|
2371
2405
|
}
|
|
2372
2406
|
const G = function(e, a) {
|
|
2373
|
-
Array.from(e.querySelectorAll(":scope > li")).forEach((t,
|
|
2374
|
-
let
|
|
2375
|
-
t.classList.add("d-none"),
|
|
2407
|
+
Array.from(e.querySelectorAll(":scope > li")).forEach((t, i) => {
|
|
2408
|
+
let l = t.textContent.toLowerCase();
|
|
2409
|
+
t.classList.add("d-none"), l.includes(a.toLowerCase()) && t.classList.remove("d-none");
|
|
2376
2410
|
}), window.dataLayer = window.dataLayer || [], window.dataLayer.push({
|
|
2377
2411
|
event: "Filtered list",
|
|
2378
2412
|
value: a
|
|
@@ -2425,24 +2459,24 @@ window.customElements.get("iam-filterlist") || window.customElements.define("iam
|
|
|
2425
2459
|
const ti = {
|
|
2426
2460
|
name: "Filter list"
|
|
2427
2461
|
};
|
|
2428
|
-
function ei(e, a, t,
|
|
2429
|
-
return
|
|
2462
|
+
function ei(e, a, t, i, l, r) {
|
|
2463
|
+
return u(), h("iam-filterlist", null, [
|
|
2430
2464
|
_(e.$slots, "default")
|
|
2431
2465
|
]);
|
|
2432
2466
|
}
|
|
2433
|
-
const
|
|
2467
|
+
const _i = /* @__PURE__ */ w(ti, [["render", ei]]);
|
|
2434
2468
|
export {
|
|
2435
2469
|
ii as Accordion,
|
|
2436
2470
|
ri as AccordionItem,
|
|
2437
2471
|
yi as Alert,
|
|
2438
|
-
|
|
2472
|
+
gi as AppliedFilters,
|
|
2439
2473
|
li as Banner,
|
|
2440
2474
|
Te as Card,
|
|
2441
|
-
|
|
2475
|
+
ni as Carousel,
|
|
2442
2476
|
si as FileUploads,
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2477
|
+
_i as Filterlist,
|
|
2478
|
+
oi as Header,
|
|
2479
|
+
P as Input,
|
|
2446
2480
|
ht as Logo,
|
|
2447
2481
|
ui as Nav,
|
|
2448
2482
|
pi as NoteFeed,
|