@goodhood-web/nebenan-base 4.2.0 → 4.3.0-development.2
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.d.ts +3 -1
- package/index.js +102 -89
- package/index.mjs +13376 -13050
- package/lib/AttendeesModal/AttendeesModal.d.ts +3 -0
- package/lib/AttendeesModal/AttendeesModal.types.d.ts +4 -0
- package/lib/AttendeesModal/components/AttendeesList/AttendeesList.d.ts +3 -0
- package/lib/AttendeesModal/components/AttendeesList/AttendeesList.types.d.ts +8 -0
- package/lib/AttendeesModal/components/index.d.ts +2 -0
- package/lib/AttendeesModal/network.d.ts +4 -0
- package/lib/AttendeesModal/utils.d.ts +11 -0
- package/lib/Authentication/Registration/RegistrationForm/network.d.ts +1 -1
- package/lib/Authentication/Registration/utils.d.ts +1 -1
- package/lib/ContentCreator/validationSchemas/dynamicValidationSchema.d.ts +10 -10
- package/lib/ContentCreator/validationSchemas/eventSchema.d.ts +2 -2
- package/lib/ContentCreator/validationSchemas/marketplaceSchema.d.ts +2 -2
- package/lib/ContentCreator/validationSchemas/postSchema.d.ts +2 -2
- package/lib/ContentCreator/validationSchemas/recommendationSchema.d.ts +2 -2
- package/lib/ContentCreator/validationSchemas/searchSchema.d.ts +2 -2
- package/lib/Feed/FeedItem/Replies/ReplyReactions/network.d.ts +1 -0
- package/lib/Forms/DynamicForm/DynamicForm.d.ts +10 -3
- package/lib/Forms/DynamicForm/StandaloneDynamicForm.d.ts +19 -0
- package/lib/Forms/Form/utils/parseApiErrors.d.ts +2 -2
- package/lib/Forms/Wizard/Wizard.d.ts +1 -1
- package/lib/Forms/Wizard/WizardContext.d.ts +4 -0
- package/lib/Forms/index.d.ts +2 -1
- package/lib/InviteModal/InviteModal.d.ts +3 -0
- package/lib/InviteModal/InviteModal.types.d.ts +3 -0
- package/lib/InviteModal/components/InviteeList/InviteeList.d.ts +3 -0
- package/lib/InviteModal/components/InviteeList/InviteeList.types.d.ts +10 -0
- package/lib/InviteModal/components/InviteeList/netwrok.d.ts +1 -0
- package/lib/InviteModal/components/index.d.ts +2 -0
- package/lib/InviteModal/network.d.ts +4 -0
- package/lib/InviteModal/utils.d.ts +9 -0
- package/lib/RichTextArea/components/POI/POIRecommendation.d.ts +1 -1
- package/lib/RichTextArea/components/POI/POIRecommendation.types.d.ts +2 -3
- package/lib/RichTextArea/components/POI/Store/poi.d.ts +4 -0
- package/lib/RichTextArea/components/POI/components/Intro/Intro.d.ts +4 -0
- package/lib/RichTextArea/components/POI/components/Suggestions/Suggestions.d.ts +1 -1
- package/lib/RichTextArea/components/POI/components/Suggestions/Suggestions.types.d.ts +1 -6
- package/lib/SearchableList/SearchableList.d.ts +3 -0
- package/lib/SearchableList/SearchableList.types.d.ts +16 -0
- package/lib/SearchableList/components/Content/Content.d.ts +3 -0
- package/lib/SearchableList/components/Content/Content.types.d.ts +10 -0
- package/lib/SearchableList/components/Footer/Footer.d.ts +3 -0
- package/lib/SearchableList/components/Footer/Footer.types.d.ts +3 -0
- package/lib/SearchableList/components/Header/Header.d.ts +3 -0
- package/lib/SearchableList/components/Header/Header.types.d.ts +11 -0
- package/lib/SearchableList/components/Label/Label.d.ts +4 -0
- package/lib/SearchableList/components/SearchInput/SearchInput.d.ts +3 -0
- package/lib/SearchableList/components/SearchInput/SearchInput.types.d.ts +11 -0
- package/lib/utils/client.d.ts +5 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/lib/RichTextArea/components/POI/components/SheetComponents/SheetComponents.d.ts +0 -4
- package/lib/RichTextArea/components/POI/components/SheetComponents/SheetComponents.types.d.ts +0 -21
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NeighbourListItemProps } from '../../../../../../ui/src/lib/Molecules/ListItems/Neighbour/Neighbour.types';
|
|
2
|
+
type Attendee = NeighbourListItemProps & {
|
|
3
|
+
privateMessageUrl: string;
|
|
4
|
+
};
|
|
5
|
+
export interface AttendeeListProps {
|
|
6
|
+
attendees: Attendee[];
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const fetchAttendees: (postId: string, after: string | null) => Promise<{
|
|
2
|
+
page: import('../../../../api/src/lib/core').components["schemas"]["Core_V3_Participations_List"];
|
|
3
|
+
page_info: import('../../../../api/src/lib/core').components["schemas"]["PageInfo"];
|
|
4
|
+
} | undefined>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { components } from '../../../../api/src/lib/core';
|
|
2
|
+
import { AttendeesModalProps } from './AttendeesModal.types';
|
|
3
|
+
export declare const formatAttendeesList: (participationStatus: AttendeesModalProps["participationStatus"], list?: components["schemas"]["Core_V3_Participations_List"]) => {
|
|
4
|
+
address: string;
|
|
5
|
+
altText: string;
|
|
6
|
+
fullName: string;
|
|
7
|
+
imageUrl: string;
|
|
8
|
+
privateMessageUrl: string;
|
|
9
|
+
profileUrl: string;
|
|
10
|
+
userId: number;
|
|
11
|
+
}[];
|
|
@@ -3,4 +3,4 @@ import { OnFormSubmitType } from '../../../Forms/Form/Form.types';
|
|
|
3
3
|
export declare const handleRegistration: (data: OnFormSubmitType<InferFormData<FormField[]>>, trackingParams: Record<string, string | null>, onSuccess: (data: {
|
|
4
4
|
access_token: string | null;
|
|
5
5
|
email_confirmation_required: boolean;
|
|
6
|
-
}) => void,
|
|
6
|
+
}) => void, isSSOFlow: boolean | undefined, googleIdToken: string | null) => Promise<boolean | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormErrorMessageObject } from '../../Forms/Form/utils/parseApiErrors';
|
|
2
2
|
import { JwtPayload } from './Registration.types';
|
|
3
|
-
export declare const handleErrorMassage: (error: unknown, setFormError: (error: string | null) => void, setFormFieldError?: (errorMassage: FormErrorMessageObject) => void, identifier?: string) => boolean;
|
|
3
|
+
export declare const handleErrorMassage: (error: unknown, setFormError: (error: string | null) => void, setFormFieldError?: (errorMassage: FormErrorMessageObject) => void, identifier?: string, knownFields?: string[]) => boolean;
|
|
4
4
|
/**
|
|
5
5
|
* Safely extracts a specific claim from the decoded JWT payload,
|
|
6
6
|
* returning undefined if extraction fails.
|
|
@@ -101,7 +101,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
101
101
|
};
|
|
102
102
|
content_type: "event";
|
|
103
103
|
subject: string;
|
|
104
|
-
reach: "profile" | "
|
|
104
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
105
105
|
hood_group_id?: number | null | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
content: {
|
|
@@ -122,7 +122,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
122
122
|
};
|
|
123
123
|
content_type: "event";
|
|
124
124
|
subject: string;
|
|
125
|
-
reach: "profile" | "
|
|
125
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
126
126
|
hood_group_id?: number | null | undefined;
|
|
127
127
|
}>, z.ZodObject<{
|
|
128
128
|
content: z.ZodObject<{
|
|
@@ -226,7 +226,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
226
226
|
};
|
|
227
227
|
content_type: "marketplace";
|
|
228
228
|
subject: string;
|
|
229
|
-
reach: "profile" | "
|
|
229
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
230
230
|
hood_group_id?: number | null | undefined;
|
|
231
231
|
}, {
|
|
232
232
|
content: {
|
|
@@ -247,7 +247,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
247
247
|
};
|
|
248
248
|
content_type: "marketplace";
|
|
249
249
|
subject: string;
|
|
250
|
-
reach: "profile" | "
|
|
250
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
251
251
|
hood_group_id?: number | null | undefined;
|
|
252
252
|
}>, z.ZodObject<{
|
|
253
253
|
content: z.ZodObject<{
|
|
@@ -351,7 +351,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
351
351
|
};
|
|
352
352
|
content_type: "post";
|
|
353
353
|
subject: string;
|
|
354
|
-
reach: "profile" | "
|
|
354
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
355
355
|
hood_group_id?: number | null | undefined;
|
|
356
356
|
}, {
|
|
357
357
|
content: {
|
|
@@ -372,7 +372,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
372
372
|
};
|
|
373
373
|
content_type: "post";
|
|
374
374
|
subject: string;
|
|
375
|
-
reach: "profile" | "
|
|
375
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
376
376
|
hood_group_id?: number | null | undefined;
|
|
377
377
|
}>, z.ZodObject<{
|
|
378
378
|
content: z.ZodObject<{
|
|
@@ -476,7 +476,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
476
476
|
};
|
|
477
477
|
content_type: "recommendation";
|
|
478
478
|
subject: string;
|
|
479
|
-
reach: "profile" | "
|
|
479
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
480
480
|
hood_group_id?: number | null | undefined;
|
|
481
481
|
}, {
|
|
482
482
|
content: {
|
|
@@ -497,7 +497,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
497
497
|
};
|
|
498
498
|
content_type: "recommendation";
|
|
499
499
|
subject: string;
|
|
500
|
-
reach: "profile" | "
|
|
500
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
501
501
|
hood_group_id?: number | null | undefined;
|
|
502
502
|
}>, z.ZodObject<{
|
|
503
503
|
content: z.ZodObject<{
|
|
@@ -601,7 +601,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
601
601
|
};
|
|
602
602
|
content_type: "search";
|
|
603
603
|
subject: string;
|
|
604
|
-
reach: "profile" | "
|
|
604
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
605
605
|
hood_group_id?: number | null | undefined;
|
|
606
606
|
}, {
|
|
607
607
|
content: {
|
|
@@ -622,7 +622,7 @@ export declare const contentValidationSchema: z.ZodDiscriminatedUnion<"content_t
|
|
|
622
622
|
};
|
|
623
623
|
content_type: "search";
|
|
624
624
|
subject: string;
|
|
625
|
-
reach: "profile" | "
|
|
625
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
626
626
|
hood_group_id?: number | null | undefined;
|
|
627
627
|
}>]>;
|
|
628
628
|
export type ContentFormData = z.infer<typeof contentValidationSchema>;
|
|
@@ -101,7 +101,7 @@ export declare const eventValidationSchema: z.ZodObject<{
|
|
|
101
101
|
};
|
|
102
102
|
content_type: "event";
|
|
103
103
|
subject: string;
|
|
104
|
-
reach: "profile" | "
|
|
104
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
105
105
|
hood_group_id?: number | null | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
content: {
|
|
@@ -122,6 +122,6 @@ export declare const eventValidationSchema: z.ZodObject<{
|
|
|
122
122
|
};
|
|
123
123
|
content_type: "event";
|
|
124
124
|
subject: string;
|
|
125
|
-
reach: "profile" | "
|
|
125
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
126
126
|
hood_group_id?: number | null | undefined;
|
|
127
127
|
}>;
|
|
@@ -101,7 +101,7 @@ export declare const marketplaceValidationSchema: z.ZodObject<{
|
|
|
101
101
|
};
|
|
102
102
|
content_type: "marketplace";
|
|
103
103
|
subject: string;
|
|
104
|
-
reach: "profile" | "
|
|
104
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
105
105
|
hood_group_id?: number | null | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
content: {
|
|
@@ -122,6 +122,6 @@ export declare const marketplaceValidationSchema: z.ZodObject<{
|
|
|
122
122
|
};
|
|
123
123
|
content_type: "marketplace";
|
|
124
124
|
subject: string;
|
|
125
|
-
reach: "profile" | "
|
|
125
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
126
126
|
hood_group_id?: number | null | undefined;
|
|
127
127
|
}>;
|
|
@@ -101,7 +101,7 @@ export declare const postValidationSchema: z.ZodObject<{
|
|
|
101
101
|
};
|
|
102
102
|
content_type: "post";
|
|
103
103
|
subject: string;
|
|
104
|
-
reach: "profile" | "
|
|
104
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
105
105
|
hood_group_id?: number | null | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
content: {
|
|
@@ -122,6 +122,6 @@ export declare const postValidationSchema: z.ZodObject<{
|
|
|
122
122
|
};
|
|
123
123
|
content_type: "post";
|
|
124
124
|
subject: string;
|
|
125
|
-
reach: "profile" | "
|
|
125
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
126
126
|
hood_group_id?: number | null | undefined;
|
|
127
127
|
}>;
|
|
@@ -101,7 +101,7 @@ export declare const recommendationValidationSchema: z.ZodObject<{
|
|
|
101
101
|
};
|
|
102
102
|
content_type: "recommendation";
|
|
103
103
|
subject: string;
|
|
104
|
-
reach: "profile" | "
|
|
104
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
105
105
|
hood_group_id?: number | null | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
content: {
|
|
@@ -122,6 +122,6 @@ export declare const recommendationValidationSchema: z.ZodObject<{
|
|
|
122
122
|
};
|
|
123
123
|
content_type: "recommendation";
|
|
124
124
|
subject: string;
|
|
125
|
-
reach: "profile" | "
|
|
125
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
126
126
|
hood_group_id?: number | null | undefined;
|
|
127
127
|
}>;
|
|
@@ -101,7 +101,7 @@ export declare const searchValidationSchema: z.ZodObject<{
|
|
|
101
101
|
};
|
|
102
102
|
content_type: "search";
|
|
103
103
|
subject: string;
|
|
104
|
-
reach: "profile" | "
|
|
104
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
105
105
|
hood_group_id?: number | null | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
content: {
|
|
@@ -122,6 +122,6 @@ export declare const searchValidationSchema: z.ZodObject<{
|
|
|
122
122
|
};
|
|
123
123
|
content_type: "search";
|
|
124
124
|
subject: string;
|
|
125
|
-
reach: "profile" | "
|
|
125
|
+
reach: "profile" | "public" | "hood" | "extended";
|
|
126
126
|
hood_group_id?: number | null | undefined;
|
|
127
127
|
}>;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { TGridSpacing } from '../../Grids/Grid/Grid.types';
|
|
3
|
+
import { FormField } from '../Wizard/Wizard.types';
|
|
4
|
+
interface DynamicFormProps {
|
|
5
|
+
fields: FormField[];
|
|
6
|
+
formError?: string | null;
|
|
7
|
+
formFieldMap?: Record<string, (field: FormField) => ReactNode>;
|
|
8
|
+
spacing?: TGridSpacing;
|
|
9
|
+
}
|
|
10
|
+
export declare function DynamicForm({ fields, formError, formFieldMap, spacing, }: PropsWithChildren<DynamicFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
11
|
export default DynamicForm;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Mode } from 'react-hook-form';
|
|
3
|
+
import { ZodType } from 'zod';
|
|
4
|
+
import { TGridSpacing } from '../../Grids/Grid/Grid.types';
|
|
5
|
+
import { OnSubmitFunction } from '../Form/Form.types';
|
|
6
|
+
import { FormField, InferFormData } from '../Wizard/Wizard.types';
|
|
7
|
+
interface StandaloneDynamicFormProps {
|
|
8
|
+
fields: FormField[];
|
|
9
|
+
formError?: string | null;
|
|
10
|
+
formFieldMap?: Record<string, (field: FormField) => React.ReactNode>;
|
|
11
|
+
formKey?: string;
|
|
12
|
+
id: string;
|
|
13
|
+
onSubmit?: OnSubmitFunction<InferFormData<FormField[]>>;
|
|
14
|
+
spacing?: TGridSpacing;
|
|
15
|
+
validationMode?: Mode;
|
|
16
|
+
validationSchema?: ZodType<InferFormData<FormField[]>>;
|
|
17
|
+
}
|
|
18
|
+
export declare function StandaloneDynamicForm({ fields, formError, formFieldMap, formKey, id, onSubmit, spacing, validationMode, validationSchema, }: PropsWithChildren<StandaloneDynamicFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default StandaloneDynamicForm;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface FormErrorMessageObject {
|
|
2
2
|
field: string | null;
|
|
3
|
-
message: string;
|
|
3
|
+
message: string | string[];
|
|
4
4
|
}
|
|
5
|
-
export declare function parseAndSetFormErrors(error: any, fieldId?: string): FormErrorMessageObject | string;
|
|
5
|
+
export declare function parseAndSetFormErrors(error: any, fieldId?: string, knownFields?: string[]): FormErrorMessageObject | FormErrorMessageObject[] | string | string[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { WizardProps } from './Wizard.types';
|
|
3
|
-
export default function Wizard({ excludedSteps,
|
|
3
|
+
export default function Wizard({ excludedSteps, formFieldMap, formWrapper, id, initialStep, onStepChange, steps, }: PropsWithChildren<WizardProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
1
2
|
import { OnFormSubmitType } from '../Form/Form.types';
|
|
2
3
|
import { FormField, InferFormData, WizardStepT } from './Wizard.types';
|
|
3
4
|
type TWizardContext = {
|
|
4
5
|
currentStep: number;
|
|
5
6
|
currentStepData: WizardStepT;
|
|
7
|
+
fieldErrors: Record<string, string | string[]>;
|
|
8
|
+
formMethods: UseFormReturn | null;
|
|
6
9
|
goToStep: (stepId: string, prevStepId?: string) => void;
|
|
7
10
|
next: () => void;
|
|
8
11
|
onSubmitStep: (data: OnFormSubmitType<InferFormData<FormField[]>>) => Promise<boolean | undefined>;
|
|
9
12
|
prevStep: string;
|
|
10
13
|
previous: () => void;
|
|
14
|
+
setFieldErrors: (errors: Record<string, string | string[]> | ((prev: Record<string, string | string[]>) => Record<string, string | string[]>)) => void;
|
|
11
15
|
totalSteps: number;
|
|
12
16
|
};
|
|
13
17
|
export declare const WizardContext: import('react').Context<TWizardContext>;
|
package/lib/Forms/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as DynamicForm } from './DynamicForm/DynamicForm';
|
|
2
|
+
import { default as StandaloneDynamicForm } from './DynamicForm/StandaloneDynamicForm';
|
|
2
3
|
import { default as Form } from './Form/Form';
|
|
3
|
-
export { Form, DynamicForm };
|
|
4
|
+
export { Form, DynamicForm, StandaloneDynamicForm };
|
|
4
5
|
export * from './Fields';
|
|
5
6
|
export * from './Wizard';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NeighbourListItemProps } from '../../../../../../ui/src/lib/Molecules/ListItems/Neighbour/Neighbour.types';
|
|
2
|
+
type Invitee = NeighbourListItemProps & {
|
|
3
|
+
invited?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export interface InviteeListProps {
|
|
6
|
+
id: number;
|
|
7
|
+
invitees: Invitee[];
|
|
8
|
+
onSelect?: (inviteeName: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fetchInvitees: (userId: number, inviteeId: number) => Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const fetchInvitees: (postId: string, query: string, after: string | null) => Promise<{
|
|
2
|
+
page: import('../../../../api/src/lib/core').components["schemas"]["Core_V3_Neighbour_List"];
|
|
3
|
+
page_info: import('../../../../api/src/lib/core').components["schemas"]["PageInfo"];
|
|
4
|
+
} | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { components } from '../../../../api/src/lib/core';
|
|
2
|
+
export declare const formatInviteesList: (list?: components["schemas"]["Core_V3_Neighbour_List"]) => {
|
|
3
|
+
address: string;
|
|
4
|
+
altText: string;
|
|
5
|
+
fullName: string;
|
|
6
|
+
imageUrl: string;
|
|
7
|
+
profileUrl: string;
|
|
8
|
+
userId: number;
|
|
9
|
+
}[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { POIRecommendationProps } from './POIRecommendation.types';
|
|
2
|
-
declare const POIRecommendation: ({ onDismiss, onSelect, openSheet,
|
|
2
|
+
declare const POIRecommendation: ({ onDismiss, onSelect, openSheet, }: POIRecommendationProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default POIRecommendation;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Poi } from '../../../../../../api/src/lib/core_v2';
|
|
2
2
|
export type POIRecommendationProps = {
|
|
3
3
|
onDismiss: () => void;
|
|
4
|
-
onSelect: (
|
|
4
|
+
onSelect: (poi: Poi) => void;
|
|
5
5
|
openSheet: boolean;
|
|
6
|
-
value: RichTextAreaValueType;
|
|
7
6
|
};
|
|
8
7
|
export type POICategory = {
|
|
9
8
|
key: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SuggestionsProps } from './Suggestions.types';
|
|
2
|
-
declare const POISuggestions: ({
|
|
2
|
+
declare const POISuggestions: ({ onSelect, pois }: SuggestionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default POISuggestions;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
1
|
import { Poi } from '../../../../../../../../api/src/lib/core_v2';
|
|
3
|
-
import { RichTextAreaValueType } from '../../../../RichTextArea.types';
|
|
4
2
|
export type SuggestionsProps = {
|
|
5
|
-
|
|
3
|
+
onSelect: (poi: Poi) => void;
|
|
6
4
|
pois: Poi[] | null;
|
|
7
|
-
query: string;
|
|
8
|
-
setPois: Dispatch<SetStateAction<Poi[] | null>>;
|
|
9
|
-
value: RichTextAreaValueType;
|
|
10
5
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SearchableListProps } from './SearchableList.types';
|
|
2
|
+
declare const SearchableList: ({ contentProps, headerProps, inputProps, intro, label, onDismiss, open, setQuery, }: SearchableListProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default SearchableList;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { ContentProps } from './components/Content/Content.types';
|
|
3
|
+
import { SearchInputProps } from './components/SearchInput/SearchInput.types';
|
|
4
|
+
export type SearchableListProps = {
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
contentProps?: ContentProps;
|
|
7
|
+
headerProps: {
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
inputProps?: SearchInputProps['inputProps'];
|
|
11
|
+
intro?: React.ReactNode;
|
|
12
|
+
label?: string;
|
|
13
|
+
onDismiss: () => void;
|
|
14
|
+
open: boolean;
|
|
15
|
+
setQuery?: Dispatch<SetStateAction<string>>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as EmptyStateProps } from '../../../../../../ui/src/lib/Molecules/Notices/EmptyState/EmptyState.types';
|
|
2
|
+
export type ContentProps = {
|
|
3
|
+
content?: React.ReactNode;
|
|
4
|
+
emptyStateProps?: Omit<EmptyStateProps, 'size'> & {
|
|
5
|
+
size?: EmptyStateProps['size'];
|
|
6
|
+
};
|
|
7
|
+
length?: number;
|
|
8
|
+
loadMore?: () => void;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { SearchInputProps } from '../SearchInput/SearchInput.types';
|
|
3
|
+
export type HeaderProps = {
|
|
4
|
+
headerProps: {
|
|
5
|
+
isMobile?: boolean;
|
|
6
|
+
onDismiss: () => void;
|
|
7
|
+
setQuery?: Dispatch<SetStateAction<string>>;
|
|
8
|
+
title?: string;
|
|
9
|
+
};
|
|
10
|
+
inputProps?: SearchInputProps['inputProps'];
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { TextInputProps } from '../../../../../../ui/src/lib/Atoms/Inputs/TextInput/TextInput.types';
|
|
3
|
+
export type SearchInputProps = {
|
|
4
|
+
inputProps?: {
|
|
5
|
+
icon?: TextInputProps['icon'];
|
|
6
|
+
label: string;
|
|
7
|
+
size?: 'medium' | 'large';
|
|
8
|
+
};
|
|
9
|
+
isMobile?: boolean;
|
|
10
|
+
setQuery?: Dispatch<SetStateAction<string>>;
|
|
11
|
+
};
|
package/lib/utils/client.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export declare const isMobile: (mobileScreenSize?: number) => boolean;
|
|
2
2
|
export declare const useIsBreakpointMatch: (tabletScreenBreakpoint?: number) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Extracts the numeric ID from a gid string like "gid://something/12345".
|
|
5
|
+
* Returns 0 if extraction fails or result is not a number.
|
|
6
|
+
*/
|
|
7
|
+
export declare const extractUserId: (gid: string | undefined | null) => number;
|