@goodhood-web/nebenan-base 4.5.0-development.10 → 4.5.0-development.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { ContentCreatorProps } from './ContentCreatorForm.types';
2
- declare const ContentCreator: ({ config, contentType, disablePremiumFeature, group, onDismiss, onSubmitSuccess, open, post, postId, profile, }: ContentCreatorProps & {
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: ({ contentType, disablePremiumFeature, onDismiss, onSubmitSuccess, open, post, postId, className, profile, group, }: ContentCreatorProps) => import("react/jsx-runtime").JSX.Element;
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,3 +1,4 @@
1
+ import { RefObject } from 'react';
1
2
  import { components } from '../../../../api/src/lib/core';
2
3
  import { ProfileResponse } from '../../../../api/src/lib/core_v2';
3
4
  import { ContentFormData } from './validationSchemas';
@@ -12,16 +13,27 @@ export type Group = {
12
13
  title: string;
13
14
  };
14
15
  export type HoodGroupId = number | null | undefined;
16
+ export type WrapperRefType = {
17
+ openImageUpload: () => void;
18
+ };
19
+ export type ContentCreatorRefType = {
20
+ openImageUpload: () => void;
21
+ };
15
22
  export type ContentCreatorProps = {
16
23
  className?: string;
17
- contentType?: 'post' | 'event' | 'marketplace' | 'search' | 'recommendation';
24
+ contentCreatorRef?: RefObject<WrapperRefType>;
18
25
  disablePremiumFeature?: boolean;
19
26
  group?: Group;
20
27
  onDismiss: () => void;
21
28
  onSubmitSuccess: (response: HoodMessage) => void;
22
29
  open: boolean;
23
30
  post?: PostItem;
31
+ postFieldPlaceholders?: {
32
+ contentField?: string;
33
+ subjectField?: string;
34
+ };
24
35
  postId?: number | string;
36
+ prefillValues?: Partial<ContentFormData>;
25
37
  profile: ProfileResponse;
26
38
  };
27
39
  export type ContentCreatorFormProps = {
@@ -32,6 +44,10 @@ export type ContentCreatorFormProps = {
32
44
  isPreSelectedMode: boolean;
33
45
  isSubmitting: boolean;
34
46
  onContentCreatorDismiss: () => void;
47
+ postFieldPlaceholders?: {
48
+ contentField?: string;
49
+ subjectField?: string;
50
+ };
35
51
  postId?: number | string;
36
52
  profile: ProfileResponse;
37
53
  };
@@ -1,3 +1,3 @@
1
- import { ContentCreatorFormProps } from '../../ContentCreatorForm.types';
2
- declare const ContentCreatorFieldsWrapper: ({ disablePremiumFeature, formError, group, isEditMode, isPreSelectedMode, isSubmitting, onContentCreatorDismiss, postId, profile, }: ContentCreatorFormProps) => import("react/jsx-runtime").JSX.Element;
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
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, postId, richTextAreaRef, }: ContentProps) => 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
4
  export declare const Footer: ({ formError, group, isSubmitting, onImageUploadClick, onOpenReachTypeSelector, onPoiOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -14,6 +14,10 @@ export type ContentProps = {
14
14
  onOpenReachTypeSelector: () => void;
15
15
  onPoiDismiss: () => void;
16
16
  poiClicked: boolean;
17
+ postFieldPlaceholders?: {
18
+ contentField?: string;
19
+ subjectField?: string;
20
+ };
17
21
  postId?: number | string;
18
22
  richTextAreaRef?: RefObject<RichTextAreaRef>;
19
23
  };
@@ -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: ({ onPoiDismiss, poiClicked, postFieldPlaceholders, richTextAreaRef, }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default PostFields;
@@ -3,5 +3,9 @@ import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types'
3
3
  export type PostFieldsProps = {
4
4
  onPoiDismiss: () => void;
5
5
  poiClicked: boolean;
6
+ postFieldPlaceholders?: {
7
+ contentField?: string;
8
+ subjectField?: string;
9
+ };
6
10
  richTextAreaRef?: RefObject<RichTextAreaRef>;
7
11
  };
@@ -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,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;
@@ -10,6 +10,7 @@ export type POIRecommendationProps = {
10
10
  headerProps?: SearchableListProps['headerProps'];
11
11
  inputProps?: SearchableListProps['inputProps'];
12
12
  intro?: SearchableListProps['intro'];
13
+ sheetClassName?: string;
13
14
  withNewItemAddition?: boolean;
14
15
  };
15
16
  };
@@ -1,3 +1,3 @@
1
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;
2
+ declare const SearchableList: ({ contentProps, headerProps, inputProps, intro, label, onDismiss, open, setQuery, sheetClassName, }: SearchableListProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default SearchableList;
@@ -14,4 +14,5 @@ export type SearchableListProps = {
14
14
  onDismiss: () => void;
15
15
  open: boolean;
16
16
  setQuery?: Dispatch<SetStateAction<string>>;
17
+ sheetClassName?: string;
17
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "4.5.0-development.10",
3
+ "version": "4.5.0-development.12",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",