@vergelijkdirect/comparison-forms 1.2.32-rc.5 → 1.2.32-rc.6

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.
@@ -17335,8 +17335,8 @@ xe.default = xe;
17335
17335
  const tt = (t) => {
17336
17336
  const {
17337
17337
  generateComparisonId: e
17338
- } = gR(), r = (p) => {
17339
- t("emit-event", p);
17338
+ } = gR(), r = (p, f) => {
17339
+ t("emit-event-hub", { event: p, data: f });
17340
17340
  }, n = (p, f) => {
17341
17341
  t("redirect-page", { link: p, data: f });
17342
17342
  }, a = (p) => {
@@ -17367,7 +17367,7 @@ const tt = (t) => {
17367
17367
  }
17368
17368
  }), u = (p, f) => p.replace("<<COMPARISONID>>", f);
17369
17369
  return {
17370
- submitFormAndEmitEvent: r,
17370
+ emitEvent: r,
17371
17371
  submitFormAndRedirect: n,
17372
17372
  submitFormAndUpdateFormData: a,
17373
17373
  submitFormAndCreateComparison: i,
@@ -30192,7 +30192,7 @@ var ob = /* @__PURE__ */ E(
30192
30192
  );
30193
30193
  ob.options.__file = "/Users/mac/Work/comparison-forms/src/components/common/inputs/DefaultTextArea.vue";
30194
30194
  const HI = ob.exports, zI = (t) => {
30195
- let { submitFormAndEmitEvent: e } = tt(t), r = we({
30195
+ let { emitEvent: e } = tt(t), r = we({
30196
30196
  howToContact: [],
30197
30197
  whenToContact: [],
30198
30198
  whatToHelpWith: "alreadyHasContract",
@@ -30201,13 +30201,13 @@ const HI = ob.exports, zI = (t) => {
30201
30201
  const a = ie(() => [{
30202
30202
  rule: "required",
30203
30203
  text: "Voornaam is verplicht"
30204
- }]), i = (p) => {
30205
- n.value = p;
30204
+ }]), i = (f) => {
30205
+ n.value = f;
30206
30206
  }, o = () => {
30207
30207
  r.howToContact = [], r.whenToContact = [], r.whatToHelpWith = "alreadyHasContract", r.userQuestion = "";
30208
30208
  }, u = () => {
30209
30209
  S.email = "", S.firstName = "", S.phoneNumber = "";
30210
- }, c = (p) => p.join(","), l = () => N(void 0, null, function* () {
30210
+ }, c = (f) => f.join(","), l = () => N(void 0, null, function* () {
30211
30211
  return yield ze([
30212
30212
  "name",
30213
30213
  "phonenumber",
@@ -30215,8 +30215,10 @@ const HI = ob.exports, zI = (t) => {
30215
30215
  "whenToContact",
30216
30216
  "emailInput"
30217
30217
  ]);
30218
- }), s = () => N(void 0, null, function* () {
30219
- const { data: p } = yield xe.post(Dn.getMijnUrl() + "/api/communication/contact", {
30218
+ }), s = () => {
30219
+ e("close-tab");
30220
+ }, d = () => N(void 0, null, function* () {
30221
+ const { data: f } = yield xe.post(Dn.getMijnUrl() + "/api/communication/contact", {
30220
30222
  email: S.email,
30221
30223
  name: S.firstName,
30222
30224
  phone_number: S.phoneNumber,
@@ -30226,21 +30228,22 @@ const HI = ob.exports, zI = (t) => {
30226
30228
  what_to_help_with: r.whatToHelpWith,
30227
30229
  type: "callback"
30228
30230
  });
30229
- return p.response === "success";
30231
+ return f.response === "success";
30230
30232
  });
30231
30233
  return {
30232
30234
  requestStatus: n,
30233
30235
  nameInputErrorsData: a,
30234
30236
  callbackRequestQuestionsData: r,
30237
+ closeTab: s,
30235
30238
  validateBeforeSubmit: () => N(void 0, null, function* () {
30236
30239
  try {
30237
30240
  if (yield l()) {
30238
30241
  j.value = !0;
30239
- const p = yield s();
30240
- i(p ? "success" : "failed"), o(), u(), yield Um(), e(), j.value = !1;
30242
+ const f = yield d();
30243
+ i(f ? "success" : "failed"), o(), u(), yield Um(), s(), j.value = !1;
30241
30244
  }
30242
- } catch (p) {
30243
- i("failed"), console.error(p);
30245
+ } catch (f) {
30246
+ i("failed"), console.error(f);
30244
30247
  } finally {
30245
30248
  j.value = !1;
30246
30249
  }
@@ -30261,14 +30264,16 @@ const HI = ob.exports, zI = (t) => {
30261
30264
  const {
30262
30265
  nameInputErrorsData: r,
30263
30266
  callbackRequestQuestionsData: n,
30264
- validateBeforeSubmit: a
30267
+ closeTab: a,
30268
+ validateBeforeSubmit: i
30265
30269
  } = zI(e);
30266
30270
  return {
30267
30271
  userState: S,
30268
30272
  callbackRequestQuestions: aN,
30269
30273
  nameInputErrorsData: r,
30270
30274
  callbackRequestQuestionsData: n,
30271
- validateBeforeSubmit: a
30275
+ closeTab: a,
30276
+ validateBeforeSubmit: i
30272
30277
  };
30273
30278
  }
30274
30279
  });
@@ -30290,7 +30295,7 @@ var sb = function() {
30290
30295
  e.$set(e.callbackRequestQuestionsData, "whatToHelpWith", n);
30291
30296
  }, expression: "callbackRequestQuestionsData.whatToHelpWith" } }), r("ErrorHandler", { attrs: { "errors-data": [{ rule: "required", text: "Selecteer een dekking" }] } })], 1), r("h6", [e._v("Wil je ons alvast meer informatie geven over je vraag? (optioneel)")]), r("default-text-area", { attrs: { id: "userQuestions", placeholder: "Geef hier een korte beschrijving van je vraag of verzoek...", name: "userQuestion" }, model: { value: e.callbackRequestQuestionsData.userQuestion, callback: function(n) {
30292
30297
  e.$set(e.callbackRequestQuestionsData, "userQuestion", n);
30293
- }, expression: "callbackRequestQuestionsData.userQuestion" } }), r("button", { staticClass: "vd-btn vd-btn-primary-alt", on: { click: e.validateBeforeSubmit } }, [e._v("Bel me terug")]), r("button", { staticClass: "vd-btn vd-btn-return" }, [e._v("Sluit formulier")])], 1)]);
30298
+ }, expression: "callbackRequestQuestionsData.userQuestion" } }), r("button", { staticClass: "vd-btn vd-btn-primary-alt", on: { click: e.validateBeforeSubmit } }, [e._v("Bel me terug")]), r("button", { staticClass: "vd-btn vd-btn-return", on: { click: e.closeTab } }, [e._v("Sluit formulier")])], 1)]);
30294
30299
  }, YI = [function() {
30295
30300
  var t = this, e = t._self._c;
30296
30301
  return t._self._setupProxy, e("h6", { staticClass: "vd-contact-slider__checkboxes-title" }, [t._v("Hoe wil je dat we contact met je opnemen? (meerdere opties mogelijk) "), e("span", { staticClass: "text-danger ml-1 mt-2" }, [t._v("*")])]);