@apolitical/component-library 3.3.4 → 3.3.6-beta.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.
@@ -1,3 +1,3 @@
1
1
  import { IFormProps } from './form.types';
2
- declare const Form: ({ fields, className, id: formId, formRef: ref, intlPath, button, secondaryActionButton, meta: { shouldShowCancelButton, shouldReset, showRequiredLabels, showSuccessMessage, }, gtm, functions: { onSuccess, onCancel, onCatch, onFailure, }, ...props }: IFormProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ declare const Form: ({ fields, className, id: formId, formRef: ref, intlPath, button, secondaryActionButton, meta, gtm, functions: { onSuccess, onCancel, onCatch, onFailure, }, ...props }: IFormProps) => import("react/jsx-runtime").JSX.Element | null;
3
3
  export default Form;
@@ -1,3 +1,10 @@
1
+ export interface IShouldShowProps {
2
+ title?: boolean;
3
+ expectation?: boolean;
4
+ url?: boolean;
5
+ logInButton?: boolean;
6
+ successMessage?: boolean;
7
+ }
1
8
  interface ISignupForm {
2
9
  className?: string;
3
10
  functions: {
@@ -8,18 +15,11 @@ interface ISignupForm {
8
15
  /** Callback function to resend verification code (used when user already signed up but not verified) */
9
16
  resendVerificationCode: () => void;
10
17
  };
11
- shouldShow: {
12
- title?: boolean;
13
- expectation: boolean;
14
- url?: boolean;
15
- logInButton: boolean;
16
- successMessage?: boolean;
17
- };
18
+ shouldShow: IShouldShowProps;
18
19
  dataToSubmit: {
19
20
  [key: string]: string;
20
21
  };
21
22
  submitButton: string;
22
- showSuccessMessage?: boolean;
23
23
  }
24
- declare const SignupForm: ({ className, functions, shouldShow, submitButton, dataToSubmit, ...props }: ISignupForm) => import("react/jsx-runtime").JSX.Element;
24
+ declare const SignupForm: ({ className, functions, shouldShow: shouldShowProps, submitButton, dataToSubmit, ...props }: ISignupForm) => import("react/jsx-runtime").JSX.Element;
25
25
  export default SignupForm;
@@ -7,7 +7,7 @@ interface IBlurEmailField {
7
7
  }
8
8
  declare const blurEmailField: ({ ref, validateEmail, dispatch }: IBlurEmailField) => Promise<void>;
9
9
  declare const transformFormData: (formData: FormData) => {
10
- name: FormDataEntryValue;
10
+ name: string;
11
11
  email: string;
12
12
  jobTitle: FormDataEntryValue;
13
13
  organization: FormDataEntryValue;
@@ -1,13 +1,8 @@
1
1
  import React from 'react';
2
2
  import { IField } from '../../../form/components/form/form.types';
3
+ import { IShouldShowProps } from './signup-form';
3
4
  interface Props {
4
- shouldShow: {
5
- title?: boolean;
6
- expectation: boolean;
7
- url?: boolean;
8
- logInButton: boolean;
9
- successMessage?: boolean;
10
- };
5
+ shouldShow: IShouldShowProps;
11
6
  functions: {
12
7
  validateEmail: (arg: any) => Promise<any>;
13
8
  createAccount: (arg: any) => Promise<any>;