@goodhood-web/nebenan-base 4.11.0-development.4 → 4.11.0-development.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.
Files changed (29) hide show
  1. package/index.js +64 -62
  2. package/index.mjs +37 -28
  3. package/lib/Authentication/LoginForm/LoginFormFields.d.ts +2 -2
  4. package/lib/Authentication/LoginForm/network.d.ts +2 -2
  5. package/lib/Authentication/PasswordForgotten/PasswordForgottenFormFields.d.ts +2 -2
  6. package/lib/Authentication/PasswordForgotten/network.d.ts +2 -2
  7. package/lib/Authentication/PasswordReset/PasswordResetFormFields.d.ts +2 -2
  8. package/lib/Authentication/PasswordReset/network.d.ts +2 -2
  9. package/lib/Authentication/Registration/FieldMappings/FieldMappings.d.ts +2 -2
  10. package/lib/Authentication/Registration/RegistrationForm/FieldMappings/FieldMappings.d.ts +2 -2
  11. package/lib/Authentication/Registration/RegistrationForm/Steps/Address.d.ts +2 -2
  12. package/lib/Authentication/Registration/RegistrationForm/Steps/Email.d.ts +2 -2
  13. package/lib/Authentication/Registration/RegistrationForm/network.d.ts +2 -2
  14. package/lib/Authentication/Registration/RegistrationForm/utils.d.ts +2 -2
  15. package/lib/Authentication/Registration/VerificationForm/FieldMappings/FieldMappings.d.ts +2 -2
  16. package/lib/Authentication/Registration/VerificationForm/Steps/Gps.d.ts +2 -2
  17. package/lib/Authentication/Registration/VerificationForm/Steps/InviteCode.d.ts +2 -2
  18. package/lib/Authentication/Registration/VerificationForm/Steps/PostalCode.d.ts +2 -2
  19. package/lib/Authentication/Registration/VerificationForm/Steps/Sms.d.ts +2 -2
  20. package/lib/Authentication/Registration/VerificationForm/Steps/SmsCode.d.ts +2 -2
  21. package/lib/Authentication/Registration/VerificationForm/network.d.ts +4 -4
  22. package/lib/Authentication/Registration/VerificationForm/utils.d.ts +2 -2
  23. package/lib/Forms/DynamicForm/DynamicForm.d.ts +3 -3
  24. package/lib/Forms/DynamicForm/StandaloneDynamicForm.d.ts +5 -5
  25. package/lib/Forms/Fields/index.d.ts +2 -1
  26. package/lib/Forms/Wizard/Wizard.types.d.ts +21 -21
  27. package/lib/Forms/Wizard/WizardContext.d.ts +2 -2
  28. package/lib/Forms/Wizard/useWizard.d.ts +1 -1
  29. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1616,7 +1616,7 @@ const tP = ({ children: t, className: e, spacing: n }) => {
1616
1616
  onBlur: o,
1617
1617
  value: d,
1618
1618
  name: a,
1619
- hintText: c ? l : void 0,
1619
+ hintText: l,
1620
1620
  progressBar: c && /* @__PURE__ */ p(
1621
1621
  Tw,
1622
1622
  {
@@ -1665,7 +1665,7 @@ const yP = (t, e) => {
1665
1665
  defaultValue: l,
1666
1666
  name: i,
1667
1667
  rules: o
1668
- }), h = f.value ? Ww(f.value) : null, m = (k) => {
1668
+ }), h = f.value && a ? Ww(f.value) : null, m = (k) => {
1669
1669
  f.onChange(k), c(i);
1670
1670
  }, g = (k, y) => y ? k.length < 8 && y.score >= 2 ? y.score - 1 : y.score : null;
1671
1671
  return /* @__PURE__ */ p(
@@ -75795,7 +75795,7 @@ function Zre(t) {
75795
75795
  url: h.cta_url
75796
75796
  });
75797
75797
  const g = Kre({ extendedEmbed: h });
75798
- console.log("Created node:", g.getType(), "isUnlinked:", g.__isUnlinked), r.append(g), l += h.title, i.set(h.cta_url, h), a.add(h.cta_url);
75798
+ r.append(g), l += h.title, i.set(h.cta_url, h), a.add(h.cta_url);
75799
75799
  } else
