jamespot-react-components 1.0.201 → 1.0.203

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.
@@ -6,7 +6,7 @@ export declare const EditorUploader: ({ token, uniqid, label, accept, multiple,
6
6
  label: string;
7
7
  accept: string;
8
8
  multiple: boolean;
9
- name?: "attachment" | "editorFiles" | undefined;
9
+ name?: "editorFiles" | "attachment" | undefined;
10
10
  onUploadStart: (count?: number) => void;
11
11
  onUploadSuccess: (response: jFileLittle) => void;
12
12
  onUploadSucessEnd?: (() => void) | undefined;
@@ -25,6 +25,7 @@ export type CheckboxProps<TFieldValues> = DataCy & {
25
25
  valueTypeIsBoolean?: boolean;
26
26
  readOnly?: boolean;
27
27
  getReadOnlyLabel?: (value: TFieldValues) => React.ReactNode;
28
+ limit?: number;
28
29
  };
29
30
  export type JRCInputCheckboxProps<TFieldValues extends FieldValues = FieldValues> = CheckboxProps<TFieldValues> & JRCInputFieldProps<TFieldValues>;
30
31
  export type NativeCheckboxProps<TFieldValues extends FieldValues = FieldValues> = CheckboxProps<TFieldValues> & PartialBy<Omit<ControllerRenderProps<TFieldValues>, 'value' | 'ref'>, 'onBlur'> & {
@@ -1,4 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { FormInputProps } from '../../Deprecated/JRCFormFieldRender';
3
- export declare const CheckboxWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const CheckboxWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
4
+ disabled?: boolean | undefined;
5
+ }, never>;
4
6
  export declare const JRCCheckbox: React.ForwardRefExoticComponent<FormInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
- import { Drive, jFileLittle } from 'jamespot-user-api';
1
+ import jamespot, { Drive, FileCopyParams, jFileLittle } from 'jamespot-user-api';
2
2
  import * as React from 'react';
3
3
  import { WrappedFieldInputProps } from 'redux-form';
4
4
  export type DriveOrFilebank = Drive | 'fileBank';
@@ -19,5 +19,11 @@ export interface JRCInputFileAdavancedProps extends React.ComponentPropsWithoutR
19
19
  existingFiles?: Array<jFileLittle>;
20
20
  deleteFile?: (id: number) => Promise<void>;
21
21
  activeDrives?: DriveOrFilebank[];
22
+ fileBankRequests?: {
23
+ getBanks: () => ReturnType<typeof jamespot.filebank.getBanks>;
24
+ getFolders: (uri: string) => ReturnType<typeof jamespot.filebank.getFolders>;
25
+ getDocuments: (uri: string) => ReturnType<typeof jamespot.filebank.getDocuments>;
26
+ copyFile: (params: FileCopyParams) => ReturnType<typeof jamespot.file.copy>;
27
+ };
22
28
  }
23
29
  export declare const JRCInputFileAdvancedRaw: React.ForwardRefExoticComponent<JRCInputFileAdavancedProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const IconBefore: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, }: import("components/JRCIcon/JRCIcon").JRCIconProps) => import("react").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const IconBefore: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, faOptions, }: import("components/JRCIcon/JRCIcon").JRCIconProps) => import("react").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
