@goodhood-web/nebenan-base 4.11.0-development.1 → 4.11.0-development.10
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.js +99 -96
- package/index.mjs +15853 -14977
- package/lib/Authentication/LoginForm/LoginFormFields.d.ts +2 -2
- package/lib/Authentication/LoginForm/network.d.ts +2 -2
- package/lib/Authentication/PasswordForgotten/PasswordForgottenFormFields.d.ts +2 -2
- package/lib/Authentication/PasswordForgotten/network.d.ts +2 -2
- package/lib/Authentication/PasswordReset/PasswordResetFormFields.d.ts +2 -2
- package/lib/Authentication/PasswordReset/network.d.ts +2 -2
- package/lib/Authentication/Registration/FieldMappings/FieldMappings.d.ts +2 -2
- package/lib/Authentication/Registration/RegistrationForm/FieldMappings/FieldMappings.d.ts +2 -2
- package/lib/Authentication/Registration/RegistrationForm/Steps/Address.d.ts +2 -2
- package/lib/Authentication/Registration/RegistrationForm/Steps/Email.d.ts +2 -2
- package/lib/Authentication/Registration/RegistrationForm/network.d.ts +2 -2
- package/lib/Authentication/Registration/RegistrationForm/utils.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/FieldMappings/FieldMappings.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/Steps/Gps.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/Steps/InviteCode.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/Steps/PostalCode.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/Steps/Sms.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/Steps/SmsCode.d.ts +2 -2
- package/lib/Authentication/Registration/VerificationForm/network.d.ts +4 -4
- package/lib/Authentication/Registration/VerificationForm/utils.d.ts +2 -2
- package/lib/Feed/FeedItem/Replies/ReplyBubble/utils.d.ts +1 -1
- package/lib/Feed/FeedItem/Replies/ReplySection/network.d.ts +1 -1
- package/lib/Feed/FeedItem/Replies/ReplySection/utils.d.ts +1 -1
- package/lib/Forms/DynamicForm/DynamicForm.d.ts +3 -3
- package/lib/Forms/DynamicForm/StandaloneDynamicForm.d.ts +5 -5
- package/lib/Forms/Fields/index.d.ts +2 -1
- package/lib/Forms/Wizard/Wizard.types.d.ts +21 -21
- package/lib/Forms/Wizard/WizardContext.d.ts +2 -2
- package/lib/Forms/Wizard/useWizard.d.ts +1 -1
- package/lib/RichTextArea/components/POI/POIRecommendation.types.d.ts +4 -1
- package/lib/RichTextArea/components/POI/Store/poi.d.ts +38 -3
- package/lib/RichTextArea/components/POI/network.d.ts +19 -0
- package/lib/RichTextArea/components/POI/utils.d.ts +6 -2
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getLoginFormFields: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getLoginFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>, onClick?: () => void) => WizardStepT;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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<
|
|
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 {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData } from '../../Forms';
|
|
2
2
|
import { OnFormSubmitType } from '../../Forms/Form/Form.types';
|
|
3
|
-
export declare const handleReset: (data: OnFormSubmitType<InferFormData<
|
|
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 {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getPasswordForgottenFormFields: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData } from '../../Forms';
|
|
2
2
|
import { OnFormSubmitType } from '../../Forms/Form/Form.types';
|
|
3
|
-
export declare const handleReset: (data: OnFormSubmitType<InferFormData<
|
|
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 {
|
|
3
|
-
export declare const registrationFieldMap: Record<string, (field:
|
|
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 {
|
|
3
|
-
export declare const registrationFormFieldMap: Record<string, (field:
|
|
2
|
+
import { FormFieldType } from '../../../../Forms';
|
|
3
|
+
export declare const registrationFormFieldMap: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getAddressStep: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getAddressStep: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
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<
|
|
6
|
+
export declare const getEmailStep: (onSubmit: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData } from '../../../Forms';
|
|
2
2
|
import { OnFormSubmitType } from '../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const handleRegistration: (data: OnFormSubmitType<InferFormData<
|
|
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 {
|
|
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<
|
|
3
|
+
export declare const getRegistrationFormFields: (ssoRegistration: boolean, onSubmit: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const verificationFormFieldMap: Record<string, (field:
|
|
2
|
+
import { FormFieldType } from '../../../../Forms';
|
|
3
|
+
export declare const verificationFormFieldMap: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getGpsMethod: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getGpsMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getInviteCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getInviteCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getPostalCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getPostalCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getSmsMethod: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
3
|
+
export declare const getSmsMethod: (onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>) => WizardStepT;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormFieldType, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
2
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
3
|
-
export declare const getSmsCodeMethod: (onSubmit?: OnSubmitFunction<InferFormData<
|
|
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 {
|
|
2
|
+
import { FormFieldType, InferFormData } from '../../../Forms';
|
|
3
3
|
import { OnFormSubmitType } from '../../../Forms/Form/Form.types';
|
|
4
|
-
export declare const handleSmsCodeRequest: (data: OnFormSubmitType<InferFormData<
|
|
5
|
-
export declare const handleSmsCodeSend: (data: OnFormSubmitType<InferFormData<
|
|
6
|
-
export declare const handleInviteCodeSend: (data: OnFormSubmitType<InferFormData<
|
|
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 {
|
|
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) =>
|
|
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,4 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ReplyBubbleProps } from './ReplyBubble.types';
|
|
3
|
-
export declare const parseReplyContent: (reply?: ReplyBubbleProps["reply"]) => ReactNode[] |
|
|
3
|
+
export declare const parseReplyContent: (reply?: ReplyBubbleProps["reply"]) => ReactNode[] | undefined;
|
|
4
4
|
export declare const renderEmbeddables: (reply: ReplyBubbleProps["reply"]) => (import("react/jsx-runtime").JSX.Element | null)[] | null;
|
|
@@ -6,7 +6,7 @@ type PostReplyProps = {
|
|
|
6
6
|
export declare const postReply: ({ postId, reply }: PostReplyProps) => Promise<{
|
|
7
7
|
id: number;
|
|
8
8
|
parent_hood_message_id: number;
|
|
9
|
-
body
|
|
9
|
+
body?: string | null;
|
|
10
10
|
author_details?: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_AuthorDetails"] | null;
|
|
11
11
|
created_at: string;
|
|
12
12
|
updated_at?: string | null;
|
|
@@ -10,7 +10,7 @@ type SlicedRepliesProps = {
|
|
|
10
10
|
export declare const slicedReplies: ({ expanded, limit, replies }: SlicedRepliesProps) => {
|
|
11
11
|
id: number;
|
|
12
12
|
parent_hood_message_id: number;
|
|
13
|
-
body
|
|
13
|
+
body?: string | null;
|
|
14
14
|
author_details?: components["schemas"]["Core_V3_AuthorDetails"] | null;
|
|
15
15
|
created_at: string;
|
|
16
16
|
updated_at?: string | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { TGridSpacing } from '../../Grids/Grid/Grid.types';
|
|
3
|
-
import {
|
|
3
|
+
import { FormFieldType } from '../Wizard/Wizard.types';
|
|
4
4
|
interface DynamicFormProps {
|
|
5
|
-
fields:
|
|
5
|
+
fields: FormFieldType[];
|
|
6
6
|
formError?: string | null;
|
|
7
|
-
formFieldMap?: Record<string, (field:
|
|
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 {
|
|
6
|
+
import { FormFieldType, InferFormData } from '../Wizard/Wizard.types';
|
|
7
7
|
interface StandaloneDynamicFormProps {
|
|
8
|
-
fields:
|
|
8
|
+
fields: FormFieldType[];
|
|
9
9
|
formError?: string | null;
|
|
10
|
-
formFieldMap?: Record<string, (field:
|
|
10
|
+
formFieldMap?: Record<string, (field: FormFieldType) => React.ReactNode>;
|
|
11
11
|
formKey?: string;
|
|
12
12
|
id: string;
|
|
13
|
-
onSubmit?: OnSubmitFunction<InferFormData<
|
|
13
|
+
onSubmit?: OnSubmitFunction<InferFormData<FormFieldType[]>>;
|
|
14
14
|
spacing?: TGridSpacing;
|
|
15
15
|
validationMode?: Mode;
|
|
16
|
-
validationSchema?: ZodType<InferFormData<
|
|
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
|
-
|
|
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
|
|
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
|
|
39
|
+
export type TextFieldType = StepFieldType & FormTextInputProps & {
|
|
40
40
|
type: 'text';
|
|
41
41
|
};
|
|
42
|
-
export type
|
|
42
|
+
export type FormHeaderFieldType = StepFieldType & {
|
|
43
43
|
fieldConfig: FormHeaderProps;
|
|
44
44
|
type: 'formHeader';
|
|
45
45
|
};
|
|
46
|
-
export type
|
|
46
|
+
export type GenderSelectorFieldType = StepFieldType & FormGenderSelectorProps & {
|
|
47
47
|
type: 'genderSelector';
|
|
48
48
|
};
|
|
49
|
-
export type
|
|
49
|
+
export type SelectInputFieldType = StepFieldType & {
|
|
50
50
|
fieldConfig: FormSelectInputProps;
|
|
51
51
|
type: 'selectInput';
|
|
52
52
|
};
|
|
53
|
-
export type
|
|
53
|
+
export type PhoneInputFieldType = StepFieldType & {
|
|
54
54
|
fieldConfig: FormPhoneInputProps;
|
|
55
55
|
type: 'phoneInput';
|
|
56
56
|
};
|
|
57
|
-
export type
|
|
57
|
+
export type ContentCreatorTileFieldType = StepFieldType & {
|
|
58
58
|
fieldConfig: Omit<FormContentCreatorTileProps, 'selected'>;
|
|
59
59
|
type: 'tileButton';
|
|
60
60
|
};
|
|
61
|
-
export type
|
|
61
|
+
export type ToggleFieldType = StepFieldType & FormToggleInputProps & {
|
|
62
62
|
type: 'toggle';
|
|
63
63
|
};
|
|
64
|
-
export type
|
|
64
|
+
export type ButtonFieldType = StepFieldType & {
|
|
65
65
|
fieldConfig: FormButtonProps;
|
|
66
66
|
type: 'button';
|
|
67
67
|
};
|
|
68
|
-
export type
|
|
68
|
+
export type PasswordFieldType = StepFieldType & FormPasswordFieldProps & {
|
|
69
69
|
type: 'password';
|
|
70
70
|
};
|
|
71
|
-
export type
|
|
71
|
+
export type NameAbbreviationFieldType = StepFieldType & FormNameAbbreviationProps & {
|
|
72
72
|
type: 'nameAbbr';
|
|
73
73
|
};
|
|
74
|
-
export type
|
|
74
|
+
export type SubmitFieldType = StepFieldType & {
|
|
75
75
|
fieldConfig?: {
|
|
76
76
|
label?: string;
|
|
77
77
|
};
|
|
78
78
|
type: 'submit';
|
|
79
79
|
};
|
|
80
|
-
export type
|
|
80
|
+
export type CodeFieldType = StepFieldType & {
|
|
81
81
|
fieldConfig: FormCodeInputProps;
|
|
82
82
|
type: 'codeField';
|
|
83
83
|
};
|
|
84
|
-
export type
|
|
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
|
|
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:
|
|
94
|
+
fields: FormFieldType[];
|
|
95
95
|
formError?: WizardProps['formError'];
|
|
96
|
-
formFieldMap?: Record<string, (field:
|
|
96
|
+
formFieldMap?: Record<string, (field: FormFieldType) => ReactNode | JSX.Element>;
|
|
97
97
|
formKey?: string;
|
|
98
98
|
id: string;
|
|
99
|
-
onSubmit?: FormProps<InferFormData<
|
|
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<
|
|
106
|
-
validationSchema?: FormProps<InferFormData<
|
|
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:
|
|
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 {
|
|
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<
|
|
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').
|
|
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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { components } from '../../../../../../api/src/lib/core';
|
|
1
2
|
import { Poi } from '../../../../../../api/src/lib/core_v2';
|
|
2
3
|
import { SearchableListProps } from '../../../SearchableList/SearchableList.types';
|
|
3
4
|
export type POIRecommendationProps = {
|
|
@@ -15,6 +16,8 @@ export type POIRecommendationProps = {
|
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
18
|
export type POICategory = {
|
|
18
|
-
|
|
19
|
+
id?: string;
|
|
20
|
+
key?: string;
|
|
19
21
|
label: string;
|
|
20
22
|
};
|
|
23
|
+
export type V3BusinessProfile = components['schemas']['Core_V3_NOPE_Profile'];
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const uploadedPoi: import('jotai').PrimitiveAtom<{
|
|
2
|
+
id: string;
|
|
3
|
+
categories: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
4
|
+
gid: string;
|
|
5
|
+
kind: "business" | "organization";
|
|
6
|
+
legacy_gid: string;
|
|
7
|
+
recommendations_count: number;
|
|
8
|
+
subcategories: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
9
|
+
supporter: boolean;
|
|
10
|
+
title?: string | null;
|
|
11
|
+
city?: string | null;
|
|
12
|
+
house_number?: string | null;
|
|
13
|
+
location?: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_Point"] | null;
|
|
14
|
+
street?: string | null;
|
|
15
|
+
zip_code?: string | null;
|
|
16
|
+
banner_url?: string | null;
|
|
17
|
+
logo_url?: string | null;
|
|
18
|
+
representative_image_url?: string | null;
|
|
19
|
+
} | null> & {
|
|
20
|
+
init: {
|
|
21
|
+
id: string;
|
|
22
|
+
categories: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
23
|
+
gid: string;
|
|
24
|
+
kind: "business" | "organization";
|
|
25
|
+
legacy_gid: string;
|
|
26
|
+
recommendations_count: number;
|
|
27
|
+
subcategories: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
28
|
+
supporter: boolean;
|
|
29
|
+
title?: string | null;
|
|
30
|
+
city?: string | null;
|
|
31
|
+
house_number?: string | null;
|
|
32
|
+
location?: import('../../../../../../../api/src/lib/core').components["schemas"]["Core_V3_Point"] | null;
|
|
33
|
+
street?: string | null;
|
|
34
|
+
zip_code?: string | null;
|
|
35
|
+
banner_url?: string | null;
|
|
36
|
+
logo_url?: string | null;
|
|
37
|
+
representative_image_url?: string | null;
|
|
38
|
+
} | null;
|
|
4
39
|
};
|
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
export declare const fetchBusinessProfile: (id: number) => Promise<import('../../../../../../api/src/lib/types/newsFeeds').LinkedBusinessProfile>;
|
|
2
|
+
export declare const fetchBusinessProfileV3: (uuid: string) => Promise<{
|
|
3
|
+
id: string;
|
|
4
|
+
categories: import('../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
5
|
+
gid: string;
|
|
6
|
+
kind: "business" | "organization";
|
|
7
|
+
legacy_gid: string;
|
|
8
|
+
recommendations_count: number;
|
|
9
|
+
subcategories: import('../../../../../../api/src/lib/core').components["schemas"]["Core_V3_NOPE_Category_List"];
|
|
10
|
+
supporter: boolean;
|
|
11
|
+
title?: string | null;
|
|
12
|
+
city?: string | null;
|
|
13
|
+
house_number?: string | null;
|
|
14
|
+
location?: import('../../../../../../api/src/lib/core').components["schemas"]["Core_V3_Point"] | null;
|
|
15
|
+
street?: string | null;
|
|
16
|
+
zip_code?: string | null;
|
|
17
|
+
banner_url?: string | null;
|
|
18
|
+
logo_url?: string | null;
|
|
19
|
+
representative_image_url?: string | null;
|
|
20
|
+
} | undefined>;
|
|
2
21
|
export declare const fetchProfile: () => Promise<import('../../../../../../api/src/lib/core_v2').ProfileResponse>;
|
|
3
22
|
export declare const fetchPOIs: (searchQuery: string, purpose: string) => Promise<import('../../../../../../api/src/lib/core_v2').Poi[]>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Poi } from '../../../../../../api/src/lib/core_v2';
|
|
2
2
|
import { ProfileResponse } from '../../../../../../api/src/lib/core_v2/types';
|
|
3
3
|
import { LinkedBusinessProfile } from '../../../../../../api/src/lib/types/newsFeeds';
|
|
4
|
-
import { POICategory } from './POIRecommendation.types';
|
|
5
|
-
export declare const formatAddressFull: (item: Poi | LinkedBusinessProfile, joiner?: string) => string;
|
|
4
|
+
import { POICategory, V3BusinessProfile } from './POIRecommendation.types';
|
|
5
|
+
export declare const formatAddressFull: (item: Poi | LinkedBusinessProfile | V3BusinessProfile, joiner?: string) => string;
|
|
6
6
|
export declare const getLikedProp: (object_type: string) => "recommends_unclaimed_profile_ids" | "recommends_organization_profile_ids" | "recommends_business_profile_ids" | undefined;
|
|
7
7
|
export declare const hasLiked: (profile: ProfileResponse, poi: Poi) => boolean;
|
|
8
8
|
export declare const getItemCategoryLabel: (categories_labels?: POICategory[], subcategories_labels?: POICategory[]) => string | null;
|
|
9
9
|
export declare const getPoiPlaceholderIconName: (type: string) => "business" | "special_place" | "organisation";
|
|
10
10
|
export declare const generateBadgeType: (badges: string[]) => "commercial_supporter" | "organization_supporter";
|
|
11
|
+
export declare const generateBadgeTypeV3: (kind: "business" | "organization") => "commercial_supporter" | "organization_supporter";
|
|
12
|
+
export declare const generateLocationGid: (value: Poi) => string;
|
|
13
|
+
export declare const extractPoiUuidFromAssociatedGid: (gid: string) => string | null;
|
|
14
|
+
export declare const parseKindType: (kind: V3BusinessProfile["kind"]) => "business" | "organisation";
|