jamespot-react-components 1.2.56 → 1.2.57

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,10 +1,10 @@
1
- import { Sizes, ToggleListOption, ToggleValues } from '../../Form/Input/JRCInputCheckbox/JRCInputToggle';
2
- export declare const EditorButtonToggle: ({ name, label, initialValue, description, options, onChange, size, }: {
1
+ import { Sizes, ToggleListOption, ToggleValue } from '../../Form/Input/JRCInputCheckbox/JRCInputToggle';
2
+ export declare const EditorButtonToggle: <T extends ToggleValue>({ name, label, initialValue, description, options, onChange, size, }: {
3
3
  name?: string;
4
4
  label?: string;
5
- initialValue: ToggleValues;
5
+ initialValue: T | undefined;
6
6
  description?: string;
7
7
  options: ToggleListOption[];
8
- onChange: (value: ToggleValues | undefined) => void;
8
+ onChange: (value: T) => void;
9
9
  size?: Sizes;
10
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
- type EditorSelectOption = {
1
+ export type EditorSelectOption = {
2
2
  label: string;
3
- value: string;
3
+ value: string | number;
4
4
  };
5
- type EditorSelectOptions = EditorSelectOption[];
6
- export declare const EditorSelect: <T extends string>({ label, options, initialValue, required, onChange, }: {
5
+ export type EditorSelectOptions = EditorSelectOption[];
6
+ export declare const EditorSelect: <T extends string | number>({ label, options, initialValue, required, onChange, width, }: {
7
7
  label: string;
8
8
  options: EditorSelectOptions;
9
- initialValue: string | undefined;
9
+ initialValue: T | undefined;
10
10
  required?: boolean;
11
11
  onChange: (value: T) => void;
12
+ width?: string;
12
13
  }) => import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -5,10 +5,10 @@ import { ButtonColors } from '../../../JRCButton/types';
5
5
  import { JRCTooltipProps } from '../../../JRCTooltip/types';
6
6
  import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
7
7
  export type Sizes = 's' | 'm' | 'l';
8
- export type ToggleValues = string | number | boolean;
8
+ export type ToggleValue = string | number | boolean;
9
9
  export type ToggleListOption = {
10
10
  label: string | JSX.Element;
11
- value: ToggleValues;
11
+ value: ToggleValue;
12
12
  color?: ButtonColors;
13
13
  };
14
14
  type ToggleProps = DataCy & {
@@ -20,7 +20,7 @@ type ToggleProps = DataCy & {
20
20
  export type ToggleRawProps<TFieldValues extends FieldValues = FieldValues> = ToggleProps & Omit<ControllerRenderProps<TFieldValues>, 'value' | 'ref' | 'onBlur'> & {
21
21
  ref?: ForwardedRef<HTMLInputElement>;
22
22
  } & {
23
- value: ToggleValues;
23
+ value: ToggleValue;
24
24
  tooltip?: Omit<JRCTooltipProps, 'children'>;
25
25
  };
26
26
  export declare const JRCInputToggleRaw: <T extends FieldValues = FieldValues>(props: ToggleRawProps<T>) => JSX.Element;
@@ -317,6 +317,7 @@ export declare const NoOptionList: import("styled-components").StyledComponent<"
317
317
  x?: "flex-start" | "center" | "flex-end" | "space-around" | "space-between" | "space-evenly";
318
318
  y?: "flex-start" | "center" | "flex-end" | "space-around" | "space-between" | "space-evenly";
319
319
  childFull?: boolean;
320
+ 'data-testid'?: string;
320
321
  }, never>;
321
322
  export declare const IconBefore: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, faOptions, iconColor, role, label, }: import("../../../JRCIcon/JRCIcon").JRCIconProps) => import("react/jsx-runtime").JSX.Element, import("styled-components").DefaultTheme, {
322
323
  left?: number;
@@ -12,6 +12,14 @@ export declare const AlbumImageWrapper: import("styled-components").StyledCompon
12
12
  export declare const AlbumImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {
13
13
  $maxHeight: number;
14
14
  }, never>;
15
+ export declare const AlbumBackgroundImageWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
16
+ $width: number;
17
+ $height: number;
18
+ }, never>;
19
+ export declare const AlbumBackgroundImageWrapperImg: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {
20
+ $width: number;
21
+ $top: number;
22
+ }, never>;
15
23
  export declare const AlbumOverlay: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
16
24
  export declare const AlbumAttachments: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
17
25
  export declare const AlbumRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from 'react';
2
+ export type AnimationType = 'fade' | 'slide' | 'fade-slide' | 'zoom' | 'grow';
3
+ interface JRCAnimatedContainerProps {
4
+ children: ReactNode;
5
+ isVisible: boolean;
6
+ animationType: AnimationType;
7
+ timeout?: number;
8
+ className?: string;
9
+ }
10
+ export declare const JRCAnimatedContainer: React.FC<JRCAnimatedContainerProps>;
11
+ export {};
@@ -8,6 +8,7 @@ type FlexBoxProps = Omit<FastCssProps, 'display'> & {
8
8
  x?: 'flex-start' | 'center' | 'flex-end' | 'space-around' | 'space-between' | 'space-evenly';
9
9
  y?: 'flex-start' | 'center' | 'flex-end' | 'space-around' | 'space-between' | 'space-evenly';
10
10
  childFull?: boolean;
11
+ 'data-testid'?: string;
11
12
  };
12
13
  export declare const JRCFlexBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, FlexBoxProps, never>;
13
14
  export type JRCFlexBoxProps = FlexBoxProps & {
@@ -4,3 +4,9 @@ declare const meta: Meta;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof JRCFlexBox>;
6
6
  export declare const Default: Story;
7
+ export declare const Inline: Story;
8
+ export declare const Gap: Story;
9
+ export declare const Flex: Story;
10
+ export declare const DirectionRowReverse: Story;
11
+ export declare const JustifyAlignRow: Story;
12
+ export declare const JustifyAlignColumn: Story;
@@ -25,7 +25,7 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
25
25
  } & import("jamespot-user-api").WidgetType<{
26
26
  widgets?: import("jamespot-user-api").WidgetBaseType[] | undefined;
27
27
  arr?: import("jamespot-user-api").WidgetCheckListContentArr[] | undefined;
28
- css?: Record<string, string> | undefined;
28
+ css?: Record<string, string | number> | undefined;
29
29
  edit?: boolean | undefined;
30
30
  }>) | ({
31
31
  layers?: string[] | undefined;
@@ -42,7 +42,7 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
42
42
  label?: string | undefined;
43
43
  isVisible?: boolean | undefined;
44
44
  textEllipsis?: boolean | undefined;
45
- dateFormat?: "date" | "time" | "date-time" | "date-time-sec" | "time-sec" | undefined;
45
+ dateFormat?: "date" | "date-time" | "date-time-sec" | "time" | "time-sec" | undefined;
46
46
  numberFormat?: "fr-FR" | "en-EN" | "filesize" | undefined;
47
47
  }[] | undefined;
48
48
  tableHeadColor?: string | undefined;
@@ -80,6 +80,12 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
80
80
  layers?: string[] | undefined;
81
81
  } & import("jamespot-user-api").WidgetType<{
82
82
  url?: string | undefined;
83
+ }>) | ({
84
+ layers?: string[] | undefined;
85
+ } & import("jamespot-user-api").WidgetType<{
86
+ css?: Record<string, string | number> | undefined;
87
+ buttonName?: string | undefined;
88
+ pictureSize?: string | undefined;
83
89
  }>)>[] | undefined;
84
90
  } & (import("jamespot-user-api").WidgetArticleAttachmentContent | {
85
91
  text?: string | undefined;
@@ -106,7 +112,7 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
106
112
  } | import("jamespot-user-api").WidgetArticleGalleryContent | import("jamespot-user-api").WidgetArticleImageContent | import("jamespot-user-api").WidgetArticleSliderContent | import("jamespot-user-api/lib/src/types/widgets/widgetArticleText").WidgetArticleTextContent | import("jamespot-user-api").WidgetArticleTitleContent | {
107
113
  widgets?: import("jamespot-user-api").WidgetBaseType[] | undefined;
108
114
  arr?: import("jamespot-user-api").WidgetCheckListContentArr[] | undefined;
109
- css?: Record<string, string> | undefined;
115
+ css?: Record<string, string | number> | undefined;
110
116
  edit?: boolean | undefined;
111
117
  } | {
112
118
  limit?: number | boolean | undefined;
@@ -116,7 +122,7 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
116
122
  label?: string | undefined;
117
123
  isVisible?: boolean | undefined;
118
124
  textEllipsis?: boolean | undefined;
119
- dateFormat?: "date" | "time" | "date-time" | "date-time-sec" | "time-sec" | undefined;
125
+ dateFormat?: "date" | "date-time" | "date-time-sec" | "time" | "time-sec" | undefined;
120
126
  numberFormat?: "fr-FR" | "en-EN" | "filesize" | undefined;
121
127
  }[] | undefined;
122
128
  tableHeadColor?: string | undefined;
@@ -135,7 +141,7 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
135
141
  label?: string | undefined;
136
142
  isVisible?: boolean | undefined;
137
143
  textEllipsis?: boolean | undefined;
138
- dateFormat?: "date" | "time" | "date-time" | "date-time-sec" | "time-sec" | undefined;
144
+ dateFormat?: "date" | "date-time" | "date-time-sec" | "time" | "time-sec" | undefined;
139
145
  numberFormat?: "fr-FR" | "en-EN" | "filesize" | undefined;
140
146
  }[] | undefined;
141
147
  tableHeadColor?: string | undefined;
@@ -154,7 +160,7 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
154
160
  } | {
155
161
  widgets?: import("jamespot-user-api").WidgetBaseType[] | undefined;
156
162
  arr?: import("jamespot-user-api").WidgetQuickSurveyContentArr[] | undefined;
157
- css?: Record<string, string> | undefined;
163
+ css?: Record<string, string | number> | undefined;
158
164
  closing?: boolean | 0 | 1 | undefined;
159
165
  isClosed?: boolean | 0 | 1 | undefined;
160
166
  open?: boolean | 0 | 1 | undefined;
@@ -177,6 +183,10 @@ export declare const Primary: import("storybook/internal/csf").AnnotatedStoryFn<
177
183
  emailsPromptStatus?: string | undefined;
178
184
  } | {
179
185
  url?: string | undefined;
186
+ } | {
187
+ css?: Record<string, string | number> | undefined;
188
+ buttonName?: string | undefined;
189
+ pictureSize?: string | undefined;
180
190
  }), args_1: boolean, ...args: unknown[]) => void;
