@goodhood-web/nebenan-base 4.2.0-development.3 → 4.2.0-development.5

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,4 +1,4 @@
1
1
  import { ContentProps, FooterProps, HeaderProps } from './ContentFieldsSheet.types';
2
2
  export declare const Header: ({ imageUrl, onContentTypeSelectorOpen, onDismiss, userId, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
3
- export declare const Content: ({ imageUploadClicked, onImageUploadDismiss, onPoiDismiss, poiClicked, }: ContentProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const Footer: ({ formError, onImageUploadOpen, onPoiOpen, setReachTypeSelectorOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Content: ({ onPoiDismiss, poiClicked, richTextAreaRef }: ContentProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const Footer: ({ formError, onImageUploadClick, onPoiOpen, setReachTypeSelectorOpen, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import { Dispatch, SetStateAction } from 'react';
1
+ import { Dispatch, RefObject, SetStateAction } from 'react';
2
+ import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
2
3
  export type HeaderProps = {
3
4
  imageUrl?: string;
4
5
  onContentTypeSelectorOpen: () => void;
@@ -6,14 +7,13 @@ export type HeaderProps = {
6
7
  userId?: number;
7
8
  };
8
9
  export type ContentProps = {
9
- imageUploadClicked: boolean;
10
- onImageUploadDismiss: () => void;
11
10
  onPoiDismiss: () => void;
12
11
  poiClicked: boolean;
12
+ richTextAreaRef?: RefObject<RichTextAreaRef>;
13
13
  };
14
14
  export type FooterProps = {
15
15
  formError?: string | null;
16
- onImageUploadOpen: () => void;
16
+ onImageUploadClick: () => void;
17
17
  onPoiOpen: () => void;
18
18
  setReachTypeSelectorOpen: Dispatch<SetStateAction<boolean>>;
19
19
  };
@@ -1,3 +1,3 @@
1
1
  import { PostFieldsProps } from './PostFields.types';
2
- declare const PostFields: ({ imageUploadClicked, onImageUploadDismiss, onPoiDismiss, poiClicked, }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const PostFields: ({ onPoiDismiss, poiClicked, richTextAreaRef }: PostFieldsProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default PostFields;
@@ -1,6 +1,7 @@
1
+ import { RefObject } from 'react';
2
+ import { RichTextAreaRef } from '../../../../../RichTextArea/RichTextArea.types';
1
3
  export type PostFieldsProps = {
2
- imageUploadClicked: boolean;
3
- onImageUploadDismiss: () => void;
4
4
  onPoiDismiss: () => void;
5
5
  poiClicked: boolean;
6
+ richTextAreaRef?: RefObject<RichTextAreaRef>;
6
7
  };
@@ -1,8 +1,10 @@
1
+ import { RefObject } from 'react';
1
2
  import { UseControllerProps } from 'react-hook-form';
2
3
  import { ContentFormData } from '../../ContentCreator/validationSchemas';
3
- import { RichTextAreaProps } from '../../RichTextArea/RichTextArea.types';
4
+ import { RichTextAreaProps, RichTextAreaRef } from '../../RichTextArea/RichTextArea.types';
4
5
  export type FormRichTextAreaInputProps = UseControllerProps<ContentFormData> & Partial<RichTextAreaProps> & {
5
6
  name: string;
7
+ ref?: RefObject<RichTextAreaRef>;
6
8
  };
7
- declare const FormRichTextAreaInput: ({ name, ...props }: FormRichTextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const FormRichTextAreaInput: ({ name, ref, ...props }: FormRichTextAreaInputProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export default FormRichTextAreaInput;
@@ -1,2 +1,3 @@
1
- import { RichTextAreaProps } from './RichTextArea.types';
2
- export default function RichTextArea({ ariaDescribedby, attachment, charLimit, colorScheme, contentEditableRef, disabled, errorText, hintText, id, label, onBlur, onChange, onFocus, onImageClick, onImageUploadDismiss, onPoiClick, onPoiDismiss, size, submitButton, value, }: RichTextAreaProps): import("react/jsx-runtime").JSX.Element;
1
+ import { RichTextAreaProps, RichTextAreaRef } from './RichTextArea.types';
2
+ declare const _default: import('react').ForwardRefExoticComponent<RichTextAreaProps & import('react').RefAttributes<RichTextAreaRef>>;
3
+ export default _default;
@@ -20,8 +20,6 @@ export type RichTextAreaProps = {
20
20
  onBlur?: (event: FocusEvent<HTMLDivElement>) => void;
21
21
  onChange: (value: RichTextAreaValueType) => void;
22
22
  onFocus?: (event: FocusEvent<HTMLDivElement>) => void;
23
- onImageClick?: boolean;
24
- onImageUploadDismiss?: () => void;
25
23
  onPoiClick?: boolean;
26
24
  onPoiDismiss?: () => void;
27
25
  size?: 'medium' | 'large';
@@ -59,3 +57,6 @@ export type CoreV3PostInput = {
59
57
  images?: string[] | null;
60
58
  };
61
59
  export declare const toCoreV3Format: (value: RichTextAreaValueType) => CoreV3PostInput;
60
+ export type RichTextAreaRef = {
61
+ onImageUpload: () => void;
62
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodhood-web/nebenan-base",
3
- "version": "4.2.0-development.3",
3
+ "version": "4.2.0-development.5",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "repository": "https://github.com/good-hood-gmbh/goodhood-web",