@vergelijkdirect/comparison-forms 1.2.29-rc.1 → 1.2.29-rc.3

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.
@@ -17332,66 +17332,68 @@ Re.default = Re;
17332
17332
  const at = (t) => {
17333
17333
  const {
17334
17334
  generateComparisonId: e
17335
- } = cR(), r = (d, p) => {
17336
- t("redirect-page", { link: d, data: p });
17337
- }, n = (d) => {
17338
- t("submit-form", d);
17339
- }, a = (d, p, f) => N(void 0, null, function* () {
17335
+ } = cR(), r = (p, f) => {
17336
+ t("redirect-page", { link: p, data: f });
17337
+ }, n = (p) => {
17338
+ t("submit-form", p);
17339
+ }, a = (p, f, h) => N(void 0, null, function* () {
17340
17340
  try {
17341
- const h = yield e(d, p);
17342
- h && r(o(f, h.getId()));
17343
- } catch (h) {
17344
- throw h;
17345
- }
17346
- }), i = () => N(void 0, null, function* () {
17341
+ const v = yield e(p, f);
17342
+ v && r(u(h, v.getId()));
17343
+ } catch (v) {
17344
+ throw v;
17345
+ }
17346
+ }), i = () => {
17347
+ t("show-notification");
17348
+ }, o = () => N(void 0, null, function* () {
17347
17349
  try {
17348
17350
  return yield Re.post(On.mijn.url + "/api/v1/vd/register/quote", {
17349
17351
  email: O.email,
17350
17352
  name: O.firstName,
17351
17353
  phone_number: O.phoneNumber,
17352
17354
  referrer_group: X.refId
17353
- }), !0;
17354
- } catch (d) {
17355
- throw d;
17355
+ }), i(), !0;
17356
+ } catch (p) {
17357
+ throw p;
17356
17358
  }
17357
- }), o = (d, p) => d.replace("<<COMPARISONID>>", p);
17359
+ }), u = (p, f) => p.replace("<<COMPARISONID>>", f);
17358
17360
  return {
17359
17361
  submitFormAndRedirect: r,
17360
17362
  submitFormAndUpdateFormData: n,
17361
17363
  submitFormAndCreateComparison: a,
17362
- submitAndSendQuotationData: i,
17363
- setInitialUserInfoInStore: (d) => {
17364
- Object.keys(O).map((f) => {
17365
- if (f === "zipcode") {
17366
- O[f] = d.userInformation.zipCode || xn()[f] || O[f];
17364
+ submitAndSendQuotationData: o,
17365
+ setInitialUserInfoInStore: (p) => {
17366
+ Object.keys(O).map((h) => {
17367
+ if (h === "zipcode") {
17368
+ O[h] = p.userInformation.zipCode || xn()[h] || O[h];
17367
17369
  return;
17368
17370
  }
17369
- if (f === "houseNumber") {
17370
- const h = d.userInformation[f] ? String(d.userInformation[f]) : "";
17371
- O[f] = h || xn()[f] || O[f];
17371
+ if (h === "houseNumber") {
17372
+ const v = p.userInformation[h] ? String(p.userInformation[h]) : "";
17373
+ O[h] = v || xn()[h] || O[h];
17372
17374
  return;
17373
17375
  }
17374
- O[f] = d.userInformation[f] || xn()[f] || O[f];
17376
+ O[h] = p.userInformation[h] || xn()[h] || O[h];
17375
17377
  });
17376
17378
  },
17377
- removeSessionState: (d, p) => {
17378
- Zm.removeSessionState(d, p);
17379
+ removeSessionState: (p, f) => {
17380
+ Zm.removeSessionState(p, f);
17379
17381
  },
17380
17382
  openQuotationModal: () => {
17381
- const { refId: d, notes: p, description: f, headerTitle: h } = X;
17383
+ const { refId: p, notes: f, description: h, headerTitle: v } = X;
17382
17384
  t("emit-event-hub", {
17383
17385
  event: "open-quotation-modal",
17384
17386
  data: {
17385
- refId: d,
17386
- notes: p,
17387
- description: f,
17388
- headerTitle: h
17387
+ refId: p,
17388
+ notes: f,
17389
+ description: h,
17390
+ headerTitle: v
17389
17391
  }
17390
17392
  });
17391
17393
  },
17392
- setQuotationData: (d) => {
17393
- Object.keys(d).map((p) => {
17394
- X[p] = d[p];
17394
+ setQuotationData: (p) => {
17395
+ Object.keys(p).map((f) => {
17396
+ X[f] = p[f];
17395
17397
  });
17396
17398
  }
17397
17399
  };
@@ -29350,7 +29352,7 @@ const hI = "254", mI = (t, e) => {
29350
29352
  if (yield l()) {
29351
29353
  j.value = !0;
29352
29354
  const d = yield n();
29353
- o(d ? "success" : "failed"), u(), c(), lu.value = null, oR(), j.value = !1;
29355
+ o(d ? "success" : "failed"), u(), c(), lu.value = null, yield oR(), j.value = !1;
29354
29356
  }
29355
29357
  } catch (d) {
29356
29358
  o("failed"), console.error(d);
@@ -29418,7 +29420,7 @@ const hI = "254", mI = (t, e) => {
29418
29420
  required: !1
29419
29421
  }
29420
29422
  },
29421
- setup(t, e) {
29423
+ setup(t, { emit: e }) {
29422
29424
  const {
29423
29425
  validateBeforeSubmit: r,
29424
29426
  setEmailValidness: n,
@@ -30152,29 +30154,32 @@ const NI = eb.exports, II = A({
30152
30154
  }
30153
30155
  },
30154
30156
  setup(t, { emit: e }) {
30155
- const r = (i) => {
30156
- e("change", i);
30157
- }, n = (i) => {
30158
- e("emit-event", i);
30159
- }, a = ({ link: i, data: o = null }) => {
30160
- if (!o) {
30161
- window.location.href = i;
30157
+ const r = (o) => {
30158
+ e("change", o);
30159
+ }, n = (o) => {
30160
+ e("emit-event", o);
30161
+ }, a = (o) => {
30162
+ e("emit-notification", o);
30163
+ }, i = ({ link: o, data: u = null }) => {
30164
+ if (!u) {
30165
+ window.location.href = o;
30162
30166
  return;
30163
30167
  }
30164
- const u = uR(i, o);
30165
- window.location.href = u;
30168
+ const c = uR(o, u);
30169
+ window.location.href = c;
30166
30170
  };
30167
30171
  return hk(ud("ITC", null)), iR(ud("$validator", null)), L.value = t.hasNewDesign, {
30168
30172
  FormLocations: P,
30169
30173
  submitFormData: r,
30174
+ showNotification: a,
30170
30175
  emitEventHub: n,
30171
- redirectPage: a
30176
+ redirectPage: i
30172
30177
  };
30173
30178
  }
30174
30179
  });
30175
30180
  var tb = function() {
30176
30181
  var e = this, r = e._self._c;
30177
- return e._self._setupProxy, r(e.formComponent, { tag: "component", attrs: { link: e.link, "has-new-design": e.hasNewDesign, "user-information": e.userInformation, "insurance-state": e.insuranceState, "form-location": e.formLocation, classes: e.classes, title: e.title, showTitle: e.showTitle, "form-orientation": e.formOrientation, "additional-options": e.additionalOptions, description: e.description, "button-text": e.buttonText }, on: { "submit-form": e.submitFormData, "emit-event-hub": e.emitEventHub, "redirect-page": e.redirectPage } });
30182
+ return e._self._setupProxy, r(e.formComponent, { tag: "component", attrs: { link: e.link, "has-new-design": e.hasNewDesign, "user-information": e.userInformation, "insurance-state": e.insuranceState, "form-location": e.formLocation, classes: e.classes, title: e.title, showTitle: e.showTitle, "form-orientation": e.formOrientation, "additional-options": e.additionalOptions, description: e.description, "button-text": e.buttonText }, on: { "submit-form": e.submitFormData, "show-notification": e.showNotification, "emit-event-hub": e.emitEventHub, "redirect-page": e.redirectPage } });
30178
30183
  }, jI = [];
30179
30184
  tb._withStripped = !0;
30180
30185
  var rb = /* @__PURE__ */ T(