jamespot-react-components 1.2.58 → 1.2.59

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.
Files changed (25) hide show
  1. package/build/jamespot-react-components.js +735 -707
  2. package/build/jamespot-react-components.js.map +1 -1
  3. package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.d.ts +1 -13
  4. package/build/src/components/Form/Input/JRCInputSearchRaw/JRCInputSearchRaw.d.ts +2 -1
  5. package/build/src/components/Form/Input/JRCInputSearchRaw/JRCInputSearchRaw.stories.d.ts +7 -5
  6. package/build/src/components/Form/Input/JRCInputTinyMCE/JRCInputTinyMCE.d.ts +6 -4
  7. package/build/src/components/Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw.d.ts +5 -9
  8. package/build/src/components/Form/Input/JRCInputTinyMCERaw/editorSetup.d.ts +12 -0
  9. package/build/src/components/Form/Input/JRCInputTinyMCERaw/extensions/GifsExtension/GifsExtension.d.ts +3 -0
  10. package/build/src/components/Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions.d.ts +1 -0
  11. package/build/src/components/Form/Input/JRCInputTinyMCERaw/types.d.ts +7 -0
  12. package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +1 -1
  13. package/build/src/components/JRCAppHeader/JRCAppHeader.d.ts +1 -4
  14. package/build/src/components/JRCCommentsBloc/JRCComment.d.ts +1 -1
  15. package/build/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +1 -1
  16. package/build/src/components/JRCCommentsBloc/components/EditComment.d.ts +2 -2
  17. package/build/src/components/JRCCommentsBloc/components/NewComment.d.ts +2 -2
  18. package/build/src/components/JRCGifSelector/JRCGifSelector.d.ts +13 -0
  19. package/build/src/components/JRCGifSelector/JRCGifSelector.stories.d.ts +8 -0
  20. package/build/src/components/JRCMenuItem/JRCMenuItem.d.ts +1 -7
  21. package/build/src/components/Widgets/JRCWidgetArticleText/JRCWidgetArticleText.d.ts +5 -2
  22. package/build/src/components/index.d.ts +1 -0
  23. package/build/src/hooks/UseDebounce.d.ts +1 -1
  24. package/build/src/types.d.ts +2 -1
  25. package/package.json +3 -4
@@ -39,17 +39,5 @@ export declare const ReadOnlyUl: import("styled-components").StyledComponent<"ul
39
39
  export declare const JRCInputCheckboxRaw: <T extends FieldValues = FieldValues>(props: NativeCheckboxProps<T> & {
40
40
  margin?: string;
41
41
  }) => JSX.Element;
