jamespot-react-components 1.0.243 → 1.0.245

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,9 +1,9 @@
1
+ import React, { ReactElement } from 'react';
1
2
  import { jFileLittle } from 'jamespot-user-api';
2
- import React from 'react';
3
3
  type EditorImageUploadProps = {
4
4
  token: string;
5
5
  initialFile?: jFileLittle;
6
- children(open: () => void, openCrop: () => void): React.ReactElement<HTMLElement>;
6
+ children(open: () => void, openCrop: () => void): ReactElement<HTMLElement>;
7
7
  onUploadSuccess: (file: jFileLittle) => void;
8
8
  };
9
9
  export declare const EditorImageUpload: ({ token, children, initialFile, onUploadSuccess }: EditorImageUploadProps) => React.JSX.Element;
@@ -32,6 +32,7 @@ export type NativeCheckboxProps<TFieldValues extends FieldValues = FieldValues>
32
32
  ref?: React.ForwardedRef<HTMLInputElement>;
33
33
  } & {
34
34
  value: TFieldValues | TFieldValues[];
35
+ htmlFor?: string;
35
36
  };
36
37
  export declare const ReadOnlyUl: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
37
38
  export declare const StyledDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -3,9 +3,14 @@ import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
3
3
  import { DataCy } from '../../../../types/dataAttributes';
4
4
  import { FieldValues } from 'react-hook-form';
5
5
  import { jFileLittle } from 'jamespot-user-api';
6
+ export type DropZoneDimensions = {
7
+ width: number;
8
+ height: number;
9
+ };
6
10
  export type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
7
11
  token?: string | undefined;
8
12
  attrName?: string;
13
+ dzDimensions?: DropZoneDimensions;
9
14
  onLoading?: (state: boolean) => void;
10
15
  aspectRatio?: number | undefined;
11
16
  defaultImages?: {
@@ -1,3 +1,4 @@
1
+ import { DropZoneDimensions } from './JRCInputImage';
1
2
  export declare const InputFileWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
3
  export declare const Grid: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
4
  position?: "right" | "bottom" | undefined;
@@ -6,6 +7,7 @@ export declare const Grid: import("styled-components").StyledComponent<"div", im
6
7
  export declare const DropZone: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
7
8
  position?: "right" | "bottom" | undefined;
8
9
  columnCount: number;
10
+ dzDimensions?: DropZoneDimensions | undefined;
9
11
  }, never>;
10
12
  export declare const ReadOnlyImg: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
11
13
  export declare const DropZoneButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Editor } from '@tinymce/tinymce-react';
3
- import { LegacyRef } from 'react';
3
+ import { Ref } from 'react';
4
4
  import { TinyMCECommonOptions } from 'jamespot-user-api';
5
5
  import { DataCy } from '../../../../types/dataAttributes';
6
6
  import { TinyMCEExtension } from './extensions/JTinyMCEExtensions';
@@ -24,7 +24,7 @@ export type JRCInputTinyMCERawProps = DataCy & {
24
24
  };
25
25
  onBlur?: () => void;
26
26
  onChange: (html: string, text: string) => void;
27
- ref?: LegacyRef<Editor>;
27
+ ref?: Ref<Editor>;
28
28
  tinymceScriptSrc?: string;
29
29
  autoFocus?: boolean;
30
30
  inline?: boolean;
@@ -38,4 +38,27 @@ export type JRCInputTinyMCERawProps = DataCy & {
38
38
  autofocus?: boolean;
39
39
  readOnly?: boolean;
40
40
  };