75800
75800
  Bd(r, d), l += d;
75801
75801
  s = f;
@@ -75863,50 +75863,58 @@ function Jre({ onChange: t, value: e }) {
75863
75863
  let c = !1;
75864
75864
  return n.registerUpdateListener(({ editorState: f }) => {
75865
75865
  c || f.read(() => {
75866
- const d = Ve(), h = d.getTextContent();
75867
- if (h === i.current) return;
75868
- const { embeds: m, linkUrls: g } = U5(
75866
+ const d = Ve();
75867
+ let h = "";
75868
+ const m = d.getChildren();
75869
+ if (m.forEach((k, y) => {
75870
+ "getChildren" in k && (k.getChildren().forEach((T) => {
75871
+ T.getType() === "linebreak" ? h += `
75872
+ ` : h += T.getTextContent();
75873
+ }), y < m.length - 1 && (h += `
75874
+ `));
75875
+ }), h === i.current) return;
75876
+ const { embeds: g, linkUrls: v } = U5(
75869
75877
  d,
75870
75878
  l.current
75871
75879
  );
75872
- g.forEach((b) => {
75873
- s.current.has(b) || (s.current.add(b), o(b).then((k) => {
75874
- if ((k == null ? void 0 : k.status) === "success" && k.data) {
75875
- const y = {
75876
- associated_gid: k.data.gid,
75877
- cta_url: k.data.cta_url,
75878
- description: k.data.description,
75879
- image_url: k.data.image_url,
75880
+ v.forEach((k) => {
75881
+ s.current.has(k) || (s.current.add(k), o(k).then((y) => {
75882
+ if ((y == null ? void 0 : y.status) === "success" && y.data) {
75883
+ const S = {
75884
+ associated_gid: y.data.gid,
75885
+ cta_url: y.data.cta_url,
75886
+ description: y.data.description,
75887
+ image_url: y.data.image_url,
75880
75888
  indices: null,
75881
- recommendations_count: k.data.recommendations_count,
75882
- role: k.data.role,
75883
- title: k.data.title
75889
+ recommendations_count: y.data.recommendations_count,
75890
+ role: y.data.role,
75891
+ title: y.data.title
75884
75892
  };
75885
- l.current.set(b, y), n.getEditorState().read(() => {
75886
- const { embeds: S } = U5(
75893
+ l.current.set(k, S), n.getEditorState().read(() => {
75894
+ const { embeds: C } = U5(
75887
75895
  Ve(),
75888
75896
  l.current
75889
- ), C = e.embeddables.filter(
75890
- (T) => T.role === "profile"
75897
+ ), T = e.embeddables.filter(
75898
+ (A) => A.role === "profile"
75891
75899
  );
75892
75900
  a.current = !0, t({
75893
75901
  ...e,
75894
75902
  body: h,
75895
- embeddables: [...S, ...C]
75903
+ embeddables: [...C, ...T]
75896
75904
  });
75897
75905
  });
75898
75906
  }
75899
- }).catch((k) => {
75900
- console.error("Failed to fetch link metadata:", k);
75907
+ }).catch((y) => {
75908
+ console.error("Failed to fetch link metadata:", y);
75901
75909
  }));
75902
- }), s.current.forEach((b) => {
75903
- g.has(b) || (s.current.delete(b), l.current.delete(b));
75910
+ }), s.current.forEach((k) => {
75911
+ v.has(k) || (s.current.delete(k), l.current.delete(k));
75904
75912
  });
75905
- const v = e.embeddables.filter((b) => b.role === "profile");
75913
+ const b = e.embeddables.filter((k) => k.role === "profile");
75906
75914
  i.current = h, a.current = !0, c = !0, t({
75907
75915
  ...e,
75908
75916
  body: h,
75909
- embeddables: [...m, ...v]
75917
+ embeddables: [...g, ...b]
75910
75918
  }), setTimeout(() => {
75911
75919
  c = !1;
75912
75920
  }, 0);
@@ -88768,6 +88776,7 @@ export {
88768
88776
  h4 as MobileLayout,
88769
88777
  Fge as ModalGallery,
88770
88778
  pAe as NPEAggregator,
88779
+ kP as PasswordField,
88771
88780
  zMe as PasswordForgotten,
88772
88781
  FMe as PasswordReset,
88773
88782
  px as PointOfInterest,
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../Forms';
2
2
  import { OnSubmitFunction } from '../../Forms/Form/Form.types';
3
- export declare const getLoginFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>, onClick?: () => void) => WizardStepT;
3
+ export declare const getLoginFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>, onClick?: () => void) => WizardStepT;
@@ -1,6 +1,6 @@
1
- import { FormField, InferFormData } from '../../Forms';
1
+ import { FormFieldType, InferFormData } from '../../Forms';
2
2
  import { OnFormSubmitType } from '../../Forms/Form/Form.types';
3
3
  import { FormErrorMessageObject } from '../../Forms/Form/utils/parseApiErrors';
4
4
  import { OnSuccessResponse } from '../Authentication.types';
5
- export declare const handleLogin: (data: OnFormSubmitType<InferFormData<FormField[]>>, onSuccess: (data: OnSuccessResponse) => void, setFormError: (error: string | null) => void, setState: (state: string | null) => void) => Promise<boolean | undefined>;
5
+ export declare const handleLogin: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, onSuccess: (data: OnSuccessResponse) => void, setFormError: (error: string | null) => void, setState: (state: string | null) => void) => Promise<boolean | undefined>;
6
6
  export declare const handleLoginErrorMassage: (error: unknown, setFormError: (error: string | null) => void, setFormFieldError?: (errorMassage: FormErrorMessageObject) => void, identifier?: string) => boolean;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../Forms';
2
2
  import { OnSubmitFunction } from '../../Forms/Form/Form.types';
3
- export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData } from '../../Forms';
1
+ import { FormFieldType, InferFormData } from '../../Forms';
2
2
  import { OnFormSubmitType } from '../../Forms/Form/Form.types';
3
- export declare const handleReset: (data: OnFormSubmitType<InferFormData<FormField[]>>, onSubmit: (userEmail: string, screen: string) => void, setFormError: (error: string | null) => void, submitter?: string) => Promise<boolean | undefined>;
3
+ export declare const handleReset: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, onSubmit: (userEmail: string, screen: string) => void, setFormError: (error: string | null) => void, submitter?: string) => Promise<boolean | undefined>;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../Forms';
2
2
  import { OnSubmitFunction } from '../../Forms/Form/Form.types';
3
- export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData } from '../../Forms';
1
+ import { FormFieldType, InferFormData } from '../../Forms';
2
2
  import { OnFormSubmitType } from '../../Forms/Form/Form.types';
3
- export declare const handleReset: (data: OnFormSubmitType<InferFormData<FormField[]>>, onSubmit: (userEmail: string) => void, setFormError: (error: string | null) => void, token?: string) => Promise<boolean | undefined>;
3
+ export declare const handleReset: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, onSubmit: (userEmail: string) => void, setFormError: (error: string | null) => void, token?: string) => Promise<boolean | undefined>;
@@ -1,3 +1,3 @@
1
1
  import { ReactNode } from 'react';
2
- import { FormField } from '../../../Forms';
3
- export declare const registrationFieldMap: Record<string, (field: FormField) => ReactNode | JSX.Element>;
2
+ import { FormFieldType } from '../../../Forms';
3
+ export declare const registrationFieldMap: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
@@ -1,3 +1,3 @@
1
1
  import { ReactNode } from 'react';
2
- import { FormField } from '../../../../Forms';
3
- export declare const registrationFormFieldMap: Record<string, (field: FormField) => ReactNode | JSX.Element>;
2
+ import { FormFieldType } from '../../../../Forms';
3
+ export declare const registrationFormFieldMap: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
3
- export declare const getAddressStep: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getAddressStep: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
2
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
3
3
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
4
4
  export declare const emailSchema: z.ZodString;
5
5
  export declare const passwordSchema: z.ZodEffects<z.ZodString, string, string>;
6
- export declare const getEmailStep: (onSubmit: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
6
+ export declare const getEmailStep: (onSubmit: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,6 +1,6 @@
1
- import { FormField, InferFormData } from '../../../Forms';
1
+ import { FormFieldType, InferFormData } from '../../../Forms';
2
2
  import { OnFormSubmitType } from '../../../Forms/Form/Form.types';
3
- export declare const handleRegistration: (data: OnFormSubmitType<InferFormData<FormField[]>>, trackingParams: Record<string, string | null>, onSuccess: (data: {
3
+ export declare const handleRegistration: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, trackingParams: Record<string, string | null>, onSuccess: (data: {
4
4
  access_token?: string | null;
5
5
  email_confirmation_required: boolean;
6
6
  }) => void, isSSOFlow: boolean | undefined, googleIdToken: string | null, invite_token?: string | null) => Promise<boolean | undefined>;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../Forms/Form/Form.types';
3
- export declare const getRegistrationFormFields: (ssoRegistration: boolean, onSubmit: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT[];
3
+ export declare const getRegistrationFormFields: (ssoRegistration: boolean, onSubmit: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT[];
@@ -1,3 +1,3 @@
1
1
  import { ReactNode } from 'react';
2
- import { FormField } from '../../../../Forms';
3
- export declare const verificationFormFieldMap: Record<string, (field: FormField) => ReactNode | JSX.Element>;
2
+ import { FormFieldType } from '../../../../Forms';
3
+ export declare const verificationFormFieldMap: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
3
- export declare const getGpsMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getGpsMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
3
- export declare const getInviteCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getInviteCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
3
- export declare const getPostalCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getPostalCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
3
- export declare const getSmsMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getSmsMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,3 +1,3 @@
1
- import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
1
+ import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
2
2
  import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
3
- export declare const getSmsCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
3
+ export declare const getSmsCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
@@ -1,8 +1,8 @@
1
1
  import { VerificationGPSResponse, VerificationSMSResponse } from '../../../../../../api/src/lib/core_v2';
2
- import { FormField, InferFormData } from '../../../Forms';
2
+ import { FormFieldType, InferFormData } from '../../../Forms';
3
3
  import { OnFormSubmitType } from '../../../Forms/Form/Form.types';
4
- export declare const handleSmsCodeRequest: (data: OnFormSubmitType<InferFormData<FormField[]>>, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean>;
5
- export declare const handleSmsCodeSend: (data: OnFormSubmitType<InferFormData<FormField[]>>, onSubmit: (data: VerificationSMSResponse) => void, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean | undefined>;
6
- export declare const handleInviteCodeSend: (data: OnFormSubmitType<InferFormData<FormField[]>>, onSubmit: (data: VerificationSMSResponse) => void, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean | undefined>;
4
+ export declare const handleSmsCodeRequest: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean>;
5
+ export declare const handleSmsCodeSend: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, onSubmit: (data: VerificationSMSResponse) => void, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean | undefined>;
6
+ export declare const handleInviteCodeSend: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>, onSubmit: (data: VerificationSMSResponse) => void, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean | undefined>;
7
7
  export declare const handlePostalCodeRequest: (onFetchProfile: () => Promise<void>, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean | "postalCodeRequested">;
8
8
  export declare const handleGpsVerification: (onSubmit: (data: VerificationGPSResponse) => void, setFormError: (error: string | null) => void, token: string | null) => Promise<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { VerificationMethods } from '../../../../../../api/src/lib/core_v2';
2
- import { FormField } from '../../../Forms';
2
+ import { FormFieldType } from '../../../Forms';
3
3
  export declare const VERIFICATION_POSSIBLE = 0;
4
4
  export declare const VERIFICATION_PENDING = 1;
5
5
  export declare const VERIFICATION_KEY_CODE = "code";
@@ -61,7 +61,7 @@ export declare const VERIFICATION_METHODS_FIELDS: {
61
61
  type: string;
62
62
  };
63
63
  };
64
- export declare const getVerificationMethods: (verificationMethods: VerificationMethods) => FormField[];
64
+ export declare const getVerificationMethods: (verificationMethods: VerificationMethods) => FormFieldType[];
65
65
  export declare const isPostcardRequested: (status: {
66
66
  is_postcard_verification_pending: boolean;
67
67
  }) => boolean;
@@ -1,10 +1,10 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { TGridSpacing } from '../../Grids/Grid/Grid.types';
3
- import { FormField } from '../Wizard/Wizard.types';
3
+ import { FormFieldType } from '../Wizard/Wizard.types';
4
4
  interface DynamicFormProps {
5
- fields: FormField[];
5
+ fields: FormFieldType[];
6
6
  formError?: string | null;
7
- formFieldMap?: Record<string, (field: FormField) => ReactNode>;
7
+ formFieldMap?: Record<string, (field: FormFieldType) => ReactNode>;
8
8
  spacing?: TGridSpacing;
9
9
  }
10
10
  export declare function DynamicForm({ fields, formError, formFieldMap, spacing, }: PropsWithChildren<DynamicFormProps>): import("react/jsx-runtime").JSX.Element;
@@ -3,17 +3,17 @@ import { Mode } from 'react-hook-form';
3
3
  import { ZodType } from 'zod';
4
4
  import { TGridSpacing } from '../../Grids/Grid/Grid.types';
5
5
  import { OnSubmitFunction } from '../Form/Form.types';
6
- import { FormField, InferFormData } from '../Wizard/Wizard.types';
6
+ import { FormFieldType, InferFormData } from '../Wizard/Wizard.types';
7
7
  interface StandaloneDynamicFormProps {
8
- fields: FormField[];
8
+ fields: FormFieldType[];
9
9
  formError?: string | null;
10
- formFieldMap?: Record<string, (field: FormField) => React.ReactNode>;
10
+ formFieldMap?: Record<string, (field: FormFieldType) => React.ReactNode>;
11
11
  formKey?: string;
12
12
  id: string;
13
- onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>;
13
+ onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>;
14
14
  spacing?: TGridSpacing;
15
15
  validationMode?: Mode;
16
- validationSchema?: ZodType<InferFormData<FormField[]>>;
16
+ validationSchema?: ZodType<InferFormData<FormFieldType[]>>;
17
17
  }
18
18
  export declare function StandaloneDynamicForm({ fields, formError, formFieldMap, formKey, id, onSubmit, spacing, validationMode, validationSchema, }: PropsWithChildren<StandaloneDynamicFormProps>): import("react/jsx-runtime").JSX.Element;
19
19
  export default StandaloneDynamicForm;
@@ -8,4 +8,5 @@ import { default as FormRadioButtonCluster } from './FormRadioButtonCluster';
8
8
  import { default as FormTextAreaInput } from './FormTextAreaInput';
9
9
  import { default as FormTextInput } from './FormTextInput';
10
10
  import { default as FormToggleInput } from './FormToggleInput';
11
- export { FormCheckboxInput, FormInputFieldSpecial, FormPasswordField, FormPhoneInput, FormRadioButton, FormRadioButtonCluster, FormTextAreaInput, FormTextInput, FormContentCreatorTile, FormToggleInput, };
11
+ import { default as PasswordField } from './PasswordField/PasswordField';
12
+ export { FormCheckboxInput, FormInputFieldSpecial, FormPasswordField, FormPhoneInput, FormRadioButton, FormRadioButtonCluster, FormTextAreaInput, FormTextInput, FormContentCreatorTile, FormToggleInput, PasswordField, };
@@ -27,7 +27,7 @@ export type InferFormData<T extends readonly unknown[]> = {
27
27
  [Field in OnlyStrictFields<T> as Field['name']]: FieldValueMap[Field['type']];
28
28
  };
29
29
  type StepType = 'text' | 'submit' | 'slot' | 'selectInput' | 'formHeader' | 'button' | 'password' | 'genderSelector' | 'codeField' | 'tileButton' | 'nameAbbr' | 'toggle' | 'phoneInput';
30
- export type StepField = {
30
+ export type StepFieldType = {
31
31
  id: string;
32
32
  layout?: {
33
33
  desktop?: GridItemProps['desktop'];
@@ -36,79 +36,79 @@ export type StepField = {
36
36
  };
37
37
  type: StepType;
38
38
  };
39
- export type TextField = StepField & FormTextInputProps & {
39
+ export type TextFieldType = StepFieldType & FormTextInputProps & {
40
40
  type: 'text';
41
41
  };
42
- export type FormHeaderField = StepField & {
42
+ export type FormHeaderFieldType = StepFieldType & {
43
43
  fieldConfig: FormHeaderProps;
44
44
  type: 'formHeader';
45
45
  };
46
- export type GenderSelectorField = StepField & FormGenderSelectorProps & {
46
+ export type GenderSelectorFieldType = StepFieldType & FormGenderSelectorProps & {
47
47
  type: 'genderSelector';
48
48
  };
49
- export type SelectInputField = StepField & {
49
+ export type SelectInputFieldType = StepFieldType & {
50
50
  fieldConfig: FormSelectInputProps;
51
51
  type: 'selectInput';
52
52
  };
53
- export type PhoneInputField = StepField & {
53
+ export type PhoneInputFieldType = StepFieldType & {
54
54
  fieldConfig: FormPhoneInputProps;
55
55
  type: 'phoneInput';
56
56
  };
57
- export type ContentCreatorTileField = StepField & {
57
+ export type ContentCreatorTileFieldType = StepFieldType & {
58
58
  fieldConfig: Omit<FormContentCreatorTileProps, 'selected'>;
59
59
  type: 'tileButton';
60
60
  };
61
- export type ToggleField = StepField & FormToggleInputProps & {
61
+ export type ToggleFieldType = StepFieldType & FormToggleInputProps & {
62
62
  type: 'toggle';
63
63
  };
64
- export type ButtonField = StepField & {
64
+ export type ButtonFieldType = StepFieldType & {
65
65
  fieldConfig: FormButtonProps;
66
66
  type: 'button';
67
67
  };
68
- export type PasswordField = StepField & FormPasswordFieldProps & {
68
+ export type PasswordFieldType = StepFieldType & FormPasswordFieldProps & {
69
69
  type: 'password';
70
70
  };
71
- export type NameAbbreviationField = StepField & FormNameAbbreviationProps & {
71
+ export type NameAbbreviationFieldType = StepFieldType & FormNameAbbreviationProps & {
72
72
  type: 'nameAbbr';
73
73
  };
74
- export type SubmitField = StepField & {
74
+ export type SubmitFieldType = StepFieldType & {
75
75
  fieldConfig?: {
76
76
  label?: string;
77
77
  };
78
78
  type: 'submit';
79
79
  };
80
- export type CodeField = StepField & {
80
+ export type CodeFieldType = StepFieldType & {
81
81
  fieldConfig: FormCodeInputProps;
82
82
  type: 'codeField';
83
83
  };
84
- export type SlotField = StepField & {
84
+ export type SlotFieldType = StepFieldType & {
85
85
  render: ({ key }: {
86
86
  key: string;
87
87
  }) => ReactNode;
88
88
  type: 'slot';
89
89
  };
90
- export type FormField = TextField | FormHeaderField | GenderSelectorField | SelectInputField | PasswordField | ToggleField | ButtonField | NameAbbreviationField | ContentCreatorTileField | SubmitField | CodeField | SlotField | PhoneInputField;
90
+ export type FormFieldType = TextFieldType | FormHeaderFieldType | GenderSelectorFieldType | SelectInputFieldType | PasswordFieldType | ToggleFieldType | ButtonFieldType | NameAbbreviationFieldType | ContentCreatorTileFieldType | SubmitFieldType | CodeFieldType | SlotFieldType | PhoneInputFieldType;
91
91
  export type WizardStepT = {
92
92
  canGoBack?: boolean;
93
93
  canGoNext?: boolean;
94
- fields: FormField[];
94
+ fields: FormFieldType[];
95
95
  formError?: WizardProps['formError'];
96
- formFieldMap?: Record<string, (field: FormField) => ReactNode | JSX.Element>;
96
+ formFieldMap?: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
97
97
  formKey?: string;
98
98
  id: string;
99
- onSubmit?: FormProps<InferFormData<FormField[]>>['onSubmit'];
99
+ onSubmit?: FormProps<InferFormData<FormFieldType[]>>['onSubmit'];
100
100
  pageViewtracking?: {
101
101
  name: SnowplowTrackEventMap['page_view']['name'];
102
102
  section?: PageSection;
103
103
  };
104
104
  spacing?: TGridSpacing;
105
- validationMode?: FormProps<InferFormData<FormField[]>>['validationMode'];
106
- validationSchema?: FormProps<InferFormData<FormField[]>>['validationSchema'];
105
+ validationMode?: FormProps<InferFormData<FormFieldType[]>>['validationMode'];
106
+ validationSchema?: FormProps<InferFormData<FormFieldType[]>>['validationSchema'];
107
107
  };
108
108
  export type WizardProps = {
109
109
  excludedSteps?: WizardStepT['id'][];
110
110
  formError?: string | null;
111
- formFieldMap?: Record<string, (field: FormField) => ReactNode | JSX.Element>;
111
+ formFieldMap?: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
112
112
  formWrapper?: (props: ReactNode) => ReactNode;
113
113
  id: string;
114
114
  initialStep?: number | WizardStepT['id'];
@@ -1,6 +1,6 @@
1
1
  import { UseFormReturn } from 'react-hook-form';
2
2
  import { OnFormSubmitType } from '../Form/Form.types';
3
- import { FormField, InferFormData, WizardStepT } from './Wizard.types';
3
+ import { FormFieldType, InferFormData, WizardStepT } from './Wizard.types';
4
4
  type TWizardContext = {
5
5
  currentStep: number;
6
6
  currentStepData: WizardStepT;
@@ -8,7 +8,7 @@ type TWizardContext = {
8
8
  formMethods: UseFormReturn | null;
9
9
  goToStep: (stepId: string, prevStepId?: string) => void;
10
10
  next: () => void;
11
- onSubmitStep: (data: OnFormSubmitType<InferFormData<FormField[]>>) => Promise<boolean | undefined>;
11
+ onSubmitStep: (data: OnFormSubmitType<InferFormData<FormFieldType[]>>) => Promise<boolean | undefined>;
12
12
  prevStep: string;
13
13
  previous: () => void;
14
14
  setFieldErrors: (errors: Record<string, string | string[]> | ((prev: Record<string, string | string[]>) => Record<string, string | string[]>)) => void;
@@ -3,7 +3,7 @@ export declare const useWizard: () => {
3
3
  currentStepData: import('./Wizard.types').WizardStepT;
4
4
  goToStep: (stepId: string, prevStepId?: string) => void;
5
5
  next: () => void;
6
- onSubmitStep: (data: import('../Form/Form.types').OnFormSubmitType<import('./Wizard.types').InferFormData<import('./Wizard.types').FormField[]>>) => Promise<boolean | undefined>;
6
+ onSubmitStep: (data: import('../Form/Form.types').OnFormSubmitType<import('./Wizard.types').InferFormData<import('./Wizard.types').FormFieldType[]>>) => Promise<boolean | undefined>;
7
7
  prevStep: string;
8
8
  previous: () => void;
9
9
  totalSteps: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "4.11.0-development.4",
3
+ "version": "4.11.0-development.6",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",