@vergelijkdirect/comparison-forms 2.0.0-rc.4 → 2.0.0-rc.5

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.
@@ -101,10 +101,10 @@ declare const __VLS_export_14: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, C
101
101
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
102
102
 
103
103
  declare const __VLS_export_15: DefineComponent<ComparisonFormFlowProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
104
- error: (error: unknown) => any;
104
+ error: (error: unknown, payload?: ComparisonPayload | undefined) => any;
105
105
  submitted: (url: string) => any;
106
106
  }, string, PublicProps, Readonly<ComparisonFormFlowProps> & Readonly<{
107
- onError?: ((error: unknown) => any) | undefined;
107
+ onError?: ((error: unknown, payload?: ComparisonPayload | undefined) => any) | undefined;
108
108
  onSubmitted?: ((url: string) => any) | undefined;
109
109
  }>, {
110
110
  flat: boolean;
@@ -5587,7 +5587,7 @@ function xa(e) {
5587
5587
  t.value = !0, n.value = null;
5588
5588
  try {
5589
5589
  let t = await Nn().comparisonService.create(r.comparison, ba(r)), n = va(e.link, r.comparison, t.getId());
5590
- (e.onRedirect ?? ya)(n);
5590
+ e.onRedirect ? e.onRedirect(n) : ya(n);
5591
5591
  } catch (t) {
5592
5592
  n.value = t, e.onError?.(t, r);
5593
5593
  } finally {
@@ -5693,11 +5693,9 @@ var Sa = /* @__PURE__ */ B({
5693
5693
  let a = e, o = i, s = q(a), c = t(() => Ia[a.form]), { submit: l, isSubmitting: u } = xa({
5694
5694
  link: a.link,
5695
5695
  onRedirect: (e) => {
5696
- o("submitted", e), (a.redirect ?? ((e) => {
5697
- window.location.href = e;
5698
- }))(e);
5696
+ o("submitted", e), a.redirect ? a.redirect(e) : window.location.href = e;
5699
5697
  },
5700
- onError: (e) => o("error", e)
5698
+ onError: (e, t) => o("error", e, t)
5701
5699
  });
5702
5700
  function d(e) {
5703
5701
  c.value && l(c.value.presenter(e));
@@ -5740,6 +5738,7 @@ var Sa = /* @__PURE__ */ B({
5740
5738
  href: a.value,
5741
5739
  label: e.buttonText,
5742
5740
  "button-type": "green",
5741
+ size: "big",
5743
5742
  target: "_self",
5744
5743
  block: ""
5745
5744
  }, null, 8, ["href", "label"])]));