41
- export declare const JRCInputTinyMCERaw: ({ dataCy, token, value, onBlur, onChange, mentionsQueries, tinymceScriptSrc, autoFocus, inline, placeholder, additionalExtensions, ref, height, autofocus, ...props }: JRCInputTinyMCERawProps) => React.JSX.Element;
41
+ export declare const JRCInputTinyMCERaw: React.ForwardRefExoticComponent<Omit<DataCy & {
42
+ token?: string | undefined;
43
+ commonOptions: TinyMCECommonOptions;
44
+ additionalExtensions?: TinyMCEExtension[] | undefined;
45
+ value: string | {
46
+ html: string;
47
+ text: string;
48
+ };
49
+ onBlur?: (() => void) | undefined;
50
+ onChange: (html: string, text: string) => void;
51
+ ref?: React.Ref<Editor> | undefined;
52
+ tinymceScriptSrc?: string | undefined;
53
+ autoFocus?: boolean | undefined;
54
+ inline?: boolean | undefined;
55
+ placeholder?: string | undefined;
56
+ mentionsQueries: {
57
+ users: MentionQuery;
58
+ tags: MentionQuery;
59
+ contents: MentionQuery;
60
+ };
61
+ height?: number | undefined;
62
+ autofocus?: boolean | undefined;
63
+ readOnly?: boolean | undefined;
64
+ }, "ref"> & React.RefAttributes<Editor>>;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { JRCInputSelectProps } from './JRCInputSelect.types';
3
+ import type { FieldValues } from 'react-hook-form';
4
+ export declare function JRCInputSelectExtended<T extends FieldValues = FieldValues>(props: JRCInputSelectProps<T>): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { NativeSelectProps } from './JRCInputSelect.types';
2
+ import type { FieldValues } from 'react-hook-form';
3
+ export declare const JRCInputSelectRaw: <T extends FieldValues = FieldValues>(props: Pick<Partial<NativeSelectProps<T>>, "ref"> & Omit<NativeSelectProps<T>, "ref">) => JSX.Element;
@@ -15,6 +15,7 @@ export type JRCCommentsBlocProps = {
15
15
  tinyMCEConfig: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries' | 'tinymceScriptSrc'>;
16
16
  onComment: (params: Pick<AddCommentParams, 'content' | 'alertAuthor' | 'sendAlert'>) => Promise<void>;
17
17
  isWidgetActive?: boolean;
18
+ canCreateWidget?: boolean;
18
19
  widgetListComponent: React.ReactNode;
19
20
  newWidgetsWrapperComponent: React.ReactNode;
20
21
  existingWidgetsWrapperComponent: (comment: jCommentList, widgets: WidgetWrapperProps[], mode: WidgetDisplayMode, inplace: boolean) => React.ReactNode;
@@ -52,4 +53,4 @@ export type JRCCommentsBlocProps = {
52
53
  onReport: (commentUri: string) => void;
53
54
  };
54
55
  export declare const AvatarWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
55
- export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, variant, canComment, handlers, socialQuestion, articleId, additionalExtensions, onReport, }: JRCCommentsBlocProps) => React.JSX.Element;
56
+ export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, variant, canComment, handlers, socialQuestion, articleId, additionalExtensions, onReport, }: JRCCommentsBlocProps) => React.JSX.Element;
@@ -20,9 +20,9 @@ export type NewCommentProps = {
20
20
  };
21
21
  onError?: (message?: string) => void;
22
22
  activeDrives: DriveOrFilebank[];
23
- isWidgetActive?: boolean;
23
+ canCreateWidget?: boolean;
24
24
  socialQuestion?: boolean;
25
25
  deleteFile?: (id: number) => Promise<void>;
26
26
  additionalExtensions: Array<TinyMCEExtension>;
27
27
  };
28
- export declare const NewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, handlers, activeDrives, isWidgetActive, socialQuestion, deleteFile, additionalExtensions, }: NewCommentProps) => React.JSX.Element;
28
+ export declare const NewComment: ({ newWidgetsWrapperComponent, widgetListComponent, canComment, loading, currentUser, onComment, onError, tinyMCEConfig, token, handlers, activeDrives, canCreateWidget, socialQuestion, deleteFile, additionalExtensions, }: NewCommentProps) => React.JSX.Element;
@@ -21,7 +21,6 @@ export declare const JRCModalBody: import("styled-components").StyledComponent<"
21
21
  modalOverflow?: "hidden" | "auto" | "scroll" | "visible" | undefined;
