jamespot-react-components 1.2.62 → 1.3.4

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,7 +1,8 @@
1
- export declare const EditorInput: ({ label, placeholder, initialValue, onChange, }: {
1
+ export declare const EditorInput: ({ label, placeholder, initialValue, width, onChange, }: {
2
2
  label: string;
3
3
  placeholder?: string;
4
4
  initialValue: string | undefined;
5
5
  autoFocus?: boolean;
6
+ width?: string;
6
7
  onChange: (text: string) => void;
7
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Position } from '../../Widgets/const';
2
+ import { ButtonColors } from '../../JRCButton/types';
3
+ export type Sizes = 's' | 'm' | 'l';
4
+ export declare const EditorPositionToggle: ({ label, initialValue, width, onChange, color, size, }: {
5
+ label?: string;
6
+ initialValue?: Position;
7
+ width?: string;
8
+ onChange: (value: Position) => void;
9
+ color?: ButtonColors;
10
+ size?: Sizes;
11
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { WidgetEditorActions, WidgetExtensionContent } from 'jamespot-user-api';
2
+ export declare const JRCWidgetExtensionEditor: ({ extensionName, onChange, }: WidgetExtensionContent & WidgetEditorActions<WidgetExtensionContent>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jUserList } from 'jamespot-user-api';
2
+ export type JRCWidgetWelcomeProps = {
3
+ css?: {
4
+ background?: string;
5
+ textColor?: string;
6
+ fontWeight?: string;
7
+ fontSize?: string | number;
8
+ textAlign?: string;
9
+ };
10
+ message?: string;
11
+ displayMode?: string;
12
+ currentUser: jUserList;
13
+ lineBreak?: boolean;
14
+ position?: string;
15
+ };
16
+ export declare const JRCWidgetWelcome: ({ currentUser, message, lineBreak, css, position, displayMode, }: JRCWidgetWelcomeProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { Meta } from '@storybook/react-webpack5';
2
+ import { JRCWidgetWelcome } from './JRCWidgetWelcome';
3
+ import { ProfileDisplayType, Position, TextFontWeight, EditorFontSize } from '../const';
4
+ declare const _default: Meta<typeof JRCWidgetWelcome>;
5
+ export default _default;
6
+ export declare const Default: {
7
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
8
+ args: {};
9
+ };
10
+ export declare const CustomMessage: {
11
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
12
+ args: {
13
+ message: string;
14
+ };
15
+ };
16
+ export declare const WithFullName: {
17
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
18
+ args: {
19
+ displayMode: ProfileDisplayType;
20
+ };
21
+ };
22
+ export declare const TopLeft: {
23
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
24
+ args: {
25
+ position: Position;
26
+ };
27
+ };
28
+ export declare const BottomRight: {
29
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
30
+ args: {
31
+ position: Position;
32
+ };
33
+ };
34
+ export declare const CustomBackground: {
35
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
36
+ args: {
37
+ css: {
38
+ background: string;
39
+ textColor: string;
40
+ fontWeight: TextFontWeight;
41
+ fontSize: EditorFontSize;
42
+ };
43
+ };
44
+ };
45
+ export declare const NoLineBreak: {
46
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
47
+ args: {
48
+ lineBreak: boolean;
49
+ };
50
+ };
51
+ export declare const InteractionTest: {
52
+ render: import("storybook/internal/csf").AnnotatedStoryFn<import("@storybook/react-webpack5").ReactRenderer, import("./JRCWidgetWelcome").JRCWidgetWelcomeProps>;
53
+ play: ({ canvasElement }: {
54
+ canvasElement: HTMLElement;
55
+ }) => Promise<void>;
56
+ };
@@ -0,0 +1,10 @@
1
+ import { WidgetWelcomeContent } from 'jamespot-user-api';
2
+ export interface JRCWidgetWelcomeEditorProps extends WidgetWelcomeContent {
3
+ uniqid: string;
4
+ content: WidgetWelcomeContent;
5
+ onChangeContent: (uniqid: string, content: WidgetWelcomeContent) => void;
6
+ }
7
+ /**
8
+ * Widget Welcome editor component
9
+ */
10
+ export declare const JRCWidgetWelcomeEditor: ({ uniqid, content, onChangeContent }: JRCWidgetWelcomeEditorProps) => import("react/jsx-runtime").JSX.Element;
@@ -27,10 +27,6 @@ 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
30
  export declare enum EditorFontSize {
35
31
  Size10 = 10,
36
32
  Size12 = 12,
@@ -45,10 +41,40 @@ export declare const EditorFontSizeOptions: {
45
41
  label: string;
46
42
  value: EditorFontSize;
47
43
  }[];
44
+ export declare const EditorGalleryHeightModeOptions: {
45
+ label: string;
46
+ value: string;
47
+ }[];
48
48
  export declare const EditorOpacityOptions: {
49
49
  label: string;
50
50
  value: string;
51
51
  }[];
52
+ export declare enum TextAlign {
53
+ Left = "left",
54
+ Center = "center",
55
+ Justify = "justify",
56
+ Right = "right"
57
+ }
58
+ export declare const TextAlignOptions: {
59
+ label: string;
60
+ value: TextAlign;
61
+ }[];
62
+ export declare enum Position {
63
+ TopLeft = "top-left",
64
+ TopCenter = "top-center",
65
+ TopRight = "top-right",
66
+ CenterLeft = "center-left",
67
+ Center = "center",
68
+ CenterRight = "center-right",
69
+ BottomLeft = "bottom-left",
70
+ BottomCenter = "bottom-center",
71
+ BottomRight = "bottom-right"
72
+ }
73
+ export declare const PositionOptions: {
74
+ label: string;
75
+ value: Position;
76
+ iconName: string;
77
+ }[];
52
78
  export declare enum ProfileDisplayType {
53
79
  OnlyPicture = "1",
54
80
  WithFirstName = "2",
@@ -76,6 +102,10 @@ export declare const TextFontWeightOptions: {
76
102
  label: string;
77
103
  value: TextFontWeight;
78
104
  }[];
105
+ export declare const YesNoBooleanOptions: {
106
+ label: string;
107
+ value: boolean;
108
+ }[];
79
109
  /**
80
110
  * Gets the color value by its index in the EditorColorsOptions array.
81
111
  * @param index The index of the color.
@@ -1,8 +1,10 @@
1
1
  import { jFileLittle, jUserList } from 'jamespot-user-api';
2
+ import { Position } from './const';
2
3
  export declare function imageResize(width: number, height: number, maxWidth: number, maxHeight: number): {
3
4
  width: number;
4
5
  height: number;
5
6
  };
6
7
  export declare const mockFileLittle: () => jFileLittle;
8
+ export declare function getPositionStyle(position: Position): React.CSSProperties;
7
9
  export declare const mock_jUserList: () => jUserList;
8
10
  export declare const getCurrentUserDisplayText: (displayMode: string, currentUser: jUserList) => string;
@@ -1,7 +1,6 @@
1
1
  export { BETA_JRCDoubleClick } from './Beta/BETA_JRCDoubleClick/BETA_JRCDoubleClick';
2
2
  export { BETA_JRCDragAndDrop } from './Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
3
3
  export { ArticleCard } from './Common/Article/ArticleCard';
4
- export { JRCAudience } from './JRCAudience/JRCAudience';
5
4
  export { JRCConditionalWrapper } from './Common/JRCConditionalWrapper';
6
5
  export { JRCDraggingPlaceholder } from './Common/JRCDraggingPlaceholder';
7
6
  export { SkipToContent } from './Common/SkipToContent';
@@ -51,6 +50,7 @@ export { JRCAppContainer } from './JRCAppContainer/JRCAppContainer';
51
50
  export { JRCAppHeader } from './JRCAppHeader/JRCAppHeader';
52
51
  export { JRCAppLeftColumn } from './JRCAppLeftColumn/JRCAppLeftColumn';
53
52
  export { JRCAttachments } from './JRCAttachments/JRCAttachments';
53
+ export { JRCAudience } from './JRCAudience/JRCAudience';
54
54
  export { JRCAvatar } from './JRCAvatar/JRCAvatar';
55
55
  export { JRCButton } from './JRCButton/JRCButton';
56
56
  export { JRCValidationButton } from './JRCButton/JRCValidationButton';
@@ -144,6 +144,7 @@ export { JRCWidgetEmailsImap } from './Widgets/JRCWidgetEmailsImap/JRCWidgetEmai
144
144
  export { JRCWidgetEmailsImapEditor } from './Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapEditor';
145
145
  export { JRCWidgetEmailsImapLevel2 } from './Widgets/JRCWidgetEmailsImap/JRCWidgetEmailsImapLevel2';
146
146
  export { JRCWidgetEmptyInplace } from './Widgets/JRCWidgetEmptyInplace';
147
+ export { JRCWidgetExtensionEditor } from './Widgets/JRCWidgetExtension/JRCWidgetExtensionEditor';
147
148
  export { JRCWidgetIcon } from './Widgets/JRCWidgetIcon';
148
149
  export { JRCWidgetArticleImageEditor } from './Widgets/JRCWidgetImage/JRCWidgetArticleImageEditor';
149
150
  export { JRCWidgetImage } from './Widgets/JRCWidgetImage/JRCWidgetImage';
@@ -160,5 +161,7 @@ export { JRCWidgetDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidg
160
161
  export { JRCWidgetExcelDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor';
161
162
  export { JRCWidgetTable } from './Widgets/JRCWidgetTable/JRCWidgetTable';
162
163
  export { JRCWidgetTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetTableEditor';
164
+ export { JRCWidgetWelcome } from './Widgets/JRCWidgetWelcome/JRCWidgetWelcome';
165
+ export { JRCWidgetWelcomeEditor } from './Widgets/JRCWidgetWelcome/JRCWidgetWelcomeEditor';
163
166
  export { JRCWidgetUserProfile } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfile';
164
167
  export { JRCWidgetUserProfileEditor } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfileEditor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-react-components",
3
- "version": "1.2.62",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "keywords": [],
12
12
  "author": "",
13
13
  "devDependencies": {
14
- "@chromatic-com/storybook": "^4.1.1",
14
+ "@chromatic-com/storybook": "^4.1.2",
15
15
  "@fullcalendar/core": "^6.1.19",
16
16
  "@fullcalendar/daygrid": "^6.1.19",
17
17
  "@fullcalendar/interaction": "^6.1.19",
@@ -20,11 +20,11 @@
20
20
  "@fullcalendar/timegrid": "^6.1.19",
21
21
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
22
22
  "@lcov-viewer/istanbul-report": "^1.4.0",
23
- "@storybook/addon-a11y": "^9.1.10",
23
+ "@storybook/addon-a11y": "9.1.16",
24
24
  "@storybook/addon-coverage": "^2.0.0",
25
- "@storybook/addon-docs": "^9.1.10",
26
- "@storybook/addon-links": "^9.1.10",
27
- "@storybook/react-webpack5": "^9.1.10",
25
+ "@storybook/addon-docs": "9.1.16",
26
+ "@storybook/addon-links": "9.1.16",
27
+ "@storybook/react-webpack5": "9.1.16",
28
28
  "@storybook/test-runner": "^0.23.0",
29
29
  "@storybook/testing-library": "^0.2.2",
30
30
  "@testing-library/dom": "^8.20.1",
@@ -34,15 +34,14 @@
34
34
  "@testing-library/user-event": "^13.5.0",
35
35
  "@tinymce/tinymce-react": "^5.1.1",
36
36
  "@types/chroma-js": "^2.4.5",
37
- "@types/dompurify": "^3.2.0",
38
37
  "@types/jest": "^30.0.0",
39
- "@types/node": "^20.19.21",
38
+ "@types/node": "^20.19.24",
40
39
  "@types/react": "^18.3.26",
41
40
  "@types/react-dom": "^18.3.7",
42
41
  "@types/react-redux": "^7.1.34",
43
42
  "@types/react-router-dom": "^5.3.3",
44
43
  "@types/react-table": "^7.7.20",
45
- "@types/styled-components": "^5.1.34",
44
+ "@types/styled-components": "^5.1.35",
46
45
  "@types/testing-library__jest-dom": "^5.14.9",
47
46
  "@types/tinymce": "^4.6.9",
48
47
  "@types/uuid": "^10.0.0",
@@ -61,16 +60,16 @@
61
60
  "eslint-plugin-jsx-expressions": "^1.3.2",
62
61
  "eslint-plugin-react": "^7.37.5",
63
62
  "eslint-plugin-react-hooks": "^4.6.2",
64
- "eslint-plugin-storybook": "9.1.3",
63
+ "eslint-plugin-storybook": "9.1.16",
65
64
  "file-loader": "^6.2.0",
66
65
  "fork-ts-checker-webpack-plugin": "^9.1.0",
67
66
  "husky": "^7.0.4",
68
67
  "identity-obj-proxy": "^3.0.0",
69
- "jamespot-user-api": "^1.2.62",
68
+ "jamespot-user-api": "^1.3.4",
70
69
  "jest": "^30.2.0",
71
70
  "jest-environment-jsdom": "^30.2.0",
72
71
  "jest-styled-components": "^7.2.0",
73
- "knip": "^5.65.0",
72
+ "knip": "^5.67.1",
74
73
  "lint-staged": "^12.5.0",
75
74
  "nyc": "^17.1.0",
76
75
  "prettier": "^3.6.2",
@@ -81,18 +80,18 @@
81
80
  "react-dnd-html5-backend": "^14.1.0",
82
81
  "react-dnd-test-backend": "^16.0.1",
83
82
  "react-dom": "^18.3.1",
84
- "react-hook-form": "^7.65.0",
83
+ "react-hook-form": "^7.66.0",
85
84
  "react-image-crop": "^11.0.10",
86
85
  "react-intl": "7.1.11",
87
86
  "react-qr-code": "^2.0.18",
88
87
  "react-redux": "^8.1.3",
89
88
  "react-router-dom": "^6.30.1",
90
89
  "react-table": "^7.8.0",
91
- "react-test-renderer": "^17.0.2",
92
90
  "react-tooltip": "^4.5.1",
91
+ "react-transition-state": "^2.3.1",
93
92
  "redux": "^4.2.1",
94
93
  "source-map-loader": "^1.1.3",
95
- "storybook": "^9.1.10",
94
+ "storybook": "9.1.16",
96
95
  "style-loader": "^1.3.0",
97
96
  "styled-components": "^5.3.11",
98
97
  "ts-jest": "^29.4.5",
@@ -121,9 +120,6 @@
121
120
  "node": ">=20.17.0 <21.0.0",
122
121
  "pnpm": ">=9.9.0 <10"
123
122
  },
124
- "dependencies": {
125
- "react-transition-state": "^2.3.1"
126
- },
127
123
  "scripts": {
128
124
  "dev": "webpack --env NODE_ENV=development",
129
125
  "local": "webpack --env NODE_ENV=development WATCH=true",