@apolitical/component-library 2.0.0 → 2.0.1-4125.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.
package/index.mjs CHANGED
@@ -4004,8 +4004,11 @@ const ra = ({
4004
4004
  showRequiredLabels: !0
4005
4005
  },
4006
4006
  gtm: f = { context: "Form", event: "form-submit-click" },
4007
- functions: { onSuccess: d, onCatch: u, onFailure: l } = {
4008
- onSuccess: () => {
4007
+ functions: { onSuccess: d = async () => {
4008
+ }, onCatch: u = () => {
4009
+ }, onFailure: l = () => {
4010
+ } } = {
4011
+ onSuccess: async () => {
4009
4012
  },
4010
4013
  onCatch: () => {
4011
4014
  },
@@ -4065,23 +4068,15 @@ const ra = ({
4065
4068
  payload: {
4066
4069
  fields: e,
4067
4070
  dispatch: j,
4068
- onSuccess: (F) => {
4071
+ onSuccess: async (F) => {
4069
4072
  try {
4070
- d && d(F), j({
4071
- type: c ? "formSubmittedAndReset" : "formSubmitted"
4072
- });
4073
+ await d(F), j({ type: c ? "formSubmittedAndReset" : "formSubmitted" });
4073
4074
  } catch (Q) {
4074
- u && u(Q), j({
4075
- type: "updateValue",
4076
- payload: { key: "isSubmitting", value: !1 }
4077
- });
4075
+ u(Q), j({ type: "updateValue", payload: { key: "isSubmitting", value: !1 } });
4078
4076
  }
4079
4077
  },
4080
4078
  onFailure: (F) => {
4081
- l && l(F), j({
4082
- type: "updateValue",
4083
- payload: { key: "isSubmitting", value: !1 }
4084
- });
4079
+ l(F), j({ type: "updateValue", payload: { key: "isSubmitting", value: !1 } });
4085
4080
  },
4086
4081
  intl: _
4087
4082
  }
@@ -4269,7 +4264,7 @@ const Pc = ({
4269
4264
  ] });
4270
4265
  }, wi = ({
4271
4266
  gtm: e,
4272
- functions: { onSuccess: t = () => {
4267
+ functions: { onSuccess: t = async () => {
4273
4268
  }, onFailure: n = () => {
4274
4269
  } }
4275
4270
  }) => {
@@ -5857,7 +5852,7 @@ const no = {
5857
5852
  event: "signup-submit-click"
5858
5853
  },
5859
5854
  functions: {
5860
- onSuccess: () => {
5855
+ onSuccess: async () => {
5861
5856
  oa({
5862
5857
  refs: _,
5863
5858
  dataToSubmit: s,
@@ -5895,7 +5890,7 @@ const no = {
5895
5890
  );
5896
5891
  };
5897
5892
  let rn;
5898
- const an = "contactFooter_", Nc = ({ onSuccess: e = () => {
5893
+ const an = "contactFooter_", Nc = ({ onSuccess: e = async () => {
5899
5894
  }, onFailure: t = () => {
5900
5895
  } }) => {
5901
5896
  const n = me(null), [r, s] = L.useState(0), [i, c] = L.useState(!1), o = () => {
@@ -1,5 +1,5 @@
1
1
  declare const ContactFooter: ({ onSuccess, onFailure }: {
2
- onSuccess?: (() => void) | undefined;
2
+ onSuccess?: (() => Promise<void>) | undefined;
3
3
  onFailure?: (() => void) | undefined;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
5
5
  export default ContactFooter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-4125.6",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {