@goodhood-web/nebenan-base 4.5.0-development.2 → 4.5.0-development.21
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 +98 -96
- package/index.mjs +19409 -19069
- package/lib/Authentication/Registration/RegistrationForm/Steps/Email.d.ts +3 -0
- package/lib/ContentCreator/ContentCreator.d.ts +1 -1
- package/lib/ContentCreator/ContentCreatorForm.d.ts +2 -2
- package/lib/ContentCreator/ContentCreatorForm.types.d.ts +32 -5
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/ContentCreatorFieldsWrapper.d.ts +2 -2
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.d.ts +3 -3
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentFieldsSheet/ContentFieldsSheet.types.d.ts +10 -0
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.types.d.ts +1 -0
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventFields.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/EventFields/EventFields.types.d.ts +2 -0
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/CategoryModalField.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormCategory.d.ts +5 -2
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormLocation.d.ts +5 -2
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/ListModalField.types.d.ts +5 -0
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ListModalField/LocationModalField.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/FormMarketplaceImageCropper.d.ts +2 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/MarketplaceFields.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/MarketplaceFields/MarketplaceFields.types.d.ts +1 -0
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/FormRichTextArea.d.ts +7 -5
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/PostFields/PostFields.types.d.ts +5 -0
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ReachTypeField/ReachTypeField.d.ts +1 -1
- package/lib/ContentCreator/components/ContentCreatorFieldWrapper/components/ReachTypeField/ReachTypeFields.types.d.ts +4 -1
- package/lib/ContentCreator/constants.d.ts +0 -84
- package/lib/ContentCreator/mockedData.d.ts +4 -0
- package/lib/ContentCreator/network.d.ts +2 -2
- package/lib/ContentCreator/utils/general.d.ts +0 -2
- package/lib/ContentCreator/utils/payloadGenerators.d.ts +3 -3
- package/lib/ContentCreator/validationSchemas/commonSchemas.d.ts +1 -1
- package/lib/ContentCreator/validationSchemas/dynamicValidationSchema.d.ts +17 -17
- package/lib/ContentCreator/validationSchemas/eventSchema.d.ts +3 -3
- package/lib/ContentCreator/validationSchemas/marketplaceSchema.d.ts +5 -5
- package/lib/ContentCreator/validationSchemas/postSchema.d.ts +9 -9
- package/lib/Feed/FeedItem/Marketplace/MarketplaceBody/MarketplaceBody.d.ts +1 -1
- package/lib/Feed/FeedItem/Marketplace/MarketplaceBody/MarketplaceBody.types.d.ts +1 -0
- package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.d.ts +3 -1
- package/lib/Feed/FeedItem/Marketplace/MarketplaceDetailPage/MarketplaceDetailPage.types.d.ts +1 -0
- package/lib/Feed/FeedItem/Replies/ReplySection/network.d.ts +1 -0
- package/lib/Feed/FeedItem/Replies/ReplySection/utils.d.ts +1 -0
- package/lib/Feed/utils.d.ts +1 -0
- package/lib/Forms/Fields/PasswordField/PasswordField.d.ts +1 -1
- package/lib/Forms/Fields/PasswordField/PasswordField.types.d.ts +1 -0
- package/lib/Forms/Fields/PasswordField/utils.d.ts +1 -1
- package/lib/Forms/Fields/utils.d.ts +2 -0
- package/lib/MarketplaceImageCropper/MarketplaceImageCropper.d.ts +1 -1
- package/lib/MarketplaceImageCropper/MarketplaceImageCropper.types.d.ts +1 -0
- package/lib/MultiImageCropper/components/ImageCropperPanel/ImageCropperPanel.d.ts +1 -1
- package/lib/PremiumFeaturePanel/PremiumFeaturePanel.d.ts +1 -1
- package/lib/PremiumFeaturePanel/PremiumFeaturePanel.types.d.ts +2 -0
- package/lib/RichTextArea/RichTextArea.types.d.ts +4 -0
- package/lib/RichTextArea/components/POI/POIRecommendation.types.d.ts +1 -0
- package/lib/RichTextArea/lexical/plugins/MentionPlugin.d.ts +2 -1
- package/lib/RichTextArea/lexical/utils.d.ts +1 -1
- package/lib/SearchableList/SearchableList.d.ts +1 -1
- package/lib/SearchableList/SearchableList.types.d.ts +1 -0
- package/package.json +3 -2
- package/style.css +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { FormField, InferFormData, WizardStepT } from '../../../../Forms';
|
|
2
3
|
import { OnSubmitFunction } from '../../../../Forms/Form/Form.types';
|
|
4
|
+
export declare const emailSchema: z.ZodString;
|
|
5
|
+
export declare const passwordSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
3
6
|
export declare const getEmailStep: (onSubmit: OnSubmitFunction<InferFormData<FormField[]>>) => WizardStepT;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentCreatorProps } from './ContentCreatorForm.types';
|
|
2
|
-
declare const ContentCreator: ({ config,
|
|
2
|
+
declare const ContentCreator: ({ config, contentCreatorRef, disablePremiumFeature, group, onDismiss, onSubmitSuccess, open, post, postFieldPlaceholders, postId, prefillValues, profile, }: ContentCreatorProps & {
|
|
3
3
|
config: {
|
|
4
4
|
chargebee: {
|
|
5
5
|
site: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ContentCreatorProps } from './ContentCreatorForm.types';
|
|
2
|
-
declare const ContentCreatorForm: (
|
|
1
|
+
import { ContentCreatorProps, ContentCreatorRefType } from './ContentCreatorForm.types';
|
|
2
|
+
declare const ContentCreatorForm: import('react').ForwardRefExoticComponent<ContentCreatorProps & import('react').RefAttributes<ContentCreatorRefType>>;
|
|
3
3
|
export default ContentCreatorForm;
|
|
@@ -1,28 +1,55 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { components } from '../../../../api/src/lib/core';
|
|
3
|
+
import { ProfileResponse } from '../../../../api/src/lib/core_v2';
|
|
2
4
|
import { ContentFormData } from './validationSchemas';
|
|
3
5
|
export type PostItem = components['schemas']['Core_V3_Input_HoodMessage'];
|
|
4
6
|
export type FailureError = {
|
|
5
7
|
failures: components['schemas']['Core_V3_Failure_List'];
|
|
6
8
|
};
|
|
7
9
|
export type HoodMessage = components['schemas']['Core_V3_HoodMessage'];
|
|
10
|
+
export type Group = {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
id: number;
|
|
13
|
+
title: string;
|
|
14
|
+
};
|
|
15
|
+
export type HoodGroupId = number | null | undefined;
|
|
16
|
+
export type WrapperRefType = {
|
|
17
|
+
openImageUpload: () => void;
|
|
18
|
+
};
|
|
19
|
+
export type ContentCreatorRefType = {
|
|
20
|
+
openImageUpload: () => void;
|
|
21
|
+
};
|
|
8
22
|
export type ContentCreatorProps = {
|
|
9
|
-
|
|
10
|
-
|
|
23
|
+
className?: string;
|
|
24
|
+
contentCreatorRef?: RefObject<WrapperRefType>;
|
|
25
|
+
disablePremiumFeature?: boolean;
|
|
26
|
+
group?: Group;
|
|
11
27
|
onDismiss: () => void;
|
|
12
28
|
onSubmitSuccess: (response: HoodMessage) => void;
|
|
13
29
|
open: boolean;
|
|
14
30
|
post?: PostItem;
|
|
31
|
+
postFieldPlaceholders?: {
|
|
32
|
+
contentField?: string;
|
|
33
|
+
subjectField?: string;
|
|
34
|
+
};
|
|
15
35
|
postId?: number | string;
|
|
36
|
+
prefillValues?: Partial<ContentFormData>;
|
|
37
|
+
profile: ProfileResponse;
|
|
16
38
|
};
|
|
17
39
|
export type ContentCreatorFormProps = {
|
|
40
|
+
disablePremiumFeature?: boolean;
|
|
18
41
|
formError?: string | null;
|
|
42
|
+
group: Group | null | undefined;
|
|
19
43
|
isEditMode?: boolean;
|
|
20
|
-
|
|
44
|
+
isPreSelectedMode: boolean;
|
|
21
45
|
isSubmitting: boolean;
|
|
22
46
|
onContentCreatorDismiss: () => void;
|
|
23
|
-
|
|
24
|
-
|
|
47
|
+
postFieldPlaceholders?: {
|
|
48
|
+
contentField?: string;
|
|
49
|
+
subjectField?: string;
|
|
50
|
+
};
|
|
25
51
|
postId?: number | string;
|
|
52
|
+
profile: ProfileResponse;
|
|
26
53
|
};
|
|
27
54
|
export type PostFormData = Extract<ContentFormData, {
|
|
28
55
|
content_type: 'post' | 'search' | 'recommendation';
|
package/lib/ContentCreator/components/ContentCreatorFieldWrapper/ContentCreatorFieldsWrapper.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ContentCreatorFormProps } from '../../ContentCreatorForm.types';
|
|
2
|
-
declare const ContentCreatorFieldsWrapper: (
|
|
1
|
+
import { ContentCreatorFormProps, WrapperRefType } from '../../ContentCreatorForm.types';
|
|
2
|
+
declare const ContentCreatorFieldsWrapper: import('react').ForwardRefExoticComponent<ContentCreatorFormProps & import('react').RefAttributes<WrapperRefType>>;
|
|
3
3
|
export default ContentCreatorFieldsWrapper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContentProps, FooterProps, HeaderProps } from './ContentFieldsSheet.types';
|
|
2
|
-
export declare const Header: ({ isSubmitting, onContentTypeSelectorOpen, onDismiss, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare const Content: ({ onOpenReachTypeSelector, onPoiDismiss, poiClicked, postId, richTextAreaRef, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const Footer: ({ formError, isSubmitting, onImageUploadClick, onOpenReachTypeSelector, onPoiOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Header: ({ isSubmitting, onContentTypeSelectorOpen, onDismiss, profile, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const Content: ({ disablePremiumFeature, group, onOpenReachTypeSelector, onPoiDismiss, poiClicked, postFieldPlaceholders, postId, richTextAreaRef, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Footer: ({ formError, group, isSubmitting, onImageUploadClick, onOpenReachTypeSelector, onPoiOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
import { ProfileResponse } from '../../../../../../../../api/src/lib/core_v2';
|
|
2
3
|
import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
|
|
4
|
+
import { Group } from '../../../../ContentCreatorForm.types';
|
|
3
5
|
export type HeaderProps = {
|
|
4
6
|
isSubmitting: boolean;
|
|
5
7
|
onContentTypeSelectorOpen: () => void;
|
|
6
8
|
onDismiss: () => void;
|
|
9
|
+
profile: ProfileResponse;
|
|
7
10
|
};
|
|
8
11
|
export type ContentProps = {
|
|
12
|
+
disablePremiumFeature?: boolean;
|
|
13
|
+
group: Group | null | undefined;
|
|
9
14
|
onOpenReachTypeSelector: () => void;
|
|
10
15
|
onPoiDismiss: () => void;
|
|
11
16
|
poiClicked: boolean;
|
|
17
|
+
postFieldPlaceholders?: {
|
|
18
|
+
contentField?: string;
|
|
19
|
+
subjectField?: string;
|
|
20
|
+
};
|
|
12
21
|
postId?: number | string;
|
|
13
22
|
richTextAreaRef?: RefObject<RichTextAreaRef>;
|
|
14
23
|
};
|
|
15
24
|
export type FooterProps = {
|
|
16
25
|
formError?: string | null;
|
|
26
|
+
group: Group | null | undefined;
|
|
17
27
|
isSubmitting: boolean;
|
|
18
28
|
onImageUploadClick: () => void;
|
|
19
29
|
onOpenReachTypeSelector: () => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ContentTypeSheetProps } from './ContentTypeField.types';
|
|
2
|
-
declare const ContentTypeField: ({ onClose, onFormSheetOpen, onSelect, open, }: ContentTypeSheetProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
declare const ContentTypeField: ({ hoodGroupId, onClose, onFormSheetOpen, onSelect, open, }: ContentTypeSheetProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default ContentTypeField;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EventFieldsProps } from './EventFields.types';
|
|
2
|
-
declare const EventFields: ({ onOpenReachTypeSelector }: EventFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const EventFields: ({ group, onOpenReachTypeSelector }: EventFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default EventFields;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CategoryModalFieldProps } from './ListModalField.types';
|
|
2
|
-
declare const CategoryModalField: ({ disabled, errorMessage, floatingLabel, items, onChange, value, }: CategoryModalFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const CategoryModalField: ({ disabled, errorMessage, floatingLabel, items, onChange, open, setOpen, value, }: CategoryModalFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CategoryModalField;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { UseControllerProps } from 'react-hook-form';
|
|
2
2
|
import { CategoryModalFieldProps } from '../ListModalField.types';
|
|
3
|
-
export type FormCategoryFieldProps = UseControllerProps & Partial<CategoryModalFieldProps
|
|
4
|
-
|
|
3
|
+
export type FormCategoryFieldProps = UseControllerProps & Partial<CategoryModalFieldProps> & {
|
|
4
|
+
open: boolean;
|
|
5
|
+
setOpen: CategoryModalFieldProps['setOpen'];
|
|
6
|
+
};
|
|
7
|
+
export default function FormCategory({ floatingLabel, isMarketplaceCategory, name, open, setOpen, value, }: FormCategoryFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { UseControllerProps } from 'react-hook-form';
|
|
2
2
|
import { ContentFormData } from '../../../../../validationSchemas';
|
|
3
3
|
import { LocationModalFieldProps } from '../ListModalField.types';
|
|
4
|
-
export type FormLocationFieldProps = UseControllerProps<ContentFormData> & Partial<LocationModalFieldProps
|
|
5
|
-
|
|
4
|
+
export type FormLocationFieldProps = UseControllerProps<ContentFormData> & Partial<LocationModalFieldProps> & {
|
|
5
|
+
locationModalOpen: boolean;
|
|
6
|
+
setLocationModalOpen: LocationModalFieldProps['setOpen'];
|
|
7
|
+
};
|
|
8
|
+
export default function FormLocation({ floatingLabel, locationModalOpen, name, setLocationModalOpen, value, }: FormLocationFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
1
2
|
import { SelectValueType } from '../../../../../../../../ui/src/lib/Atoms/Dropdowns/DropdownItem/DropdownItem.types';
|
|
2
3
|
import { CategoryItem, LocationValue } from './FormModalFields/FormModalsFields.types';
|
|
3
4
|
export type CategoryModalFieldProps = {
|
|
@@ -7,6 +8,8 @@ export type CategoryModalFieldProps = {
|
|
|
7
8
|
isMarketplaceCategory?: boolean;
|
|
8
9
|
items?: CategoryItem[];
|
|
9
10
|
onChange: (value: SelectValueType) => void;
|
|
11
|
+
open: boolean;
|
|
12
|
+
setOpen: Dispatch<SetStateAction<boolean>>;
|
|
10
13
|
value: SelectValueType;
|
|
11
14
|
};
|
|
12
15
|
export type LocationModalFieldProps = {
|
|
@@ -14,6 +17,8 @@ export type LocationModalFieldProps = {
|
|
|
14
17
|
errorMessage?: string;
|
|
15
18
|
floatingLabel?: string;
|
|
16
19
|
onChange: (value: LocationValue) => void;
|
|
20
|
+
open: boolean;
|
|
21
|
+
setOpen: Dispatch<SetStateAction<boolean>>;
|
|
17
22
|
value: LocationValue;
|
|
18
23
|
};
|
|
19
24
|
export type DropdownButtonProps = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LocationModalFieldProps } from './ListModalField.types';
|
|
2
|
-
declare const LocationModalField: ({ disabled, errorMessage, floatingLabel, onChange, value, }: LocationModalFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const LocationModalField: ({ disabled, errorMessage, floatingLabel, onChange, open, setOpen, value, }: LocationModalFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default LocationModalField;
|
|
@@ -4,8 +4,9 @@ import { ImageFile } from '../../../../../RichTextArea/RichTextArea.types';
|
|
|
4
4
|
export type FormImageCropperProps = UseControllerProps & Partial<MarketplaceImageCropperProps> & {
|
|
5
5
|
CCFormSelectedImage?: ImageFile | null;
|
|
6
6
|
isInContentCreator?: boolean;
|
|
7
|
+
multiple?: boolean;
|
|
7
8
|
name: string;
|
|
8
9
|
withoutHint?: boolean;
|
|
9
10
|
};
|
|
10
|
-
declare const FormMarketplaceImageCropper: ({ CCFormSelectedImage, isEventImageCropper, isInContentCreator, name, }: FormImageCropperProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const FormMarketplaceImageCropper: ({ CCFormSelectedImage, isEventImageCropper, isInContentCreator, multiple, name, }: FormImageCropperProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default FormMarketplaceImageCropper;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MarketplaceFieldsProps } from './MarketplaceFields.types';
|
|
2
|
-
declare const MarketplaceFields: ({ onOpenReachTypeSelector, postId, }: MarketplaceFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MarketplaceFields: ({ disablePremiumFeature, onOpenReachTypeSelector, postId, }: MarketplaceFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MarketplaceFields;
|
|
@@ -2,6 +2,7 @@ import { UseControllerProps } from 'react-hook-form';
|
|
|
2
2
|
import { RichTextAreaProps, RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
|
|
3
3
|
import { ContentFormData } from '../../../../validationSchemas';
|
|
4
4
|
export type FormRichTextAreaInputProps = UseControllerProps<ContentFormData> & Partial<RichTextAreaProps> & {
|
|
5
|
+
groupId?: number;
|
|
5
6
|
name: string;
|
|
6
7
|
};
|
|
7
8
|
declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<UseControllerProps<{
|
|
@@ -23,7 +24,7 @@ declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<U
|
|
|
23
24
|
};
|
|
24
25
|
content_type: "post";
|
|
25
26
|
subject: string;
|
|
26
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
27
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
27
28
|
} | {
|
|
28
29
|
content: {
|
|
29
30
|
body: string;
|
|
@@ -43,7 +44,7 @@ declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<U
|
|
|
43
44
|
};
|
|
44
45
|
content_type: "search";
|
|
45
46
|
subject: string;
|
|
46
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
47
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
47
48
|
} | {
|
|
48
49
|
content: {
|
|
49
50
|
body: string;
|
|
@@ -63,7 +64,7 @@ declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<U
|
|
|
63
64
|
};
|
|
64
65
|
content_type: "recommendation";
|
|
65
66
|
subject: string;
|
|
66
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
67
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
67
68
|
} | {
|
|
68
69
|
content: {
|
|
69
70
|
body: string;
|
|
@@ -88,7 +89,7 @@ declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<U
|
|
|
88
89
|
};
|
|
89
90
|
content_type: "event";
|
|
90
91
|
subject: string;
|
|
91
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
92
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
92
93
|
starts_at_date: Date;
|
|
93
94
|
starts_at_time: Date;
|
|
94
95
|
images?: {
|
|
@@ -130,7 +131,7 @@ declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<U
|
|
|
130
131
|
signedId?: string | undefined;
|
|
131
132
|
}[]];
|
|
132
133
|
subject: string;
|
|
133
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
134
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
134
135
|
marketplace_item_type: string;
|
|
135
136
|
premium_feature: {
|
|
136
137
|
id: string;
|
|
@@ -139,6 +140,7 @@ declare const FormRichTextAreaInput: import('react').ForwardRefExoticComponent<U
|
|
|
139
140
|
};
|
|
140
141
|
price?: string | null | undefined;
|
|
141
142
|
}> & Partial<RichTextAreaProps> & {
|
|
143
|
+
groupId?: number;
|
|
142
144
|
name: string;
|
|
143
145
|
} & import('react').RefAttributes<RichTextAreaRef>>;
|
|
144
146
|
export default FormRichTextAreaInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PostFieldsProps } from './PostFields.types';
|
|
2
|
-
declare const PostFields: ({ onPoiDismiss, poiClicked, richTextAreaRef }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const PostFields: ({ groupId, onPoiDismiss, poiClicked, postFieldPlaceholders, richTextAreaRef, }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default PostFields;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
|
|
3
3
|
export type PostFieldsProps = {
|
|
4
|
+
groupId?: number;
|
|
4
5
|
onPoiDismiss: () => void;
|
|
5
6
|
poiClicked: boolean;
|
|
7
|
+
postFieldPlaceholders?: {
|
|
8
|
+
contentField?: string;
|
|
9
|
+
subjectField?: string;
|
|
10
|
+
};
|
|
6
11
|
richTextAreaRef?: RefObject<RichTextAreaRef>;
|
|
7
12
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReachTypeFieldProps } from './ReachTypeFields.types';
|
|
2
|
-
declare const ReachTypeField: ({ onClose, open }: ReachTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ReachTypeField: ({ group, hoodName, onClose, open }: ReachTypeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ReachTypeField;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { Group } from '../../../../ContentCreatorForm.types';
|
|
1
2
|
export type OptionType = {
|
|
2
3
|
label: string;
|
|
3
4
|
secondaryText: string;
|
|
4
5
|
value: ReachType;
|
|
5
6
|
};
|
|
6
7
|
export type ReachTypeFieldProps = {
|
|
8
|
+
group: Group | null | undefined;
|
|
9
|
+
hoodName?: string;
|
|
7
10
|
onClose: () => void;
|
|
8
11
|
open: boolean;
|
|
9
12
|
};
|
|
10
|
-
export type ReachType = 'hood' | 'extended' | 'public';
|
|
13
|
+
export type ReachType = 'hood' | 'extended' | 'public' | 'group';
|
|
@@ -27,87 +27,3 @@ export declare const DEFAULT_FORM_VALUES: {
|
|
|
27
27
|
starts_at_time: Date;
|
|
28
28
|
subject: string;
|
|
29
29
|
};
|
|
30
|
-
export declare const POST_DEFAULT_VALUES: {
|
|
31
|
-
content_type: string;
|
|
32
|
-
category: string;
|
|
33
|
-
content: {
|
|
34
|
-
attachments: {
|
|
35
|
-
images: never[];
|
|
36
|
-
};
|
|
37
|
-
body: string;
|
|
38
|
-
embeddables: never[];
|
|
39
|
-
};
|
|
40
|
-
ends_at_date: null;
|
|
41
|
-
ends_at_time: null;
|
|
42
|
-
images: never[];
|
|
43
|
-
location: {
|
|
44
|
-
label: string;
|
|
45
|
-
};
|
|
46
|
-
marketplace_item_type: MarketplaceItems;
|
|
47
|
-
premium_feature: {
|
|
48
|
-
id: string;
|
|
49
|
-
pill: string;
|
|
50
|
-
value: string;
|
|
51
|
-
};
|
|
52
|
-
price: null;
|
|
53
|
-
reach: string;
|
|
54
|
-
starts_at_date: Date;
|
|
55
|
-
starts_at_time: Date;
|
|
56
|
-
subject: string;
|
|
57
|
-
};
|
|
58
|
-
export declare const EVENT_DEFAULT_VALUES: {
|
|
59
|
-
content_type: string;
|
|
60
|
-
category: string;
|
|
61
|
-
content: {
|
|
62
|
-
attachments: {
|
|
63
|
-
images: never[];
|
|
64
|
-
};
|
|
65
|
-
body: string;
|
|
66
|
-
embeddables: never[];
|
|
67
|
-
};
|
|
68
|
-
ends_at_date: null;
|
|
69
|
-
ends_at_time: null;
|
|
70
|
-
images: never[];
|
|
71
|
-
location: {
|
|
72
|
-
label: string;
|
|
73
|
-
};
|
|
74
|
-
marketplace_item_type: MarketplaceItems;
|
|
75
|
-
premium_feature: {
|
|
76
|
-
id: string;
|
|
77
|
-
pill: string;
|
|
78
|
-
value: string;
|
|
79
|
-
};
|
|
80
|
-
price: null;
|
|
81
|
-
reach: string;
|
|
82
|
-
starts_at_date: Date;
|
|
83
|
-
starts_at_time: Date;
|
|
84
|
-
subject: string;
|
|
85
|
-
};
|
|
86
|
-
export declare const MARKETPLACE_DEFAULT_VALUES: {
|
|
87
|
-
content_type: string;
|
|
88
|
-
reach: string;
|
|
89
|
-
category: string;
|
|
90
|
-
content: {
|
|
91
|
-
attachments: {
|
|
92
|
-
images: never[];
|
|
93
|
-
};
|
|
94
|
-
body: string;
|
|
95
|
-
embeddables: never[];
|
|
96
|
-
};
|
|
97
|
-
ends_at_date: null;
|
|
98
|
-
ends_at_time: null;
|
|
99
|
-
images: never[];
|
|
100
|
-
location: {
|
|
101
|
-
label: string;
|
|
102
|
-
};
|
|
103
|
-
marketplace_item_type: MarketplaceItems;
|
|
104
|
-
premium_feature: {
|
|
105
|
-
id: string;
|
|
106
|
-
pill: string;
|
|
107
|
-
value: string;
|
|
108
|
-
};
|
|
109
|
-
price: null;
|
|
110
|
-
starts_at_date: Date;
|
|
111
|
-
starts_at_time: Date;
|
|
112
|
-
subject: string;
|
|
113
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { OnFormSubmitType } from '../Forms/Form/Form.types';
|
|
3
|
-
import { HoodMessage, MarketplaceFormData } from './ContentCreatorForm.types';
|
|
3
|
+
import { HoodGroupId, HoodMessage, MarketplaceFormData } from './ContentCreatorForm.types';
|
|
4
4
|
import { ContentFormData } from './validationSchemas';
|
|
5
|
-
export declare const handleSubmit: (data: OnFormSubmitType<ContentFormData>, isEditMode: boolean, setFormError: Dispatch<SetStateAction<string | null>>, hoodGroupId
|
|
5
|
+
export declare const handleSubmit: (data: OnFormSubmitType<ContentFormData>, isEditMode: boolean, setFormError: Dispatch<SetStateAction<string | null>>, hoodGroupId: HoodGroupId, onSuccess?: (responseData: HoodMessage | undefined, premiumFeature?: MarketplaceFormData["premium_feature"]) => void, onError?: (error: unknown) => void) => Promise<boolean | undefined>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DefaultValues } from 'react-hook-form';
|
|
2
2
|
import { SelectedPremiumFeature } from '../../PremiumFeaturePanel/components/PremiumFeatureSelector/PremiumFeatureSelector.types';
|
|
3
3
|
import { FailureError, PostItem } from '../ContentCreatorForm.types';
|
|
4
|
-
import { ContentType } from '../components/ContentCreatorFieldWrapper/components/ContentTypeField/ContentTypeField.types';
|
|
5
4
|
import { LocationValue } from '../components/ContentCreatorFieldWrapper/components/ListModalField/FormModalFields/FormModalsFields.types';
|
|
6
5
|
import { ContentFormData } from '../validationSchemas';
|
|
7
6
|
import { BodyWithEmbeds } from '../validationSchemas/commonSchemas';
|
|
@@ -13,7 +12,6 @@ export declare const transformBackendFieldError: (error: FailureError) => {
|
|
|
13
12
|
}[];
|
|
14
13
|
};
|
|
15
14
|
export declare const getInitialValues: (post: PostItem) => DefaultValues<ContentFormData>;
|
|
16
|
-
export declare const getDefaultFormValues: (contentType: ContentType) => DefaultValues<ContentFormData>;
|
|
17
15
|
export declare const combineDateAndTimeStrings: (type: "start" | "end", dateStr: Date | null, timeStr: Date | null) => string | null | undefined;
|
|
18
16
|
export declare const navigateTo: (contentType: string | undefined) => "/feed/marketplace" | "/feed";
|
|
19
17
|
export declare const formatLocation: (location: LocationValue) => string;
|
|
@@ -9,7 +9,7 @@ export declare const generatePostPayload: (data: PostFormData) => {
|
|
|
9
9
|
indices?: number[] | null | undefined;
|
|
10
10
|
}[] | null | undefined;
|
|
11
11
|
images: string[] | null;
|
|
12
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
12
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
13
13
|
subject: string;
|
|
14
14
|
};
|
|
15
15
|
export declare const generateEventPayload: (data: EventFormData) => {
|
|
@@ -25,7 +25,7 @@ export declare const generateEventPayload: (data: EventFormData) => {
|
|
|
25
25
|
ends_at: string | null | undefined;
|
|
26
26
|
images: string[] | null;
|
|
27
27
|
location: string;
|
|
28
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
28
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
29
29
|
starts_all_day: boolean;
|
|
30
30
|
starts_at: string;
|
|
31
31
|
subject: string;
|
|
@@ -41,6 +41,6 @@ export declare const generateMarketplacePayload: (data: MarketplaceFormData) =>
|
|
|
41
41
|
}[];
|
|
42
42
|
images: string[] | null;
|
|
43
43
|
price: number | null;
|
|
44
|
-
reach: "profile" | "public" | "hood" | "extended";
|
|
44
|
+
reach: "group" | "profile" | "public" | "hood" | "extended";
|
|
45
45
|
subject: string;
|
|
46
46
|
};
|
|
@@ -28,7 +28,7 @@ export declare const imageFileSchema: z.ZodObject<{
|
|
|
28
28
|
originalImg: File;
|
|
29
29
|
signedId?: string | undefined;
|
|
30
30
|
}>;
|
|
31
|
-
export declare const reachSchema: z.ZodEnum<["profile", "hood", "extended", "public"]>;
|
|
31
|
+
export declare const reachSchema: z.ZodEnum<["profile", "hood", "extended", "public", "group"]>;
|
|
32
32
|
export type ImageFile = z.infer<typeof imageFileSchema>;
|
|
33
33
|
export declare const subjectSchema: z.ZodString;
|
|
34
34
|
export declare const bodyWithEmbedsSchema: z.ZodObject<{
|