3
3
  export declare const IconAfter: import("styled-components").StyledComponent<{
4
4
  ({ hasLicense, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onClick"> & import("../../../../types/dataAttributes").DataCy & {
5
5
  icon: string;
@@ -17,6 +17,8 @@ export declare const IconAfter: import("styled-components").StyledComponent<{
17
17
  bg?: import("../../../../styles/theme").Colors | import("../../../../styles/theme").Shades | undefined;
18
18
  bgHover?: import("../../../../styles/theme").Colors | import("../../../../styles/theme").Shades | undefined;
19
19
  iconSize?: number | undefined;
20
+ badgeNumber?: number | undefined;
21
+ badgeInline?: boolean | undefined;
20
22
  } & {
21
23
  type: string;
22
24
  variant: string;
@@ -6,6 +6,7 @@ type SelectHierarchicalTreeModalProps = {
6
6
  inPlace: boolean;
7
7
  options: any[];
8
8
  updateOptions: (options: any[]) => void;
9
+ limit?: number;
9
10
  };
10
11
  export type SKOSTree = {
11
12
  title: string;
@@ -37,6 +37,8 @@ export declare const JRCIconButtonAppLeftColumn: import("styled-components").Sty
37
37
  bg?: import("../../styles/theme").Colors | import("../../styles/theme").Shades | undefined;
38
38
  bgHover?: import("../../styles/theme").Colors | import("../../styles/theme").Shades | undefined;
39
39
  iconSize?: number | undefined;
40
+ badgeNumber?: number | undefined;
41
+ badgeInline?: boolean | undefined;
40
42
  } & {
41
43
  type: string;
42
44
  variant: string;
@@ -2,9 +2,10 @@ import { jFileLittle } from 'jamespot-user-api';
2
2
  import React from 'react';
3
3
  export type JRCAttachmentsProps = {
4
4
  files: jFileLittle[];
5
- isWedocActive: boolean;
5
+ isWedocActive?: boolean;
6
6
  getAccessHash?: (fileId: number) => Promise<string>;
7
- onError: (message?: string) => void;
8
- onDelete?: (id: number) => void;
7
+ onError?: (message?: string) => void;
8
+ onDelete?: (id: number) => Promise<void>;
9
+ mode?: 'view' | 'edit';
9
10
  };
10
- export declare const JRCAttachments: ({ files, isWedocActive, getAccessHash, onError, onDelete }: JRCAttachmentsProps) => React.JSX.Element;
11
+ export declare const JRCAttachments: ({ files, isWedocActive, getAccessHash, onError, onDelete, mode, }: JRCAttachmentsProps) => React.JSX.Element;
@@ -2,7 +2,7 @@ import jamespot, { AddCommentParams, AddRemoveActionParams, Model, UpdateComment
2
2
  import { jCommentList } from 'jamespot-user-api/lib/src/types/comment';
3
3
  import React from 'react';
4
4
  import { JRCInputTinyMCERawProps } from '../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
5
- import { DriveOrFilebank } from '../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
5
+ import { DriveOrFilebank, JRCInputFileAdavancedProps } from '../Form/Input/JRCInputFileAdvanced/JRCInputFileAdvancedRaw';
6
6
  export type JRCCommentsBlocProps = {
7
7
  comments?: jCommentList[];
8
8
  initialCommentsNumber?: number;
@@ -32,6 +32,8 @@ export type JRCCommentsBlocProps = {
32
32
  activeDrives: DriveOrFilebank[];
33
33
  socialActionAdd: ({ targetId, targetType, type, }: AddRemoveActionParams) => ReturnType<typeof jamespot.socialAction.add>;
34
34
  variant?: 'modal' | 'inline';
35
+ canComment: boolean;
36
+ fileBankRequests: Required<JRCInputFileAdavancedProps>['fileBankRequests'];
35
37
  };
36
38
  export declare const AvatarWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
37
- export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, fetchUser, fetchUserFields, deleteFile, fetchSocialActionUserList, removeLike, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, socialActionAdd, variant, }: JRCCommentsBlocProps) => React.JSX.Element;
39
+ export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, fetchUser, fetchUserFields, deleteFile, fetchSocialActionUserList, removeLike, onError, highlightFields, userModel, userAccountStatus, isWedocActive, getAccessHash, onGetHashError, activeDrives, socialActionAdd, variant, canComment, fileBankRequests, }: JRCCommentsBlocProps) => React.JSX.Element;
@@ -1,4 +1,7 @@
1
1
  import * as React from 'react';
2
+ type FontAwesomeOptions = {
3
+ style?: 'solid' | 'regular' | 'brands';
4
+ };
2
5
  /**
3
6
  * Props type for JRCIcon
4
7
  * @property name string: Name of the icon (required)
@@ -20,5 +23,7 @@ export interface JRCIconProps {
20
23
  /** margin */
21
24
  isMargin?: boolean;
22
25
  className?: string;
26
+ faOptions?: FontAwesomeOptions;
23
27
  }
24
- export declare const JRCIcon: ({ color, variant, name, size, isMargin, className, }: JRCIconProps) => React.JSX.Element;
28
+ export declare const JRCIcon: ({ color, variant, name, size, isMargin, className, faOptions, }: JRCIconProps) => React.JSX.Element;
29
+ export {};
@@ -32,6 +32,8 @@ export type JRCIconButtonProps = Omit<React.ComponentPropsWithoutRef<'button'>,
32
32
  bg?: Colors | Shades;
33
33
  bgHover?: Colors | Shades;
34
34
  iconSize?: number;
35
+ badgeNumber?: number;
36
+ badgeInline?: boolean;
35
37
  };
36
38
  declare const defaultProps: {
37
39
  type: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const VerticalItemFlex: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const JRCDefaultIconVerticalItem: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, }: import("../JRCIcon/JRCIcon").JRCIconProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const JRCDefaultIconVerticalItem: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, faOptions, }: import("../JRCIcon/JRCIcon").JRCIconProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
