@@ -24848,10 +24848,10 @@ exports[`amplify form renderer tests forms with StorageField tests should render
24848
24848
"/* eslint-disable */
24849
24849
import * as React from \\"react\\";
24850
24850
import { Button, Flex, Grid, TextField } from \\"@aws-amplify/ui-react\\";
24851
+ import { StorageManager } from \\"@aws-amplify/ui-react-storage\\";
24851
24852
import { Field, getOverrideProps } from \\"@aws-amplify/ui-react/internal\\";
24852
24853
import { Product } from \\"../models\\";
24853
24854
import { fetchByPath, processFile, validateField } from \\"./utils\\";
24854
- import { StorageManager } from \\"@aws-amplify/ui-react-storage\\";
24855
24855
import { DataStore } from \\"aws-amplify\\";
24856
24856
export default function CreateProductForm(props) {
24857
24857
const {
@@ -25059,10 +25059,10 @@ exports[`amplify form renderer tests forms with StorageField tests should render
25059
25059
"/* eslint-disable */
25060
25060
import * as React from \\"react\\";
25061
25061
import { Button, Flex, Grid, TextField } from \\"@aws-amplify/ui-react\\";
25062
+ import { StorageManager } from \\"@aws-amplify/ui-react-storage\\";
25062
25063
import { Field, getOverrideProps } from \\"@aws-amplify/ui-react/internal\\";
25063
25064
import { Product } from \\"../models\\";
25064
25065
import { fetchByPath, processFile, validateField } from \\"./utils\\";
25065
- import { StorageManager } from \\"@aws-amplify/ui-react-storage\\";
25066
25066
import { DataStore } from \\"aws-amplify\\";
25067
25067
export default function UpdateProductForm(props) {
25068
25068
const {
@@ -25287,14 +25287,54 @@ export default function UpdateProductForm(props) {
25287
25287
"
25288
25288
`;
25289
25289
25290
+ exports[`amplify form renderer tests forms with StorageField tests should render a update form with StorageField 2`] = `
25291
+ "import * as React from \\"react\\";
25292
+ import { GridProps, TextFieldProps } from \\"@aws-amplify/ui-react\\";
25293
+ import { StorageManagerProps } from \\"@aws-amplify/ui-react-storage\\";
25294
+ import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
25295
+ import { Product } from \\"../models\\";
25296
+ export declare type ValidationResponse = {
25297
+ hasError: boolean;
25298
+ errorMessage?: string;
25299
+ };
25300
+ export declare type ValidationFunction<T> = (value: T, validationResponse: ValidationResponse) => ValidationResponse | Promise<ValidationResponse>;
25301
+ export declare type UpdateProductFormInputValues = {
25302
+ name?: string;
25303
+ imgKeys?: string[];
25304
+ };
25305
+ export declare type UpdateProductFormValidationValues = {
25306
+ name?: ValidationFunction<string>;
25307
+ imgKeys?: ValidationFunction<string>;
25308
+ };
25309
+ export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
25310
+ export declare type UpdateProductFormOverridesProps = {
25311
+ UpdateProductFormGrid?: PrimitiveOverrideProps<GridProps>;
25312
+ name?: PrimitiveOverrideProps<TextFieldProps>;
25313
+ imgKeys?: PrimitiveOverrideProps<StorageManagerProps>;
25314
+ } & EscapeHatchProps;
25315
+ export declare type UpdateProductFormProps = React.PropsWithChildren<{
25316
+ overrides?: UpdateProductFormOverridesProps | undefined | null;
25317
+ } & {
25318
+ id?: string;
25319
+ product?: Product;
25320
+ onSubmit?: (fields: UpdateProductFormInputValues) => UpdateProductFormInputValues;
25321
+ onSuccess?: (fields: UpdateProductFormInputValues) => void;
25322
+ onError?: (fields: UpdateProductFormInputValues, errorMessage: string) => void;
25323
+ onChange?: (fields: UpdateProductFormInputValues) => UpdateProductFormInputValues;
25324
+ onValidate?: UpdateProductFormValidationValues;
25325
+ } & React.CSSProperties>;
25326
+ export default function UpdateProductForm(props: UpdateProductFormProps): React.ReactElement;
25327
+ "
25328
+ `;
25329
+
25290
25330
exports[`amplify form renderer tests forms with StorageField tests should render a update form with StorageField on non-array field 1`] = `
25291
25331
"/* eslint-disable */
25292
25332
import * as React from \\"react\\";
25293
25333
import { Button, Flex, Grid, TextField } from \\"@aws-amplify/ui-react\\";
25334
+ import { StorageManager } from \\"@aws-amplify/ui-react-storage\\";
25294
25335
import { Field, getOverrideProps } from \\"@aws-amplify/ui-react/internal\\";
25295
25336
import { Product } from \\"../models\\";
25296
25337
import { fetchByPath, processFile, validateField } from \\"./utils\\";
25297
- import { StorageManager } from \\"@aws-amplify/ui-react-storage\\";
25298
25338
import { DataStore } from \\"aws-amplify\\";
25299
25339
export default function UpdateProductForm(props) {
25300
25340
const {
0 commit comments