@evoke-platform/ui-components 1.10.0-dev.1 → 1.10.0-dev.2
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.
- package/dist/published/components/custom/FormV2/FormRendererContainer.d.ts +0 -2
- package/dist/published/components/custom/FormV2/components/Footer.js +1 -0
- package/dist/published/components/custom/FormV2/components/FormFieldTypes/Image.js +1 -2
- package/dist/published/stories/FormRendererContainer.stories.d.ts +0 -10
- package/dist/published/stories/FormRendererContainer.stories.js +7 -3
- package/package.json +1 -1
|
@@ -24,8 +24,6 @@ export type FormRendererContainerProps = BaseProps & {
|
|
|
24
24
|
fieldHeight?: 'small' | 'medium';
|
|
25
25
|
};
|
|
26
26
|
actionId?: string;
|
|
27
|
-
stickyFooter?: boolean;
|
|
28
|
-
hideButtons?: boolean;
|
|
29
27
|
objectId: string;
|
|
30
28
|
richTextEditor?: ComponentType<SimpleEditorProps>;
|
|
31
29
|
onSubmit?: (submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>;
|
|
@@ -32,7 +32,6 @@ const styles = {
|
|
|
32
32
|
},
|
|
33
33
|
icon: {
|
|
34
34
|
color: '#fff',
|
|
35
|
-
zIndex: 40,
|
|
36
35
|
fontSize: '16px',
|
|
37
36
|
},
|
|
38
37
|
deleteIcon: {
|
|
@@ -81,7 +80,7 @@ export const Image = (props) => {
|
|
|
81
80
|
accept: { 'image/*': ['.png', '.jpg', '.jpeg', '.gif', '.svg'] },
|
|
82
81
|
});
|
|
83
82
|
return (React.createElement(React.Fragment, null, image ? (React.createElement(Box, { sx: styles.imageContainer },
|
|
84
|
-
React.createElement(Box, { sx: { position: 'relative', left: 0
|
|
83
|
+
React.createElement(Box, { sx: { position: 'relative', left: 0 } },
|
|
85
84
|
React.createElement(CardMedia, { component: "img", image: image, alt: 'Uploaded Image', sx: styles.image }),
|
|
86
85
|
canUpdateProperty && (React.createElement(IconButton, { onClick: handleRemove, "aria-label": "Remove image", sx: styles.deleteIcon },
|
|
87
86
|
React.createElement(ClearRounded, { sx: styles.icon })))))) : canUpdateProperty ? (React.createElement(Box, { sx: {
|
|
@@ -10,8 +10,6 @@ declare const _default: import("@storybook/types").ComponentAnnotations<import("
|
|
|
10
10
|
fieldHeight?: "medium" | "small" | undefined;
|
|
11
11
|
} | undefined;
|
|
12
12
|
actionId?: string | undefined;
|
|
13
|
-
stickyFooter?: boolean | undefined;
|
|
14
|
-
hideButtons?: boolean | undefined;
|
|
15
13
|
objectId: string;
|
|
16
14
|
richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
|
|
17
15
|
onSubmit?: ((submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>) | undefined;
|
|
@@ -39,8 +37,6 @@ export declare const Editable: import("@storybook/types").AnnotatedStoryFn<impor
|
|
|
39
37
|
fieldHeight?: "medium" | "small" | undefined;
|
|
40
38
|
} | undefined;
|
|
41
39
|
actionId?: string | undefined;
|
|
42
|
-
stickyFooter?: boolean | undefined;
|
|
43
|
-
hideButtons?: boolean | undefined;
|
|
44
40
|
objectId: string;
|
|
45
41
|
richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
|
|
46
42
|
onSubmit?: ((submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>) | undefined;
|
|
@@ -67,8 +63,6 @@ export declare const NoButtons: import("@storybook/types").AnnotatedStoryFn<impo
|
|
|
67
63
|
fieldHeight?: "medium" | "small" | undefined;
|
|
68
64
|
} | undefined;
|
|
69
65
|
actionId?: string | undefined;
|
|
70
|
-
stickyFooter?: boolean | undefined;
|
|
71
|
-
hideButtons?: boolean | undefined;
|
|
72
66
|
objectId: string;
|
|
73
67
|
richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
|
|
74
68
|
onSubmit?: ((submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>) | undefined;
|
|
@@ -95,8 +89,6 @@ export declare const DocumentForm: import("@storybook/types").AnnotatedStoryFn<i
|
|
|
95
89
|
fieldHeight?: "medium" | "small" | undefined;
|
|
96
90
|
} | undefined;
|
|
97
91
|
actionId?: string | undefined;
|
|
98
|
-
stickyFooter?: boolean | undefined;
|
|
99
|
-
hideButtons?: boolean | undefined;
|
|
100
92
|
objectId: string;
|
|
101
93
|
richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
|
|
102
94
|
onSubmit?: ((submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>) | undefined;
|
|
@@ -123,8 +115,6 @@ export declare const FormWithSections: import("@storybook/types").AnnotatedStory
|
|
|
123
115
|
fieldHeight?: "medium" | "small" | undefined;
|
|
124
116
|
} | undefined;
|
|
125
117
|
actionId?: string | undefined;
|
|
126
|
-
stickyFooter?: boolean | undefined;
|
|
127
|
-
hideButtons?: boolean | undefined;
|
|
128
118
|
objectId: string;
|
|
129
119
|
richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
|
|
130
120
|
onSubmit?: ((submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>) | undefined;
|
|
@@ -2,7 +2,7 @@ import { Box } from '@mui/material';
|
|
|
2
2
|
import { http, HttpResponse } from 'msw';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { MemoryRouter } from 'react-router-dom';
|
|
5
|
-
import { FormRendererContainer } from '../components/custom';
|
|
5
|
+
import { FormRenderer, FormRendererContainer } from '../components/custom';
|
|
6
6
|
import { documentInstance } from './FormRendererData';
|
|
7
7
|
import { sharedObjectHandlers } from './sharedMswHandlers';
|
|
8
8
|
export default {
|
|
@@ -31,8 +31,12 @@ const mockProps = {
|
|
|
31
31
|
fieldHeight: 'medium',
|
|
32
32
|
},
|
|
33
33
|
actionId: '_update',
|
|
34
|
-
stickyFooter: true,
|
|
35
34
|
objectId: 'genericEvokeForm',
|
|
35
|
+
renderFooter: (footerProps) => (React.createElement(FormRenderer.Footer, { ...footerProps, sx: {
|
|
36
|
+
background: 'white',
|
|
37
|
+
position: 'sticky',
|
|
38
|
+
bottom: 0,
|
|
39
|
+
} })),
|
|
36
40
|
};
|
|
37
41
|
const Template = (args) => {
|
|
38
42
|
return (React.createElement(MemoryRouter, null,
|
|
@@ -45,7 +49,7 @@ Editable.args = {
|
|
|
45
49
|
export const NoButtons = Template.bind({});
|
|
46
50
|
NoButtons.args = {
|
|
47
51
|
...mockProps,
|
|
48
|
-
|
|
52
|
+
renderFooter: () => null,
|
|
49
53
|
};
|
|
50
54
|
export const DocumentForm = Template.bind({});
|
|
51
55
|
DocumentForm.args = {
|