@vergelijkdirect/comparison-forms 2.0.2 → 2.1.0-ver-9053.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.
Files changed (60) hide show
  1. package/README.md +5 -5
  2. package/dist/vue/VdInput-CRb-iTiH.js +145 -0
  3. package/dist/vue/VdPopover-B78nVpNU.js +200 -0
  4. package/dist/vue/VdRadioGroup-D5kHcpsY.js +166 -0
  5. package/dist/vue/VdSearchableSelect-THqVGo_Q.js +209 -0
  6. package/dist/vue/VdSelect-Dv35x4sz.js +112 -0
  7. package/dist/vue/bike-Ch7ZcSpI.js +2 -0
  8. package/dist/vue/bike.presenter-CdCny1-M.js +1673 -0
  9. package/dist/vue/birthdate.schema-B9q6IeIR.js +91 -0
  10. package/dist/vue/businessCar.presenter-DR-Ozf6B.js +121 -0
  11. package/dist/vue/businessLiability-w4xhGnik.js +2 -0
  12. package/dist/vue/businessLiability.presenter-8iyRbLgw.js +80 -0
  13. package/dist/vue/car-business-DMYPV4UK.js +2 -0
  14. package/dist/vue/car-jPvIXEVK.js +2 -0
  15. package/dist/vue/car.presenter-gd62kiqS.js +130 -0
  16. package/dist/vue/caravan-B8l6zEkk.js +2 -0
  17. package/dist/vue/caravan.presenter-Cr5vuB_r.js +157 -0
  18. package/dist/vue/company.schema-DStHJpGH.js +241 -0
  19. package/dist/vue/comparison-forms.d.ts +34 -34
  20. package/dist/vue/comparison-forms.js +119 -5590
  21. package/dist/vue/date.util-DjJZwKvn.js +24 -0
  22. package/dist/vue/familyComposition.enum-D26VYo_a.js +6 -0
  23. package/dist/vue/familyComposition.schema-CNMH-wP0.js +75 -0
  24. package/dist/vue/house-BtQscoRa.js +2 -0
  25. package/dist/vue/house.presenter-DLeGfJAY.js +118 -0
  26. package/dist/vue/houseOwnedBuilding.model-BLLI1Vm0.js +14 -0
  27. package/dist/vue/itc-KSDsJZsI.js +10 -0
  28. package/dist/vue/legal-BjG3LO5G.js +2 -0
  29. package/dist/vue/legal.presenter-CwEVdXZJ.js +100 -0
  30. package/dist/vue/liability-_Sp33TSY.js +2 -0
  31. package/dist/vue/liability.presenter-C_5O-OQm.js +110 -0
  32. package/dist/vue/loan-T0OYMmxG.js +2 -0
  33. package/dist/vue/loan.presenter-CEZ3PcSo.js +198 -0
  34. package/dist/vue/messages-DRFu-PCu.js +40 -0
  35. package/dist/vue/moped-D9KUmwn6.js +2 -0
  36. package/dist/vue/moped.presenter-DazWxVEM.js +133 -0
  37. package/dist/vue/motor-BEAQ5N4w.js +2 -0
  38. package/dist/vue/motor.presenter-e_ESWwhI.js +130 -0
  39. package/dist/vue/package-DjsxU0ny.js +2 -0
  40. package/dist/vue/package.presenter-BA6S0X_L.js +137 -0
  41. package/dist/vue/pet-Bguvk2H4.js +2 -0
  42. package/dist/vue/pet.presenter-BpDDlFSQ.js +170 -0
  43. package/dist/vue/rules-3BZkSj_K.js +13 -0
  44. package/dist/vue/travel-C_cvpQNA.js +2 -0
  45. package/dist/vue/travel.presenter-DeoXBmrT.js +108 -0
  46. package/dist/vue/useAddress-C-h1pGI5.js +245 -0
  47. package/dist/vue/useLicensePlate-wAVrX9tr.js +187 -0
  48. package/dist/vue/useValidator-B8ZuqyvJ.js +535 -0
  49. package/dist/vue/yesNo-BvJlCm7Y.js +6 -0
  50. package/dist/wc/comparison-forms.js +14836 -14413
  51. package/dist/wc-noitc/comparison-forms.umd.cjs +3 -3
  52. package/package.json +1 -1
  53. package/dist/client/.vite/ssr-manifest.json +0 -600
  54. package/dist/client/assets/index-6Enzr9rU.css +0 -4
  55. package/dist/client/assets/index-6Enzr9rU.css.br +0 -0
  56. package/dist/client/assets/index-DUchBxEo.js +0 -57
  57. package/dist/client/assets/index-DUchBxEo.js.br +0 -0
  58. package/dist/client/index.html +0 -15
  59. package/dist/server/entry-server.js +0 -9981
  60. package/dist/server/entry-server.js.br +0 -0
