jamespot-react-components 1.0.146 → 1.0.147

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 (48) hide show
  1. package/build/assets/gif.605d1d151a01356b376d5c4ac2f40d19.png +0 -0
  2. package/build/jamespot-react-components.js +538 -571
  3. package/build/jamespot-react-components.js.map +1 -1
  4. package/build/src/components/Common/FastCss.d.ts +1 -0
  5. package/build/src/components/Editors/components/EditorInput.d.ts +2 -1
  6. package/build/src/components/Editors/components/EditorSelect.d.ts +2 -1
  7. package/build/src/components/Editors/components/EditorUploader.d.ts +2 -2
  8. package/build/src/components/Form/Input/JRCFormFile/File.d.ts +2 -2
  9. package/build/src/components/Form/Input/JRCFormFile/JRCFormFile.d.ts +3 -3
  10. package/build/src/components/Form/Input/JRCFormFile/JRCFormFile.styles.d.ts +1 -1
  11. package/build/src/components/Form/Input/JRCFormFile/file.api.d.ts +15 -2
  12. package/build/src/components/Form/Input/JRCInputFile/JRCInputFile.d.ts +5 -5
  13. package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.d.ts +3 -5
  14. package/build/src/components/JRCButton/JRCButton.d.ts +2 -2
  15. package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +1 -1
  16. package/build/src/components/JRCEmptySpace/JRCEmptySpace.d.ts +12 -0
  17. package/build/src/components/JRCEmptySpace/JRCEmptySpace.stories.d.ts +4 -0
  18. package/build/src/components/JRCFile/JRCFileImage.d.ts +3 -0
  19. package/build/src/components/JRCFileViewer/JRCFileViewer.d.ts +13 -2
  20. package/build/src/components/JRCFileViewer/JRCFileViewer.styles.d.ts +1 -0
  21. package/build/src/components/JRCFileViewer/JRCFileViewerArrows.d.ts +6 -2
  22. package/build/src/components/JRCFileViewer/JRCFileViewerContent.d.ts +5 -4
  23. package/build/src/components/JRCFileViewer/JRCFileViewerContentApplication.d.ts +3 -2
  24. package/build/src/components/JRCFileViewer/JRCFileViewerOpenWithOptions.d.ts +3 -2
  25. package/build/src/components/JRCFileViewer/types.d.ts +3 -9
  26. package/build/src/components/JRCFileViewer/utils.d.ts +4 -4
  27. package/build/src/components/JRCHref/JRCHref.d.ts +2 -1
  28. package/build/src/components/JRCSidePanelModal/JRCSidePanelModal.styles.d.ts +1 -1
  29. package/build/src/components/Widgets/JRCWidgetArticleAttachment/JRCWidgetArticleAttachment.d.ts +4 -4
  30. package/build/src/components/Widgets/JRCWidgetArticleAttachment/JRCWidgetArticleAttachment.stories.d.ts +7 -0
  31. package/build/src/components/Widgets/JRCWidgetArticleGallery/JRCWidgetArticleGallery.d.ts +6 -16
  32. package/build/src/components/Widgets/JRCWidgetArticleGallery/JRCWidgetArticleGallery.stories.d.ts +8 -0
  33. package/build/src/components/Widgets/JRCWidgetArticleImage/JRCWidgetArticleImage.d.ts +5 -5
  34. package/build/src/components/Widgets/JRCWidgetArticleImage/JRCWidgetArticleImage.stories.d.ts +8 -0
  35. package/build/src/components/Widgets/JRCWidgetArticleText/JRCWidgetArticleText.stories.d.ts +7 -0
  36. package/build/src/components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitle.d.ts +6 -3
  37. package/build/src/components/Widgets/const.d.ts +0 -4
  38. package/build/src/components/Widgets/utils.d.ts +3 -3
  39. package/build/src/hooks/useRefSize.d.ts +6 -0
  40. package/build/src/index.d.ts +3 -0
  41. package/build/src/styles/theme.d.ts +1 -1
  42. package/build/src/types.d.ts +1 -0
  43. package/build/src/utils/index.d.ts +4 -2
  44. package/build/src/utils/utils.color.d.ts +2 -0
  45. package/build/src/utils/utils.files.d.ts +113 -2
  46. package/package.json +2 -2
  47. package/build/src/components/Widgets/components/Attachment.d.ts +0 -34
  48. package/build/src/components/Widgets/components/Image.d.ts +0 -10