22
22
  }, never>;
23
23
  export declare const JRCModalContentFull: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
24
- export declare const JRCModalContentScrollbox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
25
24
  export declare const JRCModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
26
25
  modalOverflow?: "hidden" | "auto" | "scroll" | "visible" | undefined;
27
26
  }, never>;
@@ -1,5 +1,5 @@
1
- import { WidgetCheckListContent } from 'jamespot-user-api';
2
1
  import React from 'react';
2
+ import { WidgetCheckListContent } from 'jamespot-user-api';
3
3
  export declare const CSSRowLinkWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
4
4
  border?: boolean | undefined;
5
5
  }, never>;
@@ -82,7 +82,8 @@ export { JRCInputUrl } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
82
82
  export { JRCInputCommunity } from './components/Form/Input/JRCSelect/JRCAutocompleteCommunity';
83
83
  export { JRCInputAudience } from './components/Form/Input/JRCSelect/JRCInputAudience';
84
84
  export { JRCInputAutocomplete } from './components/Form/Input/JRCSelect/JRCInputAutocomplete';
85
- export { JRCInputSelect, JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelect';
85
+ export { JRCInputSelectExtended } from './components/Form/Input/JRCSelect/JRCInputSelectExtended';
86
+ export { JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelectRaw';
86
87
  export { JRCInputSelectHierarchicalTree } from './components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree';
87
88
  export { JRCInputSelectList } from './components/Form/Input/JRCSelect/JRCInputSelectList';
88
89
  export { JRCAlert } from './components/JRCAlert/JRCAlert';
@@ -213,4 +214,3 @@ export { JTinyMCEExtensionsBuilders } from './components/Form/Input/JRCInputTiny
213
214
  */
214
215
  export * from './types';
215
216
  export { Utils } from './utils';
216
- export { FormControls } from './components/Form/Input/Common/useFormControls';
@@ -4,6 +4,7 @@ export type { MessageType } from './components/Common/util/getColor.util';
4
4
  export * from './components/Form/Common/types';
5
5
  export type { JRCValueLabelProps } from './components/Form/Common/types';
6
6
  export type { JRCInputFieldProps, NameControl } from './components/Form/Input/Common/JRCFormFieldRenderer.types';
7
+ export type { FormControls } from './components/Form/Input/Common/useFormControls';
7
8
  export type { JRCAutocompleteAudienceProps } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteAudience';
8
9
  export type { JRCAutocompleteTaxonomyProps } from './components/Form/Input/Deprecated/JRCFormAutocomplete/JRCFormAutocompleteTaxonomy';
9
10
  export type { JRCFormCheckboxProps } from './components/Form/Input/Deprecated/JRCFormCheckbox/JRCFormCheckbox.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.0.243",
3
+ "version": "1.0.245",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -80,7 +80,7 @@
80
80
  "chroma-js": "^2.1.1",
81
81
  "classnames": "^2.3.1",
82
82
  "dompurify": "^3.0.5",
83
- "jamespot-user-api": "^1.0.217",
83
+ "jamespot-user-api": "^1.0.218",
84
84
  "moment": "2.29.4",
85
85
  "react": "^17.x",
86
86
  "react-beautiful-dnd": "^13.1.1",
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import { JRCInputSelectProps, NativeSelectProps } from './JRCInputSelect.types';
3
- import type { FieldValues } from 'react-hook-form';
4
- export declare const Select: <T extends FieldValues = FieldValues>(props: Pick<Partial<NativeSelectProps<T>>, "ref"> & Omit<NativeSelectProps<T>, "ref">) => JSX.Element;
5
- export declare function JRCInputSelect<T extends FieldValues = FieldValues>(props: JRCInputSelectProps<T>): React.JSX.Element;
6
- export declare const JRCInputSelectRaw: <T extends FieldValues = FieldValues>(props: Pick<Partial<NativeSelectProps<T>>, "ref"> & Omit<NativeSelectProps<T>, "ref">) => JSX.Element;