@vergelijkdirect/comparison-forms 2.0.0-rc.13 → 2.0.0-rc.14
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/dist/wc-forms/VdInput-PLH7DZsc.js +331 -0
- package/dist/wc-forms/VdPopover-CcRVedXS.js +285 -0
- package/dist/wc-forms/VdRadioGroup-BsMaGEuY.js +166 -0
- package/dist/wc-forms/VdSearchableSelect-CY7qBcIO.js +4516 -0
- package/dist/wc-forms/VdSelect-BPB3Jh_f.js +108 -0
- package/dist/wc-forms/bike.js +1647 -0
- package/dist/wc-forms/birthdate.schema-DGsq2GQR.js +89 -0
- package/dist/wc-forms/business-car.js +109 -0
- package/dist/wc-forms/business-liability.js +71 -0
- package/dist/wc-forms/car.js +112 -0
- package/dist/wc-forms/caravan.js +144 -0
- package/dist/wc-forms/company.schema-CUG4hnMP.js +239 -0
- package/dist/wc-forms/date.util-D9xNHiuY.js +474 -0
- package/dist/wc-forms/familyComposition.schema-fY4w6P1J.js +74 -0
- package/dist/wc-forms/floating-ui.dom-B6uyM6oK.js +856 -0
- package/dist/wc-forms/house.js +101 -0
- package/dist/wc-forms/houseOwnedBuilding.model-CPULUrWv.js +14 -0
- package/dist/wc-forms/legal.js +153 -0
- package/dist/wc-forms/liability.js +89 -0
- package/dist/wc-forms/loan.js +173 -0
- package/dist/wc-forms/messages-kbFdNTrA.js +40 -0
- package/dist/wc-forms/moped.js +115 -0
- package/dist/wc-forms/motor.js +112 -0
- package/dist/wc-forms/package.js +119 -0
- package/dist/wc-forms/pet.js +158 -0
- package/dist/wc-forms/rolldown-runtime-Dqa2HsxW.js +20 -0
- package/dist/wc-forms/rules-Cj1sWDmF.js +13 -0
- package/dist/wc-forms/services-CG6XsnRT.js +16 -0
- package/dist/wc-forms/travel.js +99 -0
- package/dist/wc-forms/useAddress-LSZ7sQk9.js +243 -0
- package/dist/wc-forms/useLicensePlate-KLwykzxF.js +187 -0
- package/dist/wc-forms/useValidator-DdXn8soU.js +7197 -0
- package/dist/wc-forms/yesNo-BvJlCm7Y.js +6 -0
- package/package.json +7 -4
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Dn as e, Sr as t, Un as n, c as r, d as i, dt as a, in as o, kn as s, nn as c, qt as l, r as u, ri as d, s as f, t as p, u as m, zr as h } from "./useValidator-DdXn8soU.js";
|
|
2
|
+
import { t as g } from "./VdRadioGroup-BsMaGEuY.js";
|
|
3
|
+
import { n as _, t as v } from "./useAddress-LSZ7sQk9.js";
|
|
4
|
+
import { i as y, r as b, t as x } from "./familyComposition.schema-fY4w6P1J.js";
|
|
5
|
+
import { n as S } from "./yesNo-BvJlCm7Y.js";
|
|
6
|
+
import { t as C } from "./messages-kbFdNTrA.js";
|
|
7
|
+
import { n as w, t as T } from "./houseOwnedBuilding.model-CPULUrWv.js";
|
|
8
|
+
//#region src/comparisons/house/house.schema.ts
|
|
9
|
+
var E = (e) => u({
|
|
10
|
+
address: e,
|
|
11
|
+
ownedBuilding: w,
|
|
12
|
+
familyComposition: x(C.house.familyCompositionRequired)
|
|
13
|
+
}), D = /* @__PURE__ */ o({
|
|
14
|
+
__name: "HouseForm",
|
|
15
|
+
props: /*@__PURE__*/ e({
|
|
16
|
+
initialData: {},
|
|
17
|
+
title: {},
|
|
18
|
+
description: {},
|
|
19
|
+
banner: {},
|
|
20
|
+
layout: {},
|
|
21
|
+
card: { type: Boolean },
|
|
22
|
+
flat: { type: Boolean },
|
|
23
|
+
fullWidth: { type: Boolean },
|
|
24
|
+
submitLabel: {},
|
|
25
|
+
submitDisabled: { type: Boolean }
|
|
26
|
+
}, {
|
|
27
|
+
...m,
|
|
28
|
+
title: "Woonverzekering vergelijken"
|
|
29
|
+
}),
|
|
30
|
+
emits: ["submit"],
|
|
31
|
+
setup(e, { emit: a }) {
|
|
32
|
+
let o = e, u = i(o), m = a, { addressSchema: x, draft: C, resolvedAddress: w, additionOptions: D } = v({ initial: o.initialData?.address }), { isSubmitting: O, handleSubmit: k, defineField: A } = p(E(x), {
|
|
33
|
+
ownedBuilding: o.initialData?.ownedBuilding ?? S.Yes,
|
|
34
|
+
familyComposition: o.initialData?.familyComposition ?? y.SingleWithoutChildren,
|
|
35
|
+
address: C
|
|
36
|
+
}), [j, M, N] = A("ownedBuilding"), [P, F, I] = A("familyComposition", { validateAt: "change" });
|
|
37
|
+
function L() {
|
|
38
|
+
k(({ ownedBuilding: e, familyComposition: t }) => {
|
|
39
|
+
m("submit", {
|
|
40
|
+
ownedBuilding: e,
|
|
41
|
+
familyComposition: t,
|
|
42
|
+
address: w.value
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return (i, a) => (n(), l(d(f), s(d(u), {
|
|
47
|
+
"submit-disabled": e.submitDisabled || d(O),
|
|
48
|
+
onSubmit: L
|
|
49
|
+
}), {
|
|
50
|
+
default: t(() => [
|
|
51
|
+
c(d(r), {
|
|
52
|
+
span: "4",
|
|
53
|
+
md: "6"
|
|
54
|
+
}, {
|
|
55
|
+
default: t(() => [c(d(_), {
|
|
56
|
+
"resolved-address": d(w),
|
|
57
|
+
"onUpdate:resolvedAddress": a[0] ||= (e) => h(w) ? w.value = e : null,
|
|
58
|
+
"addition-options": d(D)
|
|
59
|
+
}, null, 8, ["resolved-address", "addition-options"])]),
|
|
60
|
+
_: 1
|
|
61
|
+
}),
|
|
62
|
+
c(d(r), {
|
|
63
|
+
span: "3",
|
|
64
|
+
md: "3"
|
|
65
|
+
}, {
|
|
66
|
+
default: t(() => [c(d(g), s({
|
|
67
|
+
modelValue: d(j),
|
|
68
|
+
"onUpdate:modelValue": a[1] ||= (e) => h(j) ? j.value = e : null,
|
|
69
|
+
legend: "Jouw woning is...",
|
|
70
|
+
name: "ownedBuilding",
|
|
71
|
+
options: d(T),
|
|
72
|
+
variant: "boxed",
|
|
73
|
+
required: !1,
|
|
74
|
+
"error-message": d(N)
|
|
75
|
+
}, d(M)), null, 16, [
|
|
76
|
+
"modelValue",
|
|
77
|
+
"options",
|
|
78
|
+
"error-message"
|
|
79
|
+
])]),
|
|
80
|
+
_: 1
|
|
81
|
+
}),
|
|
82
|
+
c(d(r), {
|
|
83
|
+
span: "3",
|
|
84
|
+
md: "3"
|
|
85
|
+
}, {
|
|
86
|
+
default: t(() => [c(d(b), s({
|
|
87
|
+
modelValue: d(P),
|
|
88
|
+
"onUpdate:modelValue": a[2] ||= (e) => h(P) ? P.value = e : null,
|
|
89
|
+
"error-message": d(I)
|
|
90
|
+
}, d(F)), null, 16, ["modelValue", "error-message"])]),
|
|
91
|
+
_: 1
|
|
92
|
+
})
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
}, 16, ["submit-disabled"]));
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/entries/wc-forms/house.ts
|
|
100
|
+
customElements.define("vd-house-form", a(D, { shadowRoot: !1 }));
|
|
101
|
+
//#endregion
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./useValidator-DdXn8soU.js";
|
|
2
|
+
import { n as e, t } from "./yesNo-BvJlCm7Y.js";
|
|
3
|
+
import { t as n } from "./messages-kbFdNTrA.js";
|
|
4
|
+
import { n as r } from "./rules-Cj1sWDmF.js";
|
|
5
|
+
//#region src/schemas/ownedBuilding.schema.ts
|
|
6
|
+
var i = r(t, n.ownedBuilding.required), a = [{
|
|
7
|
+
value: e.Yes,
|
|
8
|
+
label: "Gekocht"
|
|
9
|
+
}, {
|
|
10
|
+
value: e.No,
|
|
11
|
+
label: "Verhuurd"
|
|
12
|
+
}];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { i as n, a as t };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Dn as e, Gt as t, Jt as n, Sr as r, Un as i, _r as a, a as o, c as s, d as c, dt as l, in as u, kn as d, nn as f, qt as p, r as m, ri as h, s as g, t as _, u as v, zr as y } from "./useValidator-DdXn8soU.js";
|
|
2
|
+
import { t as b } from "./VdSelect-BPB3Jh_f.js";
|
|
3
|
+
import { t as x } from "./VdRadioGroup-BsMaGEuY.js";
|
|
4
|
+
import { n as S, t as C } from "./useAddress-LSZ7sQk9.js";
|
|
5
|
+
import { a as w, t as T } from "./birthdate.schema-DGsq2GQR.js";
|
|
6
|
+
import { i as E, n as D, r as O } from "./familyComposition.schema-fY4w6P1J.js";
|
|
7
|
+
import { n as k } from "./yesNo-BvJlCm7Y.js";
|
|
8
|
+
import { t as A } from "./messages-kbFdNTrA.js";
|
|
9
|
+
import { n as j, t as M } from "./houseOwnedBuilding.model-CPULUrWv.js";
|
|
10
|
+
//#region src/comparisons/legal/constants.ts
|
|
11
|
+
var N = E.SingleWithChildren, P = (e) => m({
|
|
12
|
+
address: e,
|
|
13
|
+
ownedBuilding: j,
|
|
14
|
+
birthdate: T(),
|
|
15
|
+
familyComposition: D,
|
|
16
|
+
familySize: o().defined().when("familyComposition", {
|
|
17
|
+
is: N,
|
|
18
|
+
then: (e) => e.required(A.legal.familySizeRequired)
|
|
19
|
+
})
|
|
20
|
+
}), F = [{
|
|
21
|
+
title: "Alleenstaande met 1 kind",
|
|
22
|
+
value: "2"
|
|
23
|
+
}, {
|
|
24
|
+
title: "Alleenstaande met 2 of meer kinderen",
|
|
25
|
+
value: "3"
|
|
26
|
+
}], I = /* @__PURE__ */ u({
|
|
27
|
+
__name: "LegalForm",
|
|
28
|
+
props: /*@__PURE__*/ e({
|
|
29
|
+
initialData: {},
|
|
30
|
+
title: {},
|
|
31
|
+
description: {},
|
|
32
|
+
banner: {},
|
|
33
|
+
layout: {},
|
|
34
|
+
card: { type: Boolean },
|
|
35
|
+
flat: { type: Boolean },
|
|
36
|
+
fullWidth: { type: Boolean },
|
|
37
|
+
submitLabel: {},
|
|
38
|
+
submitDisabled: { type: Boolean }
|
|
39
|
+
}, {
|
|
40
|
+
...v,
|
|
41
|
+
title: "Rechtsbijstandverzekering vergelijken"
|
|
42
|
+
}),
|
|
43
|
+
emits: ["submit"],
|
|
44
|
+
setup(e, { emit: o }) {
|
|
45
|
+
let l = e, u = c(l), m = o, { addressSchema: v, draft: T, resolvedAddress: D, additionOptions: A } = C({ initial: l.initialData?.address }), { isSubmitting: j, handleSubmit: I, defineField: L, resetField: R } = _(P(v), {
|
|
46
|
+
ownedBuilding: l.initialData?.ownedBuilding ?? k.Yes,
|
|
47
|
+
birthdate: l.initialData?.birthdate ?? "",
|
|
48
|
+
familyComposition: l.initialData?.familyComposition ?? E.SingleWithoutChildren,
|
|
49
|
+
familySize: l.initialData?.familySize ?? "",
|
|
50
|
+
address: T
|
|
51
|
+
}), [z, B, V] = L("ownedBuilding"), [H, U, W] = L("birthdate"), [G, K, q] = L("familyComposition", { validateAt: "change" }), [J, Y, X] = L("familySize", { validateAt: "change" }), Z = t(() => G.value === N);
|
|
52
|
+
a(G, (e) => {
|
|
53
|
+
e !== N && R("familySize", { value: "" });
|
|
54
|
+
}, { immediate: !0 });
|
|
55
|
+
function Q() {
|
|
56
|
+
I(({ ownedBuilding: e, birthdate: t, familyComposition: n, familySize: r }) => {
|
|
57
|
+
m("submit", {
|
|
58
|
+
ownedBuilding: e,
|
|
59
|
+
birthdate: t,
|
|
60
|
+
familyComposition: n,
|
|
61
|
+
familySize: r,
|
|
62
|
+
address: D.value
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return (t, a) => (i(), p(h(g), d(h(u), {
|
|
67
|
+
"submit-disabled": e.submitDisabled || h(j),
|
|
68
|
+
onSubmit: Q
|
|
69
|
+
}), {
|
|
70
|
+
default: r(() => [
|
|
71
|
+
f(h(s), {
|
|
72
|
+
span: "3",
|
|
73
|
+
md: "6"
|
|
74
|
+
}, {
|
|
75
|
+
default: r(() => [f(h(S), {
|
|
76
|
+
"resolved-address": h(D),
|
|
77
|
+
"onUpdate:resolvedAddress": a[0] ||= (e) => y(D) ? D.value = e : null,
|
|
78
|
+
"addition-options": h(A)
|
|
79
|
+
}, null, 8, ["resolved-address", "addition-options"])]),
|
|
80
|
+
_: 1
|
|
81
|
+
}),
|
|
82
|
+
f(h(s), {
|
|
83
|
+
span: "3",
|
|
84
|
+
md: "6"
|
|
85
|
+
}, {
|
|
86
|
+
default: r(() => [f(h(x), d({
|
|
87
|
+
modelValue: h(z),
|
|
88
|
+
"onUpdate:modelValue": a[1] ||= (e) => y(z) ? z.value = e : null,
|
|
89
|
+
legend: "Jouw woning is...",
|
|
90
|
+
name: "ownedBuilding",
|
|
91
|
+
options: h(M),
|
|
92
|
+
variant: "boxed",
|
|
93
|
+
required: !1,
|
|
94
|
+
"error-message": h(V)
|
|
95
|
+
}, h(B)), null, 16, [
|
|
96
|
+
"modelValue",
|
|
97
|
+
"options",
|
|
98
|
+
"error-message"
|
|
99
|
+
])]),
|
|
100
|
+
_: 1
|
|
101
|
+
}),
|
|
102
|
+
f(h(s), {
|
|
103
|
+
span: "2",
|
|
104
|
+
md: "6"
|
|
105
|
+
}, {
|
|
106
|
+
default: r(() => [f(h(w), d({
|
|
107
|
+
modelValue: h(H),
|
|
108
|
+
"onUpdate:modelValue": a[2] ||= (e) => y(H) ? H.value = e : null,
|
|
109
|
+
"error-message": h(W)
|
|
110
|
+
}, h(U)), null, 16, ["modelValue", "error-message"])]),
|
|
111
|
+
_: 1
|
|
112
|
+
}),
|
|
113
|
+
f(h(s), {
|
|
114
|
+
span: "2",
|
|
115
|
+
md: "6"
|
|
116
|
+
}, {
|
|
117
|
+
default: r(() => [f(h(O), d({
|
|
118
|
+
modelValue: h(G),
|
|
119
|
+
"onUpdate:modelValue": a[3] ||= (e) => y(G) ? G.value = e : null,
|
|
120
|
+
"error-message": h(q)
|
|
121
|
+
}, h(K)), null, 16, ["modelValue", "error-message"])]),
|
|
122
|
+
_: 1
|
|
123
|
+
}),
|
|
124
|
+
Z.value ? (i(), p(h(s), {
|
|
125
|
+
key: 0,
|
|
126
|
+
span: "2",
|
|
127
|
+
md: "6"
|
|
128
|
+
}, {
|
|
129
|
+
default: r(() => [f(h(b), d({
|
|
130
|
+
modelValue: h(J),
|
|
131
|
+
"onUpdate:modelValue": a[4] ||= (e) => y(J) ? J.value = e : null,
|
|
132
|
+
label: "Aantal kinderen",
|
|
133
|
+
placeholder: "Maak een keuze",
|
|
134
|
+
options: h(F),
|
|
135
|
+
name: "familySize",
|
|
136
|
+
required: !1,
|
|
137
|
+
"error-message": h(X)
|
|
138
|
+
}, h(Y)), null, 16, [
|
|
139
|
+
"modelValue",
|
|
140
|
+
"options",
|
|
141
|
+
"error-message"
|
|
142
|
+
])]),
|
|
143
|
+
_: 1
|
|
144
|
+
})) : n("", !0)
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 16, ["submit-disabled"]));
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/entries/wc-forms/legal.ts
|
|
152
|
+
customElements.define("vd-legal-form", l(I, { shadowRoot: !1 }));
|
|
153
|
+
//#endregion
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Dn as e, Sr as t, Un as n, c as r, d as i, dt as a, in as o, kn as s, nn as c, qt as l, r as u, ri as d, s as f, t as p, u as m, zr as h } from "./useValidator-DdXn8soU.js";
|
|
2
|
+
import { n as g, t as _ } from "./useAddress-LSZ7sQk9.js";
|
|
3
|
+
import { a as v, t as y } from "./birthdate.schema-DGsq2GQR.js";
|
|
4
|
+
import { i as b, n as x, r as S } from "./familyComposition.schema-fY4w6P1J.js";
|
|
5
|
+
//#region src/comparisons/liability/liability.schema.ts
|
|
6
|
+
var C = (e) => u({
|
|
7
|
+
address: e,
|
|
8
|
+
birthdate: y(),
|
|
9
|
+
familyComposition: x
|
|
10
|
+
}), w = /* @__PURE__ */ o({
|
|
11
|
+
__name: "LiabilityForm",
|
|
12
|
+
props: /*@__PURE__*/ e({
|
|
13
|
+
initialData: {},
|
|
14
|
+
title: {},
|
|
15
|
+
description: {},
|
|
16
|
+
banner: {},
|
|
17
|
+
layout: {},
|
|
18
|
+
card: { type: Boolean },
|
|
19
|
+
flat: { type: Boolean },
|
|
20
|
+
fullWidth: { type: Boolean },
|
|
21
|
+
submitLabel: {},
|
|
22
|
+
submitDisabled: { type: Boolean }
|
|
23
|
+
}, {
|
|
24
|
+
...m,
|
|
25
|
+
title: "Aansprakelijkheidsverzekering vergelijken"
|
|
26
|
+
}),
|
|
27
|
+
emits: ["submit"],
|
|
28
|
+
setup(e, { emit: a }) {
|
|
29
|
+
let o = e, u = i(o), m = a, { addressSchema: y, draft: x, resolvedAddress: w, additionOptions: T } = _({ initial: o.initialData?.address }), { isSubmitting: E, handleSubmit: D, defineField: O } = p(C(y), {
|
|
30
|
+
birthdate: o.initialData?.birthdate ?? "",
|
|
31
|
+
familyComposition: o.initialData?.familyComposition ?? b.SingleWithoutChildren,
|
|
32
|
+
address: x
|
|
33
|
+
}), [k, A, j] = O("birthdate"), [M, N, P] = O("familyComposition", { validateAt: "change" });
|
|
34
|
+
function F() {
|
|
35
|
+
D(({ birthdate: e, familyComposition: t }) => {
|
|
36
|
+
m("submit", {
|
|
37
|
+
birthdate: e,
|
|
38
|
+
familyComposition: t,
|
|
39
|
+
address: w.value
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return (i, a) => (n(), l(d(f), s(d(u), {
|
|
44
|
+
"submit-disabled": e.submitDisabled || d(E),
|
|
45
|
+
onSubmit: F
|
|
46
|
+
}), {
|
|
47
|
+
default: t(() => [
|
|
48
|
+
c(d(r), {
|
|
49
|
+
span: "5",
|
|
50
|
+
md: "6"
|
|
51
|
+
}, {
|
|
52
|
+
default: t(() => [c(d(g), {
|
|
53
|
+
"resolved-address": d(w),
|
|
54
|
+
"onUpdate:resolvedAddress": a[0] ||= (e) => h(w) ? w.value = e : null,
|
|
55
|
+
"addition-options": d(T)
|
|
56
|
+
}, null, 8, ["resolved-address", "addition-options"])]),
|
|
57
|
+
_: 1
|
|
58
|
+
}),
|
|
59
|
+
c(d(r), {
|
|
60
|
+
span: "2",
|
|
61
|
+
md: "6"
|
|
62
|
+
}, {
|
|
63
|
+
default: t(() => [c(d(v), s({
|
|
64
|
+
modelValue: d(k),
|
|
65
|
+
"onUpdate:modelValue": a[1] ||= (e) => h(k) ? k.value = e : null,
|
|
66
|
+
"error-message": d(j)
|
|
67
|
+
}, d(A)), null, 16, ["modelValue", "error-message"])]),
|
|
68
|
+
_: 1
|
|
69
|
+
}),
|
|
70
|
+
c(d(r), {
|
|
71
|
+
span: "3",
|
|
72
|
+
md: "6"
|
|
73
|
+
}, {
|
|
74
|
+
default: t(() => [c(d(S), s({
|
|
75
|
+
modelValue: d(M),
|
|
76
|
+
"onUpdate:modelValue": a[2] ||= (e) => h(M) ? M.value = e : null,
|
|
77
|
+
"error-message": d(P)
|
|
78
|
+
}, d(N)), null, 16, ["modelValue", "error-message"])]),
|
|
79
|
+
_: 1
|
|
80
|
+
})
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 16, ["submit-disabled"]));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/entries/wc-forms/liability.ts
|
|
88
|
+
customElements.define("vd-liability-form", a(w, { shadowRoot: !1 }));
|
|
89
|
+
//#endregion
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { Dn as e, Sr as t, Un as n, a as r, c as i, d as a, dt as o, in as s, kn as c, nn as l, qt as u, r as d, ri as f, s as p, t as m, u as h, zr as g } from "./useValidator-DdXn8soU.js";
|
|
2
|
+
import { t as _ } from "./VdInput-PLH7DZsc.js";
|
|
3
|
+
import { t as v } from "./VdSelect-BPB3Jh_f.js";
|
|
4
|
+
import { a as y, t as b } from "./birthdate.schema-DGsq2GQR.js";
|
|
5
|
+
import { i as x, n as S, r as C } from "./familyComposition.schema-fY4w6P1J.js";
|
|
6
|
+
import { t as w } from "./messages-kbFdNTrA.js";
|
|
7
|
+
import { t as T } from "./rules-Cj1sWDmF.js";
|
|
8
|
+
//#region src/comparisons/loan/constants.ts
|
|
9
|
+
var E = {
|
|
10
|
+
min: 21,
|
|
11
|
+
max: 74
|
|
12
|
+
}, D = {
|
|
13
|
+
min: 3500,
|
|
14
|
+
max: 75e3
|
|
15
|
+
}, O = d({
|
|
16
|
+
LoanPurpose: r().required(w.loan.purposeRequired),
|
|
17
|
+
LoanAmount: T(w.loan.amountRequired).min(D.min, w.loan.amountMin(D.min)).max(D.max, w.loan.amountMax(D.max)),
|
|
18
|
+
birthdate: b(E),
|
|
19
|
+
familyComposition: S
|
|
20
|
+
}), k = [
|
|
21
|
+
{
|
|
22
|
+
title: "Aankoop auto",
|
|
23
|
+
value: "02"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: "Aankoop boot",
|
|
27
|
+
value: "03"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "Aankoop caravan/camper",
|
|
31
|
+
value: "04"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: "Aankoop inboedel",
|
|
35
|
+
value: "32"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: "Aankoop motor",
|
|
39
|
+
value: "05"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: "Aankoop recreatiewoning",
|
|
43
|
+
value: "11"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: "Oversluiten lopende leningen",
|
|
47
|
+
value: "09"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "Verbouwing woning",
|
|
51
|
+
value: "06"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: "Energie besparende maatregelen",
|
|
55
|
+
value: "07"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: "Aflossen restschuld woning",
|
|
59
|
+
value: "12"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: "Extra financiële ruimte",
|
|
63
|
+
value: "33"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: "Anders",
|
|
67
|
+
value: "99"
|
|
68
|
+
}
|
|
69
|
+
], A = /* @__PURE__ */ s({
|
|
70
|
+
__name: "LoanForm",
|
|
71
|
+
props: /*@__PURE__*/ e({
|
|
72
|
+
initialData: {},
|
|
73
|
+
title: {},
|
|
74
|
+
description: {},
|
|
75
|
+
banner: {},
|
|
76
|
+
layout: {},
|
|
77
|
+
card: { type: Boolean },
|
|
78
|
+
flat: { type: Boolean },
|
|
79
|
+
fullWidth: { type: Boolean },
|
|
80
|
+
submitLabel: {},
|
|
81
|
+
submitDisabled: { type: Boolean }
|
|
82
|
+
}, {
|
|
83
|
+
...h,
|
|
84
|
+
title: "Geld lenen"
|
|
85
|
+
}),
|
|
86
|
+
emits: ["submit"],
|
|
87
|
+
setup(e, { emit: r }) {
|
|
88
|
+
let o = e, s = a(o), d = r, { isSubmitting: h, handleSubmit: b, defineField: S } = m(O, {
|
|
89
|
+
LoanPurpose: o.initialData?.LoanPurpose ?? "",
|
|
90
|
+
LoanAmount: o.initialData?.LoanAmount ?? null,
|
|
91
|
+
birthdate: o.initialData?.birthdate ?? "",
|
|
92
|
+
familyComposition: o.initialData?.familyComposition ?? x.SingleWithoutChildren
|
|
93
|
+
}), [w, T, E] = S("LoanPurpose", { validateAt: "change" }), [D, A, j] = S("LoanAmount"), [M, N, P] = S("birthdate"), [F, I, L] = S("familyComposition", { validateAt: "change" });
|
|
94
|
+
function R() {
|
|
95
|
+
b((e) => {
|
|
96
|
+
d("submit", { ...e });
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return (r, a) => (n(), u(f(p), c(f(s), {
|
|
100
|
+
"submit-disabled": e.submitDisabled || f(h),
|
|
101
|
+
onSubmit: R
|
|
102
|
+
}), {
|
|
103
|
+
default: t(() => [
|
|
104
|
+
l(f(i), {
|
|
105
|
+
span: "3",
|
|
106
|
+
md: "6"
|
|
107
|
+
}, {
|
|
108
|
+
default: t(() => [l(f(v), c({
|
|
109
|
+
modelValue: f(w),
|
|
110
|
+
"onUpdate:modelValue": a[0] ||= (e) => g(w) ? w.value = e : null,
|
|
111
|
+
label: "Leendoel",
|
|
112
|
+
placeholder: "Maak een keuze",
|
|
113
|
+
options: f(k),
|
|
114
|
+
name: "LoanPurpose",
|
|
115
|
+
required: !1,
|
|
116
|
+
"error-message": f(E)
|
|
117
|
+
}, f(T)), null, 16, [
|
|
118
|
+
"modelValue",
|
|
119
|
+
"options",
|
|
120
|
+
"error-message"
|
|
121
|
+
])]),
|
|
122
|
+
_: 1
|
|
123
|
+
}),
|
|
124
|
+
l(f(i), {
|
|
125
|
+
span: "2",
|
|
126
|
+
md: "6"
|
|
127
|
+
}, {
|
|
128
|
+
default: t(() => [l(f(_), c({
|
|
129
|
+
modelValue: f(D),
|
|
130
|
+
"onUpdate:modelValue": a[1] ||= (e) => g(D) ? D.value = e : null,
|
|
131
|
+
modelModifiers: { number: !0 },
|
|
132
|
+
label: "Leenbedrag",
|
|
133
|
+
placeholder: "Van € 3.500,- tot € 75.000,-",
|
|
134
|
+
icon: "far fa-euro-sign",
|
|
135
|
+
name: "LoanAmount",
|
|
136
|
+
mask: "#####",
|
|
137
|
+
inputmode: "numeric",
|
|
138
|
+
required: !1,
|
|
139
|
+
"error-message": f(j)
|
|
140
|
+
}, f(A)), null, 16, ["modelValue", "error-message"])]),
|
|
141
|
+
_: 1
|
|
142
|
+
}),
|
|
143
|
+
l(f(i), {
|
|
144
|
+
span: "2",
|
|
145
|
+
md: "6"
|
|
146
|
+
}, {
|
|
147
|
+
default: t(() => [l(f(y), c({
|
|
148
|
+
modelValue: f(M),
|
|
149
|
+
"onUpdate:modelValue": a[2] ||= (e) => g(M) ? M.value = e : null,
|
|
150
|
+
"error-message": f(P)
|
|
151
|
+
}, f(N)), null, 16, ["modelValue", "error-message"])]),
|
|
152
|
+
_: 1
|
|
153
|
+
}),
|
|
154
|
+
l(f(i), {
|
|
155
|
+
span: "3",
|
|
156
|
+
md: "6"
|
|
157
|
+
}, {
|
|
158
|
+
default: t(() => [l(f(C), c({
|
|
159
|
+
modelValue: f(F),
|
|
160
|
+
"onUpdate:modelValue": a[3] ||= (e) => g(F) ? F.value = e : null,
|
|
161
|
+
"error-message": f(L)
|
|
162
|
+
}, f(I)), null, 16, ["modelValue", "error-message"])]),
|
|
163
|
+
_: 1
|
|
164
|
+
})
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
}, 16, ["submit-disabled"]));
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/entries/wc-forms/loan.ts
|
|
172
|
+
customElements.define("vd-loan-form", o(A, { shadowRoot: !1 }));
|
|
173
|
+
//#endregion
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region src/schemas/messages.ts
|
|
2
|
+
var e = {
|
|
3
|
+
birthdate: {
|
|
4
|
+
required: "Geboortedatum is verplicht",
|
|
5
|
+
dateFormat: "Geboortedatum is incorrect",
|
|
6
|
+
tooYoung: (e) => `De minimale leeftijd is ${e}.`,
|
|
7
|
+
tooOld: (e) => `De maximale leeftijd is ${e}.`
|
|
8
|
+
},
|
|
9
|
+
familyComposition: { required: "Gezinssituatie is verplicht" },
|
|
10
|
+
ownedBuilding: { required: "Deze vraag is verplicht" },
|
|
11
|
+
bike: {
|
|
12
|
+
kindRequired: "Selecteer je fiets",
|
|
13
|
+
conditionRequired: "Is je fiets nieuw of tweedehands gekocht?",
|
|
14
|
+
priceRequired: "Vul de aankoopprijs in (afgerond bedrag)",
|
|
15
|
+
priceMax: (e) => `Het ingevulde bedrag is te hoog. Voer een bedrag in tot maximaal € ${e},-`,
|
|
16
|
+
brandRequired: "Kies het merk van je fiets"
|
|
17
|
+
},
|
|
18
|
+
caravan: {
|
|
19
|
+
typeOfCaravanRequired: "Kies je type caravan",
|
|
20
|
+
newOrOccasionRequired: "Kies of je caravan nieuw of occasion is",
|
|
21
|
+
buildYearRequired: "Kies het bouwjaar van je caravan"
|
|
22
|
+
},
|
|
23
|
+
house: { familyCompositionRequired: "Kies een gezinsamenstelling" },
|
|
24
|
+
legal: { familySizeRequired: "Kies het aantal kinderen" },
|
|
25
|
+
loan: {
|
|
26
|
+
purposeRequired: "Leendoel is verplicht",
|
|
27
|
+
amountRequired: "Leenbedrag is verplicht",
|
|
28
|
+
amountMin: (e) => `Je kunt niet minder dan €${e},- lenen. Vul een hoger bedrag in`,
|
|
29
|
+
amountMax: (e) => `De input mag niet groter zijn dan de maximum waarde: ${e}`
|
|
30
|
+
},
|
|
31
|
+
pet: {
|
|
32
|
+
kindRequired: "Selecteer je huisdier",
|
|
33
|
+
outOfRange: (e, t) => `Je huisdier dient geboren te zijn tussen ${e} en ${t}`,
|
|
34
|
+
zipcodeRequired: "Vul je postcode in",
|
|
35
|
+
zipcodeInvalid: "Postcode is incorrect"
|
|
36
|
+
},
|
|
37
|
+
travel: { paymentTermRequired: "Selecteer een dekking" }
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { e as t };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Dn as e, Sr as t, Un as n, c as r, d as i, dt as a, in as o, kn as s, nn as c, qt as l, r as u, ri as d, s as f, t as p, u as m, zr as h } from "./useValidator-DdXn8soU.js";
|
|
2
|
+
import { t as g } from "./VdPopover-CcRVedXS.js";
|
|
3
|
+
import { n as _, t as v } from "./useAddress-LSZ7sQk9.js";
|
|
4
|
+
import { a as y, t as b } from "./birthdate.schema-DGsq2GQR.js";
|
|
5
|
+
import { n as x, r as S, t as C } from "./useLicensePlate-KLwykzxF.js";
|
|
6
|
+
//#region src/comparisons/moped/constants.ts
|
|
7
|
+
var w = {
|
|
8
|
+
min: 16,
|
|
9
|
+
max: 99
|
|
10
|
+
}, T = (e, t) => u({
|
|
11
|
+
licensePlate: e,
|
|
12
|
+
address: t,
|
|
13
|
+
birthdate: b(w)
|
|
14
|
+
}), E = /* @__PURE__ */ o({
|
|
15
|
+
__name: "MopedForm",
|
|
16
|
+
props: /*@__PURE__*/ e({
|
|
17
|
+
initialData: {},
|
|
18
|
+
title: {},
|
|
19
|
+
description: {},
|
|
20
|
+
banner: {},
|
|
21
|
+
layout: {},
|
|
22
|
+
card: { type: Boolean },
|
|
23
|
+
flat: { type: Boolean },
|
|
24
|
+
fullWidth: { type: Boolean },
|
|
25
|
+
submitLabel: {},
|
|
26
|
+
submitDisabled: { type: Boolean }
|
|
27
|
+
}, {
|
|
28
|
+
...m,
|
|
29
|
+
title: "Brommerverzekering vergelijken"
|
|
30
|
+
}),
|
|
31
|
+
emits: ["submit"],
|
|
32
|
+
setup(e, { emit: a }) {
|
|
33
|
+
let o = e, u = i(o), m = a, { addressSchema: b, draft: w, resolvedAddress: E, additionOptions: D } = v({ initial: o.initialData?.address }), { vehicleData: O, licensePlateSchema: k } = C(S.Moped, { initialData: o.initialData?.vehicle ?? void 0 }), { isSubmitting: A, handleSubmit: j, defineField: M } = p(T(k, b), {
|
|
34
|
+
licensePlate: o.initialData?.licensePlate ?? "",
|
|
35
|
+
birthdate: o.initialData?.birthdate ?? "",
|
|
36
|
+
address: w
|
|
37
|
+
}), [N, P, F, I] = M("licensePlate"), [L, R, z] = M("birthdate");
|
|
38
|
+
function B() {
|
|
39
|
+
j(({ licensePlate: e, birthdate: t }) => {
|
|
40
|
+
m("submit", {
|
|
41
|
+
licensePlate: e,
|
|
42
|
+
birthdate: t,
|
|
43
|
+
address: E.value,
|
|
44
|
+
vehicle: O.value
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return (i, a) => (n(), l(d(f), s(d(u), {
|
|
49
|
+
"submit-disabled": e.submitDisabled || d(A),
|
|
50
|
+
onSubmit: B
|
|
51
|
+
}), {
|
|
52
|
+
default: t(() => [
|
|
53
|
+
c(d(r), {
|
|
54
|
+
span: "3",
|
|
55
|
+
md: "6"
|
|
56
|
+
}, {
|
|
57
|
+
default: t(() => [c(d(x), s({
|
|
58
|
+
modelValue: d(N),
|
|
59
|
+
"onUpdate:modelValue": a[0] ||= (e) => h(N) ? N.value = e : null,
|
|
60
|
+
"vehicle-data": d(O),
|
|
61
|
+
"onUpdate:vehicleData": a[1] ||= (e) => h(O) ? O.value = e : null,
|
|
62
|
+
name: "licensePlate",
|
|
63
|
+
"error-message": d(F),
|
|
64
|
+
loading: d(I).isValidating
|
|
65
|
+
}, d(P)), {
|
|
66
|
+
popover: t(() => [c(d(g), {
|
|
67
|
+
"ref-variant": "blue-icon",
|
|
68
|
+
"tooltip-variant": "blue",
|
|
69
|
+
"tooltip-size": "small",
|
|
70
|
+
content: {
|
|
71
|
+
title: "Kentekengegevens",
|
|
72
|
+
description: "Op basis van je kenteken halen we automatisch de technische gegevens van je brommer op voor een exacte premieberekening."
|
|
73
|
+
}
|
|
74
|
+
})]),
|
|
75
|
+
_: 1
|
|
76
|
+
}, 16, [
|
|
77
|
+
"modelValue",
|
|
78
|
+
"vehicle-data",
|
|
79
|
+
"error-message",
|
|
80
|
+
"loading"
|
|
81
|
+
])]),
|
|
82
|
+
_: 1
|
|
83
|
+
}),
|
|
84
|
+
c(d(r), {
|
|
85
|
+
span: "4",
|
|
86
|
+
md: "6"
|
|
87
|
+
}, {
|
|
88
|
+
default: t(() => [c(d(_), {
|
|
89
|
+
"resolved-address": d(E),
|
|
90
|
+
"onUpdate:resolvedAddress": a[2] ||= (e) => h(E) ? E.value = e : null,
|
|
91
|
+
"addition-options": d(D)
|
|
92
|
+
}, null, 8, ["resolved-address", "addition-options"])]),
|
|
93
|
+
_: 1
|
|
94
|
+
}),
|
|
95
|
+
c(d(r), {
|
|
96
|
+
span: "3",
|
|
97
|
+
md: "6"
|
|
98
|
+
}, {
|
|
99
|
+
default: t(() => [c(d(y), s({
|
|
100
|
+
modelValue: d(L),
|
|
101
|
+
"onUpdate:modelValue": a[3] ||= (e) => h(L) ? L.value = e : null,
|
|
102
|
+
label: "Geboortedatum hoofdbestuurder",
|
|
103
|
+
"error-message": d(z)
|
|
104
|
+
}, d(R)), null, 16, ["modelValue", "error-message"])]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}, 16, ["submit-disabled"]));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/entries/wc-forms/moped.ts
|
|
114
|
+
customElements.define("vd-moped-form", a(E, { shadowRoot: !1 }));
|
|
115
|
+
//#endregion
|