jamespot-react-components 1.3.3 → 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;
@@ -246,7 +246,7 @@ export declare const OptionMenu: import("styled-components").StyledComponent<"di
246
246
  accessKey?: string | undefined | undefined;
247
247
  autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
248
248
  autoFocus?: boolean | undefined | undefined;
249
- contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
249
+ contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
250
250
  contextMenu?: string | undefined | undefined;
251
251
  dir?: string | undefined | undefined;
252
252
  draggable?: (boolean | "true" | "false") | undefined;
@@ -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;
@@ -161,5 +161,7 @@ export { JRCWidgetDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidg
161
161
  export { JRCWidgetExcelDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor';
162
162
  export { JRCWidgetTable } from './Widgets/JRCWidgetTable/JRCWidgetTable';
163
163
  export { JRCWidgetTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetTableEditor';
164
+ export { JRCWidgetWelcome } from './Widgets/JRCWidgetWelcome/JRCWidgetWelcome';
165
+ export { JRCWidgetWelcomeEditor } from './Widgets/JRCWidgetWelcome/JRCWidgetWelcomeEditor';
164
166
  export { JRCWidgetUserProfile } from './Widgets/JRCWidgetUserProfile/JRCWidgetUserProfile';
165
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.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -65,7 +65,7 @@
65
65
  "fork-ts-checker-webpack-plugin": "^9.1.0",
66
66
  "husky": "^7.0.4",
67
67
  "identity-obj-proxy": "^3.0.0",
68
- "jamespot-user-api": "^1.3.3",
68
+ "jamespot-user-api": "^1.3.4",
69
69
  "jest": "^30.2.0",
70
70
  "jest-environment-jsdom": "^30.2.0",
71
71
  "jest-styled-components": "^7.2.0",