@@ -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
+ priceMin: "Het ingevulde bedrag is te laag. Voer een bedrag hoger dan € 0,- in",
16
+ priceMax: (e) => `Het ingevulde bedrag is te hoog. Voer een bedrag in tot maximaal € ${e},-`,
17
+ brandRequired: "Kies het merk van je fiets"
18
+ },
19
+ caravan: {
20
+ typeOfCaravanRequired: "Kies je type caravan",
21
+ newOrOccasionRequired: "Kies of je caravan nieuw of occasion is",
22
+ buildYearRequired: "Kies het bouwjaar van je caravan"
23
+ },
24
+ house: { familyCompositionRequired: "Kies een gezinsamenstelling" },
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,2 @@
1
+ import { n as e, t } from "./moped.presenter-DazWxVEM.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,133 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { t as o } from "./familyComposition.enum-D26VYo_a.js";
3
+ import { t as s } from "./VdPopover-B78nVpNU.js";
4
+ import { n as c, t as l } from "./useAddress-C-h1pGI5.js";
5
+ import { a as u, t as d } from "./birthdate.schema-B9q6IeIR.js";
6
+ import { n as f, t as p } from "./useLicensePlate-wAVrX9tr.js";
7
+ import { createBlock as m, createVNode as h, defineComponent as g, isRef as _, mergeDefaults as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
8
+ import { object as C } from "yup";
9
+ //#region src/comparisons/moped/constants.ts
10
+ var w = {
11
+ min: 16,
12
+ max: 99
13
+ }, T = (e, t) => C({
14
+ licensePlate: e,
15
+ address: t,
16
+ birthdate: d(w)
17
+ }), E = /* @__PURE__ */ g({
18
+ __name: "MopedForm",
19
+ props: /*@__PURE__*/ v({
20
+ initialData: {},
21
+ title: {},
22
+ description: {},
23
+ banner: {},
24
+ layout: {},
25
+ card: { type: Boolean },
26
+ flat: { type: Boolean },
27
+ fullWidth: { type: Boolean },
28
+ submitLabel: {},
29
+ submitDisabled: { type: Boolean }
30
+ }, {
31
+ ...t,
32
+ title: "Brommerverzekering vergelijken"
33
+ }),
34
+ emits: ["submitted"],
35
+ setup(t, { emit: o }) {
36
+ let d = t, g = r(d), v = o, { addressSchema: C, draft: w, resolvedAddress: E, additionOptions: D } = l({ initial: d.initialData?.address }), { vehicleData: O, licensePlateSchema: k } = p(a.Moped, { initialData: d.initialData?.vehicle ?? void 0 }), { isSubmitting: A, handleSubmit: j, defineField: M } = i(T(k, C), {
37
+ licensePlate: d.initialData?.licensePlate ?? "",
38
+ birthdate: d.initialData?.birthdate ?? "",
39
+ address: w
40
+ }), [N, P, F, I] = M("licensePlate"), [L, R, z] = M("birthdate");
41
+ function B() {
42
+ j(({ licensePlate: e, birthdate: t }) => {
43
+ v("submitted", {
44
+ licensePlate: e,
45
+ birthdate: t,
46
+ address: E.value,
47
+ vehicle: O.value
48
+ });
49
+ });
50
+ }
51
+ return (r, i) => (b(), m(x(n), y(x(g), {
52
+ "submit-disabled": t.submitDisabled || x(A),
53
+ onSubmit: B
54
+ }), {
55
+ default: S(() => [
56
+ h(x(e), {
57
+ span: "3",
58
+ md: "6"
59
+ }, {
60
+ default: S(() => [h(x(f), y({
61
+ modelValue: x(N),
62
+ "onUpdate:modelValue": i[0] ||= (e) => _(N) ? N.value = e : null,
63
+ "vehicle-data": x(O),
64
+ "onUpdate:vehicleData": i[1] ||= (e) => _(O) ? O.value = e : null,
65
+ name: "licensePlate",
66
+ "error-message": x(F),
67
+ loading: x(I).isValidating
68
+ }, x(P)), {
69
+ popover: S(() => [h(x(s), {
70
+ "ref-variant": "blue-icon",
71
+ "tooltip-variant": "blue",
72
+ "tooltip-size": "small",
73
+ content: {
74
+ title: "Kentekengegevens",
75
+ description: "Op basis van je kenteken halen we automatisch de technische gegevens van je brommer op voor een exacte premieberekening."
76
+ }
77
+ })]),
78
+ _: 1
79
+ }, 16, [
80
+ "modelValue",
81
+ "vehicle-data",
82
+ "error-message",
83
+ "loading"
84
+ ])]),
85
+ _: 1
86
+ }),
87
+ h(x(e), {
88
+ span: "4",
89
+ md: "6"
90
+ }, {
91
+ default: S(() => [h(x(c), {
92
+ "resolved-address": x(E),
93
+ "onUpdate:resolvedAddress": i[2] ||= (e) => _(E) ? E.value = e : null,
94
+ "addition-options": x(D)
95
+ }, null, 8, ["resolved-address", "addition-options"])]),
96
+ _: 1
97
+ }),
98
+ h(x(e), {
99
+ span: "3",
100
+ md: "6"
101
+ }, {
102
+ default: S(() => [h(x(u), y({
103
+ modelValue: x(L),
104
+ "onUpdate:modelValue": i[3] ||= (e) => _(L) ? L.value = e : null,
105
+ label: "Geboortedatum hoofdbestuurder",
106
+ "error-message": x(z)
107
+ }, x(R)), null, 16, ["modelValue", "error-message"])]),
108
+ _: 1
109
+ })
110
+ ]),
111
+ _: 1
112
+ }, 16, ["submit-disabled"]));
113
+ }
114
+ });
115
+ //#endregion
116
+ //#region src/comparisons/moped/moped.presenter.ts
117
+ function D(e) {
118
+ return {
119
+ comparison: a.Moped,
120
+ detail: { moped: { ...e.vehicle } },
121
+ user: {
122
+ zipCode: e.address.zipCode,
123
+ houseNumber: e.address.houseNumber,
124
+ houseNumberAddition: e.address.houseNumberAddition,
125
+ birthdate: e.birthdate,
126
+ street: e.address.street,
127
+ city: e.address.city,
128
+ familyComposition: o.SingleWithoutChildren
129
+ }
130
+ };
131
+ }
132
+ //#endregion
133
+ export { E as n, D as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./motor.presenter-e_ESWwhI.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,130 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { t as o } from "./familyComposition.enum-D26VYo_a.js";
3
+ import { t as s } from "./VdPopover-B78nVpNU.js";
4
+ import { n as c, t as l } from "./useAddress-C-h1pGI5.js";
5
+ import { a as u, t as d } from "./birthdate.schema-B9q6IeIR.js";
6
+ import { n as f, t as p } from "./useLicensePlate-wAVrX9tr.js";
7
+ import { createBlock as m, createVNode as h, defineComponent as g, isRef as _, mergeDefaults as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
8
+ import { object as C } from "yup";
9
+ //#region src/comparisons/motor/motor.schema.ts
10
+ var w = (e, t) => C({
11
+ licensePlate: e,
12
+ address: t,
13
+ birthdate: d()
14
+ }), T = /* @__PURE__ */ g({
15
+ __name: "MotorForm",
16
+ props: /*@__PURE__*/ v({
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
+ ...t,
29
+ title: "Motorverzekering vergelijken"
30
+ }),
31
+ emits: ["submitted"],
32
+ setup(t, { emit: o }) {
33
+ let d = t, g = r(d), v = o, { addressSchema: C, draft: T, resolvedAddress: E, additionOptions: D } = l({ initial: d.initialData?.address }), { vehicleData: O, licensePlateSchema: k } = p(a.Motor, { initialData: d.initialData?.vehicle ?? void 0 }), { isSubmitting: A, handleSubmit: j, defineField: M } = i(w(k, C), {
34
+ licensePlate: d.initialData?.licensePlate ?? "",
35
+ birthdate: d.initialData?.birthdate ?? "",
36
+ address: T
37
+ }), [N, P, F, I] = M("licensePlate"), [L, R, z] = M("birthdate");
38
+ function B() {
39
+ j(({ licensePlate: e, birthdate: t }) => {
40
+ v("submitted", {
41
+ licensePlate: e,
42
+ birthdate: t,
43
+ address: E.value,
44
+ vehicle: O.value
45
+ });
46
+ });
47
+ }
48
+ return (r, i) => (b(), m(x(n), y(x(g), {
49
+ "submit-disabled": t.submitDisabled || x(A),
50
+ onSubmit: B
51
+ }), {
52
+ default: S(() => [
53
+ h(x(e), {
54
+ span: "3",
55
+ md: "6"
56
+ }, {
57
+ default: S(() => [h(x(f), y({
58
+ modelValue: x(N),
59
+ "onUpdate:modelValue": i[0] ||= (e) => _(N) ? N.value = e : null,
60
+ "vehicle-data": x(O),
61
+ "onUpdate:vehicleData": i[1] ||= (e) => _(O) ? O.value = e : null,
62
+ name: "licensePlate",
63
+ "error-message": x(F),
64
+ loading: x(I).isValidating
65
+ }, x(P)), {
66
+ popover: S(() => [h(x(s), {
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 motor 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
+ h(x(e), {
85
+ span: "4",
86
+ md: "6"
87
+ }, {
88
+ default: S(() => [h(x(c), {
89
+ "resolved-address": x(E),
90
+ "onUpdate:resolvedAddress": i[2] ||= (e) => _(E) ? E.value = e : null,
91
+ "addition-options": x(D)
92
+ }, null, 8, ["resolved-address", "addition-options"])]),
93
+ _: 1
94
+ }),
95
+ h(x(e), {
96
+ span: "3",
97
+ md: "6"
98
+ }, {
99
+ default: S(() => [h(x(u), y({
100
+ modelValue: x(L),
101
+ "onUpdate:modelValue": i[3] ||= (e) => _(L) ? L.value = e : null,
102
+ label: "Geboortedatum hoofdbestuurder",
103
+ "error-message": x(z)
104
+ }, x(R)), null, 16, ["modelValue", "error-message"])]),
105
+ _: 1
106
+ })
107
+ ]),
108
+ _: 1
109
+ }, 16, ["submit-disabled"]));
110
+ }
111
+ });
112
+ //#endregion
113
+ //#region src/comparisons/motor/motor.presenter.ts
114
+ function E(e) {
115
+ return {
116
+ comparison: a.Motor,
117
+ detail: { motor: { ...e.vehicle } },
118
+ user: {
119
+ zipCode: e.address.zipCode,
120
+ houseNumber: e.address.houseNumber,
121
+ houseNumberAddition: e.address.houseNumberAddition,
122
+ birthdate: e.birthdate,
123
+ street: e.address.street,
124
+ city: e.address.city,
125
+ familyComposition: o.SingleWithoutChildren
126
+ }
127
+ };
128
+ }
129
+ //#endregion
130
+ export { T as n, E as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./package.presenter-BA6S0X_L.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,137 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { t as o } from "./familyComposition.enum-D26VYo_a.js";
3
+ import { n as s, t as c } from "./useAddress-C-h1pGI5.js";
4
+ import { a as l, t as u } from "./birthdate.schema-B9q6IeIR.js";
5
+ import { n as d, r as f } from "./familyComposition.schema-CNMH-wP0.js";
6
+ import { computed as p, createBlock as m, createCommentVNode as h, createVNode as g, defineComponent as _, isRef as v, mergeDefaults as y, mergeProps as b, openBlock as x, unref as S, watch as C, withCtx as w } from "vue";
7
+ import { object as T, string as E } from "yup";
8
+ //#region src/utils/familyComposition.util.ts
9
+ var D = [o.FamilyWithChildren, o.FamilyWithoutChildren];
10
+ function O(e) {
11
+ return D.includes(e);
12
+ }
13
+ //#endregion
14
+ //#region src/comparisons/package/package.schema.ts
15
+ var k = (e) => T({
16
+ address: e,
17
+ birthdate: u(),
18
+ familyComposition: d,
19
+ partnerBirthdate: E().defined().when("familyComposition", {
20
+ is: O,
21
+ then: () => u()
22
+ })
23
+ }), A = /* @__PURE__ */ _({
24
+ __name: "PackageForm",
25
+ props: /*@__PURE__*/ y({
26
+ initialData: {},
27
+ title: {},
28
+ description: {},
29
+ banner: {},
30
+ layout: {},
31
+ card: { type: Boolean },
32
+ flat: { type: Boolean },
33
+ fullWidth: { type: Boolean },
34
+ submitLabel: {},
35
+ submitDisabled: { type: Boolean }
36
+ }, {
37
+ ...t,
38
+ title: "Combineer al je verzekeringen in 1 verzekeringspakket"
39
+ }),
40
+ emits: ["submitted"],
41
+ setup(t, { emit: a }) {
42
+ let u = t, d = r(u), _ = a, { addressSchema: y, draft: T, resolvedAddress: E, additionOptions: D } = c({ initial: u.initialData?.address }), { isSubmitting: A, handleSubmit: j, defineField: M, resetField: N } = i(k(y), {
43
+ birthdate: u.initialData?.birthdate ?? "",
44
+ familyComposition: u.initialData?.familyComposition ?? o.SingleWithoutChildren,
45
+ partnerBirthdate: u.initialData?.partnerBirthdate ?? "",
46
+ address: T
47
+ }), [P, F, I] = M("birthdate"), [L, R, z] = M("familyComposition", { validateAt: "change" }), [B, V, H] = M("partnerBirthdate"), U = p(() => O(L.value));
48
+ C(L, (e) => {
49
+ O(e) || N("partnerBirthdate", { value: "" });
50
+ }, { immediate: !0 });
51
+ function W() {
52
+ j(({ birthdate: e, familyComposition: t, partnerBirthdate: n }) => {
53
+ _("submitted", {
54
+ birthdate: e,
55
+ familyComposition: t,
56
+ partnerBirthdate: n,
57
+ address: E.value
58
+ });
59
+ });
60
+ }
61
+ return (r, i) => (x(), m(S(n), b(S(d), {
62
+ "submit-disabled": t.submitDisabled || S(A),
63
+ onSubmit: W
64
+ }), {
65
+ default: w(() => [
66
+ g(S(e), {
67
+ span: "4",
68
+ md: "6"
69
+ }, {
70
+ default: w(() => [g(S(s), {
71
+ "resolved-address": S(E),
72
+ "onUpdate:resolvedAddress": i[0] ||= (e) => v(E) ? E.value = e : null,
73
+ "addition-options": S(D)
74
+ }, null, 8, ["resolved-address", "addition-options"])]),
75
+ _: 1
76
+ }),
77
+ g(S(e), {
78
+ span: U.value ? 2 : 3,
79
+ md: "6"
80
+ }, {
81
+ default: w(() => [g(S(l), b({
82
+ modelValue: S(P),
83
+ "onUpdate:modelValue": i[1] ||= (e) => v(P) ? P.value = e : null,
84
+ label: "Geboortedatum",
85
+ "error-message": S(I)
86
+ }, S(F)), null, 16, ["modelValue", "error-message"])]),
87
+ _: 1
88
+ }, 8, ["span"]),
89
+ g(S(e), {
90
+ span: U.value ? 2 : 3,
91
+ md: "6"
92
+ }, {
93
+ default: w(() => [g(S(f), b({
94
+ modelValue: S(L),
95
+ "onUpdate:modelValue": i[2] ||= (e) => v(L) ? L.value = e : null,
96
+ "error-message": S(z)
97
+ }, S(R)), null, 16, ["modelValue", "error-message"])]),
98
+ _: 1
99
+ }, 8, ["span"]),
100
+ U.value ? (x(), m(S(e), {
101
+ key: 0,
102
+ span: "2",
103
+ md: "6"
104
+ }, {
105
+ default: w(() => [g(S(l), b({
106
+ modelValue: S(B),
107
+ "onUpdate:modelValue": i[3] ||= (e) => v(B) ? B.value = e : null,
108
+ label: "Geboortedatum partner",
109
+ name: "partnerBirthdate",
110
+ "error-message": S(H)
111
+ }, S(V)), null, 16, ["modelValue", "error-message"])]),
112
+ _: 1
113
+ })) : h("", !0)
114
+ ]),
115
+ _: 1
116
+ }, 16, ["submit-disabled"]));
117
+ }
118
+ });
119
+ //#endregion
120
+ //#region src/comparisons/package/package.presenter.ts
121
+ function j(e) {
122
+ return {
123
+ comparison: a.Package,
124
+ detail: { partner: { birthdate: e.partnerBirthdate } },
125
+ user: {
126
+ zipCode: e.address.zipCode,
127
+ houseNumber: e.address.houseNumber,
128
+ houseNumberAddition: e.address.houseNumberAddition,
129
+ birthdate: e.birthdate,
130
+ street: e.address.street,
131
+ city: e.address.city,
132
+ familyComposition: e.familyComposition
133
+ }
134
+ };
135
+ }
136
+ //#endregion
137
+ export { A as n, j as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./pet.presenter-BpDDlFSQ.js";
2
+ export { e as Form, t as presenter };
@@ -0,0 +1,170 @@
1
+ import { i as e, o as t, r as n, s as r, t as i, u as a } from "./useValidator-B8ZuqyvJ.js";
2
+ import { t as o } from "./VdInput-CRb-iTiH.js";
3
+ import { t as s } from "./VdSelect-Dv35x4sz.js";
4
+ import { t as c } from "./VdPopover-B78nVpNU.js";
5
+ import { a as l, i as u, n as d, r as f } from "./birthdate.schema-B9q6IeIR.js";
6
+ import { t as p } from "./messages-DRFu-PCu.js";
7
+ import { createBlock as m, createVNode as h, defineComponent as g, isRef as _, mergeDefaults as v, mergeProps as y, openBlock as b, unref as x, withCtx as S } from "vue";
8
+ import { object as C, string as w } from "yup";
9
+ //#region src/comparisons/pet/constants.ts
10
+ var T = {
11
+ min: 0,
12
+ max: 99
13
+ }, E = C({
14
+ kind: w().required(p.pet.kindRequired),
15
+ age: w().required(p.birthdate.required).test("date_format", p.birthdate.dateFormat, d).test(f({
16
+ min: {
17
+ value: 7,
18
+ unit: "week"
19
+ },
20
+ max: {
21
+ value: T.max,
22
+ unit: "year"
23
+ }
24
+ }, {
25
+ future: () => p.birthdate.tooYoung(T.min),
26
+ tooYoung: ({ earliest: e, latest: t }) => p.pet.outOfRange(e.format(u), t.format(u)),
27
+ tooOld: () => p.birthdate.tooOld(T.max)
28
+ }, "birthdate_range")),
29
+ zipCode: w().required(p.pet.zipCodeRequired).matches(/^\d{4}\s?[a-zA-Z]{2}$/, p.pet.zipCodeInvalid)
30
+ }), D = [
31
+ {
32
+ title: "Hond",
33
+ value: "dog"
34
+ },
35
+ {
36
+ title: "Kat",
37
+ value: "cat"
38
+ },
39
+ {
40
+ title: "Konijn",
41
+ value: "rabbit"
42
+ },
43
+ {
44
+ title: "Vogel",
45
+ value: "bird"
46
+ }
47
+ ], O = /* @__PURE__ */ g({
48
+ __name: "PetForm",
49
+ props: /*@__PURE__*/ v({
50
+ initialData: {},
51
+ title: {},
52
+ description: {},
53
+ banner: {},
54
+ layout: {},
55
+ card: { type: Boolean },
56
+ flat: { type: Boolean },
57
+ fullWidth: { type: Boolean },
58
+ submitLabel: {},
59
+ submitDisabled: { type: Boolean }
60
+ }, {
61
+ ...t,
62
+ title: "Dierenverzekering vergelijken"
63
+ }),
64
+ emits: ["submitted"],
65
+ setup(t, { emit: a }) {
66
+ let u = t, d = r(u), f = a, { isSubmitting: p, handleSubmit: g, defineField: v } = i(E, {
67
+ kind: u.initialData?.kind ?? "dog",
68
+ age: u.initialData?.age ?? "",
69
+ zipCode: u.initialData?.zipCode ?? ""
70
+ }), [C, w, T] = v("kind", { validateAt: "change" }), [O, k, A] = v("age"), [j, M, N] = v("zipCode");
71
+ function P() {
72
+ g((e) => {
73
+ f("submitted", { ...e });
74
+ });
75
+ }
76
+ return (r, i) => (b(), m(x(n), y(x(d), {
77
+ "submit-disabled": t.submitDisabled || x(p),
78
+ onSubmit: P
79
+ }), {
80
+ default: S(() => [
81
+ h(x(e), {
82
+ span: "4",
83
+ md: "6"
84
+ }, {
85
+ default: S(() => [h(x(s), y({
86
+ modelValue: x(C),
87
+ "onUpdate:modelValue": i[0] ||= (e) => _(C) ? C.value = e : null,
88
+ label: "Wat voor huisdier wil je verzekeren?",
89
+ placeholder: "",
90
+ options: x(D),
91
+ name: "kind",
92
+ required: !1,
93
+ "error-message": x(T)
94
+ }, x(w)), null, 16, [
95
+ "modelValue",
96
+ "options",
97
+ "error-message"
98
+ ])]),
99
+ _: 1
100
+ }),
101
+ h(x(e), {
102
+ span: "4",
103
+ md: "6"
104
+ }, {
105
+ default: S(() => [h(x(l), y({
106
+ modelValue: x(O),
107
+ "onUpdate:modelValue": i[1] ||= (e) => _(O) ? O.value = e : null,
108
+ label: "Geboortedatum huisdier",
109
+ "error-message": x(A)
110
+ }, x(k)), {
111
+ popover: S(() => [h(x(c), {
112
+ "ref-variant": "blue-icon",
113
+ "tooltip-variant": "blue",
114
+ "tooltip-size": "small",
115
+ content: {
116
+ title: "Waarom de geboortedatum?",
117
+ description: "De leeftijd van je huisdier is cruciaal voor de premieberekening. Oudere dieren hebben vaak hogere premies vanwege verhoogde gezondheidsrisico's. Als je de exacte datum niet weet, gebruik dan een schatting."
118
+ }
119
+ })]),
120
+ _: 1
121
+ }, 16, ["modelValue", "error-message"])]),
122
+ _: 1
123
+ }),
124
+ h(x(e), {
125
+ span: "2",
126
+ md: "6"
127
+ }, {
128
+ default: S(() => [h(x(o), y({
129
+ modelValue: x(j),
130
+ "onUpdate:modelValue": i[2] ||= (e) => _(j) ? j.value = e : null,
131
+ label: "Postcode",
132
+ placeholder: "bv. 1234 AZ",
133
+ name: "zipCode",
134
+ mask: "####@@",
135
+ capitalize: "",
136
+ required: !1,
137
+ "error-message": x(N)
138
+ }, x(M)), {
139
+ popover: S(() => [h(x(c), {
140
+ "ref-variant": "blue-icon",
141
+ "tooltip-variant": "blue",
142
+ "tooltip-size": "small",
143
+ content: {
144
+ title: "Waarom je postcode?",
145
+ description: "Je postcode helpt ons om de juiste premie voor jouw huisdier te berekenen, omdat sommige verzekeraars hun tarieven op basis van je woonlocatie bepalen."
146
+ }
147
+ })]),
148
+ _: 1
149
+ }, 16, ["modelValue", "error-message"])]),
150
+ _: 1
151
+ })
152
+ ]),
153
+ _: 1
154
+ }, 16, ["submit-disabled"]));
155
+ }
156
+ });
157
+ //#endregion
158
+ //#region src/comparisons/pet/pet.presenter.ts
159
+ function k(e) {
160
+ return {
161
+ comparison: a.Pet,
162
+ detail: { pet: {
163
+ kind: e.kind,
164
+ age: e.age
165
+ } },
166
+ user: { zipCode: e.zipCode }
167
+ };
168
+ }
169
+ //#endregion
170
+ export { O as n, k as t };
@@ -0,0 +1,13 @@
1
+ import { number as e, string as t } from "yup";
2
+ //#region src/schemas/rules.ts
3
+ function n(e, n) {
4
+ return t().required(n).oneOf(e, n);
5
+ }
6
+ function r(e) {
7
+ return t().required(e);
8
+ }
9
+ function i(t) {
10
+ return e().typeError(t).required(t);
11
+ }
12
+ //#endregion
13
+ export { n, r, i as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./travel.presenter-DeoXBmrT.js";
2
+ export { e as Form, t as presenter };