42
- export declare function JRCInputCheckbox<TFieldValues extends FieldValues = FieldValues>({ name, control, rules, label, htmlFor, labelIsLegend, description, helper, ...props }: JRCInputCheckboxProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
43
- export declare namespace JRCInputCheckbox {
44
- var defaultProps: {
45
- direction: string;
46
- labelPosition: string;
47
- checkboxMode: string;
48
- label: string;
49
- backgroundOnHover: boolean;
50
- backgroundOnSelect: boolean;
51
- SortByChecked: boolean;
52
- valueTypeIsBoolean: boolean;
53
- };
54
- }
42
+ export declare function JRCInputCheckbox<TFieldValues extends FieldValues = FieldValues>({ name, control, rules, label, htmlFor, labelIsLegend, description, helper, direction, labelPosition, checkboxMode, backgroundOnHover, backgroundOnSelect, SortByChecked, valueTypeIsBoolean, ...props }: JRCInputCheckboxProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
55
43
  export {};
@@ -5,6 +5,7 @@ type JRCInputSearchProps = {
5
5
  placeholder?: string;
6
6
  width?: number | string;
7
7
  loading?: boolean;
8
+ debounceDelay?: number;
8
9
  } & DataCy;
9
- export declare const JRCInputSearchRaw: ({ onChange, placeholder, width, loading, onClickSearch, dataCy, }: JRCInputSearchProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const JRCInputSearchRaw: ({ onChange, placeholder, width, loading, onClickSearch, dataCy, debounceDelay, }: JRCInputSearchProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -1,5 +1,7 @@
1
- import { Meta } from '@storybook/react-webpack5';
2
- declare const _default: Meta;
3
- export default _default;
4
- export declare const OnChange: () => import("react/jsx-runtime").JSX.Element;
5
- export declare const OnClick: () => import("react/jsx-runtime").JSX.Element;
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { JRCInputSearchRaw } from './JRCInputSearchRaw';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ type Story = StoryObj<typeof JRCInputSearchRaw>;
6
+ export declare const OnSearch: Story;
7
+ export declare const OnClick: Story;
@@ -1,8 +1,7 @@
1
- import { TinyMCECommonOptions } from 'jamespot-user-api';
1
+ import { JFileApi, TinyMCECommonOptions } from 'jamespot-user-api';
2
2
  import { FieldValues } from 'react-hook-form';
3
3
  import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
4
- import { MentionQuery } from '../JRCInputTinyMCERaw/JRCInputTinyMCERaw';
5
- import { TinyMCEExtension } from '../JRCInputTinyMCERaw/types';
4
+ import { MentionQuery, TinyMCEExtension } from '../JRCInputTinyMCERaw/types';
6
5
  export type JRCInputTinyMCEProps<T extends FieldValues> = JRCInputFieldProps<T> & {
7
6
  token?: string;
8
7
  commonOptions: TinyMCECommonOptions;
@@ -12,5 +11,8 @@ export type JRCInputTinyMCEProps<T extends FieldValues> = JRCInputFieldProps<T>
12
11
  contents: MentionQuery;
13
12
  };
14
13
  additionalExtensions?: Array<TinyMCEExtension>;
14
+ handlers: {
15
+ file: Pick<JFileApi, 'upload'>;
16
+ };
15
17
  };
16
- export declare const JRCInputTinyMCE: <T extends FieldValues = FieldValues>({ dataCy, token, mentionsQueries, commonOptions, additionalExtensions, ...props }: JRCInputTinyMCEProps<T>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const JRCInputTinyMCE: <T extends FieldValues = FieldValues>({ dataCy, token, mentionsQueries, commonOptions, additionalExtensions, handlers, ...props }: JRCInputTinyMCEProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,11 @@
1
1
  import { Editor } from '@tinymce/tinymce-react';
2
- import { TinyMCECommonOptions } from 'jamespot-user-api';
2
+ import { JFileApi, TinyMCECommonOptions } from 'jamespot-user-api';
3
3
  import { Ref } from 'react';
4
4
  import { DataCy } from '../../../../types/dataAttributes';
5
- import { TinyMCEExtension } from './types';
5
+ import { MentionQuery, TinyMCEExtension } from './types';
6
6
  declare global {
7
7
  const tinymce: any;
8
8
  }
9
- export type TinyMention = {
10
- type: 'autocompleteitem';
11
- value: string;
12
- text: string;
13
- icon?: string;
14
- };
15
- export type MentionQuery = (query: string) => Promise<TinyMention[]>;
16
9
  export type JRCInputTinyMCERawProps = DataCy & {
17
10
  token?: string;
18
11
  commonOptions: TinyMCECommonOptions;
@@ -36,5 +29,8 @@ export type JRCInputTinyMCERawProps = DataCy & {
36
29
  height?: number;
37
30
  autofocus?: boolean;
38
31
  readOnly?: boolean;
32
+ handlers: {
33
+ file: Pick<JFileApi, 'upload'>;
34
+ };
39
35
  };
40
36
  export declare const JRCInputTinyMCERaw: import("react").ForwardRefExoticComponent<Omit<JRCInputTinyMCERawProps, "ref"> & import("react").RefAttributes<Editor>>;
@@ -0,0 +1,12 @@
1
+ import { Editor } from 'tinymce';
2
+ import { JFileApi } from 'jamespot-user-api';
3
+ import { MentionQuery } from './types';
4
+ import { IntlShape } from 'react-intl/src/types';
5
+ export declare const handlePasteImage: (editor: Editor, token: string | undefined, handlers: {
6
+ file: Pick<JFileApi, "upload">;
7
+ }, intl: IntlShape) => void;
8
+ export declare const handleAutocomplete: (editor: Editor, mentionsQueries: {
9
+ users: MentionQuery;
10
+ tags: MentionQuery;
11
+ contents: MentionQuery;
12
+ }) => void;
@@ -0,0 +1,3 @@
1
+ import { Editor } from 'tinymce';
2
+ import { TinyMCEExtensionBuilder } from '../../types';
3
+ export declare const GifsExtension: TinyMCEExtensionBuilder<[(editor: Editor) => void, () => void]>;
@@ -9,4 +9,5 @@ export declare const JTinyMCEExtensionsBuilders: {
9
9
  funny: (text: string) => Promise<string>;
10
10
  }, import("react-intl").IntlShape]>;
11
11
  readonly markdown: import("../types").TinyMCEExtensionBuilder<[(editor: import("tinymce").Editor) => void, import("react-intl").IntlShape]>;
12
+ readonly gifs: import("../types").TinyMCEExtensionBuilder<[(editor: import("tinymce").Editor) => void, () => void]>;
12
13
  };
@@ -5,3 +5,10 @@ export type TinyMCEExtension = {
5
5
  export interface TinyMCEExtensionBuilder<T extends Array<any>> {
6
6
  (...args: T): TinyMCEExtension;
7
7
  }
8
+ export type TinyMention = {
9
+ type: 'autocompleteitem';
10
+ value: string;
11
+ text: string;
12
+ icon?: string;
13
+ };
14
+ export type MentionQuery = (query: string) => Promise<TinyMention[]>;
@@ -286,7 +286,7 @@ export declare const OptionMenu: import("styled-components").StyledComponent<"di
286
286
  } & {
287
287
  sizeVariant?: "s" | "md";
288
288
  minWidth?: string | false;
289
- }, "key" | "ref" | "color" | "slot" | "style" | "title" | "theme" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part">;
289
+ }, "key" | "ref" | "color" | "theme" | "slot" | "style" | "title" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part">;
290
290
  export declare const SelectedOptionWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
291
291
  export declare const SelectedOption: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
292
292
  type: "button";
@@ -1,6 +1,3 @@
1
1
  import { JRCAppHeaderProps } from './JRCAppHeader.types';
2
- declare const JRCAppHeader: {
3
- (props: JRCAppHeaderProps): import("react/jsx-runtime").JSX.Element;
4
- defaultProps: {};
5
- };
2
+ declare const JRCAppHeader: (props: JRCAppHeaderProps) => import("react/jsx-runtime").JSX.Element;
6
3
  export { JRCAppHeader };
@@ -23,7 +23,7 @@ type JRCCommentProps = {
23
23
  existingWidgetsWrapperComponent: (comment: jCommentList, widgets: WidgetWrapperProps[], mode: WidgetDisplayMode, inplace: boolean) => ReactNode;
24
24
  activeDrives: DriveOrFilebank[];
25
25
  handlers: FoldersHandlers & {
26
- file: Pick<JFileApi, 'copy'>;
26
+ file: Pick<JFileApi, 'copy' | 'upload'>;
27
27
  fileIntegrity: Pick<JFileIntegrity, 'getCommentQuarantines'>;
28
28
  drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
29
29
  user: Pick<JUserApi, 'get' | 'getFields'>;
@@ -31,7 +31,7 @@ export type JRCCommentsBlocProps = {
31
31
  variant?: 'modal' | 'inline';
32
32
  canComment: boolean;
33
33
  handlers: FoldersHandlers & {
34
- file: Pick<JFileApi, 'copy' | 'deleteFile'>;
34
+ file: Pick<JFileApi, 'copy' | 'deleteFile' | 'upload'>;
35
35
  fileIntegrity: Pick<JFileIntegrity, 'getCommentQuarantines'>;
36
36
  drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
37
37
  user: Pick<JUserApi, 'get' | 'getFields'>;
@@ -9,8 +9,8 @@ type EditCommentProps = {
9
9
  commentContent: string | null;
10
10
  setCommentContent: (content: string) => void;
11
11
  token: string;
12
- handlers?: FoldersHandlers & {
13
- file: Pick<JFileApi, 'copy'>;
12
+ handlers: FoldersHandlers & {
13
+ file: Pick<JFileApi, 'copy' | 'upload'>;
14
14
  drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
15
15
  };
16
16
  deleteFile?: (id: number) => Promise<void>;
@@ -13,8 +13,8 @@ type NewCommentProps = {
13
13
  onComment: (params: Pick<AddCommentParams, 'content' | 'alertAuthor' | 'sendAlert'>) => Promise<void>;
14
14
  token?: string;
15
15
  tinyMCEConfig: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries' | 'tinymceScriptSrc'>;
16
- handlers?: FoldersHandlers & {
17
- file: Pick<JFileApi, 'copy'>;
16
+ handlers: FoldersHandlers & {
17
+ file: Pick<JFileApi, 'copy' | 'upload'>;
18
18
  drive: Pick<JDriveApi, 'msDocuments' | 'dropboxDocuments' | 'groups' | 'tenants' | 'listAccount' | 'isAccountLogged' | 'checkAccountToken' | 'getAccount' | 'logout' | 'setDefaultAccount' | 'getDocument'>;
19
19
  };
20
20
  onError?: (message?: string) => void;
@@ -0,0 +1,13 @@
1
+ import { Gif } from 'jamespot-user-api';
2
+ declare const Gif: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {
3
+ $aspectRatio: number;
4
+ }, never>;
5
+ type JRCGifSelectorProps = {
6
+ gifs: Gif[];
7
+ onSearch: (query: string) => void;
8
+ loading?: boolean;
9
+ onSelectGif: (url: string) => void;
10
+ onReachEnd: () => void;
11
+ };
12
+ export declare const JRCGifSelector: ({ gifs, onSearch, loading, onSelectGif, onReachEnd }: JRCGifSelectorProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { JRCGifSelector } from './JRCGifSelector';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ type Story = StoryObj<typeof JRCGifSelector>;
6
+ export declare const Default: Story;
7
+ export declare const NoResult: Story;
8
+ export declare const Loading: Story;
@@ -5,11 +5,5 @@ interface JRCMenuItemProps {
5
5
  size: number;
6
6
  attr: string | ReactNode;
7
7
  }
8
- declare const JRCMenuItem: {
9
- (props: JRCMenuItemProps): JSX.Element;
10
- defaultProps: {
11
- icon: string;
12
- size: number;
13
- };
14
- };
8
+ declare const JRCMenuItem: ({ label, attr, icon, size }: JRCMenuItemProps) => JSX.Element;
15
9
  export { JRCMenuItem };
@@ -1,4 +1,4 @@
1
- import { WidgetDisplayMode } from 'jamespot-user-api';
1
+ import { JFileApi, WidgetDisplayMode } from 'jamespot-user-api';
2
2
  import { JRCInputTinyMCERawProps } from '../../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
3
3
  import { TinyMCEExtension } from '../../Form/Input/JRCInputTinyMCERaw/types';
4
4
  export type JRCWidgetArticleTextProps = {
@@ -9,5 +9,8 @@ export type JRCWidgetArticleTextProps = {
9
9
  onChange: (text: string) => void;
10
10
  additionalExtensions?: Array<TinyMCEExtension>;
11
11
  tinyMCECommonOptions?: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries'> & Partial<Pick<JRCInputTinyMCERawProps, 'tinymceScriptSrc'>>;
12
+ handlers: {
13
+ file: Pick<JFileApi, 'upload'>;
14
+ };
12
15
  };
13
- export declare const JRCWidgetArticleText: ({ text, autoFocus, token, mode, onChange, additionalExtensions, tinyMCECommonOptions, }: JRCWidgetArticleTextProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const JRCWidgetArticleText: ({ text, autoFocus, token, mode, onChange, additionalExtensions, tinyMCECommonOptions, handlers, }: JRCWidgetArticleTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -77,6 +77,7 @@ export { JRCFileOpen } from './JRCFileOpen/JRCFileOpen';
77
77
  export { JRCFileViewer } from './JRCFileViewer/JRCFileViewer';
78
78
  export { JRCFlexBox } from './JRCFlex/JRCFlexBox';
79
79
  export { JRCFolders } from './JRCFolders/JRCFolders';
80
+ export { JRCGifSelector } from './JRCGifSelector/JRCGifSelector';
80
81
  export { JRCGrid } from './JRCGrid/JRCGrid';
81
82
  export { JRCStyledHref } from './JRCHref/JRCHref';
82
83
  export { JRCHtml } from './JRCHtml/JRCHtml';
@@ -6,7 +6,7 @@
6
6
  * @param delay delay
7
7
  */
8
8
  export declare function useDebounce<T = string>(value: T, delay?: number): T;
9
- export declare function useDebouncedCallback<T = string>(fn?: (value: T) => void): {
9
+ export declare function useDebouncedCallback<T = string>(fn?: (value: T) => void, delay?: number): {
10
10
  debouncedFunction: (v: T) => void;
11
11
  value: T | undefined;
12
12
  };
@@ -17,7 +17,8 @@ export type { JRCInputTextIconButtonProps } from './components/Form/Input/JRCInp
17
17
  export type { JRCInputTextareaProps } from './components/Form/Input/JRCInputTextarea/JRCInputTextarea';
18
18
  export type { JRCInputTimeProps } from './components/Form/Input/JRCInputTime/JRCInputTime';
19
19
  export type { JRCInputTinyMCEProps } from './components/Form/Input/JRCInputTinyMCE/JRCInputTinyMCE';
20
- export type { JRCInputTinyMCERawProps, MentionQuery, TinyMention, } from './components/Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
20
+ export type { JRCInputTinyMCERawProps } from './components/Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
21
+ export type { MentionQuery, TinyMention } from './components/Form/Input/JRCInputTinyMCERaw/types';
21
22
  export type { JRCInputUrlProps } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
22
23
  export type { JRCAutocompleteCommunityProps } from './components/Form/Input/JRCSelect/JRCAutocompleteCommunity';
23
24
  export type { AutocompleteView } from './components/Form/Input/JRCSelect/JRCInputAutocompleteViews';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.2.58",
3
+ "version": "1.2.59",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -66,7 +66,7 @@
66
66
  "fork-ts-checker-webpack-plugin": "^9.1.0",
67
67
  "husky": "^7.0.4",
68
68
  "identity-obj-proxy": "^3.0.0",
69
- "jamespot-user-api": "^1.2.58",
69
+ "jamespot-user-api": "^1.2.59",
70
70
  "jest": "^30.2.0",
71
71
  "jest-environment-jsdom": "^30.2.0",
72
72
  "jest-styled-components": "^7.2.0",
@@ -90,7 +90,6 @@
90
90
  "react-table": "^7.8.0",
91
91
  "react-test-renderer": "^17.0.2",
92
92
  "react-tooltip": "^4.5.1",
93
- "react-transition-group": "^4.4.5",
94
93
  "redux": "^4.2.1",
95
94
  "source-map-loader": "^1.1.3",
96
95
  "storybook": "^9.1.10",
@@ -123,7 +122,7 @@
123
122
  "pnpm": ">=9.9.0 <10"
124
123
  },
125
124
  "dependencies": {
126
- "@types/react-transition-group": "^4.4.12"
125
+ "react-transition-state": "^2.3.1"
127
126
  },
128
127
  "scripts": {
129
128
  "dev": "webpack --env NODE_ENV=development",