jamespot-react-components 1.3.111 → 1.3.112

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,5 +1,5 @@
1
1
  import { Sizes, ToggleListOption, ToggleValue } from '../../Form/Input/JRCInputCheckbox/JRCInputToggle';
2
- export declare const EditorButtonToggle: <T extends ToggleValue>({ name, label, initialValue, description, isDisabled, options, onChange, size, dataCy, }: {
2
+ export declare const EditorButtonToggle: <T extends ToggleValue>({ name, label, initialValue, description, isDisabled, options, onChange, onOptionClick, size, dataCy, }: {
3
3
  name?: string;
4
4
  label?: string;
5
5
  initialValue: T | undefined;
@@ -7,6 +7,7 @@ export declare const EditorButtonToggle: <T extends ToggleValue>({ name, label,
7
7
  description?: string;
8
8
  options: ToggleListOption[];
9
9
  onChange: (value: T) => void;
10
+ onOptionClick?: (value: T) => void;
10
11
  size?: Sizes;
11
12
  dataCy?: string;
12
13
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { RegisterOptions } from 'react-hook-form';
2
2
  import { FormControls } from '../../Form/Input/Common/useFormControls';
3
- export declare const EditorInput: ({ label, placeholder, initialValue, width, rules, rulesValidate, description, isMultiline, onChange, }: {
3
+ export declare const EditorInput: ({ label, placeholder, initialValue, width, rules, rulesValidate, description, isMultiline, margin, textAlign, onChange, }: {
4
4
  label: string;
5
5
  placeholder?: string;
6
6
  initialValue: string | undefined;
@@ -12,5 +12,7 @@ export declare const EditorInput: ({ label, placeholder, initialValue, width, ru
12
12
  }>["validate"];
13
13
  description?: string;
14
14
  isMultiline?: boolean;
15
+ margin?: string;
16
+ textAlign?: "left" | "right" | "center";
15
17
  onChange: (text: string) => void;
16
18
  }) => import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,7 @@ type ToggleProps = DataCy & {
16
16
  width?: string;
17
17
  disabled?: boolean;
18
18
  options: Array<ToggleListOption>;
19
+ onOptionClick?: (value: ToggleValue) => void;
19
20
  };
20
21
  export type ToggleRawProps<TFieldValues extends FieldValues = FieldValues> = ToggleProps & Omit<ControllerRenderProps<TFieldValues>, 'value' | 'ref' | 'onBlur'> & {
21
22
  ref?: ForwardedRef<HTMLInputElement>;
@@ -10,7 +10,7 @@ export interface JRCInputFileAdavancedProps extends ComponentPropsWithoutRef<'in
10
10
  limit?: number;
11
11
  token?: string;
12
12
  multiple?: boolean;
13
- 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';
13
+ 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' | '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,application/pdf,text/plain,text/markdown,.pdf,.txt,.md';
14
14
  onUploadSuccess?: (response: jFileLittle, token?: string) => void;
15
15
  network?: Pick<Network, 'token' | 'postFile' | 'getUrl'>;
16
16
  onDeleteSuccess?: (index: number) => void;
@@ -7,12 +7,14 @@ export type JRCInputTextProps = DataCy & ComponentPropsWithoutRef<'input'> & {
7
7
  autocomplete?: 'on' | 'off';
8
8
  inputmode?: 'text' | 'numeric';
9
9
  inputMargin?: string | undefined;
10
+ textAlign?: 'left' | 'right' | 'center';
10
11
  };
11
12
  export declare const RenderInput: import('react').ForwardRefExoticComponent<DataCy & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
12
13
  width?: string;
13
14
  autocomplete?: "on" | "off";
14
15
  inputmode?: "text" | "numeric";
15
16
  inputMargin?: string | undefined;
17
+ textAlign?: "left" | "right" | "center";
16
18
  } & import('react').RefAttributes<HTMLInputElement>>;
17
19
  /**
18
20
  * Component used as a <input type="text"/>
@@ -27,6 +29,7 @@ export declare function JRCInputText<T extends FieldValues = FieldValues>({ html
27
29
  inputmode?: 'text' | 'numeric';
28
30
  description?: string | ReactNode;
29
31
  maxLength?: number;
32
+ textAlign?: 'left' | 'right' | 'center';
30
33
  }): import("react/jsx-runtime").JSX.Element;
31
34
  export declare const RenderNumberInput: import('react').ForwardRefExoticComponent<DataCy & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
32
35
  width?: string;
@@ -66,7 +66,7 @@ export declare const InputIconButton: import('styled-components/dist/types').ISt
66
66
  } & {
67
67
  $inputMargin?: string | undefined;
68
68
  } & import('react').RefAttributes<HTMLInputElement>>, keyof import('react').Component<any, {}, any>>;
69
- export declare const InputTextStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "css"> & import('../../../../types/dataAttributes').DataCy & {
69
+ export declare const InputTextStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "css"> & import('../../../../types/dataAttributes').DataCy & {
70
70
  $error?: boolean;
71
71
  $valid?: boolean;
72
72
  readOnly?: boolean;
@@ -75,7 +75,9 @@ export declare const InputTextStyled: import('styled-components/dist/types').ISt
75
75
  $hasIconAfter?: boolean;
76
76
  } & {
77
77
  $inputMargin?: string | undefined;
78
- } & import('react').RefAttributes<HTMLInputElement>, never>> & string & Omit<import('react').ForwardRefExoticComponent<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "css"> & import('../../../../types/dataAttributes').DataCy & {
78
+ } & import('react').RefAttributes<HTMLInputElement>, {
79
+ $textAlign?: string;
80
+ }>> & string & Omit<import('react').ForwardRefExoticComponent<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "css"> & import('../../../../types/dataAttributes').DataCy & {
79
81
  $error?: boolean;
80
82
  $valid?: boolean;
81
83
  readOnly?: boolean;
@@ -32,6 +32,7 @@ export declare const SectionLabelInput: import('styled-components/dist/types').I
32
32
  autocomplete?: "on" | "off";
33
33
  inputmode?: "text" | "numeric";
34
34
  inputMargin?: string | undefined;
35
+ textAlign?: "left" | "right" | "center";
35
36
  } & import('react').RefAttributes<HTMLInputElement>, {
36
37
  $hasError: boolean;
37
38
  }>> & string & Omit<import('react').ForwardRefExoticComponent<import('../../types/dataAttributes').DataCy & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
@@ -39,6 +40,7 @@ export declare const SectionLabelInput: import('styled-components/dist/types').I
39
40
  autocomplete?: "on" | "off";
40
41
  inputmode?: "text" | "numeric";
41
42
  inputMargin?: string | undefined;
43
+ textAlign?: "left" | "right" | "center";
42
44
  } & import('react').RefAttributes<HTMLInputElement>>, keyof import('react').Component<any, {}, any>>;
43
45
  export declare const RemoveButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onClick"> & import('../../types/dataAttributes').DataCy & {
44
46
  icon: string;
@@ -0,0 +1,9 @@
1
+ import { ChartsSerie, ChartType } from 'jamespot-user-api';
2
+ export type ChartsSeriesModalProps = {
3
+ open: boolean;
4
+ type: ChartType;
5
+ series: ChartsSerie[];
6
+ closeHandler: () => void;
7
+ onSave: (series: ChartsSerie[]) => void;
8
+ };
9
+ export declare const ChartsSeriesModal: ({ open, type, series, closeHandler, onSave }: ChartsSeriesModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { ChartsSerie, ChartType } from 'jamespot-user-api';
2
+ export declare const DEFAULT_CHART_COLORS: string[];
3
+ export declare const CHART_TYPE_OPTIONS: ({
4
+ value: "pie";
5
+ label: string;
6
+ icon: string;
7
+ } | {
8
+ value: "column";
9
+ label: string;
10
+ icon: string;
11
+ } | {
12
+ value: "line";
13
+ label: string;
14
+ icon: string;
15
+ })[];
16
+ export declare const DEFAULT_SERIES: Record<ChartType, ChartsSerie[]>;
@@ -0,0 +1,5 @@
1
+ import { WidgetChartsContent } from 'jamespot-user-api';
2
+ export type JRCWidgetChartsProps = {
3
+ content: WidgetChartsContent;
4
+ };
5
+ export declare const JRCWidgetCharts: ({ content }: JRCWidgetChartsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryFn } from '@storybook/react-vite';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const Column: StoryFn;
5
+ export declare const Line: StoryFn;
6
+ export declare const Pie: StoryFn;
7
+ export declare const Empty: StoryFn;
@@ -0,0 +1,7 @@
1
+ import { WidgetChartsContent } from 'jamespot-user-api';
2
+ export type JRCWidgetChartsEditorProps = {
3
+ uniqid: string;
4
+ content: WidgetChartsContent;
5
+ onChangeContent: (uniqid: string, content: WidgetChartsContent) => void;
6
+ };
7
+ export declare const JRCWidgetChartsEditor: ({ uniqid, content, onChangeContent }: JRCWidgetChartsEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -183,6 +183,8 @@ export { JRCWidgetBirthdayEditor } from './Widgets/JRCWidgetBirthday/JRCWidgetBi
183
183
  export { JRCWidgetButton } from './Widgets/JRCWidgetButton/JRCWidgetButton';
184
184
  export { JRCWidgetCalendarCalDav } from './Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDav';
185
185
  export { JRCWidgetCalendarCalDavEditor } from './Widgets/JRCWidgetCalendarCalDav/JRCWidgetCalendarCalDavEditor';
186
+ export { JRCWidgetCharts } from './Widgets/JRCWidgetCharts/JRCWidgetCharts';
187
+ export { JRCWidgetChartsEditor } from './Widgets/JRCWidgetCharts/JRCWidgetChartsEditor';
186
188
  export { JRCWidgetCheckList } from './Widgets/JRCWidgetCheckList/JRCWidgetCheckList';
187
189
  export { JRCWidgetCheckListEditor } from './Widgets/JRCWidgetCheckList/JRCWidgetCheckListEditor';
188
190
  export { JRCWidgetColor } from './Widgets/JRCWidgetColor/JRCWidgetColor';
@@ -1,5 +1,21 @@
1
1
  declare const _default: {
2
2
  "en": {
3
+ "WIDGET_Charts": "Charts",
4
+ "WIDGET_Charts_Title": "Title",
5
+ "WIDGET_Charts_Subtitle": "Subtitle",
6
+ "WIDGET_Charts_Legend": "Show legend",
7
+ "WIDGET_Charts_Edit_Series": "Edit data",
8
+ "WIDGET_Charts_Add_Serie": "Add a series",
9
+ "WIDGET_Charts_Add_Value": "Add a value",
10
+ "WIDGET_Charts_Series_Name": "Series name",
11
+ "WIDGET_Charts_Slice_Name": "Label",
12
+ "WIDGET_Charts_Value": "Value",
13
+ "GLOBAL_Move_Up": "Move up",
14
+ "GLOBAL_Move_Down": "Move down",
15
+ "CHARTS_Pie": "Pie",
16
+ "CHARTS_Column": "Column",
17
+ "CHARTS_Line": "Line",
18
+ "WIDGET_Empty_No_Data": "No data",
3
19
  "WIDGET_Contact": "Contact",
4
20
  "WIDGET_Contact_Text": "Display a directory of selected contacts",
5
21
  "GLOBAL_Update": "Update",
@@ -31,7 +47,6 @@ declare const _default: {
31
47
  "WIDGET_Image_X_Position": "Horizontal position",
32
48
  "WIDGET_Image_Y_Position": "Vertical position",
33
49
  "GLOBAL_Search_City": "Search city or a post code",
34
- "SELECTION_Panel_Background_Color": "Background color",
35
50
  "WIDGET_METEO": "Weather",
36
51
  "WIDGET_METEO_TEXT": "Display the weather in real time",
37
52
  "WIDGET_METEO_Iframe": "Weather by Météo France",
@@ -56,6 +56,7 @@ export type { JRCHtmlProps } from './components/JRCHtml/JRCHtml';
56
56
  export type { JRCIconProps } from './components/JRCIcon/JRCIcon';
57
57
  export type { JRCIconButtonProps } from './components/JRCIconButton/JRCIconButton';
58
58
  export type { JRCImgProps } from './components/JRCImg/JRCImg';
59
+ export type { JRCFoldersMode } from './components/JRCFolders/types';
59
60
  export type { JRCListProps, PaginationPagination } from './components/JRCList/JRCList';
60
61
  export type { JRCLoaderProps } from './components/JRCLoader/JRCLoader';
61
62
  export type { JRCLoadMoreProps } from './components/JRCLoadMore/JRCLoadMore';
@@ -111,7 +111,7 @@ export declare function fileAvatar(mimetype: string): {
111
111
  dark: string;
112
112
  };
113
113
  } | {
114
- ext: "webm" | undefined;
114
+ ext: "md" | "webm" | undefined;
115
115
  path: string;
116
116
  colors: {
117
117
  primary: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.3.111",
3
+ "version": "1.3.112",
4
4
  "description": "",
5
5
  "main": "dist/jamespot-react-components.cjs",
6
6
  "module": "dist/jamespot-react-components.js",
@@ -21,6 +21,7 @@
21
21
  "react-hook-form": "^7.72.0",
22
22
  "react-intl": "^7.1.14",
23
23
  "react-router-dom": "^6.30.3",
24
+ "recharts": "^3.9.1",
24
25
  "styled-components": "^6.3.12",
25
26
  "tinymce": "7.5.1"
26
27
  },
@@ -59,8 +60,8 @@
59
60
  "eslint-plugin-storybook": "10.3.6",
60
61
  "globals": "^16.5.0",
61
62
  "html2canvas": "^1.4.1",
62
- "jamespot-front-business": "^1.3.111",
63
- "jamespot-user-api": "^1.3.111",
63
+ "jamespot-front-business": "^1.3.112",
64
+ "jamespot-user-api": "^1.3.112",
64
65
  "jsdom": "^26.1.0",
65
66
  "knip": "^5.88.1",
66
67
  "lint-staged": "^16.4.0",
@@ -79,6 +80,7 @@
79
80
  "react-router-dom": "^6.30.3",
80
81
  "react-tooltip": "^5.30.0",
81
82
  "react-transition-state": "^2.3.3",
83
+ "recharts": "^3.9.1",
82
84
  "storybook": "10.3.6",
83
85
  "styled-components": "^6.3.12",
84
86
  "tinymce": "7.5.1",