4
4
  export interface ItemProps {
5
5
  isActive: boolean;
6
6
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  type MessageVariants = 'success' | 'error' | 'warning' | 'info';
3
3
  export type JRCMessageProps = {
4
4
  variant: MessageVariants;
5
- message: string;
5
+ message: string | React.ReactNode;
6
6
  };
7
7
  export declare const JRCMessage: ({ variant, message }: JRCMessageProps) => React.JSX.Element;
8
8
  export {};
@@ -13,5 +13,13 @@ export type JRCSidePanelModalProps = {
13
13
  footer?: ReactNode;
14
14
  removePadding?: boolean;
15
15
  inplace?: boolean;
16
+ offsetTop?: number;
16
17
  };
18
+ /**
19
+ * ℹ️⚠️
20
+ * Used as a child component of {@link JRCContainer}, the modal will be mounted in a preset portal container.
21
+ * Otherwise :
22
+ * - The modal will be mounted where it is declared (no portal).
23
+ * - The modal can be mounted in a specific portal container provided manually with the 'jrc-container-panel' id.
24
+ */
17
25
  export declare const JRCSidePanelModal: React.ForwardRefExoticComponent<JRCSidePanelModalProps & React.RefAttributes<HTMLDivElement>>;
@@ -3,6 +3,7 @@ export declare const JRCModalBox: import("styled-components").StyledComponent<"d
3
3
  position?: "left" | "right" | undefined;
4
4
  open?: boolean | undefined;
5
5
  inplace?: boolean | undefined;
6
+ offsetTop?: number | undefined;
6
7
  }, never>;
7
8
  export declare const JRCModalTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
9
  export declare const JRCModalOptions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -7,7 +7,7 @@ export declare const VerticalWrapper: import("styled-components").StyledComponen
7
7
  export declare const VerticalItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
8
8
  export declare const ItemButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, ItemProps, never>;
9
9
  export declare const VerticalItemFlex: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
10
- export declare const JRCDefaultIconVerticalItem: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, }: import("../JRCIcon/JRCIcon").JRCIconProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
10
+ export declare const JRCDefaultIconVerticalItem: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, faOptions, }: import("../JRCIcon/JRCIcon").JRCIconProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
11
11
  /**
12
12
  * Interface of a single Menu Item props
13
13
  * @member label label of the tag
@@ -12,17 +12,18 @@ export type JRCWidgetAttachmentProps = {
12
12
  size: number;
13
13
  }[];
14
14
  fileDisplay?: 'list';
15
- onDelete?: (idFile: number) => void;
16
- onError: (message?: string) => void;
15
+ onDelete?: (idFile: number) => Promise<void>;
16
+ onError?: (message?: string) => void;
17
17
  mocks?: {
18
18
  fileGetDownloads: typeof jamespot.file.getDownload;
19
19
  fileGeneratePreview: typeof jamespot.file.generatePreview;
20
20
  };
21
+ mode?: 'view' | 'edit';
21
22
  };
22
23
  /**
23
24
  * TODO: resolveFileMimetype should be done before
24
25
  */
25
- export declare const JRCWidgetAttachment: ({ files, inline, onClick, onDelete, onError, mocks, }: JRCWidgetAttachmentProps & {
26
+ export declare const JRCWidgetAttachment: ({ files, inline, onClick, onDelete, onError, mocks, mode, }: JRCWidgetAttachmentProps & {
26
27
  onClick: (idFile: number) => void;
27
28
  inline?: boolean | undefined;
28
29
  }) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.0.201",
3
+ "version": "1.0.203",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -81,7 +81,7 @@
81
81
  "chroma-js": "^2.1.1",
82
82
  "classnames": "^2.3.1",
83
83
  "dompurify": "^3.0.5",
84
- "jamespot-user-api": "^1.0.176",
84
+ "jamespot-user-api": "^1.0.178",
85
85
  "moment": "2.29.4",
86
86
  "react": "^17.x",
87
87
  "react-beautiful-dnd": "^13.1.1",