@vergelijkdirect/comparison-forms 2.0.2-rc.0 → 2.1.0-ver-9053.0

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 (77) 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-BmAOIT7K.js +2 -0
  8. package/dist/vue/bike.presenter-B28PW7O5.js +1673 -0
  9. package/dist/vue/birthdate.schema-DX1aYftY.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-pxn56jlK.js +2 -0
  15. package/dist/vue/car.presenter-CMGN_MtF.js +130 -0
  16. package/dist/vue/caravan-CuhGro4y.js +2 -0
  17. package/dist/vue/caravan.presenter-DCV4ltB7.js +157 -0
  18. package/dist/vue/company.schema-DStHJpGH.js +241 -0
  19. package/dist/vue/comparison-forms.d.ts +36 -35
  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-A9W0CwZq.js +75 -0
  24. package/dist/vue/house-DJhbPxyX.js +2 -0
  25. package/dist/vue/house.presenter-C7k4TwbP.js +118 -0
  26. package/dist/vue/houseOwnedBuilding.model-DskEdrSG.js +14 -0
  27. package/dist/vue/itc-KSDsJZsI.js +10 -0
  28. package/dist/vue/legal-Ce2WzBp6.js +2 -0
  29. package/dist/vue/legal.presenter-Ddiovxkq.js +175 -0
  30. package/dist/vue/liability-NHH24ecQ.js +2 -0
  31. package/dist/vue/liability.presenter-gHGQxRPP.js +110 -0
  32. package/dist/vue/loan-C9dmM3Vm.js +2 -0
  33. package/dist/vue/loan.presenter-p24T0XvQ.js +198 -0
  34. package/dist/vue/messages-DfcG9Qfd.js +41 -0
  35. package/dist/vue/moped-CnYiLYBp.js +2 -0
  36. package/dist/vue/moped.presenter-C5TcsOIe.js +133 -0
  37. package/dist/vue/motor-DSFijIK7.js +2 -0
  38. package/dist/vue/motor.presenter-Chlott4j.js +130 -0
  39. package/dist/vue/package-TSBIFNzu.js +2 -0
  40. package/dist/vue/package.presenter-Bit_w4np.js +137 -0
  41. package/dist/vue/pet-DRap9f-q.js +2 -0
  42. package/dist/vue/pet.presenter-BrWNvh7j.js +170 -0
  43. package/dist/vue/rules-3BZkSj_K.js +13 -0
  44. package/dist/vue/travel-DB9sfL8A.js +2 -0
  45. package/dist/vue/travel.presenter-CVkNDJwI.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 +14922 -14424
  51. package/dist/wc-forms/bike.cjs +1 -1
  52. package/dist/wc-forms/{birthdate.schema-rpmbSDZH.cjs → birthdate.schema-C-y732mA.cjs} +1 -1
  53. package/dist/wc-forms/car.cjs +1 -1
  54. package/dist/wc-forms/caravan.cjs +1 -1
  55. package/dist/wc-forms/{familyComposition.schema-DW6scNvt.cjs → familyComposition.schema-gvSnx-ea.cjs} +1 -1
  56. package/dist/wc-forms/house.cjs +1 -1
  57. package/dist/wc-forms/houseOwnedBuilding.model-G9AqKTZo.cjs +1 -0
  58. package/dist/wc-forms/legal.cjs +1 -1
  59. package/dist/wc-forms/liability.cjs +1 -1
  60. package/dist/wc-forms/loan.cjs +1 -1
  61. package/dist/wc-forms/{messages-stJTqN-x.cjs → messages-CX8jVyEo.cjs} +1 -1
  62. package/dist/wc-forms/moped.cjs +1 -1
  63. package/dist/wc-forms/motor.cjs +1 -1
  64. package/dist/wc-forms/package.cjs +1 -1
  65. package/dist/wc-forms/pet.cjs +1 -1
  66. package/dist/wc-forms/travel.cjs +1 -1
  67. package/dist/wc-noitc/comparison-forms.umd.cjs +3 -3
  68. package/package.json +1 -1
  69. package/dist/client/.vite/ssr-manifest.json +0 -600
  70. package/dist/client/assets/index-6Enzr9rU.css +0 -4
  71. package/dist/client/assets/index-6Enzr9rU.css.br +0 -0
  72. package/dist/client/assets/index-DUchBxEo.js +0 -57
  73. package/dist/client/assets/index-DUchBxEo.js.br +0 -0
  74. package/dist/client/index.html +0 -15
  75. package/dist/server/entry-server.js +0 -9981
  76. package/dist/server/entry-server.js.br +0 -0
  77. package/dist/wc-forms/houseOwnedBuilding.model-DgIQ2pQN.cjs +0 -1