@@ -3,5 +3,6 @@ export type FastCssProps = {
3
3
  display?: 'inline' | 'block' | 'flex' | 'grid' | 'inline-block' | 'inline-flex' | 'inline-grid';
4
4
  margin?: string;
5
5
  padding?: string;
6
+ textAlign?: 'center' | 'left' | 'right';
6
7
  };
7
8
  export declare const FastCss: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<FastCssProps, import("styled-components").DefaultTheme>>;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare const CSSInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const EditorInput: ({ placeholder, initialValue, onChange, }: {
3
+ export declare const EditorInput: ({ label, placeholder, initialValue, onChange, }: {
4
+ label: string;
4
5
  placeholder?: string | undefined;
5
6
  initialValue: string | undefined;
6
7
  autoFocus?: boolean | undefined;
@@ -4,7 +4,8 @@ export type EditorSelectOption = {
4
4
  value: string;
5
5
  };
6
6
  export type EditorSelectOptions = EditorSelectOption[];
7
- export declare const EditorSelect: <T extends string>({ options, initialValue, onChange, }: {
7
+ export declare const EditorSelect: <T extends string>({ label, options, initialValue, onChange, }: {
8
+ label: string;
8
9
  options: EditorSelectOptions;
9
10
  initialValue: string | undefined;
10
11
  onChange: (value: T) => void;
@@ -1,4 +1,4 @@
1
- import { FileResponse } from 'jamespot-user-api';
1
+ import { jFileLittle } from 'jamespot-user-api';
2
2
  import React from 'react';
3
3
  export declare const EditorUploader: ({ token, uniqid, label, accept, multiple, onUploadStart, onUploadSuccess, onUploadSucessEnd, }: {
4
4
  token: string;
@@ -7,6 +7,6 @@ export declare const EditorUploader: ({ token, uniqid, label, accept, multiple,
7
7
  accept: string;
8
8
  multiple: boolean;
9
9
  onUploadStart: (count?: number) => void;
10
- onUploadSuccess: (response: FileResponse) => void;
10
+ onUploadSuccess: (response: jFileLittle) => void;
11
11
  onUploadSucessEnd?: (() => void) | undefined;
12
12
  }) => React.JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { FileResponse } from 'jamespot-user-api';
2
+ import { jFileLittle } from 'jamespot-user-api';
3
3
  export declare const File: ({ file, index, token, step, attrName, onUploadSuccess, onDeleteSuccess, }: {
4
4
  file: File;
5
5
  index: number;
6
6
  step: number;
7
7
  token: string | undefined;
8
8
  attrName: string;
9
- onUploadSuccess?: ((response: FileResponse) => void) | undefined;
9
+ onUploadSuccess?: ((response: jFileLittle, token: string) => void) | undefined;
10
10
  onDeleteSuccess?: (() => void) | undefined;
11
11
  }) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { WrappedFieldInputProps } from 'redux-form';
3
- import { FileArticle, FileResponse } from 'jamespot-user-api';
3
+ import { jFileLittle } from 'jamespot-user-api';
4
4
  export type JRCFormInputFileProps = JRCFormInputFileFieldProps;
5
5
  /**
6
6
  * Props type for JRCFormInputFileFieldProps (to fix with next version of this JRC)
@@ -21,10 +21,10 @@ export interface JRCFormInputFileFieldProps extends React.ComponentPropsWithoutR
21
21
  multiple?: boolean;
22
22
  accept?: 'image/png' | 'image/jpg' | 'image/png, image/jpg' | 'image/png, image/jpeg, image/jpg' | 'image/pdf' | 'image/doc' | 'image/pdf, image/doc' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.oasis.opendocument.spreadsheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.oasis.opendocument.text,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.oasis.opendocument.presentation';
23
23
  input?: WrappedFieldInputProps;
24
- onUploadSuccess?: (response: FileResponse) => void;
24
+ onUploadSuccess?: (response: jFileLittle, token: string) => void;
25
25
  onDeleteSuccess?: (index: number) => void;
26
26
  onUploadStart?: (count?: number) => void;
27
- existingFiles?: Array<FileArticle>;
27
+ existingFiles?: Array<jFileLittle>;
28
28
  deleteFile?: (id: number) => Promise<void>;
29
29
  }
30
30
  export declare const JRCFormInputFile: React.ForwardRefExoticComponent<JRCFormInputFileFieldProps & React.RefAttributes<HTMLInputElement>>;
@@ -7,7 +7,7 @@ export declare const FileUploadWrapper: import("styled-components").StyledCompon
7
7
  export declare const LabelField: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
8
8
  export declare const CloseButton: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
9
9
  export declare const FileWrapper: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {
10
- loading: boolean;
10
+ isLoading: boolean;
11
11
  }, never>;
12
12
  export declare const FileName: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
13
13
  export declare const FileImage: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
@@ -1,2 +1,15 @@
1
- import { FileResponse } from 'jamespot-user-api';
2
- export declare function fileSend(file: File, token: string | undefined, name: string): Promise<FileResponse>;
1
+ export declare function fileSend(file: File, token: string | undefined, name: string): Promise<{
2
+ result: {
3
+ uri: string;
4
+ id: number;
5
+ mainType: string;
6
+ type: string;
7
+ dateCreation: string;
8
+ title: string;
9
+ _url: string;
10
+ dateModified: string | null;
11
+ mimetype: string;
12
+ path?: string | undefined;
13
+ };
14
+ token: string;
15
+ }>;
@@ -2,21 +2,21 @@ import * as React from 'react';
2
2
  import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
3
3
  import { DataCy } from '../../../../types/dataAttributes';
4
4
  import { FieldValues } from 'react-hook-form/dist/types';
5
- import { ApiWrapper, FileResponse } from 'jamespot-user-api';
5
+ import { ApiWrapper, jFileLittle } from 'jamespot-user-api';
6
6
  export type NativeInputFileProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
7
7
  token?: string | undefined;
8
8
  attrName?: string;
9
9
  onLoading?: (state: boolean) => void;
10
- value: ApiWrapper<FileResponse>[];
11
- onChange: (files: ApiWrapper<FileResponse>[]) => void;
10
+ value: ApiWrapper<jFileLittle>[];
11
+ onChange: (files: ApiWrapper<jFileLittle>[]) => void;
12
12
  };
13
13
  export type JRCInputFileProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & Omit<NativeInputFileProps, 'value' | 'onChange'>;
14
14
  export declare const InputFile: React.ForwardRefExoticComponent<DataCy & Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "value"> & {
15
15
  token?: string | undefined;
16
16
  attrName?: string | undefined;
17
17
  onLoading?: ((state: boolean) => void) | undefined;
18
- value: ApiWrapper<FileResponse>[];
19
- onChange: (files: ApiWrapper<FileResponse>[]) => void;
18
+ value: ApiWrapper<jFileLittle>[];
19
+ onChange: (files: ApiWrapper<jFileLittle>[]) => void;
20
20
  } & React.RefAttributes<HTMLInputElement>>;
21
21
  /**
22
22
  * Component used as a <input type="file"/>
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
3
3
  import { DataCy } from '../../../../types/dataAttributes';
4
4
  import { FieldValues } from 'react-hook-form/dist/types';
5
- import { FileResponse } from 'jamespot-user-api';
5
+ import { jFileLittle } from 'jamespot-user-api';
6
6
  export type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
7
7
  token?: string | undefined;
8
8
  attrName?: string;
@@ -18,10 +18,8 @@ export type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWithoutRef
18
18
  };
19
19
  readOnly?: boolean;
20
20
  readOnlyImg?: string;
21
- value: undefined | (FileResponse & {
22
- timestamp?: string | number;
23
- });
24
- onChange: (files: undefined | FileResponse) => void;
21
+ value: jFileLittle | undefined;
22
+ onChange: (files: jFileLittle | undefined) => void;
25
23
  disableCrop?: boolean;
26
24
  buttonsPosition?: 'inside' | 'under';
27
25
  };
@@ -54,7 +54,7 @@ export declare const Button: import("styled-components").StyledComponent<"button
54
54
  /** The variant is used to define what type of action the button will take */
55
55
  variant?: "link" | "contained" | "outlined" | undefined;
56
56
  /** @deprecated CSS float attribute */
57
- float?: "right" | "left" | undefined;
57
+ float?: "left" | "right" | undefined;
58
58
  /** CSS min-width attribute */
59
59
  minWidth?: string | undefined;
60
60
  /** has license. If false, the button will be disabled with a license tooltip. Default to true */
@@ -80,7 +80,7 @@ export declare const JRCButton: React.ForwardRefExoticComponent<Omit<React.Detai
80
80
  /** The variant is used to define what type of action the button will take */
81
81
  variant?: "link" | "contained" | "outlined" | undefined;
82
82
  /** @deprecated CSS float attribute */
83
- float?: "right" | "left" | undefined;
83
+ float?: "left" | "right" | undefined;
84
84
  /** CSS min-width attribute */
85
85
  minWidth?: string | undefined;
86
86
  /** has license. If false, the button will be disabled with a license tooltip. Default to true */
@@ -8,7 +8,7 @@ export declare const MarginLessJRCButton: import("styled-components").StyledComp
8
8
  icon?: string | undefined;
9
9
  iconRight?: boolean | undefined;
10
10
  variant?: "link" | "contained" | "outlined" | undefined;
11
- float?: "right" | "left" | undefined;
11
+ float?: "left" | "right" | undefined;
12
12
  minWidth?: string | undefined;
13
13
  hasLicense?: boolean | undefined;
14
14
  tooltip?: Omit<import("../..").JRCTooltipProps, "children"> | undefined;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ type EmptySpaceBgColor = 'sandLight' | 'sky15';
3
+ export type JRCEmptySpaceProps = {
4
+ img: string;
5
+ imgAlt?: string;
6
+ title: string;
7
+ description?: string;
8
+ actions?: React.ReactChild;
9
+ bgColor?: EmptySpaceBgColor;
10
+ };
11
+ export declare const JRCEmptySpace: React.FC<JRCEmptySpaceProps>;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const EmptySpace: Story<any>;
@@ -8,6 +8,9 @@ export declare const Image: import("styled-components").StyledComponent<"img", i
8
8
  maxHeight: number;
9
9
  }, never>;
10
10
  export declare const JRCFileImage: ({ uri, size, mimetype, display }: JRCFileProps) => React.JSX.Element;
11
+ export declare const BackgroundImageLoader: ({ uri }: {
12
+ uri: string;
13
+ }) => React.JSX.Element;
11
14
  export declare const Img: ({ uri, size }: {
12
15
  uri: string;
13
16
  size: number | undefined;
@@ -1,3 +1,14 @@
1
1
  import * as React from 'react';
2
- import { JRCFileViewerProps, JRCFileViewerFileProps } from './types';
3
- export declare const JRCFileViewer: <T extends JRCFileViewerFileProps>({ files, children, openWithOptions, _DEBUG, }: JRCFileViewerProps<T>) => React.JSX.Element;
2
+ import { JRCFileViewerProps } from './types';
3
+ export declare const JRCFileViewer: <T extends {
4
+ title: string;
5
+ id: number;
6
+ type: string;
7
+ uri: string;
8
+ mainType: string;
9
+ dateCreation: string;
10
+ _url: string;
11
+ dateModified: string | null;
12
+ mimetype: string;
13
+ path?: string | undefined;
14
+ }>({ files, size, children, openWithOptions, }: JRCFileViewerProps<T>) => React.JSX.Element;
@@ -13,4 +13,5 @@ export declare const CSSFileViewerImageBackground: import("styled-components").S
13
13
  uri: string;
14
14
  }, never>;
15
15
  export declare const CSSFileViewerArrowsButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
16
+ export declare const CSSFileViewerStep: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
16
17
  export declare const CSSFileViewerArrows: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,4 +1,8 @@
1
1
  import * as React from 'react';
2
- export declare const JRCFileViewerArrows: ({ onRelease }: {
2
+ type JRCFileViewerArrowsProps = {
3
+ index: number;
4
+ total: number;
3
5
  onRelease: (direction: string) => void;
4
- }) => React.JSX.Element;
6
+ };
7
+ export declare const JRCFileViewerArrows: ({ index, total, onRelease }: JRCFileViewerArrowsProps) => React.JSX.Element;
8
+ export {};
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
- import { JRCFileViewerFileProps, JRCFileViewerOpenWithOptionsType } from './types';
2
+ import { JRCFileViewerOpenWithOptionsType } from './types';
3
+ import { jFileLittle } from 'jamespot-user-api';
3
4
  type JRCFileViewerContentProps = {
4
- file: JRCFileViewerFileProps;
5
+ file: jFileLittle;
6
+ size?: string;
5
7
  openWithOptions: JRCFileViewerOpenWithOptionsType;
6
- _DEBUG: boolean;
7
8
  };
8
- export declare const JRCFileViewerContent: ({ file, openWithOptions }: JRCFileViewerContentProps) => React.JSX.Element;
9
+ export declare const JRCFileViewerContent: ({ file, size, openWithOptions }: JRCFileViewerContentProps) => React.JSX.Element;
9
10
  export {};
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- import { JRCFileViewerFileProps, JRCFileViewerOpenWithOptionType } from './types';
2
+ import { JRCFileViewerOpenWithOptionType } from './types';
3
+ import { jFileLittle } from 'jamespot-user-api';
3
4
  type JRCFileViewerContentApplicationProps = {
4
- file?: JRCFileViewerFileProps;
5
+ file?: jFileLittle;
5
6
  options?: JRCFileViewerOpenWithOptionType[];
6
7
  children: React.ReactNode;
7
8
  };
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
- import { JRCFileViewerFileProps, JRCFileViewerOpenWithOptionType } from './types';
2
+ import { JRCFileViewerOpenWithOptionType } from './types';
3
+ import { jFileLittle } from 'jamespot-user-api';
3
4
  type JRCFileViewerOpenWithOptionsProps = {
4
- file: JRCFileViewerFileProps;
5
+ file: jFileLittle;
5
6
  options: JRCFileViewerOpenWithOptionType[];
6
7
  };
7
8
  export declare const JRCFileViewerOpenWithOptions: ({ file, options }: JRCFileViewerOpenWithOptionsProps) => React.JSX.Element;
@@ -1,19 +1,13 @@
1
1
  /// <reference types="react" />
2
+ import { jFileLittle } from 'jamespot-user-api';
2
3
  export type JRCFileViewerProps<T> = {
3
4
  files: T[];
5
+ size?: string;
4
6
  openWithOptions: JRCFileViewerOpenWithOptionsType;
5
7
  children(setIndex: (idFile: number) => void): React.ReactElement<HTMLElement>;
6
- _DEBUG: boolean;
7
- };
8
- export type JRCFileViewerFileProps = {
9
- id: number;
10
- type: string;
11
- mimetype: string;
12
- title: string;
13
- uri?: string;
14
8
  };
15
9
  export type JRCFileViewerOpenWithOptionsType = Record<string, JRCFileViewerOpenWithOptionType[]>;
16
10
  export type JRCFileViewerOpenWithOptionType = {
17
11
  label: string;
18
- onClick: (item: JRCFileViewerFileProps | undefined) => void;
12
+ onClick: (item: jFileLittle | undefined) => void;
19
13
  };
@@ -1,4 +1,4 @@
1
- import { JRCFileViewerFileProps } from './types';
2
- export declare function videoUrl(file: JRCFileViewerFileProps): string;
3
- export declare function audioUrl(file: JRCFileViewerFileProps): string;
4
- export declare function imageUrl(file: JRCFileViewerFileProps, size?: string): string;
1
+ import { jFileLittle } from 'jamespot-user-api';
2
+ export declare function videoUrl(file: jFileLittle): string;
3
+ export declare function audioUrl(file: jFileLittle): string;
4
+ export declare function imageUrl(file: jFileLittle, size?: string): string;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { DataCy } from '../../types/dataAttributes';
3
+ import { ButtonColors } from '../JRCButton/JRCButton';
3
4
  /**
4
5
  * Props type for JRCLinkToArticle and JRCLinkToUser
5
6
  * @member idObject number : id of the record
@@ -16,7 +17,7 @@ type AnchorProps = {
16
17
  };
17
18
  type ButtonProps = {
18
19
  variant?: 'contained' | 'outlined';
19
- color?: 'primary' | 'valid' | 'danger' | 'secondary';
20
+ color?: ButtonColors;
20
21
  float?: 'left' | 'right';
21
22
  disabled?: boolean;
22
23
  children?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  export type ModalBorderRadius = 'medium' | 'small';
2
2
  export declare const JRCModalBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
- position?: "right" | "left" | undefined;
3
+ position?: "left" | "right" | undefined;
4
4
  open?: boolean | undefined;
5
5
  }, never>;
6
6
  export declare const JRCModalTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,6 +1,6 @@
1
- import { WidgetArticleAttachmentContent, WidgetDefaultProps } from 'jamespot-user-api';
2
1
  import React from 'react';
3
- export declare const JRCWidgetArticleAttachment: ({ content, mode, onStateChange, }: WidgetDefaultProps & {
4
- content: WidgetArticleAttachmentContent;
5
- token: string | undefined;
2
+ import { WidgetArticleAttachmentContent } from 'jamespot-user-api';
3
+ export declare const CSSWidgetAttachment: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const JRCWidgetArticleAttachment: ({ files, onClick, }: WidgetArticleAttachmentContent & {
5
+ onClick: (idFile: number) => void;
6
6
  }) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { WidgetArticleAttachmentContent } from 'jamespot-user-api';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<WidgetArticleAttachmentContent & {
6
+ onClick: (idFile: number) => void;
7
+ }>;
@@ -1,17 +1,7 @@
1
- import { FileResponse, WidgetArticleGalleryContent, WidgetDefaultProps, WidgetWrapperProps } from 'jamespot-user-api';
1
+ import { WidgetArticleGalleryContent } from 'jamespot-user-api';
2
2
  import React from 'react';
3
- export declare const CSSColumnGallery: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
4
- column: string;
5
- gap: string;
6
- }, never>;
7
- export declare const CSSGalleryWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
8
- width: number | string;
9
- }, never>;
10
- type JRCWidgetArticleGalleryProps = WidgetDefaultProps & {
11
- content: WidgetArticleGalleryContent;
12
- token: string | undefined;
13
- onUploadSuccess?: (fileResponse: FileResponse) => void;
14
- renderItem?: (widgetWrapper: WidgetWrapperProps) => React.ReactElement;
15
- };
16
- export declare const JRCWidgetArticleGallery: ({ width, content, onStateChange }: JRCWidgetArticleGalleryProps) => React.JSX.Element;
17
- export {};
3
+ export declare const JRCWidgetArticleGallery: ({ files, size, gap, column, maxWidth, onClick, }: WidgetArticleGalleryContent & {
4
+ maxWidth: number;
5
+ size?: string | undefined;
6
+ onClick: (idFile: number) => void;
7
+ }) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { WidgetArticleGalleryContent } from 'jamespot-user-api';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<WidgetArticleGalleryContent & {
6
+ maxWidth: number;
7
+ onClick: (idFile: number) => void;
8
+ }>;
@@ -1,6 +1,6 @@
1
- import { WidgetDefaultProps, WidgetArticleImageContent } from 'jamespot-user-api';
1
+ import { WidgetArticleImageContent } from 'jamespot-user-api';
2
2
  import React from 'react';
3
- export declare const JRCWidgetArticleImage: ({ width, content, onStateChange, }: WidgetDefaultProps & {
4
- content: WidgetArticleImageContent;
5
- token: string | undefined;
6
- }) => React.JSX.Element;
3
+ export declare const JRCWidgetArticleImage: ({ displayAs, borderRadius, useFilter, backgroundPosition, backgroundSize, maxWidth, uri, }: Omit<WidgetArticleImageContent & {
4
+ maxWidth: number;
5
+ uri: string | undefined;
6
+ }, "file">) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { WidgetArticleImageContent } from 'jamespot-user-api';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<Omit<WidgetArticleImageContent & {
6
+ maxWidth: number;
7
+ uri: string | undefined;
8
+ }, "file">>;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { WidgetArticleTextContent, WidgetDefaultProps } from 'jamespot-user-api';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<WidgetDefaultProps & {
6
+ content: WidgetArticleTextContent;
7
+ }>;
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
- import { WidgetArticleTitleContent, WidgetDefaultProps } from 'jamespot-user-api';
3
- export declare const JRCWidgetArticleTitle: ({ content, onChange, isComponentVisible, inplace, mode, }: WidgetDefaultProps & {
4
- content: WidgetArticleTitleContent;
2
+ import { WidgetArticleTitleContent, WidgetDisplayMode } from 'jamespot-user-api';
3
+ export declare const JRCWidgetArticleTitle: ({ text, color, heading, autoFocus, inplace, mode, onChange, }: WidgetArticleTitleContent & {
4
+ autoFocus: boolean;
5
+ inplace: boolean;
6
+ mode?: WidgetDisplayMode | undefined;
7
+ onChange: (text: string) => void;
5
8
  }) => React.JSX.Element;
@@ -51,10 +51,6 @@ export declare const EditorGalleryHeightModeOptions: {
51
51
  label: string;
52
52
  value: string;
53
53
  }[];
54
- export declare const EditorGalleryDisplayOptions: {
55
- label: string;
56
- value: string;
57
- }[];
58
54
  export declare const EditorFontSizeOptions: {
59
55
  label: string;
60
56
  value: string;
@@ -1,10 +1,10 @@
1
- import { WidgetFileType } from 'jamespot-user-api';
1
+ import { jFileLittle } from 'jamespot-user-api';
2
2
  export declare const loadImage: (setImageDimensions: React.Dispatch<React.SetStateAction<{
3
3
  width: number;
4
4
  height: number;
5
- }>>, imageUrl: string, setError: React.Dispatch<React.SetStateAction<boolean>>) => void;
6
- export declare function imagecache(file: WidgetFileType, width: number): string;
5
+ } | undefined>>, imageUrl: string, setError: React.Dispatch<React.SetStateAction<string | Event | undefined>>) => void;
7
6
  export declare function imageResize(width: number, height: number, maxWidth: number, maxHeight: number): {
8
7
  width: number;
9
8
  height: number;
10
9
  };
10
+ export declare const mockFileLittle: () => jFileLittle;
@@ -0,0 +1,6 @@
1
+ interface Size {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export declare function useRefSize<T extends HTMLElement = HTMLDivElement>(): [(node: T | null) => void, Size];
6
+ export {};
@@ -57,6 +57,7 @@ export { JRCDraggingPlaceholder } from './components/Common/JRCDraggingPlacehold
57
57
  export { BETA_JRCDragAndDrop } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
58
58
  export { JRCDropDown } from './components/JRCDropDown/JRCDropDown';
59
59
  export { JRCEllipsis } from './components/JRCEllipsis/JRCEllipsis';
60
+ export { JRCEmptySpace } from './components/JRCEmptySpace/JRCEmptySpace';
60
61
  export { JRCFadeStepper } from './components/Stepper/JRCFadeStepper';
61
62
  export { JRCFile } from './components/JRCFile/JRCFile';
62
63
  export { JRCFileAvatar } from './components/JRCFile/JRCFileAvatar';
@@ -149,6 +150,8 @@ export { useDidMountEffect } from './hooks/UseDidMountEffect';
149
150
  export { useImageLoader } from './hooks/UseImageLoader';
150
151
  export { useKeyPress } from './hooks/UseKeyPress';
151
152
  export { useTimeout } from './hooks/UseTimeout';
153
+ export { useRefSize } from './hooks/useRefSize';
154
+ export { useWindowSize } from './hooks/useWindowSize';
152
155
  export { useCancelOnUnmount } from './hooks/useCancelOnUnmount';
153
156
  /****
154
157
  *
@@ -18,7 +18,7 @@ export type ThemeConfigOptions = {
18
18
  navTextColor: string;
19
19
  bgColorNotLogged: string;
20
20
  };
21
- export type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'lavender' | 'orange' | 'yellow' | 'green' | 'navy' | 'overseas' | 'night2' | 'sandLight' | 'sand' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white';
21
+ export type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'lavender' | 'orange' | 'yellow' | 'green' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'sky' | 'sky15' | 'sand' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white';
22
22
  type ThemeConfigColorType = {
23
23
  [color in Colors]: string;
24
24
  };
@@ -56,6 +56,7 @@ export { JRCInputTextProps } from './components/Form/Input/JRCInputText/JRCInput
56
56
  export { JRCInputTextIconButtonProps } from './components/Form/Input/JRCInputText/JRCInputTextIconButton';
57
57
  export { JRCInputTimeProps } from './components/Form/Input/JRCInputTime/JRCInputTime';
58
58
  export { JRCInputUrlProps } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
59
+ export { JRCFileViewerOpenWithOptionsType } from './components/JRCFileViewer/types';
59
60
  export { JRCLinkToProps, JRCStyledHrefProps } from './components/JRCHref/JRCHref';
60
61
  export { JRCListProps, PaginationPagination } from './components/JRCList/JRCList';
61
62
  export { JRCLoaderProps } from './components/JRCLoader/JRCLoader';
@@ -1,10 +1,12 @@
1
1
  import * as array from './utils.array';
2
+ import * as color from './utils.color';
2
3
  import * as date from './utils.date';
3
4
  import * as document from './utils.document';
5
+ import * as image from './utils.image';
6
+ import * as file from './utils.files';
4
7
  import * as misc from './utils.misc';
5
8
  import * as object from './utils.object';
6
9
  import * as regexp from './utils.regexp';
7
10
  import * as string from './utils.string';
8
11
  import * as time from './utils.time';
9
- import * as image from './utils.image';
10
- export { array, date, document, misc, object, regexp, string, time, image };
12
+ export { array, color, date, document, file, image, misc, object, regexp, string, time };
@@ -47,5 +47,7 @@ export declare const colorimetry: {
47
47
  };
48
48
  };
49
49
  };
50
+ export declare const getContrast50: (hexcolor: string) => "black" | "white";
51
+ export declare const getContrastYIQ: (hexcolor: string) => "black" | "white";
50
52
  export declare function isValidHexColor(color: string): boolean;
51
53
  export {};