181
191
  onStateChange: (args_0: {
182
192
  busy?: boolean | undefined;
@@ -1,4 +1,16 @@
1
1
  import { WidgetTableColumn } from 'jamespot-user-api';
2
+ export declare enum WidgetTableColumnType {
3
+ NUMBER = "number",
4
+ URI = "uri",
5
+ TITLE = "title",
6
+ DATE = "date",
7
+ TEXT = "text",
8
+ FILE = "file",
9
+ SELECT = "select",
10
+ EMAIL = "email",
11
+ URL = "url",
12
+ TRANSIENT = "transient"
13
+ }
2
14
  export declare const ExcelEditorModelColumn: ({ column, onChange, }: {
3
15
  column: WidgetTableColumn;
4
16
  onChange: (data: WidgetTableColumn) => void;
@@ -0,0 +1,13 @@
1
+ import { jUserList } from 'jamespot-user-api';
2
+ export type JRCWidgetUserProfileProps = {
3
+ css?: {
4
+ background?: string;
5
+ textColor?: string;
6
+ fontWeight?: string;
7
+ fontSize?: string | number;
8
+ };
9
+ pictureSize?: string;
10
+ displayMode?: string;
11
+ currentUser: jUserList;
12
+ };
13
+ export declare const JRCWidgetUserProfile: ({ currentUser, pictureSize, displayMode, css, }: JRCWidgetUserProfileProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { Meta } from '@storybook/react-webpack5';
2
+ import { JRCWidgetUserProfile, JRCWidgetUserProfileProps } from './JRCWidgetUserProfile';
3
+ declare const _default: Meta<typeof JRCWidgetUserProfile>;
4
+ export default _default;
5
+ export declare const OnlyPicture: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, JRCWidgetUserProfileProps>;
6
+ export declare const WithFirstName: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, JRCWidgetUserProfileProps>;
7
+ export declare const WithFirstNameLastName: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, JRCWidgetUserProfileProps>;
8
+ export declare const MissingFirstName: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, JRCWidgetUserProfileProps>;
9
+ export declare const MissingLastName: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, JRCWidgetUserProfileProps>;
@@ -0,0 +1,7 @@
1
+ import { WidgetUserProfileContent } from 'jamespot-user-api';
2
+ export interface JRCWidgetUserProfileEditorProps {
3
+ uniqid: string;
4
+ content: WidgetUserProfileContent;
5
+ onChangeContent: (uniqid: string, content: WidgetUserProfileContent) => void;
6
+ }
7
+ export declare const JRCWidgetUserProfileEditor: ({ uniqid, content, onChangeContent }: JRCWidgetUserProfileEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -27,7 +27,58 @@ export declare const EditorGalleryImageNumberOptions: {
27
27
  label: string;
28
28
  value: string;
29
29
  }[];
30
+ export declare const EditorGalleryHeightModeOptions: {
31
+ label: string;
32
+ value: string;
33
+ }[];
34
+ export declare enum EditorFontSize {
35
+ Size10 = 10,
36
+ Size12 = 12,
37
+ Size14 = 14,
38
+ Size16 = 16,
39
+ Size18 = 18,
40
+ Size20 = 20,
41
+ Size22 = 22,
42
+ Size24 = 24
43
+ }
44
+ export declare const EditorFontSizeOptions: {
45
+ label: string;
46
+ value: EditorFontSize;
47
+ }[];
30
48
  export declare const EditorOpacityOptions: {
31
49
  label: string;
32
50
  value: string;
33
51
  }[];
52
+ export declare enum ProfileDisplayType {
53
+ OnlyPicture = "1",
54
+ WithFirstName = "2",
55
+ WithFirstNameLastName = "3"
56
+ }
57
+ export declare const ProfileDisplayOptions: {
58
+ label: string;
59
+ value: ProfileDisplayType;
60
+ }[];
61
+ export declare enum ProfilePictureSize {
62
+ Small = "60",
63
+ Medium = "80",
64
+ Large = "120"
65
+ }
66
+ export declare const ProfilePictureSizeOptions: {
67
+ label: string;
68
+ value: ProfilePictureSize;
69
+ }[];
70
+ export declare enum TextFontWeight {
71
+ Normal = 400,
72
+ Medium = 500,
73
+ Bold = 700
74
+ }
75
+ export declare const TextFontWeightOptions: {
76
+ label: string;
77
+ value: TextFontWeight;
78
+ }[];
79
+ /**
80
+ * Gets the color value by its index in the EditorColorsOptions array.
81
+ * @param index The index of the color.
82
+ * @returns The color string, or undefined if the index is out of bounds.
83
+ */
84
+ export declare function getColorOptionByIndex(index: number): string;
@@ -1,6 +1,8 @@
1
- import { jFileLittle } from 'jamespot-user-api';
1
+ import { jFileLittle, jUserList } from 'jamespot-user-api';
2
2
  export declare function imageResize(width: number, height: number, maxWidth: number, maxHeight: number): {
3
3
  width: number;
4
4
  height: number;
5
5
  };
6
6
  export declare const mockFileLittle: () => jFileLittle;
7
+ export declare const mock_jUserList: () => jUserList;
8
+ export declare const getCurrentUserDisplayText: (displayMode: string, currentUser: jUserList) => string;
@@ -159,3 +159,5 @@ export { JRCWidgetDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidg
159
159
  export { JRCWidgetExcelDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor';
160
160
  export { JRCWidgetTable } from './Widgets/JRCWidgetTable/JRCWidgetTable';
161
161
  export { JRCWidgetTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetTableEditor';
162
+ export { JRCWidgetUserProfile } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfile';
163
+ export { JRCWidgetUserProfileEditor } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfileEditor';
@@ -19,7 +19,7 @@ export type ThemeConfigOptions = {
19
19
  bgColorNotLogged: string;
20
20
  forest: string;
21
21
  };
22
- export type Colors = 'primary' | 'primaryLight' | 'primaryTextLight' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'navBackground' | 'navTextColor' | 'lavender' | 'orange' | 'orangeLight' | 'orangeTextLight' | 'yellow' | 'green' | 'greenLight' | 'greenTextLight' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'raspberry' | 'sky' | 'sky15' | 'sand' | 'forest' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white' | 'transparent';
22
+ export type Colors = 'primary' | 'primaryLight' | 'primaryTextLight' | 'secondary' | 'headerColor' | 'headerTextColor' | 'headerUserBackground' | 'headerUserTextColor' | 'headerSearchBarTextColor' | 'headerSearchBarBackgroundColor' | 'navBackground' | 'navTextColor' | 'lavender' | 'orange' | 'orangeLight' | 'orangeTextLight' | 'yellow' | 'green' | 'greenLight' | 'greenTextLight' | 'navy' | 'overseas' | 'night1' | 'night2' | 'sandLight' | 'raspberry' | 'sky' | 'sky15' | 'sand' | 'forest' | 'grey0' | 'grey1' | 'grey2' | 'grey3' | 'grey4' | 'grey5' | 'grey6' | 'black' | 'black10' | 'black15' | 'black20' | 'white' | 'transparent' | 'transparentHexa';
23
23
  type ThemeConfigColorType = {
24
24
  [color in Colors]: string;
25
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.2.56",
3
+ "version": "1.2.57",
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.56",
69
+ "jamespot-user-api": "^1.2.57",
70
70
  "jest": "^30.2.0",
71
71
  "jest-environment-jsdom": "^30.2.0",
72
72
  "jest-styled-components": "^7.2.0",
@@ -90,6 +90,7 @@
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",
93
94
  "redux": "^4.2.1",
94
95
  "source-map-loader": "^1.1.3",
95
96
  "storybook": "^9.1.10",
@@ -121,6 +122,9 @@
121
122
  "node": ">=20.17.0 <21.0.0",
122
123
  "pnpm": ">=9.9.0 <10"
123
124
  },
125
+ "dependencies": {
126
+ "@types/react-transition-group": "^4.4.12"
127
+ },
124
128
  "scripts": {
125
129
  "dev": "webpack --env NODE_ENV=development",
126
130
  "local": "webpack --env NODE_ENV=development WATCH=true",