@@ -0,0 +1,198 @@
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 "./VdInput-CRb-iTiH.js";
4
+ import { t as c } from "./VdSelect-Dv35x4sz.js";
5
+ import { a as l, i as u, t as d } from "./birthdate.schema-DX1aYftY.js";
6
+ import { n as f, r as p } from "./familyComposition.schema-A9W0CwZq.js";
7
+ import { r as m } from "./date.util-DjJZwKvn.js";
8
+ import { t as h } from "./messages-DfcG9Qfd.js";
9
+ import { t as g } from "./rules-3BZkSj_K.js";
10
+ import { createBlock as _, createVNode as v, defineComponent as y, isRef as b, mergeDefaults as x, mergeProps as S, openBlock as C, unref as w, withCtx as T } from "vue";
11
+ import { object as E, string as D } from "yup";
12
+ import O from "dayjs";
13
+ //#region src/comparisons/loan/constants.ts
14
+ var k = {
15
+ min: 21,
16
+ max: 74
17
+ }, A = {
18
+ min: 3500,
19
+ max: 75e3
20
+ }, j = E({
21
+ LoanPurpose: D().required(h.loan.purposeRequired),
22
+ LoanAmount: g(h.loan.amountRequired).min(A.min, h.loan.amountMin(A.min)).max(A.max, h.loan.amountMax(A.max)),
23
+ birthdate: d(k),
24
+ familyComposition: f
25
+ }), M = [
26
+ {
27
+ title: "Aankoop auto",
28
+ value: "02"
29
+ },
30
+ {
31
+ title: "Aankoop boot",
32
+ value: "03"
33
+ },
34
+ {
35
+ title: "Aankoop caravan/camper",
36
+ value: "04"
37
+ },
38
+ {
39
+ title: "Aankoop inboedel",
40
+ value: "32"
41
+ },
42
+ {
43
+ title: "Aankoop motor",
44
+ value: "05"
45
+ },
46
+ {
47
+ title: "Aankoop recreatiewoning",
48
+ value: "11"
49
+ },
50
+ {
51
+ title: "Oversluiten lopende leningen",
52
+ value: "09"
53
+ },
54
+ {
55
+ title: "Verbouwing woning",
56
+ value: "06"
57
+ },
58
+ {
59
+ title: "Energie besparende maatregelen",
60
+ value: "07"
61
+ },
62
+ {
63
+ title: "Aflossen restschuld woning",
64
+ value: "12"
65
+ },
66
+ {
67
+ title: "Extra financiële ruimte",
68
+ value: "33"
69
+ },
70
+ {
71
+ title: "Anders",
72
+ value: "99"
73
+ }
74
+ ], N = /* @__PURE__ */ y({
75
+ __name: "LoanForm",
76
+ props: /*@__PURE__*/ x({
77
+ initialData: {},
78
+ title: {},
79
+ description: {},
80
+ banner: {},
81
+ layout: {},
82
+ card: { type: Boolean },
83
+ flat: { type: Boolean },
84
+ fullWidth: { type: Boolean },
85
+ submitLabel: {},
86
+ submitDisabled: { type: Boolean }
87
+ }, {
88
+ ...t,
89
+ title: "Geld lenen"
90
+ }),
91
+ emits: ["submitted"],
92
+ setup(t, { emit: a }) {
93
+ let u = t, d = r(u), f = a, { isSubmitting: m, handleSubmit: h, defineField: g } = i(j, {
94
+ LoanPurpose: u.initialData?.LoanPurpose ?? "",
95
+ LoanAmount: u.initialData?.LoanAmount ?? null,
96
+ birthdate: u.initialData?.birthdate ?? "",
97
+ familyComposition: u.initialData?.familyComposition ?? o.SingleWithoutChildren
98
+ }), [y, x, E] = g("LoanPurpose", { validateAt: "change" }), [D, O, k] = g("LoanAmount"), [A, N, P] = g("birthdate"), [F, I, L] = g("familyComposition", { validateAt: "change" });
99
+ function R() {
100
+ h((e) => {
101
+ f("submitted", { ...e });
102
+ });
103
+ }
104
+ return (r, i) => (C(), _(w(n), S(w(d), {
105
+ "submit-disabled": t.submitDisabled || w(m),
106
+ onSubmit: R
107
+ }), {
108
+ default: T(() => [
109
+ v(w(e), {
110
+ span: "3",
111
+ md: "6"
112
+ }, {
113
+ default: T(() => [v(w(c), S({
114
+ modelValue: w(y),
115
+ "onUpdate:modelValue": i[0] ||= (e) => b(y) ? y.value = e : null,
116
+ label: "Leendoel",
117
+ placeholder: "Maak een keuze",
118
+ options: w(M),
119
+ name: "LoanPurpose",
120
+ required: !1,
121
+ "error-message": w(E)
122
+ }, w(x)), null, 16, [
123
+ "modelValue",
124
+ "options",
125
+ "error-message"
126
+ ])]),
127
+ _: 1
128
+ }),
129
+ v(w(e), {
130
+ span: "2",
131
+ md: "6"
132
+ }, {
133
+ default: T(() => [v(w(s), S({
134
+ modelValue: w(D),
135
+ "onUpdate:modelValue": i[1] ||= (e) => b(D) ? D.value = e : null,
136
+ modelModifiers: { number: !0 },
137
+ label: "Leenbedrag",
138
+ placeholder: "Van € 3.500,- tot € 75.000,-",
139
+ icon: "far fa-euro-sign",
140
+ name: "LoanAmount",
141
+ mask: "#####",
142
+ inputmode: "numeric",
143
+ required: !1,
144
+ "error-message": w(k)
145
+ }, w(O)), null, 16, ["modelValue", "error-message"])]),
146
+ _: 1
147
+ }),
148
+ v(w(e), {
149
+ span: "2",
150
+ md: "6"
151
+ }, {
152
+ default: T(() => [v(w(l), S({
153
+ modelValue: w(A),
154
+ "onUpdate:modelValue": i[2] ||= (e) => b(A) ? A.value = e : null,
155
+ "error-message": w(P)
156
+ }, w(N)), null, 16, ["modelValue", "error-message"])]),
157
+ _: 1
158
+ }),
159
+ v(w(e), {
160
+ span: "3",
161
+ md: "6"
162
+ }, {
163
+ default: T(() => [v(w(p), S({
164
+ modelValue: w(F),
165
+ "onUpdate:modelValue": i[3] ||= (e) => b(F) ? F.value = e : null,
166
+ "error-message": w(L)
167
+ }, w(I)), null, 16, ["modelValue", "error-message"])]),
168
+ _: 1
169
+ })
170
+ ]),
171
+ _: 1
172
+ }, 16, ["submit-disabled"]));
173
+ }
174
+ });
175
+ //#endregion
176
+ //#region src/comparisons/loan/loan.presenter.ts
177
+ function P(e) {
178
+ let t = m(e, u);
179
+ if (!t) return 120;
180
+ let n = t.add(76, "year").diff(O(), "month", !0), r = Math.floor(n / 12) * 12;
181
+ return Math.min(r, 120);
182
+ }
183
+ function F(e) {
184
+ return {
185
+ comparison: a.Loan,
186
+ detail: { loan: {
187
+ LoanPurpose: e.LoanPurpose,
188
+ LoanAmount: e.LoanAmount,
189
+ MaxDurationByLegalLimit: P(e.birthdate)
190
+ } },
191
+ user: {
192
+ birthdate: e.birthdate,
193
+ familyComposition: e.familyComposition
194
+ }
195
+ };
196
+ }
197
+ //#endregion
198
+ export { N as n, F as t };
@@ -0,0 +1,41 @@
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
+ legal: { familySizeRequired: "Kies het aantal kinderen" },
26
+ loan: {
27
+ purposeRequired: "Leendoel is verplicht",
28
+ amountRequired: "Leenbedrag is verplicht",
29
+ amountMin: (e) => `Je kunt niet minder dan €${e},- lenen. Vul een hoger bedrag in`,
30
+ amountMax: (e) => `De input mag niet groter zijn dan de maximum waarde: ${e}`
31
+ },
32
+ pet: {
33
+ kindRequired: "Selecteer je huisdier",
34
+ outOfRange: (e, t) => `Je huisdier dient geboren te zijn tussen ${e} en ${t}`,
35
+ zipCodeRequired: "Vul je postcode in",
36
+ zipCodeInvalid: "Postcode is incorrect"
37
+ },
38
+ travel: { paymentTermRequired: "Selecteer een dekking" }
39
+ };
40
+ //#endregion
41
+ export { e as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./moped.presenter-C5TcsOIe.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-DX1aYftY.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-Chlott4j.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-DX1aYftY.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-Bit_w4np.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-DX1aYftY.js";
5
+ import { n as d, r as f } from "./familyComposition.schema-A9W0CwZq.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-BrWNvh7j.js";
2
+ export { e as Form, t as presenter };