// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`amplify render tests actions DataStore DataStoreCreateItem 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreCreateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Customer } from \\"../models\\"; import { schema } from \\"../models/schema\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CreateCustomerButtonOverridesProps = { CreateCustomerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CreateCustomerButtonProps = React.PropsWithChildren< Partial & { overrides?: CreateCustomerButtonOverridesProps | undefined | null; } >; export default function CreateCustomerButton( props: CreateCustomerButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const createCustomerButtonOnClick = useDataStoreCreateAction({ model: Customer, fields: { firstName: \\"Din\\", lastName: \\"Djarin\\" }, schema: schema, }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions DataStore DataStoreDeleteItem 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreDeleteAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Customer } from \\"../models\\"; import { schema } from \\"../models/schema\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type DeleteCustomerButtonOverridesProps = { DeleteCustomerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type DeleteCustomerButtonProps = React.PropsWithChildren< Partial & { overrides?: DeleteCustomerButtonOverridesProps | undefined | null; } >; export default function DeleteCustomerButton( props: DeleteCustomerButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const deleteCustomerButtonOnClick = useDataStoreDeleteAction({ model: Customer, id: \\"d9887268-47dd-4899-9568-db5809218751\\", schema: schema, }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions DataStore DataStoreUpdateItem 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreUpdateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Customer } from \\"../models\\"; import { schema } from \\"../models/schema\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type UpdateCustomerButtonOverridesProps = { UpdateCustomerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type UpdateCustomerButtonProps = React.PropsWithChildren< Partial & { overrides?: UpdateCustomerButtonOverridesProps | undefined | null; } >; export default function UpdateCustomerButton( props: UpdateCustomerButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const updateCustomerButtonOnClick = useDataStoreUpdateAction({ model: Customer, id: \\"d9887268-47dd-4899-9568-db5809218751\\", fields: { firstName: \\"Din\\", lastName: \\"Djarin\\" }, schema: schema, }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions GraphQL DataStoreCreateItem 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { API } from \\"aws-amplify\\"; import { createCustomer } from \\"../graphql/mutations\\"; import { Customer } from \\"../API\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CreateCustomerButtonOverridesProps = { CreateCustomerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CreateCustomerButtonProps = React.PropsWithChildren< Partial & { overrides?: CreateCustomerButtonOverridesProps | undefined | null; } >; export default function CreateCustomerButton( props: CreateCustomerButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const createCustomerButtonOnClick = async () => { await API.graphql({ query: createCustomer, variables: { input: { firstName: \\"Din\\", lastName: \\"Djarin\\", }, }, }); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions GraphQL DataStoreDeleteItem 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { API } from \\"aws-amplify\\"; import { deleteCustomer } from \\"../graphql/mutations\\"; import { Customer } from \\"../API\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type DeleteCustomerButtonOverridesProps = { DeleteCustomerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type DeleteCustomerButtonProps = React.PropsWithChildren< Partial & { overrides?: DeleteCustomerButtonOverridesProps | undefined | null; } >; export default function DeleteCustomerButton( props: DeleteCustomerButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const deleteCustomerButtonOnClick = async () => { await API.graphql({ query: deleteCustomer, variables: { input: { id: \\"d9887268-47dd-4899-9568-db5809218751\\", }, }, }); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions GraphQL DataStoreUpdateItem 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { API } from \\"aws-amplify\\"; import { updateCustomer } from \\"../graphql/mutations\\"; import { Customer } from \\"../API\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type UpdateCustomerButtonOverridesProps = { UpdateCustomerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type UpdateCustomerButtonProps = React.PropsWithChildren< Partial & { overrides?: UpdateCustomerButtonOverridesProps | undefined | null; } >; export default function UpdateCustomerButton( props: UpdateCustomerButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const updateCustomerButtonOnClick = async () => { await API.graphql({ query: updateCustomer, variables: { input: { firstName: \\"Din\\", lastName: \\"Djarin\\", id: \\"d9887268-47dd-4899-9568-db5809218751\\", }, }, }); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions auth signs out 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useAuthSignOutAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SignOutButtonOverridesProps = { SignOutButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SignOutButtonProps = React.PropsWithChildren< Partial & { overrides?: SignOutButtonOverridesProps | undefined | null; } >; export default function SignOutButton( props: SignOutButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const signOutButtonOnClick = useAuthSignOutAction({ global: false }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions navigation anchor navigation action 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useNavigateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type NavigateButtonOverridesProps = { NavigateButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type NavigateButtonProps = React.PropsWithChildren< Partial & { overrides?: NavigateButtonOverridesProps | undefined | null; } >; export default function NavigateButton( props: NavigateButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const navigateButtonOnClick = useNavigateAction({ type: \\"anchor\\", about: \\"#about\\", }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions navigation hard navigation action 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useNavigateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type NavigateButtonOverridesProps = { NavigateButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type NavigateButtonProps = React.PropsWithChildren< Partial & { overrides?: NavigateButtonOverridesProps | undefined | null; } >; export default function NavigateButton( props: NavigateButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const navigateButtonOnClick = useNavigateAction({ type: \\"url\\", url: \\"https://www.amazon.com/\\", }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions navigation new tab navigation action 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useNavigateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type NavigateButtonOverridesProps = { NavigateButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type NavigateButtonProps = React.PropsWithChildren< Partial & { overrides?: NavigateButtonOverridesProps | undefined | null; } >; export default function NavigateButton( props: NavigateButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const navigateButtonOnClick = useNavigateAction({ type: \\"url\\", url: \\"https://www.amazon.com/\\", target: \\"newtab\\", }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions navigation reload navigation action 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useNavigateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ReloadButtonOverridesProps = { ReloadButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ReloadButtonProps = React.PropsWithChildren< Partial & { overrides?: ReloadButtonOverridesProps | undefined | null; } >; export default function ReloadButton( props: ReloadButtonProps ): React.ReactElement { const { overrides, ...rest } = props; const reloadButtonOnClick = useNavigateAction({ type: \\"reload\\" }); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests actions with conditional in parameters 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../models\\"; import { EscapeHatchProps, createDataStorePredicate, getOverrideProps, useDataStoreBinding, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ConditionalInMutationOverridesProps = { ConditionalInMutation?: PrimitiveOverrideProps; MutatedValue?: PrimitiveOverrideProps; ConditionalPropertyMutation?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ConditionalInMutationProps = React.PropsWithChildren< Partial & { user?: User; } & { overrides?: ConditionalInMutationOverridesProps | undefined | null; } >; export default function ConditionalInMutation( props: ConditionalInMutationProps ): React.ReactElement { const { user: userProp, overrides, ...rest } = props; const userFilterObj = { field: \\"firstName\\", operand: \\"Johnny\\", operator: \\"eq\\", }; const userFilter = createDataStorePredicate(userFilterObj); const userDataStore = useDataStoreBinding({ type: \\"collection\\", model: User, criteria: userFilter, }).items[0]; const user = userProp !== undefined ? userProp : userDataStore; const [mutatedValueChildren, setMutatedValueChildren] = useStateMutationAction(\\"Default Value\\"); const conditionalPropertyMutationOnClick = () => { setMutatedValueChildren( user?.age == 45 ? \\"Conditional Value\\" : \\"Unconditional Value\\" ); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests basic component tests should generate a simple button component 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests basic component tests should generate a simple text component 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomTextOverridesProps = { CustomText?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomTextProps = React.PropsWithChildren< Partial & { overrides?: CustomTextOverridesProps | undefined | null; } >; export default function CustomText(props: CustomTextProps): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests basic component tests should generate a simple view component 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TestOverridesProps = { Test?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TestProps = React.PropsWithChildren< Partial & { overrides?: TestOverridesProps | undefined | null; } >; export default function Test(props: TestProps): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests bindings auth supports auth bindings in actions 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useAuth, useDataStoreCreateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Customer } from \\"../models\\"; import { schema } from \\"../models/schema\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComponentWithAuthEventBindingOverridesProps = { ComponentWithAuthEventBinding?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComponentWithAuthEventBindingProps = React.PropsWithChildren< Partial & { overrides?: ComponentWithAuthEventBindingOverridesProps | undefined | null; } >; export default function ComponentWithAuthEventBinding( props: ComponentWithAuthEventBindingProps ): React.ReactElement { const { overrides, ...rest } = props; const authAttributes = useAuth().user?.attributes ?? {}; const componentWithAuthEventBindingOnClick = useDataStoreCreateAction({ model: Customer, fields: { userName: authAttributes[\\"username\\"], favoriteIceCream: authAttributes[\\"custom:favorite_icecream\\"], }, schema: schema, }); return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests bindings data supports bindings with reserved keywords 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { Class } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type DataBindingNamedClassOverridesProps = { DataBindingNamedClass?: PrimitiveOverrideProps; } & EscapeHatchProps; export type DataBindingNamedClassProps = React.PropsWithChildren< Partial & { class?: Class; } & { overrides?: DataBindingNamedClassOverridesProps | undefined | null; } >; export default function DataBindingNamedClass( props: DataBindingNamedClassProps ): React.ReactElement { const { class: classProp, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests bindings data supports model with conflicting component type 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { Flex as Flex0 } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { FlexProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type DataBindingNamedClassOverridesProps = { DataBindingNamedClass?: PrimitiveOverrideProps; FlexChild?: PrimitiveOverrideProps; } & EscapeHatchProps; export type DataBindingNamedClassProps = React.PropsWithChildren< Partial & { class?: Flex0; } & { overrides?: DataBindingNamedClassOverridesProps | undefined | null; } >; export default function DataBindingNamedClass( props: DataBindingNamedClassProps ): React.ReactElement { const { class: classProp, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests collection GraphQL should not render nested query if the data schema is not provided 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { listAuthors } from \\"../graphql/queries\\"; import AuthorProfile, { AuthorProfileProps } from \\"./AuthorProfile\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Collection, CollectionProps, Pagination, Placeholder, } from \\"@aws-amplify/ui-react\\"; import { API } from \\"aws-amplify\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type AuthorProfileCollectionOverridesProps = { AuthorProfileCollection?: PrimitiveOverrideProps; AuthorProfile?: AuthorProfileProps; } & EscapeHatchProps; export type AuthorProfileCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => AuthorProfileProps; } & { overrides?: AuthorProfileCollectionOverridesProps | undefined | null; } >; const nextToken = {}; const apiCache = {}; export default function AuthorProfileCollection( props: AuthorProfileCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [pageIndex, setPageIndex] = React.useState(1); const [hasMorePages, setHasMorePages] = React.useState(true); const [items, setItems] = React.useState([]); const [isApiPagination, setIsApiPagination] = React.useState(false); const [instanceKey, setInstanceKey] = React.useState(\\"newGuid\\"); const [loading, setLoading] = React.useState(true); const [maxViewed, setMaxViewed] = React.useState(1); const pageSize = 4; React.useEffect(() => { nextToken[instanceKey] = \\"\\"; apiCache[instanceKey] = []; }, [instanceKey]); React.useEffect(() => { setIsApiPagination(!!!itemsProp); }, [itemsProp]); const handlePreviousPage = () => { setPageIndex(pageIndex - 1); }; const handleNextPage = () => { setPageIndex(pageIndex + 1); }; const jumpToPage = (pageNum?: number) => { setPageIndex(pageNum!); }; const loadPage = async (page: number) => { const cacheUntil = page * pageSize + 1; const newCache = apiCache[instanceKey].slice(); let newNext = nextToken[instanceKey]; while (newCache.length < cacheUntil && newNext != null) { setLoading(true); const variables: any = { limit: pageSize, }; if (newNext) { variables[\\"nextToken\\"] = newNext; } const result = ( await API.graphql({ query: listAuthors, variables, }) ).data.listAuthors; var loaded = await Promise.all( result.items.map(async (item) => { return { ...item, }; }) ); newCache.push(...loaded); newNext = result.nextToken; } const cacheSlice = newCache.slice((page - 1) * pageSize, page * pageSize); setItems(cacheSlice); setHasMorePages(!!newNext); setLoading(false); apiCache[instanceKey] = newCache; nextToken[instanceKey] = newNext; }; React.useEffect(() => { loadPage(pageIndex); }, [pageIndex]); React.useEffect(() => { setMaxViewed(Math.max(maxViewed, pageIndex)); }, [pageIndex, maxViewed, setMaxViewed]); return ( /* @ts-ignore: TS2322 */
{(item, index) => { if (loading) { return ; } return ( ); }} {isApiPagination && ( )}
); } " `; exports[`amplify render tests collection GraphQL should render collection with data binding 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { UserPreferences } from \\"../API\\"; import { listUserPreferences, listUsers } from \\"../graphql/queries\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import { API } from \\"aws-amplify\\"; import { Button, ButtonProps, Collection, CollectionProps, Flex, FlexProps, Pagination, Placeholder, } from \\"@aws-amplify/ui-react\\"; import { MyFlexProps } from \\"./MyFlex\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CollectionOfCustomButtonsOverridesProps = { CollectionOfCustomButtons?: PrimitiveOverrideProps; MyFlex?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CollectionOfCustomButtonsProps = React.PropsWithChildren< Partial> & { width?: Number; backgroundColor?: String; buttonColor?: UserPreferences; buttonEnabled?: UserPreferences; items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => MyFlexProps; } & { overrides?: CollectionOfCustomButtonsOverridesProps | undefined | null; } >; const nextToken = {}; const apiCache = {}; export default function CollectionOfCustomButtons( props: CollectionOfCustomButtonsProps ): React.ReactElement { const { width, backgroundColor, buttonColor: buttonColorProp, buttonEnabled: buttonEnabledProp, items: itemsProp, overrideItems, overrides, ...rest } = props; const [pageIndex, setPageIndex] = React.useState(1); const [hasMorePages, setHasMorePages] = React.useState(true); const [items, setItems] = React.useState([]); const [isApiPagination, setIsApiPagination] = React.useState(false); const [instanceKey, setInstanceKey] = React.useState(\\"newGuid\\"); const [loading, setLoading] = React.useState(true); const [maxViewed, setMaxViewed] = React.useState(1); const pageSize = 4; React.useEffect(() => { nextToken[instanceKey] = \\"\\"; apiCache[instanceKey] = []; }, [instanceKey]); React.useEffect(() => { setIsApiPagination(!!!itemsProp); }, [itemsProp]); const handlePreviousPage = () => { setPageIndex(pageIndex - 1); }; const handleNextPage = () => { setPageIndex(pageIndex + 1); }; const jumpToPage = (pageNum?: number) => { setPageIndex(pageNum!); }; const loadPage = async (page: number) => { const cacheUntil = page * pageSize + 1; const newCache = apiCache[instanceKey].slice(); let newNext = nextToken[instanceKey]; while (newCache.length < cacheUntil && newNext != null) { setLoading(true); const variables: any = { limit: pageSize, filter: { and: [ { age: { gt: \\"10\\" } }, { lastName: { beginsWith: \\"L\\" } }, { and: [ { date: { ge: \\"2022-03-10\\" } }, { date: { le: \\"2023-03-11\\" } }, ], }, ], }, }; if (newNext) { variables[\\"nextToken\\"] = newNext; } const result = ( await API.graphql({ query: listUsers, variables, }) ).data.listUsers; var loaded = await Promise.all( result.items.map(async (item) => { return { ...item, }; }) ); newCache.push(...loaded); newNext = result.nextToken; } const cacheSlice = newCache.slice((page - 1) * pageSize, page * pageSize); setItems(cacheSlice); setHasMorePages(!!newNext); setLoading(false); apiCache[instanceKey] = newCache; nextToken[instanceKey] = newNext; }; React.useEffect(() => { loadPage(pageIndex); }, [pageIndex]); React.useEffect(() => { setMaxViewed(Math.max(maxViewed, pageIndex)); }, [pageIndex, maxViewed, setMaxViewed]); const buttonColorFilterObj = { userID: { eq: \\"user@email.com\\" } }; const buttonColorDataStore = API.graphql({ query: listUserPreferences, variables: { ...buttonColorFilterObj }, }).items[0]; const buttonColor = buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore; const buttonEnabledFilterObj = { and: [{ date: { ge: \\"2022-03-10\\" } }, { date: { le: \\"2023-03-11\\" } }], }; const buttonEnabledDataStore = API.graphql({ query: listUserPreferences, variables: { ...buttonEnabledFilterObj }, }).items[0]; const buttonEnabled = buttonEnabledProp !== undefined ? buttonEnabledProp : buttonEnabledDataStore; return ( /* @ts-ignore: TS2322 */
{(item, index) => { if (loading) { return ; } return ( ); }} {isApiPagination && ( )}
); } " `; exports[`amplify render tests collection GraphQL should render collection with data binding with no predicate 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { listUntitledModels } from \\"../graphql/queries\\"; import ListingCard, { ListingCardProps } from \\"./ListingCard\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Collection, CollectionProps, Pagination, Placeholder, } from \\"@aws-amplify/ui-react\\"; import { API } from \\"aws-amplify\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ListingCardCollectionOverridesProps = { ListingCardCollection?: PrimitiveOverrideProps; ListingCard?: ListingCardProps; } & EscapeHatchProps; export type ListingCardCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => ListingCardProps; } & { overrides?: ListingCardCollectionOverridesProps | undefined | null; } >; const nextToken = {}; const apiCache = {}; export default function ListingCardCollection( props: ListingCardCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [pageIndex, setPageIndex] = React.useState(1); const [hasMorePages, setHasMorePages] = React.useState(true); const [items, setItems] = React.useState([]); const [isApiPagination, setIsApiPagination] = React.useState(false); const [instanceKey, setInstanceKey] = React.useState(\\"newGuid\\"); const [loading, setLoading] = React.useState(true); const [maxViewed, setMaxViewed] = React.useState(1); const pageSize = 4; React.useEffect(() => { nextToken[instanceKey] = \\"\\"; apiCache[instanceKey] = []; }, [instanceKey]); React.useEffect(() => { setIsApiPagination(!!!itemsProp); }, [itemsProp]); const handlePreviousPage = () => { setPageIndex(pageIndex - 1); }; const handleNextPage = () => { setPageIndex(pageIndex + 1); }; const jumpToPage = (pageNum?: number) => { setPageIndex(pageNum!); }; const loadPage = async (page: number) => { const cacheUntil = page * pageSize + 1; const newCache = apiCache[instanceKey].slice(); let newNext = nextToken[instanceKey]; while (newCache.length < cacheUntil && newNext != null) { setLoading(true); const variables: any = { limit: pageSize, }; if (newNext) { variables[\\"nextToken\\"] = newNext; } const result = ( await API.graphql({ query: listUntitledModels, variables, }) ).data.listUntitledModels; var loaded = await Promise.all( result.items.map(async (item) => { return { ...item, }; }) ); newCache.push(...loaded); newNext = result.nextToken; } const cacheSlice = newCache.slice((page - 1) * pageSize, page * pageSize); setItems(cacheSlice); setHasMorePages(!!newNext); setLoading(false); apiCache[instanceKey] = newCache; nextToken[instanceKey] = newNext; }; React.useEffect(() => { loadPage(pageIndex); }, [pageIndex]); React.useEffect(() => { setMaxViewed(Math.max(maxViewed, pageIndex)); }, [pageIndex, maxViewed, setMaxViewed]); return ( /* @ts-ignore: TS2322 */
{(item, index) => { if (loading) { return ; } return ( ); }} {isApiPagination && ( )}
); } " `; exports[`amplify render tests collection GraphQL should render collection without data binding 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import ListingCard, { ListingCardProps } from \\"./ListingCard\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Collection, CollectionProps, Pagination, Placeholder, } from \\"@aws-amplify/ui-react\\"; import { API } from \\"aws-amplify\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ListingCardCollectionOverridesProps = { ListingCardCollection?: PrimitiveOverrideProps; ListingCard?: ListingCardProps; } & EscapeHatchProps; export type ListingCardCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => ListingCardProps; } & { overrides?: ListingCardCollectionOverridesProps | undefined | null; } >; const nextToken = {}; const apiCache = {}; export default function ListingCardCollection( props: ListingCardCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [pageIndex, setPageIndex] = React.useState(1); const [hasMorePages, setHasMorePages] = React.useState(true); const [items, setItems] = React.useState([]); const [isApiPagination, setIsApiPagination] = React.useState(false); const [instanceKey, setInstanceKey] = React.useState(\\"newGuid\\"); const [loading, setLoading] = React.useState(true); const [maxViewed, setMaxViewed] = React.useState(1); const pageSize = 4; React.useEffect(() => { nextToken[instanceKey] = \\"\\"; apiCache[instanceKey] = []; }, [instanceKey]); React.useEffect(() => { setIsApiPagination(!!!itemsProp); }, [itemsProp]); const handlePreviousPage = () => { setPageIndex(pageIndex - 1); }; const handleNextPage = () => { setPageIndex(pageIndex + 1); }; const jumpToPage = (pageNum?: number) => { setPageIndex(pageNum!); }; const loadPage = async (page: number) => { const cacheUntil = page * pageSize + 1; const newCache = apiCache[instanceKey].slice(); let newNext = nextToken[instanceKey]; const cacheSlice = newCache.slice((page - 1) * pageSize, page * pageSize); setItems(cacheSlice); setHasMorePages(!!newNext); setLoading(false); apiCache[instanceKey] = newCache; nextToken[instanceKey] = newNext; }; React.useEffect(() => { loadPage(pageIndex); }, [pageIndex]); React.useEffect(() => { setMaxViewed(Math.max(maxViewed, pageIndex)); }, [pageIndex, maxViewed, setMaxViewed]); return ( /* @ts-ignore: TS2322 */
{(item, index) => { if (loading) { return ; } return ( ); }} {isApiPagination && ( )}
); } " `; exports[`amplify render tests collection GraphQL should render nested query if model has a hasMany relationship 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { listAuthors } from \\"../graphql/queries\\"; import AuthorProfile, { AuthorProfileProps } from \\"./AuthorProfile\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Collection, CollectionProps, Pagination, Placeholder, } from \\"@aws-amplify/ui-react\\"; import { API } from \\"aws-amplify\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type AuthorProfileCollectionOverridesProps = { AuthorProfileCollection?: PrimitiveOverrideProps; AuthorProfile?: AuthorProfileProps; } & EscapeHatchProps; export type AuthorProfileCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => AuthorProfileProps; } & { overrides?: AuthorProfileCollectionOverridesProps | undefined | null; } >; const nextToken = {}; const apiCache = {}; export default function AuthorProfileCollection( props: AuthorProfileCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [pageIndex, setPageIndex] = React.useState(1); const [hasMorePages, setHasMorePages] = React.useState(true); const [items, setItems] = React.useState([]); const [isApiPagination, setIsApiPagination] = React.useState(false); const [instanceKey, setInstanceKey] = React.useState(\\"newGuid\\"); const [loading, setLoading] = React.useState(true); const [maxViewed, setMaxViewed] = React.useState(1); const pageSize = 4; React.useEffect(() => { nextToken[instanceKey] = \\"\\"; apiCache[instanceKey] = []; }, [instanceKey]); React.useEffect(() => { setIsApiPagination(!!!itemsProp); }, [itemsProp]); const handlePreviousPage = () => { setPageIndex(pageIndex - 1); }; const handleNextPage = () => { setPageIndex(pageIndex + 1); }; const jumpToPage = (pageNum?: number) => { setPageIndex(pageNum!); }; const loadPage = async (page: number) => { const cacheUntil = page * pageSize + 1; const newCache = apiCache[instanceKey].slice(); let newNext = nextToken[instanceKey]; while (newCache.length < cacheUntil && newNext != null) { setLoading(true); const variables: any = { limit: pageSize, }; if (newNext) { variables[\\"nextToken\\"] = newNext; } const result = ( await API.graphql({ query: listAuthors, variables, }) ).data.listAuthors; var loaded = await Promise.all( result.items.map(async (item) => { const Books = ( await API.graphql({ query: booksByAuthorID, variables: { authorID: item.id }, }) ).data.booksByAuthorID.items; const Publishers = ( await API.graphql({ query: publishersByAuthorID, variables: { authorID: item.id }, }) ).data.publishersByAuthorID.items; return { ...item, Books, Publisher, }; }) ); newCache.push(...loaded); newNext = result.nextToken; } const cacheSlice = newCache.slice((page - 1) * pageSize, page * pageSize); setItems(cacheSlice); setHasMorePages(!!newNext); setLoading(false); apiCache[instanceKey] = newCache; nextToken[instanceKey] = newNext; }; React.useEffect(() => { loadPage(pageIndex); }, [pageIndex]); React.useEffect(() => { setMaxViewed(Math.max(maxViewed, pageIndex)); }, [pageIndex, maxViewed, setMaxViewed]); return ( /* @ts-ignore: TS2322 */
{(item, index) => { if (loading) { return ; } return ( ); }} {isApiPagination && ( )}
); } " `; exports[`amplify render tests collection should not render nested query if the data schema is not provided 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { Author } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import AuthorProfile, { AuthorProfileProps } from \\"./AuthorProfile\\"; import { Collection, CollectionProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type AuthorProfileCollectionOverridesProps = { AuthorProfileCollection?: PrimitiveOverrideProps; AuthorProfile?: AuthorProfileProps; } & EscapeHatchProps; export type AuthorProfileCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => AuthorProfileProps; } & { overrides?: AuthorProfileCollectionOverridesProps | undefined | null; } >; export default function AuthorProfileCollection( props: AuthorProfileCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [items, setItems] = React.useState(undefined); const itemsDataStore = useDataStoreBinding({ type: \\"collection\\", model: Author, }).items; React.useEffect(() => { if (itemsProp !== undefined) { setItems(itemsProp); return; } setItems(itemsDataStore); }, [itemsProp, itemsDataStore]); return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render collection with data binding 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { UserPreferences, User } from \\"../models\\"; import { EscapeHatchProps, createDataStorePredicate, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Collection, CollectionProps, Flex, FlexProps, } from \\"@aws-amplify/ui-react\\"; import { MyFlexProps } from \\"./MyFlex\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CollectionOfCustomButtonsOverridesProps = { CollectionOfCustomButtons?: PrimitiveOverrideProps; MyFlex?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CollectionOfCustomButtonsProps = React.PropsWithChildren< Partial> & { width?: Number; backgroundColor?: String; buttonColor?: UserPreferences; buttonEnabled?: UserPreferences; items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => MyFlexProps; } & { overrides?: CollectionOfCustomButtonsOverridesProps | undefined | null; } >; export default function CollectionOfCustomButtons( props: CollectionOfCustomButtonsProps ): React.ReactElement { const { width, backgroundColor, buttonColor: buttonColorProp, buttonEnabled: buttonEnabledProp, items, overrideItems, overrides, ...rest } = props; const buttonUserFilterObj = { and: [ { field: \\"age\\", operand: \\"10\\", operator: \\"gt\\" }, { field: \\"lastName\\", operand: \\"L\\", operator: \\"beginsWith\\" }, { and: [ { field: \\"date\\", operator: \\"ge\\", operand: \\"2022-03-10\\" }, { field: \\"date\\", operator: \\"le\\", operand: \\"2023-03-11\\" }, ], }, ], }; const buttonUserFilter = createDataStorePredicate(buttonUserFilterObj); const [buttonUser, setButtonUser] = React.useState(undefined); const buttonUserDataStore = useDataStoreBinding({ type: \\"collection\\", model: User, criteria: buttonUserFilter, }).items; React.useEffect(() => { if (items !== undefined) { setButtonUser(items); return; } setButtonUser(buttonUserDataStore); }, [items, buttonUserDataStore]); const buttonColorFilterObj = { field: \\"userID\\", operand: \\"user@email.com\\", operator: \\"eq\\", }; const buttonColorFilter = createDataStorePredicate(buttonColorFilterObj); const buttonColorDataStore = useDataStoreBinding({ type: \\"collection\\", model: UserPreferences, criteria: buttonColorFilter, }).items[0]; const buttonColor = buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore; const buttonEnabledFilterObj = { and: [ { field: \\"date\\", operator: \\"ge\\", operand: \\"2022-03-10\\" }, { field: \\"date\\", operator: \\"le\\", operand: \\"2023-03-11\\" }, ], }; const buttonEnabledFilter = createDataStorePredicate( buttonEnabledFilterObj ); const buttonEnabledDataStore = useDataStoreBinding({ type: \\"collection\\", model: UserPreferences, criteria: buttonEnabledFilter, }).items[0]; const buttonEnabled = buttonEnabledProp !== undefined ? buttonEnabledProp : buttonEnabledDataStore; return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render collection with data binding and sort 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { UserPreferences, User } from \\"../models\\"; import { EscapeHatchProps, createDataStorePredicate, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import { SortDirection, SortPredicate } from \\"@aws-amplify/datastore\\"; import { Button, ButtonProps, Collection, CollectionProps, Flex, FlexProps, } from \\"@aws-amplify/ui-react\\"; import { MyFlexProps } from \\"./MyFlex\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CollectionOfCustomButtonsOverridesProps = { CollectionOfCustomButtons?: PrimitiveOverrideProps; MyFlex?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CollectionOfCustomButtonsProps = React.PropsWithChildren< Partial> & { width?: Number; backgroundColor?: String; buttonColor?: UserPreferences; items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => MyFlexProps; } & { overrides?: CollectionOfCustomButtonsOverridesProps | undefined | null; } >; export default function CollectionOfCustomButtons( props: CollectionOfCustomButtonsProps ): React.ReactElement { const { width, backgroundColor, buttonColor: buttonColorProp, items, overrideItems, overrides, ...rest } = props; const buttonUserFilterObj = { and: [ { field: \\"age\\", operand: \\"10\\", operator: \\"gt\\" }, { field: \\"lastName\\", operand: \\"L\\", operator: \\"beginsWith\\" }, ], }; const buttonUserFilter = createDataStorePredicate(buttonUserFilterObj); const buttonUserPagination = { sort: (s: SortPredicate) => s.firstName(SortDirection.ASCENDING).lastName(SortDirection.DESCENDING), }; const [buttonUser, setButtonUser] = React.useState(undefined); const buttonUserDataStore = useDataStoreBinding({ type: \\"collection\\", model: User, criteria: buttonUserFilter, pagination: buttonUserPagination, }).items; React.useEffect(() => { if (items !== undefined) { setButtonUser(items); return; } setButtonUser(buttonUserDataStore); }, [items, buttonUserDataStore]); const buttonColorFilterObj = { field: \\"userID\\", operand: \\"user@email.com\\", operator: \\"eq\\", }; const buttonColorFilter = createDataStorePredicate(buttonColorFilterObj); const buttonColorDataStore = useDataStoreBinding({ type: \\"collection\\", model: UserPreferences, criteria: buttonColorFilter, }).items[0]; const buttonColor = buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore; return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests collection should render collection with data binding if binding name is items 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { UserPreferences, User } from \\"../models\\"; import { EscapeHatchProps, createDataStorePredicate, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Collection, CollectionProps, Flex, FlexProps, } from \\"@aws-amplify/ui-react\\"; import { MyFlexProps } from \\"./MyFlex\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CollectionOfCustomButtonsOverridesProps = { CollectionOfCustomButtons?: PrimitiveOverrideProps; MyFlex?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CollectionOfCustomButtonsProps = React.PropsWithChildren< Partial> & { width?: Number; backgroundColor?: String; buttonColor?: UserPreferences; items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => MyFlexProps; } & { overrides?: CollectionOfCustomButtonsOverridesProps | undefined | null; } >; export default function CollectionOfCustomButtons( props: CollectionOfCustomButtonsProps ): React.ReactElement { const { width, backgroundColor, buttonColor: buttonColorProp, items: itemsProp, overrideItems, overrides, ...rest } = props; const itemsFilterObj = { and: [ { field: \\"age\\", operand: 10, operator: \\"eq\\" }, { field: \\"lastName\\", operand: \\"L\\", operator: \\"beginsWith\\" }, ], }; const itemsFilter = createDataStorePredicate(itemsFilterObj); const [items, setItems] = React.useState(undefined); const itemsDataStore = useDataStoreBinding({ type: \\"collection\\", model: User, criteria: itemsFilter, }).items; React.useEffect(() => { if (itemsProp !== undefined) { setItems(itemsProp); return; } setItems(itemsDataStore); }, [itemsProp, itemsDataStore]); const buttonColorFilterObj = { field: \\"userID\\", operand: \\"user@email.com\\", operator: \\"eq\\", }; const buttonColorFilter = createDataStorePredicate(buttonColorFilterObj); const buttonColorDataStore = useDataStoreBinding({ type: \\"collection\\", model: UserPreferences, criteria: buttonColorFilter, }).items[0]; const buttonColor = buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore; return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render collection with data binding with no predicate 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { UntitledModel } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import ListingCard, { ListingCardProps } from \\"./ListingCard\\"; import { Collection, CollectionProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ListingCardCollectionOverridesProps = { ListingCardCollection?: PrimitiveOverrideProps; ListingCard?: ListingCardProps; } & EscapeHatchProps; export type ListingCardCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => ListingCardProps; } & { overrides?: ListingCardCollectionOverridesProps | undefined | null; } >; export default function ListingCardCollection( props: ListingCardCollectionProps ): React.ReactElement { const { items, overrideItems, overrides, ...rest } = props; const [bananas, setBananas] = React.useState(undefined); const bananasDataStore = useDataStoreBinding({ type: \\"collection\\", model: UntitledModel, }).items; React.useEffect(() => { if (items !== undefined) { setBananas(items); return; } setBananas(bananasDataStore); }, [items, bananasDataStore]); return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render collection without data binding 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import ListingCard, { ListingCardProps } from \\"./ListingCard\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Collection, CollectionProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ListingCardCollectionOverridesProps = { ListingCardCollection?: PrimitiveOverrideProps; ListingCard?: ListingCardProps; } & EscapeHatchProps; export type ListingCardCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => ListingCardProps; } & { overrides?: ListingCardCollectionOverridesProps | undefined | null; } >; export default function ListingCardCollection( props: ListingCardCollectionProps ): React.ReactElement { const { items, overrideItems, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render concatenated keys if model has composite keys 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { CompositePerson } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import CompositePersonProfile, { CompositePersonProfileProps, } from \\"./CompositePersonProfile\\"; import { Collection, CollectionProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CompositePersonProfileCollectionOverridesProps = { CompositePersonProfileCollection?: PrimitiveOverrideProps; CompositePersonProfile?: CompositePersonProfileProps; } & EscapeHatchProps; export type CompositePersonProfileCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => CompositePersonProfileProps; } & { overrides?: | CompositePersonProfileCollectionOverridesProps | undefined | null; } >; export default function CompositePersonProfileCollection( props: CompositePersonProfileCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [items, setItems] = React.useState(undefined); const itemsDataStore = useDataStoreBinding({ type: \\"collection\\", model: CompositePerson, }).items; React.useEffect(() => { if (itemsProp !== undefined) { setItems(itemsProp); return; } setItems(itemsDataStore); }, [itemsProp, itemsDataStore]); return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render if model name collides with component types 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { Flex as Flex0, FlexModel, Button as Button0 } from \\"../models\\"; import { EscapeHatchProps, createDataStorePredicate, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import { SortDirection, SortPredicate } from \\"@aws-amplify/datastore\\"; import { Button, ButtonProps, Collection, CollectionProps, Flex, FlexProps, } from \\"@aws-amplify/ui-react\\"; import { MyFlexProps } from \\"./MyFlex\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CollectionWithModelNameCollisionsOverridesProps = { CollectionWithModelNameCollisions?: PrimitiveOverrideProps; MyFlex?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CollectionWithModelNameCollisionsProps = React.PropsWithChildren< Partial> & { backgroundColor?: String; buttonColor?: Flex0; buttonShape?: FlexModel; items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => MyFlexProps; } & { overrides?: | CollectionWithModelNameCollisionsOverridesProps | undefined | null; } >; export default function CollectionWithModelNameCollisions( props: CollectionWithModelNameCollisionsProps ): React.ReactElement { const { backgroundColor, buttonColor: buttonColorProp, buttonShape: buttonShapeProp, items, overrideItems, overrides, ...rest } = props; const buttonModelFilterObj = { and: [ { field: \\"age\\", operand: \\"10\\", operator: \\"gt\\" }, { field: \\"isActive\\", operand: true, operator: \\"eq\\" }, ], }; const buttonModelFilter = createDataStorePredicate(buttonModelFilterObj); const buttonModelPagination = { sort: (s: SortPredicate) => s.lastName(SortDirection.ASCENDING), }; const [buttonModel, setButtonModel] = React.useState(undefined); const buttonModelDataStore = useDataStoreBinding({ type: \\"collection\\", model: Button0, criteria: buttonModelFilter, pagination: buttonModelPagination, }).items; React.useEffect(() => { if (items !== undefined) { setButtonModel(items); return; } setButtonModel(buttonModelDataStore); }, [items, buttonModelDataStore]); const buttonColorFilterObj = { field: \\"userID\\", operand: \\"user@email.com\\", operator: \\"eq\\", }; const buttonColorFilter = createDataStorePredicate(buttonColorFilterObj); const buttonColorDataStore = useDataStoreBinding({ type: \\"collection\\", model: Flex0, criteria: buttonColorFilter, }).items[0]; const buttonColor = buttonColorProp !== undefined ? buttonColorProp : buttonColorDataStore; const buttonShapeFilterObj = { field: \\"userID\\", operand: \\"user@email.com\\", operator: \\"eq\\", }; const buttonShapeFilter = createDataStorePredicate(buttonShapeFilterObj); const buttonShapeDataStore = useDataStoreBinding({ type: \\"collection\\", model: FlexModel, criteria: buttonShapeFilter, }).items[0]; const buttonShape = buttonShapeProp !== undefined ? buttonShapeProp : buttonShapeDataStore; return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests collection should render nested query if model has a hasMany relationship 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { Author } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import AuthorProfile, { AuthorProfileProps } from \\"./AuthorProfile\\"; import { Collection, CollectionProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type AuthorProfileCollectionOverridesProps = { AuthorProfileCollection?: PrimitiveOverrideProps; AuthorProfile?: AuthorProfileProps; } & EscapeHatchProps; export type AuthorProfileCollectionProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => AuthorProfileProps; } & { overrides?: AuthorProfileCollectionOverridesProps | undefined | null; } >; export default function AuthorProfileCollection( props: AuthorProfileCollectionProps ): React.ReactElement { const { items: itemsProp, overrideItems, overrides, ...rest } = props; const [items, setItems] = React.useState(undefined); const itemsDataStore = useDataStoreBinding({ type: \\"collection\\", model: Author, }).items; React.useEffect(() => { if (itemsProp !== undefined) { setItems(itemsProp); return; } async function setItemsFromDataStore() { var loaded = await Promise.all( itemsDataStore.map(async (item) => ({ ...item, Books: await item.Books.toArray(), Publisher: await item.Publisher, })) ); setItems(loaded); } setItemsFromDataStore(); }, [itemsProp, itemsDataStore]); return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } " `; exports[`amplify render tests complex component tests should generate a button within a view component 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ViewWithButtonOverridesProps = { ViewWithButton?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ViewWithButtonProps = React.PropsWithChildren< Partial & { overrides?: ViewWithButtonOverridesProps | undefined | null; } >; export default function ViewWithButton( props: ViewWithButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex component tests should generate a component with custom child (malformed property) 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton, { CustomButtonProps } from \\"./CustomButton\\"; import { View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ViewWithCustomButtonOverridesProps = { ViewWithCustomButton?: PrimitiveOverrideProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export type ViewWithCustomButtonProps = React.PropsWithChildren< Partial & { overrides?: ViewWithCustomButtonOverridesProps | undefined | null; } >; export default function ViewWithCustomButton( props: ViewWithCustomButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex component tests should generate a component with custom child 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton, { CustomButtonProps } from \\"./CustomButton\\"; import { View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ViewWithCustomButtonOverridesProps = { ViewWithCustomButton?: PrimitiveOverrideProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export type ViewWithCustomButtonProps = React.PropsWithChildren< Partial & { overrides?: ViewWithCustomButtonOverridesProps | undefined | null; } >; export default function ViewWithCustomButton( props: ViewWithCustomButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex component tests should generate a component with exposeAs prop 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ViewWithButtonOverridesProps = { ViewWithButton?: PrimitiveOverrideProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ViewWithButtonProps = React.PropsWithChildren< Partial & { overrides?: ViewWithButtonOverridesProps | undefined | null; } >; export default function ViewWithButton( props: ViewWithButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 1 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest1OverridesProps = { ComplexTest1?: PrimitiveOverrideProps; \\"Hi harriso\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest1Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest1OverridesProps | undefined | null; } >; export default function ComplexTest1( props: ComplexTest1Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 2 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest2OverridesProps = { ComplexTest2?: PrimitiveOverrideProps; Container?: PrimitiveOverrideProps; RectangleRed?: PrimitiveOverrideProps; RectangleYellow?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest2Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest2OverridesProps | undefined | null; } >; export default function ComplexTest2( props: ComplexTest2Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 3 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextProps, View, ViewProps, } from \\"@aws-amplify/ui-react\\"; import ReneButton, { ReneButtonProps } from \\"./ReneButton\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest3OverridesProps = { ComplexTest3?: PrimitiveOverrideProps; \\"Hello World!\\"?: PrimitiveOverrideProps; \\"Rectangle 58\\"?: PrimitiveOverrideProps; ReneButton?: ReneButtonProps; \\"Testing 123\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest3Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest3OverridesProps | undefined | null; } >; export default function ComplexTest3( props: ComplexTest3Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 4 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, Variant, getOverrideProps, getOverridesFromVariants, mergeVariantsAndOverrides, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest4OverridesProps = { ComplexTest4?: PrimitiveOverrideProps; GroupTest?: PrimitiveOverrideProps; RectangleGreen?: PrimitiveOverrideProps; RectangleBlue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest4Props = React.PropsWithChildren< Partial & { colors?: \\"Red/Orange\\"; } & { overrides?: ComplexTest4OverridesProps | undefined | null; } >; export default function ComplexTest4( props: ComplexTest4Props ): React.ReactElement { const { overrides: overridesProp, ...rest } = props; const variants: Variant[] = [ { overrides: { ComplexTest4: { padding: \\"10px 10px 10px 10px\\", backgroundColor: \\"rgb(255,255,255)\\", overflow: \\"hidden\\", alignItems: \\"flex-start\\", gap: \\"10px\\", position: \\"relative\\", direction: \\"row\\", }, RectangleBlue: { padding: \\"0px 0px 0px 0px\\", backgroundColor: \\"rgb(255,153.00000607967377,0)\\", top: \\"1px\\", left: \\"203px\\", src: \\"https://via.placeholder.com/323x123?text=Amplify+Studio+is+Awesome!\\", width: \\"120px\\", position: \\"absolute\\", height: \\"122px\\", }, RectangleGreen: { padding: \\"0px 0px 0px 0px\\", backgroundColor: \\"rgb(255,0,0)\\", top: \\"0px\\", left: \\"0px\\", src: \\"https://via.placeholder.com/323x123?text=Amplify+Studio+is+Awesome!\\", width: \\"122px\\", position: \\"absolute\\", height: \\"123px\\", }, GroupTest: { width: \\"323px\\", padding: \\"0px 0px 0px 0px\\", position: \\"relative\\", height: \\"123px\\", }, }, variantValues: { colors: \\"Red/Orange\\" }, }, ]; const overrides = mergeVariantsAndOverrides( getOverridesFromVariants(variants, props), overridesProp || {} ); return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 5 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest5OverridesProps = { ComplexTest5?: PrimitiveOverrideProps; RectangleGreen?: PrimitiveOverrideProps; RectangleBlue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest5Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest5OverridesProps | undefined | null; } >; export default function ComplexTest5( props: ComplexTest5Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 6 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest6OverridesProps = { ComplexTest6?: PrimitiveOverrideProps; Name?: PrimitiveOverrideProps; \\"Price / Address\\"?: PrimitiveOverrideProps; Sqft?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest6Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest6OverridesProps | undefined | null; } >; export default function ComplexTest6( props: ComplexTest6Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 7 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Image, ImageProps, Text, TextProps, View, ViewProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest7OverridesProps = { ComplexTest7?: PrimitiveOverrideProps; Imageexy?: PrimitiveOverrideProps; Test?: PrimitiveOverrideProps; Imagecgh?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest7Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest7OverridesProps | undefined | null; } >; export default function ComplexTest7( props: ComplexTest7Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 8 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest8OverridesProps = { ComplexTest8?: PrimitiveOverrideProps; \\"Frame 107\\"?: PrimitiveOverrideProps; \\"Rectangle 57\\"?: PrimitiveOverrideProps; \\"Rectangle 56\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest8Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest8OverridesProps | undefined | null; } >; export default function ComplexTest8( props: ComplexTest8Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 9 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, Variant, getOverrideProps, getOverridesFromVariants, mergeVariantsAndOverrides, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest9OverridesProps = { ComplexTest9?: PrimitiveOverrideProps; Left?: PrimitiveOverrideProps; HeroMessage?: PrimitiveOverrideProps; \\"LOREM IPSUM\\"?: PrimitiveOverrideProps; Message?: PrimitiveOverrideProps; \\"Ut enim ad minim veniam quis nostrud\\"?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.\\"?: PrimitiveOverrideProps; Button?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest9Props = React.PropsWithChildren< Partial & { mode?: \\"Dark\\" | \\"Light\\"; } & { overrides?: ComplexTest9OverridesProps | undefined | null; } >; export default function ComplexTest9( props: ComplexTest9Props ): React.ReactElement { const { overrides: overridesProp, ...rest } = props; const variants: Variant[] = [ { nodeId: \\"2878:3221\\", variantValues: { mode: \\"Light\\" }, overrides: { \\"LOREM IPSUM\\": { fontFamily: \\"Inter\\", fontSize: \\"16px\\", fontWeight: \\"700\\", color: \\"rgba(13.000000175088644,26.000000350177288,38.0000015348196,1)\\", lineHeight: \\"20px\\", textAlign: \\"center\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", letterSpacing: \\"0.49px\\", width: \\"701px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", children: \\"LOREM IPSUM\\", }, \\"Ut enim ad minim veniam quis nostrud\\": { fontFamily: \\"Inter\\", fontSize: \\"40px\\", fontWeight: \\"700\\", color: \\"rgba(13.000000175088644,26.000000350177288,38.0000015348196,1)\\", lineHeight: \\"48px\\", textAlign: \\"center\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", width: \\"701px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", children: \\"Ut enim ad minim veniam quis nostrud\\", }, \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.\\": { fontFamily: \\"Inter\\", fontSize: \\"16px\\", fontWeight: \\"400\\", color: \\"rgba(13.000000175088644,26.000000350177288,38.0000015348196,1)\\", lineHeight: \\"24px\\", textAlign: \\"center\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", letterSpacing: \\"0.010000000000000009px\\", width: \\"701px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", children: \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.\\", }, Message: { gap: \\"16px\\", direction: \\"column\\", justifyContent: \\"center\\", alignItems: \\"center\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, Button: { display: \\"flex\\", shrink: \\"0\\", width: \\"206px\\", size: \\"large\\", variation: \\"primary\\", children: \\"Primary Button\\", }, HeroMessage: { gap: \\"24px\\", direction: \\"column\\", justifyContent: \\"center\\", alignItems: \\"center\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, Left: { gap: \\"10px\\", direction: \\"column\\", height: \\"324px\\", justifyContent: \\"center\\", alignItems: \\"center\\", grow: \\"1\\", basis: \\"941px\\", alignSelf: \\"stretch\\", overflow: \\"hidden\\", position: \\"relative\\", padding: \\"120px 120px 120px 120px\\", backgroundColor: \\"rgba(255,255,255,1)\\", }, ComplexTest9: { gap: \\"0\\", direction: \\"row\\", width: \\"941px\\", height: \\"324px\\", justifyContent: \\"center\\", alignItems: \\"center\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, }, }, { nodeId: \\"2878:3272\\", variantValues: { mode: \\"Dark\\" }, overrides: { \\"LOREM IPSUM\\": { fontFamily: \\"Inter\\", fontSize: \\"16px\\", fontWeight: \\"700\\", color: \\"rgba(233.00000131130219,249.00000035762787,252.00000017881393,1)\\", lineHeight: \\"20px\\", textAlign: \\"center\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", letterSpacing: \\"0.49px\\", width: \\"445px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", children: \\"TestMessage1\\", }, \\"Ut enim ad minim veniam quis nostrud\\": { fontFamily: \\"Inter\\", fontSize: \\"40px\\", fontWeight: \\"700\\", color: \\"rgba(233.00000131130219,249.00000035762787,252.00000017881393,1)\\", lineHeight: \\"48px\\", textAlign: \\"center\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", width: \\"445px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", children: \\"TestMessage2\\", }, \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.\\": { fontFamily: \\"Inter\\", fontSize: \\"16px\\", fontWeight: \\"400\\", color: \\"rgba(233.00000131130219,249.00000035762787,252.00000017881393,1)\\", lineHeight: \\"24px\\", textAlign: \\"center\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", letterSpacing: \\"0.010000000000000009px\\", width: \\"445px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", children: \\"TestMessage3\\", }, Message: { gap: \\"16px\\", direction: \\"column\\", justifyContent: \\"center\\", alignItems: \\"center\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, Button: { display: \\"flex\\", shrink: \\"0\\", width: \\"174px\\", size: \\"large\\", variation: \\"primary\\", children: \\"TestButton1\\", }, HeroMessage: { gap: \\"24px\\", direction: \\"column\\", justifyContent: \\"center\\", alignItems: \\"center\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, Left: { gap: \\"10px\\", direction: \\"column\\", height: \\"422px\\", justifyContent: \\"center\\", alignItems: \\"center\\", grow: \\"1\\", basis: \\"685px\\", alignSelf: \\"stretch\\", overflow: \\"hidden\\", position: \\"relative\\", padding: \\"120px 120px 120px 120px\\", backgroundColor: \\"rgba(0,63.750030398368835,76.50000303983688,1)\\", }, ComplexTest9: { gap: \\"0\\", direction: \\"row\\", width: \\"908px\\", height: \\"422px\\", justifyContent: \\"center\\", alignItems: \\"center\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, }, }, ]; const overrides = mergeVariantsAndOverrides( getOverridesFromVariants(variants, props), overridesProp || {} ); return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 10 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Divider, DividerProps, Flex, FlexProps, Icon, IconProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest10OverridesProps = { ComplexTest10?: PrimitiveOverrideProps; \\"Frame 63\\"?: PrimitiveOverrideProps; \\"Frame 390\\"?: PrimitiveOverrideProps; Free?: PrimitiveOverrideProps; \\"$0/mo\\"?: PrimitiveOverrideProps; Buttondmi?: PrimitiveOverrideProps; Dividerxhd?: PrimitiveOverrideProps; \\"Frame 138mkm\\"?: PrimitiveOverrideProps; Iconunz?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.oat\\"?: PrimitiveOverrideProps; \\"Frame 139jki\\"?: PrimitiveOverrideProps; Iconrca?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.yfq\\"?: PrimitiveOverrideProps; \\"Frame 137zde\\"?: PrimitiveOverrideProps; Iconwrc?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.lum\\"?: PrimitiveOverrideProps; \\"Frame 391\\"?: PrimitiveOverrideProps; Hobby?: PrimitiveOverrideProps; \\"$10/mo\\"?: PrimitiveOverrideProps; Buttoncej?: PrimitiveOverrideProps; Dividerovm?: PrimitiveOverrideProps; \\"Frame 138upy\\"?: PrimitiveOverrideProps; Iconxzy?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.vxv\\"?: PrimitiveOverrideProps; \\"Frame 139tvb\\"?: PrimitiveOverrideProps; Iconpjz?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.gwp\\"?: PrimitiveOverrideProps; \\"Frame 137fsd\\"?: PrimitiveOverrideProps; Iconhpq?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.riv\\"?: PrimitiveOverrideProps; \\"Frame 392\\"?: PrimitiveOverrideProps; Premium?: PrimitiveOverrideProps; \\"$100/mo\\"?: PrimitiveOverrideProps; Buttonizv?: PrimitiveOverrideProps; Dividerftq?: PrimitiveOverrideProps; \\"Frame 138lgm\\"?: PrimitiveOverrideProps; Iconoyx?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.kai\\"?: PrimitiveOverrideProps; \\"Frame 139vsq\\"?: PrimitiveOverrideProps; Iconcsj?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.nuy\\"?: PrimitiveOverrideProps; \\"Frame 137kjg\\"?: PrimitiveOverrideProps; Icongvd?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.hjl\\"?: PrimitiveOverrideProps; \\"Frame 393\\"?: PrimitiveOverrideProps; Enterprise?: PrimitiveOverrideProps; \\"Contact us\\"?: PrimitiveOverrideProps; Buttonwez?: PrimitiveOverrideProps; Dividerzxk?: PrimitiveOverrideProps; \\"Frame 138udv\\"?: PrimitiveOverrideProps; Iconkmb?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.zfj\\"?: PrimitiveOverrideProps; \\"Frame 139cwp\\"?: PrimitiveOverrideProps; Iconzyv?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.dcz\\"?: PrimitiveOverrideProps; \\"Frame 137pog\\"?: PrimitiveOverrideProps; Iconsrt?: PrimitiveOverrideProps; \\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.rug\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest10Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest10OverridesProps | undefined | null; } >; export default function ComplexTest10( props: ComplexTest10Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests complex examples should render complex sample 11 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Badge, BadgeProps, Button, ButtonProps, Divider, DividerProps, Flex, FlexProps, Icon, IconProps, Image, ImageProps, SelectField, SelectFieldProps, Text, TextField, TextFieldProps, TextProps, View, ViewProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComplexTest11OverridesProps = { ComplexTest11?: PrimitiveOverrideProps; \\"Frame 411\\"?: PrimitiveOverrideProps; \\"Frame 313vza\\"?: PrimitiveOverrideProps; \\"Frame 406\\"?: PrimitiveOverrideProps; Info?: PrimitiveOverrideProps; TextFieldlrg?: PrimitiveOverrideProps; TextFieldbcu?: PrimitiveOverrideProps; Dividervgv?: PrimitiveOverrideProps; \\"Frame 409\\"?: PrimitiveOverrideProps; Shippinguim?: PrimitiveOverrideProps; TextFieldxak?: PrimitiveOverrideProps; TextFieldsju?: PrimitiveOverrideProps; \\"Frame 407\\"?: PrimitiveOverrideProps; TextFieldmoq?: PrimitiveOverrideProps; SelectFieldqqj?: PrimitiveOverrideProps; \\"Frame 408\\"?: PrimitiveOverrideProps; TextFieldnts?: PrimitiveOverrideProps; SelectFieldpiz?: PrimitiveOverrideProps; Dividerluf?: PrimitiveOverrideProps; \\"Frame 313pea\\"?: PrimitiveOverrideProps; \\"Card info\\"?: PrimitiveOverrideProps; TextFieldavv?: PrimitiveOverrideProps; TextFieldakg?: PrimitiveOverrideProps; \\"Frame 410\\"?: PrimitiveOverrideProps; SelectFieldugk?: PrimitiveOverrideProps; SelectFieldqku?: PrimitiveOverrideProps; \\"Frame 412\\"?: PrimitiveOverrideProps; \\"Group 320\\"?: PrimitiveOverrideProps; \\"Group 314\\"?: PrimitiveOverrideProps; imagefpq?: PrimitiveOverrideProps; \\"Order Summaryogp\\"?: PrimitiveOverrideProps; Blackjlp?: PrimitiveOverrideProps; \\"Basic Teebko\\"?: PrimitiveOverrideProps; Largeqzy?: PrimitiveOverrideProps; Iconvrz?: PrimitiveOverrideProps; SelectFieldglx?: PrimitiveOverrideProps; Dividerqbo?: PrimitiveOverrideProps; Dividerxgl?: PrimitiveOverrideProps; Dividerpxl?: PrimitiveOverrideProps; \\"Group 315\\"?: PrimitiveOverrideProps; imageklz?: PrimitiveOverrideProps; \\"Order Summaryiil\\"?: PrimitiveOverrideProps; Blackrig?: PrimitiveOverrideProps; \\"Basic Teeyvl\\"?: PrimitiveOverrideProps; Largedkg?: PrimitiveOverrideProps; Iconzad?: PrimitiveOverrideProps; SelectFieldawu?: PrimitiveOverrideProps; Dividercos?: PrimitiveOverrideProps; \\"Group 316\\"?: PrimitiveOverrideProps; Subtotal?: PrimitiveOverrideProps; \\"$320.00\\"?: PrimitiveOverrideProps; \\"Group 317\\"?: PrimitiveOverrideProps; Shippingtjp?: PrimitiveOverrideProps; \\"$15.00\\"?: PrimitiveOverrideProps; \\"Group 318\\"?: PrimitiveOverrideProps; Taxes?: PrimitiveOverrideProps; \\"$26.80\\"?: PrimitiveOverrideProps; Dividerelu?: PrimitiveOverrideProps; \\"Group 319\\"?: PrimitiveOverrideProps; Total?: PrimitiveOverrideProps; \\"$361.80\\"?: PrimitiveOverrideProps; Divideruix?: PrimitiveOverrideProps; Button?: PrimitiveOverrideProps; \\"Group 313\\"?: PrimitiveOverrideProps; Iconhpw?: PrimitiveOverrideProps; \\"Cart (2)\\"?: PrimitiveOverrideProps; \\"$101.70\\"?: PrimitiveOverrideProps; Badge?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComplexTest11Props = React.PropsWithChildren< Partial & { overrides?: ComplexTest11OverridesProps | undefined | null; } >; export default function ComplexTest11( props: ComplexTest11Props ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with binding should render build property on Text 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TextWithDataBindingOverridesProps = { TextWithDataBinding?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TextWithDataBindingProps = React.PropsWithChildren< Partial & { textValue?: String; } & { overrides?: TextWithDataBindingOverridesProps | undefined | null; } >; export default function TextWithDataBinding( props: TextWithDataBindingProps ): React.ReactElement { const { textValue, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with binding should render slot binding 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, TextProps, View, ViewProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComponentWithSlotBindingOverridesProps = { ComponentWithSlotBinding?: PrimitiveOverrideProps; Rectangle?: PrimitiveOverrideProps; ChildText?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComponentWithSlotBindingProps = React.PropsWithChildren< Partial & { mySlot?: React.ReactNode; } & { overrides?: ComponentWithSlotBindingOverridesProps | undefined | null; } >; export default function ComponentWithSlotBinding( props: ComponentWithSlotBindingProps ): React.ReactElement { const { mySlot, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with data binding should add GraphQL model imports 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../API\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComponentWithDataBindingOverridesProps = { ComponentWithDataBinding?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComponentWithDataBindingProps = React.PropsWithChildren< Partial & { width?: Number; isDisabled?: Boolean; buttonUser?: User; buttonColor?: String; } & { overrides?: ComponentWithDataBindingOverridesProps | undefined | null; } >; export default function ComponentWithDataBinding( props: ComponentWithDataBindingProps ): React.ReactElement { const { width, isDisabled, buttonUser, buttonColor, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with data binding should add model imports 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ComponentWithDataBindingOverridesProps = { ComponentWithDataBinding?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ComponentWithDataBindingProps = React.PropsWithChildren< Partial & { width?: Number; isDisabled?: Boolean; buttonUser?: User; buttonColor?: String; } & { overrides?: ComponentWithDataBindingOverridesProps | undefined | null; } >; export default function ComponentWithDataBinding( props: ComponentWithDataBindingProps ): React.ReactElement { const { width, isDisabled, buttonUser, buttonColor, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with data binding should not have useDataStoreBinding when there is no predicate 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { UntitledModel } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SectionHeadingOverridesProps = { SectionHeading?: PrimitiveOverrideProps; Heading?: PrimitiveOverrideProps; \\"Heading 2\\"?: PrimitiveOverrideProps; subtitle?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SectionHeadingProps = React.PropsWithChildren< Partial & { newProp6fd1?: UntitledModel; } & { overrides?: SectionHeadingOverridesProps | undefined | null; } >; export default function SectionHeading( props: SectionHeadingProps ): React.ReactElement { const { newProp6fd1, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with data binding should render with data binding in child elements 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ChildComponentWithDataBindingOverridesProps = { ChildComponentWithDataBinding?: PrimitiveOverrideProps; TextWithDataBinding?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ChildComponentWithDataBindingProps = React.PropsWithChildren< Partial & { textValue?: String; } & { overrides?: ChildComponentWithDataBindingOverridesProps | undefined | null; } >; export default function ChildComponentWithDataBinding( props: ChildComponentWithDataBindingProps ): React.ReactElement { const { textValue, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests component with variants and not override children prop should render variants with options provided, and not override children prop 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, Variant, getOverrideProps, getOverridesFromVariants, mergeVariantsAndOverrides, } from \\"@aws-amplify/ui-react/internal\\"; import { View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ViewPrimitiveOverridesProps = { ViewPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ViewPrimitiveProps = React.PropsWithChildren< Partial & { variant?: \\"primary\\"; } & { overrides?: ViewPrimitiveOverridesProps | undefined | null; } >; export default function ViewPrimitive( props: ViewPrimitiveProps ): React.ReactElement { const { overrides: overridesProp, ...rest } = props; const variants: Variant[] = [ { variantValues: { variant: \\"primary\\" }, overrides: { ViewPrimitive: { label: \\"componentWithVariantsWithLabelProp\\" }, }, }, ]; const overrides = mergeVariantsAndOverrides( getOverridesFromVariants(variants, props), overridesProp || {} ); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests component with variants should render object variants 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, Variant, getOverrideProps, getOverridesFromVariants, mergeVariantsAndOverrides, } from \\"@aws-amplify/ui-react/internal\\"; import { Icon, IconProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type IconVariantsOverridesProps = { IconVariants?: PrimitiveOverrideProps; } & EscapeHatchProps; export type IconVariantsProps = React.PropsWithChildren< Partial & { variant?: \\"primary\\" | \\"secondary\\"; } & { overrides?: IconVariantsOverridesProps | undefined | null; } >; export default function IconVariants( props: IconVariantsProps ): React.ReactElement { const { overrides: overridesProp, ...rest } = props; const variants: Variant[] = [ { variantValues: { variant: \\"primary\\" }, overrides: { IconVariants: { paths: [ { d: \\"M18 6V4h2V2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14v-2h-4.03c1.23-.91 2.03-2.36 2.03-4v-5H8v5c0 1.64.81 3.09 2.03 4H6V4h2v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z\\", fill: \\"black\\", }, ], }, }, }, { variantValues: { variant: \\"secondary\\" }, overrides: { IconVariants: { paths: [ { d: \\"M18 6V4h2V2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14v-2h-4.03c1.23-.91 2.03-2.36 2.03-4v-5H8v5c0 1.64.81 3.09 2.03 4H6V4h2v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z\\", fill: \\"black\\", }, { d: \\"M18 6V4h2V2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14v-2h-4.03c1.23-.91 2.03-2.36 2.03-4v-5H8v5c0 1.64.81 3.09 2.03 4H6V4h2v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z\\", fill: \\"white\\", }, ], }, }, }, ]; const overrides = mergeVariantsAndOverrides( getOverridesFromVariants(variants, props), overridesProp || {} ); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests component with variants should render variants with options provided 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, Variant, getOverrideProps, getOverridesFromVariants, mergeVariantsAndOverrides, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { variant?: \\"primary\\" | \\"secondary\\"; size?: \\"large\\"; } & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { overrides: overridesProp, ...rest } = props; const variants: Variant[] = [ { variantValues: { variant: \\"primary\\" }, overrides: { CustomButton: { fontSize: \\"12px\\" } }, }, { variantValues: { variant: \\"secondary\\" }, overrides: { CustomButton: { fontSize: \\"40px\\" } }, }, { variantValues: { variant: \\"primary\\", size: \\"large\\" }, overrides: { CustomButton: { width: \\"500\\" } }, }, ]; const overrides = mergeVariantsAndOverrides( getOverridesFromVariants(variants, props), overridesProp || {} ); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests component with variants with mapped children prop should render variants with options provided, and mapped children prop 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, Variant, getOverrideProps, getOverridesFromVariants, mergeVariantsAndOverrides, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { variant?: \\"primary\\" | \\"secondary\\"; size?: \\"large\\"; } & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { overrides: overridesProp, ...rest } = props; const variants: Variant[] = [ { variantValues: { variant: \\"primary\\" }, overrides: { CustomButton: { label: \\"componentWithVariantsWithMappedChildrenProp\\", children: \\"componentWithVariantsWithChildrenProp\\", fontSize: \\"12px\\", }, }, }, { variantValues: { variant: \\"secondary\\" }, overrides: { CustomButton: { fontSize: \\"40px\\" } }, }, { variantValues: { variant: \\"primary\\", size: \\"large\\" }, overrides: { CustomButton: { width: \\"500\\", children: \\"componentWithVariantsWithMappedChildrenProp\\", }, }, }, ]; const overrides = mergeVariantsAndOverrides( getOverridesFromVariants(variants, props), overridesProp || {} ); return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests concat and conditional transform should render child component with data bound concatenation 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ChildComponentWithDataBoundConcatenationOverridesProps = { ChildComponentWithDataBoundConcatenation?: PrimitiveOverrideProps; TextWithConcatenation?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ChildComponentWithDataBoundConcatenationProps = React.PropsWithChildren< Partial & { textValue?: String; } & { overrides?: | ChildComponentWithDataBoundConcatenationOverridesProps | undefined | null; } >; export default function ChildComponentWithDataBoundConcatenation( props: ChildComponentWithDataBoundConcatenationProps ): React.ReactElement { const { textValue, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests concat and conditional transform should render child component with static concatenation 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ChildComponentWithStaticConcatenationOverridesProps = { ChildComponentWithStaticConcatenation?: PrimitiveOverrideProps; TextWithConcatenation?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ChildComponentWithStaticConcatenationProps = React.PropsWithChildren< Partial & { overrides?: | ChildComponentWithStaticConcatenationOverridesProps | undefined | null; } >; export default function ChildComponentWithStaticConcatenation( props: ChildComponentWithStaticConcatenationProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests concat and conditional transform should render component with concatenation prop 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { width?: Number; buttonUser?: User; buttonColor?: String; } & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { width, buttonUser, buttonColor, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests concat and conditional transform should render component with conditional data binding prop 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { width?: Number; buttonUser?: User; buttonColor?: String; } & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { width, buttonUser, buttonColor, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests concat and conditional transform should render component with conditional data binding prop from a bug 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { Student } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ConditionalComponentWithDataBindingOverridesProps = { ConditionalComponentWithDataBinding?: PrimitiveOverrideProps; \\"Placeholder text\\"?: PrimitiveOverrideProps; \\"Placeholder Button\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ConditionalComponentWithDataBindingProps = React.PropsWithChildren< Partial & { student?: Student; } & { overrides?: | ConditionalComponentWithDataBindingOverridesProps | undefined | null; } >; export default function ConditionalComponentWithDataBinding( props: ConditionalComponentWithDataBindingProps ): React.ReactElement { const { student, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests concat and conditional transform should render component with conditional simple binding prop 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { buttonColor?: String; } & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { buttonColor, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests custom components alias parent should render declarations 1`] = ` "import * as React from \\"react\\"; import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\"; import { GridProps } from \\"./Grid\\"; import { ButtonProps } from \\"@aws-amplify/ui-react\\"; import { ViewTestProps } from \\"./ViewTest\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type AliasParentOverridesProps = { AliasParent?: ViewTestProps; Grid?: GridProps; Button?: PrimitiveOverrideProps; } & EscapeHatchProps; export declare type AliasParentProps = React.PropsWithChildren & { overrides?: AliasParentOverridesProps | undefined | null; }>; export default function AliasParent(props: AliasParentProps): React.ReactElement; " `; exports[`amplify render tests custom components alias parent should render parent with aliased child instead of primitive 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Grid as GridCustom, GridProps } from \\"./Grid\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; import ViewTest, { ViewTestProps } from \\"./ViewTest\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type AliasParentOverridesProps = { AliasParent?: ViewTestProps; Grid?: GridProps; Button?: PrimitiveOverrideProps; } & EscapeHatchProps; export type AliasParentProps = React.PropsWithChildren< Partial & { overrides?: AliasParentOverridesProps | undefined | null; } >; export default function AliasParent( props: AliasParentProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests custom components custom children should render component with custom children 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton, { CustomButtonProps } from \\"./CustomButton\\"; import MyView, { MyViewProps } from \\"./MyView\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomChildrenOverridesProps = { CustomChildren?: MyViewProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export type CustomChildrenProps = React.PropsWithChildren< Partial & { overrides?: CustomChildrenOverridesProps | undefined | null; } >; export default function CustomChildren( props: CustomChildrenProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests custom components custom children should render component with custom children with ES5 1`] = ` "var __assign = (this && this.__assign) || function () { __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton from \\"./CustomButton\\"; import MyView from \\"./MyView\\"; export default function CustomChildren(props) { var overrides = props.overrides, rest = __rest(props, [\\"overrides\\"]); return React.createElement( MyView, __assign({}, getOverrideProps(overrides, \\"CustomChildren\\"), rest), React.createElement( CustomButton, __assign({}, getOverrideProps(overrides, \\"MyCustomButton\\")) ) ); } " `; exports[`amplify render tests custom components custom children should render declarations 1`] = ` "import * as React from \\"react\\"; import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\"; import { CustomButtonProps } from \\"./CustomButton\\"; import { MyViewProps } from \\"./MyView\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomChildrenOverridesProps = { CustomChildren?: MyViewProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export declare type CustomChildrenProps = React.PropsWithChildren & { overrides?: CustomChildrenOverridesProps | undefined | null; }>; export default function CustomChildren(props: CustomChildrenProps): React.ReactElement; " `; exports[`amplify render tests custom components custom parent and children should render component with custom parent and children 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton, { CustomButtonProps } from \\"./CustomButton\\"; import ViewTest, { ViewTestProps } from \\"./ViewTest\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomParentAndChildrenOverridesProps = { CustomParentAndChildren?: ViewTestProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export type CustomParentAndChildrenProps = React.PropsWithChildren< Partial & { overrides?: CustomParentAndChildrenOverridesProps | undefined | null; } >; export default function CustomParentAndChildren( props: CustomParentAndChildrenProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests custom components custom parent and children should render component with custom parent and children with ES5 1`] = ` "var __assign = (this && this.__assign) || function () { __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton from \\"./CustomButton\\"; import ViewTest from \\"./ViewTest\\"; export default function CustomParentAndChildren(props) { var overrides = props.overrides, rest = __rest(props, [\\"overrides\\"]); return React.createElement( ViewTest, __assign({}, getOverrideProps(overrides, \\"CustomParentAndChildren\\"), rest), React.createElement( CustomButton, __assign({}, getOverrideProps(overrides, \\"MyCustomButton\\")) ) ); } " `; exports[`amplify render tests custom components custom parent and children should render declarations 1`] = ` "import * as React from \\"react\\"; import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\"; import { CustomButtonProps } from \\"./CustomButton\\"; import { ViewTestProps } from \\"./ViewTest\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomParentAndChildrenOverridesProps = { CustomParentAndChildren?: ViewTestProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export declare type CustomParentAndChildrenProps = React.PropsWithChildren & { overrides?: CustomParentAndChildrenOverridesProps | undefined | null; }>; export default function CustomParentAndChildren(props: CustomParentAndChildrenProps): React.ReactElement; " `; exports[`amplify render tests custom components custom parent should render component 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; import MyView, { MyViewProps } from \\"./MyView\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomParentOverridesProps = { CustomParent?: MyViewProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomParentProps = React.PropsWithChildren< Partial & { overrides?: CustomParentOverridesProps | undefined | null; } >; export default function CustomParent( props: CustomParentProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests custom components custom parent should render component with ES5 1`] = ` "var __assign = (this && this.__assign) || function () { __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps } from \\"@aws-amplify/ui-react/internal\\"; import { Button } from \\"@aws-amplify/ui-react\\"; import MyView from \\"./MyView\\"; export default function CustomParent(props) { var overrides = props.overrides, rest = __rest(props, [\\"overrides\\"]); return React.createElement( MyView, __assign({}, getOverrideProps(overrides, \\"CustomParent\\"), rest), React.createElement( Button, __assign({}, getOverrideProps(overrides, \\"MyButton\\")) ) ); } " `; exports[`amplify render tests custom components custom parent should render declarations 1`] = ` "import * as React from \\"react\\"; import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\"; import { ButtonProps } from \\"@aws-amplify/ui-react\\"; import { MyViewProps } from \\"./MyView\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomParentOverridesProps = { CustomParent?: MyViewProps; MyButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export declare type CustomParentProps = React.PropsWithChildren & { overrides?: CustomParentOverridesProps | undefined | null; }>; export default function CustomParent(props: CustomParentProps): React.ReactElement; " `; exports[`amplify render tests custom render config should render ES5 1`] = ` "var __assign = (this && this.__assign) || function () { __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps } from \\"@aws-amplify/ui-react/internal\\"; import { Button, View } from \\"@aws-amplify/ui-react\\"; export default function ViewWithButton(props) { var overrides = props.overrides, rest = __rest(props, [\\"overrides\\"]); return React.createElement( View, __assign({}, getOverrideProps(overrides, \\"ViewWithButton\\"), rest), React.createElement( Button, __assign( { color: \\"#ff0000\\", width: \\"20px\\" }, getOverrideProps(overrides, \\"MyButton\\") ) ) ); } " `; exports[`amplify render tests custom render config should render JSX 1`] = ` "var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps } from \\"@aws-amplify/ui-react/internal\\"; import { Button, View } from \\"@aws-amplify/ui-react\\"; export default function ViewWithButton(props) { const { overrides } = props, rest = __rest(props, [\\"overrides\\"]); return ( ); } " `; exports[`amplify render tests custom render config should render common JS 1`] = ` "\\"use strict\\"; var __createBinding = (this && this.__createBinding) || (Object.create ? function (o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; }, }); } : function (o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? function (o, v) { Object.defineProperty(o, \\"default\\", { enumerable: true, value: v }); } : function (o, v) { o[\\"default\\"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== \\"default\\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; Object.defineProperty(exports, \\"__esModule\\", { value: true }); /* eslint-disable */ const React = __importStar(require(\\"react\\")); const internal_1 = require(\\"@aws-amplify/ui-react/internal\\"); const ui_react_1 = require(\\"@aws-amplify/ui-react\\"); function ViewWithButton(props) { const { overrides } = props, rest = __rest(props, [\\"overrides\\"]); return React.createElement( ui_react_1.View, Object.assign( {}, (0, internal_1.getOverrideProps)(overrides, \\"ViewWithButton\\"), rest ), React.createElement( ui_react_1.Button, Object.assign( { color: \\"#ff0000\\", width: \\"20px\\" }, (0, internal_1.getOverrideProps)(overrides, \\"MyButton\\") ) ) ); } exports.default = ViewWithButton; " `; exports[`amplify render tests declarations should render declarations 1`] = ` "import * as React from \\"react\\"; import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\"; import { ButtonProps, FlexProps, ImageProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ProfileOverridesProps = { Profile?: PrimitiveOverrideProps; child1?: PrimitiveOverrideProps; child2?: PrimitiveOverrideProps; child3?: PrimitiveOverrideProps; } & EscapeHatchProps; export declare type ProfileProps = React.PropsWithChildren & { overrides?: ProfileOverridesProps | undefined | null; }>; export default function Profile(props: ProfileProps): React.ReactElement; " `; exports[`amplify render tests default value should render bound default value 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type BoundDefaultValueOverridesProps = { BoundDefaultValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type BoundDefaultValueProps = React.PropsWithChildren< Partial & { label?: String; } & { overrides?: BoundDefaultValueOverridesProps | undefined | null; } >; export default function BoundDefaultValue( props: BoundDefaultValueProps ): React.ReactElement { const { label, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests default value should render collection default value 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreBinding, } from \\"@aws-amplify/ui-react/internal\\"; import { Collection, CollectionProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; import { MyTextProps } from \\"./MyText\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CollectionDefaultValueOverridesProps = { CollectionDefaultValue?: PrimitiveOverrideProps; MyText?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CollectionDefaultValueProps = React.PropsWithChildren< Partial> & { items?: any[]; overrideItems?: (collectionItem: { item: any; index: number; }) => MyTextProps; } & { overrides?: CollectionDefaultValueOverridesProps | undefined | null; } >; export default function CollectionDefaultValue( props: CollectionDefaultValueProps ): React.ReactElement { const { items, overrideItems, overrides, ...rest } = props; const [user, setUser] = React.useState(undefined); const userDataStore = useDataStoreBinding({ type: \\"collection\\", model: User, }).items; React.useEffect(() => { if (items !== undefined) { setUser(items); return; } setUser(userDataStore); }, [items, userDataStore]); return ( /* @ts-ignore: TS2322 */ {(item, index) => ( )} ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests default value should render simple and bound default value 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SimpleAndBoundDefaultValueOverridesProps = { SimpleAndBoundDefaultValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SimpleAndBoundDefaultValueProps = React.PropsWithChildren< Partial & { label?: String; } & { overrides?: SimpleAndBoundDefaultValueOverridesProps | undefined | null; } >; export default function SimpleAndBoundDefaultValue( props: SimpleAndBoundDefaultValueProps ): React.ReactElement { const { label = \\"Simple Double Default\\", overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests default value should render simple default value 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SimplePropertyBindingDefaultValueOverridesProps = { SimplePropertyBindingDefaultValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SimplePropertyBindingDefaultValueProps = React.PropsWithChildren< Partial & { label?: String; } & { overrides?: | SimplePropertyBindingDefaultValueOverridesProps | undefined | null; } >; export default function SimplePropertyBindingDefaultValue( props: SimplePropertyBindingDefaultValueProps ): React.ReactElement { const { label = \\"Default Binding Property\\", overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests icon-indices does not return negative indices for icons 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Icon, IconProps, Image, ImageProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SocialAOverridesProps = { SocialA?: PrimitiveOverrideProps; Body?: PrimitiveOverrideProps; Text?: PrimitiveOverrideProps; Headline?: PrimitiveOverrideProps; \\"New Amplify Studio gives designers the ability to export UI to React code\\"?: PrimitiveOverrideProps; Frame?: PrimitiveOverrideProps; \\"Nikhil S\\"?: PrimitiveOverrideProps; \\"2nd December 2021\\"?: PrimitiveOverrideProps; Article?: PrimitiveOverrideProps; Iconynp?: PrimitiveOverrideProps; \\"AWS Amplify Studio is a visual development environment for building full-stack web and mobile apps that grows with your business. Studio builds on existing backend building capabilities in AWS Amplify, allowing you to build your UI faster with a set of ready-to-use UI components that are editable in Figma. With Studio, you can quickly build an entire web app, front-to-back, with minimal coding, while still maintaining full control over your app design and behavior through code. Ship faster, scale effortlessly, and delight every user.\\"?: PrimitiveOverrideProps; Shareakz?: PrimitiveOverrideProps; Sharedgc?: PrimitiveOverrideProps; Iconsrv?: PrimitiveOverrideProps; Iconwdz?: PrimitiveOverrideProps; Iconxpr?: PrimitiveOverrideProps; image?: PrimitiveOverrideProps; \\"Read moreudv\\"?: PrimitiveOverrideProps; Iconlxm?: PrimitiveOverrideProps; \\"Read morepbe\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SocialAProps = React.PropsWithChildren< Partial & { overrides?: SocialAOverridesProps | undefined | null; } >; export default function SocialA(props: SocialAProps): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests mutations controls an input that is modified by a button 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, TextField, TextFieldProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type InputMutationOnClickOverridesProps = { InputMutationOnClick?: PrimitiveOverrideProps; MyInput?: PrimitiveOverrideProps; SetInputButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type InputMutationOnClickProps = React.PropsWithChildren< Partial & { overrides?: InputMutationOnClickOverridesProps | undefined | null; } >; export default function InputMutationOnClick( props: InputMutationOnClickProps ): React.ReactElement { const { overrides, ...rest } = props; const [myInputValue, setMyInputValue] = useStateMutationAction(\\"\\"); const setInputButtonOnClick = () => { setMyInputValue(\\"Razor Crest\\"); }; return ( /* @ts-ignore: TS2322 */ { setMyInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"MyInput\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations form 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useDataStoreUpdateAction, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Customer } from \\"../models\\"; import { schema } from \\"../models/schema\\"; import { Button, ButtonProps, Flex, FlexProps, TextField, TextFieldProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type MyFormOverridesProps = { MyForm?: PrimitiveOverrideProps; UsernameTextField?: PrimitiveOverrideProps; SubmitButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type MyFormProps = React.PropsWithChildren< Partial & { overrides?: MyFormOverridesProps | undefined | null; } >; export default function MyForm(props: MyFormProps): React.ReactElement { const { overrides, ...rest } = props; const [usernameTextFieldValue, setUsernameTextFieldValue] = useStateMutationAction(\\"vizsla\\"); const submitButtonOnClick = useDataStoreUpdateAction({ model: Customer, id: \\"d9887268-47dd-4899-9568-db5809218751\\", fields: { username: usernameTextFieldValue }, schema: schema, }); return ( /* @ts-ignore: TS2322 */ { setUsernameTextFieldValue(event.target.value); }} {...getOverrideProps(overrides, \\"UsernameTextField\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations internal mutation 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ColorChangeOnClickOverridesProps = { ColorChangeOnClick?: PrimitiveOverrideProps; ColoredBox?: PrimitiveOverrideProps; ColorChangerButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ColorChangeOnClickProps = React.PropsWithChildren< Partial & { overrides?: ColorChangeOnClickOverridesProps | undefined | null; } >; export default function ColorChangeOnClick( props: ColorChangeOnClickProps ): React.ReactElement { const { overrides, ...rest } = props; const [coloredBoxBackgroundColor, setColoredBoxBackgroundColor] = useStateMutationAction(\\"red\\"); const colorChangerButtonOnClick = () => { setColoredBoxBackgroundColor(\\"blue\\"); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations modifies text in component on input change 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextField, TextFieldProps, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TwoWayBindingsOverridesProps = { TwoWayBindings?: PrimitiveOverrideProps; TextFieldInput?: PrimitiveOverrideProps; TextFieldValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TwoWayBindingsProps = React.PropsWithChildren< Partial & { overrides?: TwoWayBindingsOverridesProps | undefined | null; } >; export default function TwoWayBindings( props: TwoWayBindingsProps ): React.ReactElement { const { overrides, ...rest } = props; const [textFieldInputValue, setTextFieldInputValue] = useStateMutationAction(\\"\\"); return ( /* @ts-ignore: TS2322 */ { setTextFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"TextFieldInput\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports a controlled checkbox primitive 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { CheckboxField, CheckboxFieldProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CheckboxControlledElementOverridesProps = { CheckboxControlledElement?: PrimitiveOverrideProps; Input?: PrimitiveOverrideProps; CheckboxFieldValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CheckboxControlledElementProps = React.PropsWithChildren< Partial & { overrides?: CheckboxControlledElementOverridesProps | undefined | null; } >; export default function CheckboxControlledElement( props: CheckboxControlledElementProps ): React.ReactElement { const { overrides, ...rest } = props; const [inputChecked, setInputChecked] = useStateMutationAction(false); return ( /* @ts-ignore: TS2322 */ { setInputChecked(event.target.checked); }} {...getOverrideProps(overrides, \\"Input\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports a controlled stepper primitive 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, StepperField, StepperFieldProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type StepperControlledElementOverridesProps = { StepperControlledElement?: PrimitiveOverrideProps; Input?: PrimitiveOverrideProps; StepperFieldValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type StepperControlledElementProps = React.PropsWithChildren< Partial & { overrides?: StepperControlledElementOverridesProps | undefined | null; } >; export default function StepperControlledElement( props: StepperControlledElementProps ): React.ReactElement { const { overrides, ...rest } = props; const [inputValue, setInputValue] = useStateMutationAction(0); return ( /* @ts-ignore: TS2322 */ setInputValue(value)} {...getOverrideProps(overrides, \\"Input\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports a controlled switch primitive 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, SwitchField, SwitchFieldProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SwitchControlledElementOverridesProps = { SwitchControlledElement?: PrimitiveOverrideProps; Input?: PrimitiveOverrideProps; SwitchFieldValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SwitchControlledElementProps = React.PropsWithChildren< Partial & { overrides?: SwitchControlledElementOverridesProps | undefined | null; } >; export default function SwitchControlledElement( props: SwitchControlledElementProps ): React.ReactElement { const { overrides, ...rest } = props; const [inputIsChecked, setInputIsChecked] = useStateMutationAction(false); return ( /* @ts-ignore: TS2322 */ setInputIsChecked(!inputIsChecked)} {...getOverrideProps(overrides, \\"Input\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports all initial value binding types 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { User } from \\"../models\\"; import { EscapeHatchProps, createDataStorePredicate, getOverrideProps, useAuth, useDataStoreBinding, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { useEffect } from \\"react\\"; import { Button, ButtonProps, Flex, FlexProps, Heading, HeadingProps, Text, TextField, TextFieldProps, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type InitialValueBindingsOverridesProps = { InitialValueBindings?: PrimitiveOverrideProps; Heading?: PrimitiveOverrideProps; FixedValueInitialBindingSection?: PrimitiveOverrideProps; FixedValueHeading?: PrimitiveOverrideProps; FixedValueContents?: PrimitiveOverrideProps; FixedValueMutation?: PrimitiveOverrideProps; BoundValueInitialBindingSection?: PrimitiveOverrideProps; BoundValueHeading?: PrimitiveOverrideProps; BoundValueContents?: PrimitiveOverrideProps; BoundValueMutation?: PrimitiveOverrideProps; ConcatValueInitialBindingSection?: PrimitiveOverrideProps; ConcatValueHeading?: PrimitiveOverrideProps; ConcatValueContents?: PrimitiveOverrideProps; ConcatValueMutation?: PrimitiveOverrideProps; ConditionalValueInitialBindingSection?: PrimitiveOverrideProps; ConditionalValueHeading?: PrimitiveOverrideProps; ConditionalValueContents?: PrimitiveOverrideProps; ConditionalValueMutation?: PrimitiveOverrideProps; AuthValueInitialBindingSection?: PrimitiveOverrideProps; AuthValueHeading?: PrimitiveOverrideProps; AuthValueContents?: PrimitiveOverrideProps; AuthValueMutation?: PrimitiveOverrideProps; StateValueInitialBindingSection?: PrimitiveOverrideProps; StateValueHeading?: PrimitiveOverrideProps; StateValueContents?: PrimitiveOverrideProps; StateValueMutation?: PrimitiveOverrideProps; StateSource?: PrimitiveOverrideProps; TextFieldValueInitialBindingSection?: PrimitiveOverrideProps; TextFieldValueHeading?: PrimitiveOverrideProps; TextFieldValueContents?: PrimitiveOverrideProps; TextFieldValueMutation?: PrimitiveOverrideProps; } & EscapeHatchProps; export type InitialValueBindingsProps = React.PropsWithChildren< Partial & { user?: User; } & { overrides?: InitialValueBindingsOverridesProps | undefined | null; } >; export default function InitialValueBindings( props: InitialValueBindingsProps ): React.ReactElement { const { user: userProp, overrides, ...rest } = props; const authAttributes = useAuth().user?.attributes ?? {}; const userFilterObj = { field: \\"firstName\\", operand: \\"Johnny\\", operator: \\"eq\\", }; const userFilter = createDataStorePredicate(userFilterObj); const userDataStore = useDataStoreBinding({ type: \\"collection\\", model: User, criteria: userFilter, }).items[0]; const user = userProp !== undefined ? userProp : userDataStore; const [stateSourceChildren, setStateSourceChildren] = useStateMutationAction(\\"State Value\\"); const [fixedValueContentsChildren, setFixedValueContentsChildren] = useStateMutationAction(\\"Fixed Value\\"); const [boundValueContentsChildren, setBoundValueContentsChildren] = useStateMutationAction(undefined); const [concatValueContentsChildren, setConcatValueContentsChildren] = useStateMutationAction(\`\${\\"Concat\\"}\${\\" \\"}\${\\"Value\\"}\`); const [ conditionalValueContentsChildren, setConditionalValueContentsChildren, ] = useStateMutationAction(undefined); const [authValueContentsChildren, setAuthValueContentsChildren] = useStateMutationAction(undefined); const [stateValueContentsChildren, setStateValueContentsChildren] = useStateMutationAction(stateSourceChildren); const [textFieldValueContentsValue, setTextFieldValueContentsValue] = useStateMutationAction(\\"\\"); const fixedValueMutationOnClick = () => { setFixedValueContentsChildren(\\"Mutated Value\\"); }; const boundValueMutationOnClick = () => { setBoundValueContentsChildren(\\"Mutated Value\\"); }; const concatValueMutationOnClick = () => { setConcatValueContentsChildren(\\"Mutated Value\\"); }; const conditionalValueMutationOnClick = () => { setConditionalValueContentsChildren(\\"Mutated Value\\"); }; const authValueMutationOnClick = () => { setAuthValueContentsChildren(\\"Mutated Value\\"); }; const stateValueMutationOnClick = () => { setStateValueContentsChildren(\\"Mutated Value\\"); }; const textFieldValueMutationOnClick = () => { setTextFieldValueContentsValue(\\"Mutated Value\\"); }; useEffect(() => { if ( boundValueContentsChildren === undefined && user !== undefined && user?.lastName !== undefined ) setBoundValueContentsChildren(user?.lastName); }, [user]); useEffect(() => { if ( conditionalValueContentsChildren === undefined && user !== undefined && (user?.lastName == \\"Bound Value\\" ? \\"Conditional Value\\" : \\"Unconditional Value\\") !== undefined ) setConditionalValueContentsChildren( user?.lastName == \\"Bound Value\\" ? \\"Conditional Value\\" : \\"Unconditional Value\\" ); }, [user]); useEffect(() => { if ( authValueContentsChildren === undefined && authAttributes !== undefined && authAttributes[\\"email\\"] !== undefined ) setAuthValueContentsChildren(authAttributes[\\"email\\"]); }, [authAttributes]); useEffect(() => { if ( textFieldValueContentsValue === \\"\\" && authAttributes !== undefined && authAttributes[\\"email\\"] !== undefined ) setTextFieldValueContentsValue(authAttributes[\\"email\\"]); }, [authAttributes]); return ( /* @ts-ignore: TS2322 */ { setTextFieldValueContentsValue(event.target.value); }} {...getOverrideProps(overrides, \\"TextFieldValueContents\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports invalid statement names for mutation targets 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { Listing } from \\"../models\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Image, ImageProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CardAOverridesProps = { CardA?: PrimitiveOverrideProps; image?: PrimitiveOverrideProps; \\"Text Grouping\\"?: PrimitiveOverrideProps; \\"Classic Long Sleeve T-Shirt\\"?: PrimitiveOverrideProps; $99?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CardAProps = React.PropsWithChildren< Partial & { listing?: Listing; } & { overrides?: CardAOverridesProps | undefined | null; } >; export default function CardA(props: CardAProps): React.ReactElement { const { listing, overrides, ...rest } = props; const [classicLongSleeveTShirtChildren, setClassicLongSleeveTShirtChildren] = useStateMutationAction(\\"Classic Long Sleeve T-Shirt\\"); const dollarNineNineOnClick = () => { setClassicLongSleeveTShirtChildren(listing?.titl); }; return ( /* @ts-ignore: TS2322 */ { dollarNineNineOnClick(); }} {...getOverrideProps(overrides, \\"$99\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports invalid statement names for mutation targets with ES5 1`] = ` "var __assign = (this && this.__assign) || function () { __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, Image, Text } from \\"@aws-amplify/ui-react\\"; export default function CardA(props) { var listing = props.listing, overrides = props.overrides, rest = __rest(props, [\\"listing\\", \\"overrides\\"]); var _a = useStateMutationAction(\\"Classic Long Sleeve T-Shirt\\"), classicLongSleeveTShirtChildren = _a[0], setClassicLongSleeveTShirtChildren = _a[1]; var dollarNineNineOnClick = function () { setClassicLongSleeveTShirtChildren( listing === null || listing === void 0 ? void 0 : listing.titl ); }; return React.createElement( Flex, __assign( { gap: \\"16px\\", direction: \\"column\\", justifyContent: \\"center\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", backgroundColor: \\"rgba(255,255,255,1)\\", }, getOverrideProps(overrides, \\"CardA\\"), rest ), React.createElement( Image, __assign( { height: \\"400px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, getOverrideProps(overrides, \\"image\\") ) ), React.createElement( Flex, __assign( { gap: \\"8px\\", direction: \\"column\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", }, getOverrideProps(overrides, \\"Text Grouping\\") ), React.createElement( Text, __assign( { fontFamily: \\"Inter\\", fontSize: \\"16px\\", fontWeight: \\"400\\", color: \\"rgba(0,0,0,1)\\", lineHeight: \\"24px\\", textAlign: \\"left\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", letterSpacing: \\"0.01px\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", whiteSpace: \\"pre-wrap\\", children: classicLongSleeveTShirtChildren, }, getOverrideProps(overrides, \\"Classic Long Sleeve T-Shirt\\") ) ), React.createElement( Text, __assign( { fontFamily: \\"Inter\\", fontSize: \\"14px\\", fontWeight: \\"400\\", color: \\"rgba(43,51,59,1)\\", lineHeight: \\"24px\\", textAlign: \\"left\\", display: \\"flex\\", direction: \\"column\\", justifyContent: \\"flex-start\\", shrink: \\"0\\", alignSelf: \\"stretch\\", position: \\"relative\\", padding: \\"0px 0px 0px 0px\\", whiteSpace: \\"pre-wrap\\", children: \\"$99\\", onClick: function () { dollarNineNineOnClick(); }, }, getOverrideProps(overrides, \\"$99\\") ) ) ) ); } " `; exports[`amplify render tests mutations supports multiple actions pointing to the same value 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ButtonsToggleStateOverridesProps = { ButtonsToggleState?: PrimitiveOverrideProps; FooBarValue?: PrimitiveOverrideProps; FooButton?: PrimitiveOverrideProps; BarButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ButtonsToggleStateProps = React.PropsWithChildren< Partial & { overrides?: ButtonsToggleStateOverridesProps | undefined | null; } >; export default function ButtonsToggleState( props: ButtonsToggleStateProps ): React.ReactElement { const { overrides, ...rest } = props; const [fooBarValueChildren, setFooBarValueChildren] = useStateMutationAction(\\"Baz\\"); const fooButtonOnClick = () => { setFooBarValueChildren(\\"Foo\\"); }; const barButtonOnClick = () => { setFooBarValueChildren(\\"Bar\\"); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports mutations on synthetic props 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type MutationWithSyntheticPropOverridesProps = { MutationWithSyntheticProp?: PrimitiveOverrideProps; FooBarValue?: PrimitiveOverrideProps; FooButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type MutationWithSyntheticPropProps = React.PropsWithChildren< Partial & { overrides?: MutationWithSyntheticPropOverridesProps | undefined | null; } >; export default function MutationWithSyntheticProp( props: MutationWithSyntheticPropProps ): React.ReactElement { const { overrides, ...rest } = props; const [fooBarValueChildren, setFooBarValueChildren] = useStateMutationAction(\\"Baz\\"); const fooButtonOnClick = () => { setFooBarValueChildren(\\"Foo\\"); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports mutations on visibility props 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Card, CardProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type UpdateVisibilityOverridesProps = { UpdateVisibility?: PrimitiveOverrideProps; TextDisplay?: PrimitiveOverrideProps; DisplayBlockButton?: PrimitiveOverrideProps; DisplayNoneButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type UpdateVisibilityProps = React.PropsWithChildren< Partial & { overrides?: UpdateVisibilityOverridesProps | undefined | null; } >; export default function UpdateVisibility( props: UpdateVisibilityProps ): React.ReactElement { const { overrides, ...rest } = props; const [textDisplayDisplay, setTextDisplayDisplay] = useStateMutationAction(\\"block\\"); const displayBlockButtonOnClick = () => { setTextDisplayDisplay(\\"block\\"); }; const displayNoneButtonOnClick = () => { setTextDisplayDisplay(\\"none\\"); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports mutations with no initial state 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Card, CardProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SetStateWithoutInitialValueOverridesProps = { SetStateWithoutInitialValue?: PrimitiveOverrideProps; TextDisplay?: PrimitiveOverrideProps; DisplayBlockButton?: PrimitiveOverrideProps; DisplayNoneButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SetStateWithoutInitialValueProps = React.PropsWithChildren< Partial & { overrides?: SetStateWithoutInitialValueOverridesProps | undefined | null; } >; export default function SetStateWithoutInitialValue( props: SetStateWithoutInitialValueProps ): React.ReactElement { const { overrides, ...rest } = props; const [textDisplayDisplay, setTextDisplayDisplay] = useStateMutationAction(undefined); const displayBlockButtonOnClick = () => { setTextDisplayDisplay(\\"block\\"); }; const displayNoneButtonOnClick = () => { setTextDisplayDisplay(\\"none\\"); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports names that cant be directly turned into methodnames 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useNavigateAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type InvalidNameForMethodOverridesProps = { InvalidNameForMethod?: PrimitiveOverrideProps; \\"\\\\u201CLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.\\\\u201D\\"?: PrimitiveOverrideProps; } & EscapeHatchProps; export type InvalidNameForMethodProps = React.PropsWithChildren< Partial & { overrides?: InvalidNameForMethodOverridesProps | undefined | null; } >; export default function InvalidNameForMethod( props: InvalidNameForMethodProps ): React.ReactElement { const { overrides, ...rest } = props; const loremipsumdolorsitametCommaconsecteturadipiscingelitCommaseddoeiusmodtemporincididuntutlaborePeriodOnClick = useNavigateAction({ type: \\"url\\", url: \\"emails\\" }); return ( /* @ts-ignore: TS2322 */ { loremipsumdolorsitametCommaconsecteturadipiscingelitCommaseddoeiusmodtemporincididuntutlaborePeriodOnClick(); }} {...getOverrideProps( overrides, \\"\\\\u201CLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.\\\\u201D\\" )} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports nested mutation 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Text, TextProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type NestedMutationOverridesProps = { NestedMutation?: PrimitiveOverrideProps; MutatedValue?: PrimitiveOverrideProps; StatePropertyMutation?: PrimitiveOverrideProps; StateSource?: PrimitiveOverrideProps; } & EscapeHatchProps; export type NestedMutationProps = React.PropsWithChildren< Partial & { overrides?: NestedMutationOverridesProps | undefined | null; } >; export default function NestedMutation( props: NestedMutationProps ): React.ReactElement { const { overrides, ...rest } = props; const [stateSourceChildren, setStateSourceChildren] = useStateMutationAction(\\"State Value\\"); const [mutatedValueChildren, setMutatedValueChildren] = useStateMutationAction(\\"Default Value\\"); const statePropertyMutationOnClick = () => { setMutatedValueChildren(stateSourceChildren); }; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests mutations supports two-way data binding on form elements 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, CheckboxField, CheckboxFieldProps, Flex, FlexProps, Heading, HeadingProps, PasswordField, PasswordFieldProps, PhoneNumberField, PhoneNumberFieldProps, Radio, RadioGroupField, RadioGroupFieldProps, RadioProps, SearchField, SearchFieldProps, SelectField, SelectFieldProps, SliderField, SliderFieldProps, StepperField, StepperFieldProps, SwitchField, SwitchFieldProps, Text, TextAreaField, TextAreaFieldProps, TextField, TextFieldProps, TextProps, } from \\"@aws-amplify/ui-react\\"; import option, { optionProps } from \\"./option\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TwoWayBindingsOverridesProps = { TwoWayBindings?: PrimitiveOverrideProps; FormHeading?: PrimitiveOverrideProps; CheckboxFieldSection?: PrimitiveOverrideProps; CheckboxFieldHeader?: PrimitiveOverrideProps; CheckboxFieldInput?: PrimitiveOverrideProps; CheckboxFieldValue?: PrimitiveOverrideProps; SetCheckboxFieldValue?: PrimitiveOverrideProps; PasswordFieldSection?: PrimitiveOverrideProps; PasswordFieldHeader?: PrimitiveOverrideProps; PasswordFieldInput?: PrimitiveOverrideProps; PasswordFieldValue?: PrimitiveOverrideProps; SetPasswordFieldValue?: PrimitiveOverrideProps; PhoneNumberFieldSection?: PrimitiveOverrideProps; PhoneNumberFieldHeader?: PrimitiveOverrideProps; PhoneNumberFieldInput?: PrimitiveOverrideProps; PhoneNumberFieldValue?: PrimitiveOverrideProps; SetPhoneNumberFieldValue?: PrimitiveOverrideProps; RadioGroupFieldSection?: PrimitiveOverrideProps; RadioGroupFieldHeader?: PrimitiveOverrideProps; RadioGroupFieldInput?: PrimitiveOverrideProps; RadioGroupFieldInputOption1?: PrimitiveOverrideProps; RadioGroupFieldInputOption2?: PrimitiveOverrideProps; RadioGroupFieldInputOption3?: PrimitiveOverrideProps; RadioGroupFieldValue?: PrimitiveOverrideProps; SetRadioGroupFieldValue?: PrimitiveOverrideProps; SearchFieldSection?: PrimitiveOverrideProps; SearchFieldHeader?: PrimitiveOverrideProps; SearchFieldInput?: PrimitiveOverrideProps; SearchFieldValue?: PrimitiveOverrideProps; SetSearchFieldValue?: PrimitiveOverrideProps; SelectFieldSection?: PrimitiveOverrideProps; SelectFieldHeader?: PrimitiveOverrideProps; SelectFieldInput?: PrimitiveOverrideProps; SelectFieldInputOption1?: optionProps; SelectFieldInputOption2?: optionProps; SelectFieldInputOption3?: optionProps; SelectFieldValue?: PrimitiveOverrideProps; SetSelectFieldValue?: PrimitiveOverrideProps; SliderFieldSection?: PrimitiveOverrideProps; SliderFieldHeader?: PrimitiveOverrideProps; SliderFieldInput?: PrimitiveOverrideProps; SliderFieldValue?: PrimitiveOverrideProps; SetSliderFieldValue?: PrimitiveOverrideProps; StepperFieldSection?: PrimitiveOverrideProps; StepperFieldHeader?: PrimitiveOverrideProps; StepperFieldInput?: PrimitiveOverrideProps; StepperFieldValue?: PrimitiveOverrideProps; SetStepperFieldValue?: PrimitiveOverrideProps; SwitchFieldSection?: PrimitiveOverrideProps; SwitchFieldHeader?: PrimitiveOverrideProps; SwitchFieldInput?: PrimitiveOverrideProps; SwitchFieldValue?: PrimitiveOverrideProps; SetSwitchFieldValue?: PrimitiveOverrideProps; TextFieldSection?: PrimitiveOverrideProps; TextFieldHeader?: PrimitiveOverrideProps; TextFieldInput?: PrimitiveOverrideProps; TextFieldValue?: PrimitiveOverrideProps; SetTextFieldValue?: PrimitiveOverrideProps; TextAreaFieldSection?: PrimitiveOverrideProps; TextAreaFieldHeader?: PrimitiveOverrideProps; TextAreaFieldInput?: PrimitiveOverrideProps; TextAreaFieldValue?: PrimitiveOverrideProps; SetTextAreaFieldValue?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TwoWayBindingsProps = React.PropsWithChildren< Partial & { overrides?: TwoWayBindingsOverridesProps | undefined | null; } >; export default function TwoWayBindings( props: TwoWayBindingsProps ): React.ReactElement { const { overrides, ...rest } = props; const [checkboxFieldInputChecked, setCheckboxFieldInputChecked] = useStateMutationAction(false); const [passwordFieldInputValue, setPasswordFieldInputValue] = useStateMutationAction(\\"\\"); const [phoneNumberFieldInputValue, setPhoneNumberFieldInputValue] = useStateMutationAction(\\"\\"); const [radioGroupFieldInputValue, setRadioGroupFieldInputValue] = useStateMutationAction(\\"html\\"); const [searchFieldInputValue, setSearchFieldInputValue] = useStateMutationAction(\\"\\"); const [selectFieldInputValue, setSelectFieldInputValue] = useStateMutationAction(undefined); const [sliderFieldInputValue, setSliderFieldInputValue] = useStateMutationAction(50); const [stepperFieldInputValue, setStepperFieldInputValue] = useStateMutationAction(0); const [switchFieldInputIsChecked, setSwitchFieldInputIsChecked] = useStateMutationAction(false); const [textFieldInputValue, setTextFieldInputValue] = useStateMutationAction(\\"\\"); const [textAreaFieldInputValue, setTextAreaFieldInputValue] = useStateMutationAction(\\"\\"); const setCheckboxFieldValueOnClick = () => { setCheckboxFieldInputChecked(false); }; const setPasswordFieldValueOnClick = () => { setPasswordFieldInputValue(\\"admin123\\"); }; const setPhoneNumberFieldValueOnClick = () => { setPhoneNumberFieldInputValue(\\"8675309\\"); }; const setRadioGroupFieldValueOnClick = () => { setRadioGroupFieldInputValue(\\"javascript\\"); }; const setSearchFieldValueOnClick = () => { setSearchFieldInputValue(\\"UI Docs\\"); }; const setSelectFieldValueOnClick = () => { setSelectFieldInputValue(\\"orange\\"); }; const setSliderFieldValueOnClick = () => { setSliderFieldInputValue(90); }; const setStepperFieldValueOnClick = () => { setStepperFieldInputValue(9); }; const setSwitchFieldValueOnClick = () => { setSwitchFieldInputIsChecked(true); }; const setTextFieldValueOnClick = () => { setTextFieldInputValue(\\"Hardcoded Value\\"); }; const setTextAreaFieldValueOnClick = () => { setTextAreaFieldInputValue(\\"Hardcoded Value\\"); }; return ( /* @ts-ignore: TS2322 */ { setCheckboxFieldInputChecked(event.target.checked); }} {...getOverrideProps(overrides, \\"CheckboxFieldInput\\")} > { setPasswordFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"PasswordFieldInput\\")} > { setPhoneNumberFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"PhoneNumberFieldInput\\")} > { setRadioGroupFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"RadioGroupFieldInput\\")} > { setSearchFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"SearchFieldInput\\")} > { setSelectFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"SelectFieldInput\\")} > setSliderFieldInputValue(value)} {...getOverrideProps(overrides, \\"SliderFieldInput\\")} > setStepperFieldInputValue(value)} {...getOverrideProps(overrides, \\"StepperFieldInput\\")} > setSwitchFieldInputIsChecked(!switchFieldInputIsChecked) } {...getOverrideProps(overrides, \\"SwitchFieldInput\\")} > { setTextFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"TextFieldInput\\")} > { setTextAreaFieldInputValue(event.target.value); }} {...getOverrideProps(overrides, \\"TextAreaFieldInput\\")} > ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests primitives CheckboxField 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { CheckboxField, CheckboxFieldProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CheckBoxFieldPrimitiveOverridesProps = { CheckBoxFieldPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CheckBoxFieldPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: CheckBoxFieldPrimitiveOverridesProps | undefined | null; } >; export default function CheckBoxFieldPrimitive( props: CheckBoxFieldPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives Expander 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Expander, ExpanderItem, ExpanderItemProps, ExpanderProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ExpanderPrimitiveOverridesProps = { ExpanderPrimitive?: PrimitiveOverrideProps; ExpanderItem1?: PrimitiveOverrideProps; ExpanderItem2?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ExpanderPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: ExpanderPrimitiveOverridesProps | undefined | null; } >; export default function ExpanderPrimitive( props: ExpanderPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives ExpanderItem 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { ExpanderItem, ExpanderItemProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type MyExpanderItemOverridesProps = { MyExpanderItem?: PrimitiveOverrideProps; } & EscapeHatchProps; export type MyExpanderItemProps = React.PropsWithChildren< Partial & { overrides?: MyExpanderItemOverridesProps | undefined | null; } >; export default function MyExpanderItem( props: MyExpanderItemProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives Icon 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Icon, IconProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type IconPrimitiveOverridesProps = { IconPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type IconPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: IconPrimitiveOverridesProps | undefined | null; } >; export default function IconPrimitive( props: IconPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives Icon with lower-cased type \`object\` for values 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Icon, IconProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type IconPrimitiveWithLowerCasedTypeOverridesProps = { IconPrimitiveWithLowerCasedType?: PrimitiveOverrideProps; } & EscapeHatchProps; export type IconPrimitiveWithLowerCasedTypeProps = React.PropsWithChildren< Partial & { overrides?: | IconPrimitiveWithLowerCasedTypeOverridesProps | undefined | null; } >; export default function IconPrimitiveWithLowerCasedType( props: IconPrimitiveWithLowerCasedTypeProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives Menu 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Menu, MenuItem, MenuItemProps, MenuProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type MenuPrimitiveOverridesProps = { MenuPrimitive?: PrimitiveOverrideProps; MyMenuItem?: PrimitiveOverrideProps; } & EscapeHatchProps; export type MenuPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: MenuPrimitiveOverridesProps | undefined | null; } >; export default function MenuPrimitive( props: MenuPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives MenuButton 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { ButtonProps, MenuButton, MenuButtonProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type MenuButtonPrimitiveOverridesProps = { MenuButtonPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type MenuButtonPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: MenuButtonPrimitiveOverridesProps | undefined | null; } >; export default function MenuButtonPrimitive( props: MenuButtonPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives SliderField 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { SliderField, SliderFieldProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type SliderFieldPrimitiveOverridesProps = { SliderFieldPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type SliderFieldPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: SliderFieldPrimitiveOverridesProps | undefined | null; } >; export default function SliderFieldPrimitive( props: SliderFieldPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives Table 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableFoot, TableFootProps, TableHead, TableHeadProps, TableProps, TableRow, TableRowProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TablePrimitiveOverridesProps = { TablePrimitive?: PrimitiveOverrideProps; MyTableHead?: PrimitiveOverrideProps; MyTableRow?: PrimitiveOverrideProps; MyTableCellCitrus?: PrimitiveOverrideProps; MyTableCellStoneFruit?: PrimitiveOverrideProps; MyTableCellBerry?: PrimitiveOverrideProps; MyTableBody?: PrimitiveOverrideProps; TableRow1?: PrimitiveOverrideProps; TableCell11?: PrimitiveOverrideProps; TableCell12?: PrimitiveOverrideProps; TableCell13?: PrimitiveOverrideProps; TableRow2?: PrimitiveOverrideProps; TableCell21?: PrimitiveOverrideProps; TableCell22?: PrimitiveOverrideProps; TableCell23?: PrimitiveOverrideProps; TableRow3?: PrimitiveOverrideProps; TableCell31?: PrimitiveOverrideProps; TableCell32?: PrimitiveOverrideProps; TableCell33?: PrimitiveOverrideProps; MyTableFoot?: PrimitiveOverrideProps; TableRowFoot?: PrimitiveOverrideProps; TableCellFoot1?: PrimitiveOverrideProps; TableCellFoot2?: PrimitiveOverrideProps; TableCellFoot3?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TablePrimitiveProps = React.PropsWithChildren< Partial & { overrides?: TablePrimitiveOverridesProps | undefined | null; } >; export default function TablePrimitive( props: TablePrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */
); } " `; exports[`amplify render tests primitives TextAreaField 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { TextAreaField, TextAreaFieldProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TextAreaFieldPrimitiveOverridesProps = { TextAreaFieldPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TextAreaFieldPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: TextAreaFieldPrimitiveOverridesProps | undefined | null; } >; export default function TextAreaFieldPrimitive( props: TextAreaFieldPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests primitives TextField 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { TextField, TextFieldProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type TextFieldPrimitiveOverridesProps = { TextFieldPrimitive?: PrimitiveOverrideProps; } & EscapeHatchProps; export type TextFieldPrimitiveProps = React.PropsWithChildren< Partial> & { overrides?: TextFieldPrimitiveOverridesProps | undefined | null; } >; export default function TextFieldPrimitive( props: TextFieldPrimitiveProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests renderer configurations with NoApi should render component without data binding successfully 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type CustomButtonOverridesProps = { CustomButton?: PrimitiveOverrideProps; } & EscapeHatchProps; export type CustomButtonProps = React.PropsWithChildren< Partial & { overrides?: CustomButtonOverridesProps | undefined | null; } >; export default function CustomButton( props: CustomButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests sample code snippet tests should generate a sample code snippet for components 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import CustomButton, { CustomButtonProps } from \\"./CustomButton\\"; import { View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ViewWithButtonOverridesProps = { ViewWithButton?: PrimitiveOverrideProps; MyCustomButton?: CustomButtonProps; } & EscapeHatchProps; export type ViewWithButtonProps = React.PropsWithChildren< Partial & { overrides?: ViewWithButtonOverridesProps | undefined | null; } >; export default function ViewWithButton( props: ViewWithButtonProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } " `; exports[`amplify render tests should render events 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import { Flex, FlexProps, Text, TextField, TextFieldProps, TextProps, } from \\"@aws-amplify/ui-react\\"; import { SyntheticEvent } from \\"react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type EventsOverridesProps = { Events?: PrimitiveOverrideProps; GenericEvents?: PrimitiveOverrideProps; onClick?: PrimitiveOverrideProps; onDoubleClick?: PrimitiveOverrideProps; onMouseDown?: PrimitiveOverrideProps; onMouseEnter?: PrimitiveOverrideProps; onMouseLeave?: PrimitiveOverrideProps; onMouseMove?: PrimitiveOverrideProps; onMouseOut?: PrimitiveOverrideProps; onMouseOver?: PrimitiveOverrideProps; onMouseUp?: PrimitiveOverrideProps; FieldEvents?: PrimitiveOverrideProps; onChange?: PrimitiveOverrideProps; onInput?: PrimitiveOverrideProps; onFocus?: PrimitiveOverrideProps; onBlur?: PrimitiveOverrideProps; onKeyDown?: PrimitiveOverrideProps; onKeyPress?: PrimitiveOverrideProps; onKeyUp?: PrimitiveOverrideProps; } & EscapeHatchProps; export type EventsProps = React.PropsWithChildren< Partial & { onClick?: (event: SyntheticEvent) => void; onDoubleClick?: (event: SyntheticEvent) => void; onMouseDown?: (event: SyntheticEvent) => void; onMouseEnter?: (event: SyntheticEvent) => void; onMouseLeave?: (event: SyntheticEvent) => void; onMouseMove?: (event: SyntheticEvent) => void; onMouseOut?: (event: SyntheticEvent) => void; onMouseOver?: (event: SyntheticEvent) => void; onMouseUp?: (event: SyntheticEvent) => void; onChange?: (event: SyntheticEvent) => void; onInput?: (event: SyntheticEvent) => void; onFocus?: (event: SyntheticEvent) => void; onBlur?: (event: SyntheticEvent) => void; onKeyDown?: (event: SyntheticEvent) => void; onKeyPress?: (event: SyntheticEvent) => void; onKeyUp?: (event: SyntheticEvent) => void; } & { overrides?: EventsOverridesProps | undefined | null; } >; export default function Events(props: EventsProps): React.ReactElement { const { onClick, onDoubleClick, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onChange, onInput, onFocus, onBlur, onKeyDown, onKeyPress, onKeyUp, overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests should render parsed fixed values 1`] = ` Object { "componentText": "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, } from \\"@aws-amplify/ui-react/internal\\"; import Input, { InputProps } from \\"./Input\\"; import { View, ViewProps } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ParsedFixedValuesOverridesProps = { ParsedFixedValues?: PrimitiveOverrideProps; MyInputString?: InputProps; MyInputNumber?: InputProps; MyInputParsedNumber?: InputProps; MyInputBoolean?: InputProps; MyInputPrasedBoolean?: InputProps; MyInputJson?: InputProps; MyInputParsedJson?: InputProps; MyInputArray?: InputProps; MyInputParsedArray?: InputProps; MyInputNull?: InputProps; MyInputParsedNull?: InputProps; } & EscapeHatchProps; export type ParsedFixedValuesProps = React.PropsWithChildren< Partial & { overrides?: ParsedFixedValuesOverridesProps | undefined | null; } >; export default function ParsedFixedValues( props: ParsedFixedValuesProps ): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } ", "declaration": undefined, "renderComponentToFilesystem": [Function], } `; exports[`amplify render tests source maps should render inline source maps 1`] = ` "var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === \\"function\\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if ( e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) ) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable */ import * as React from \\"react\\"; import { getOverrideProps, useAuth } from \\"@aws-amplify/ui-react/internal\\"; import { Button, Flex, Image } from \\"@aws-amplify/ui-react\\"; export default function Profile(props) { var _a, _b; const { overrides } = props, rest = __rest(props, [\\"overrides\\"]); const authAttributes = (_b = (_a = useAuth().user) === null || _a === void 0 ? void 0 : _a.attributes) !== null && _b !== void 0 ? _b : {}; return React.createElement( Flex, Object.assign({}, getOverrideProps(overrides, \\"Profile\\"), rest), React.createElement( Image, Object.assign( { src: authAttributes[\\"username\\"] }, getOverrideProps(overrides, \\"child1\\") ) ), React.createElement( Button, Object.assign( { children: authAttributes[\\"picture\\"] }, getOverrideProps(overrides, \\"child2\\") ) ), React.createElement( Button, Object.assign( { children: authAttributes[\\"custom:favorite_icecream\\"] }, getOverrideProps(overrides, \\"child3\\") ) ) ); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibW9kdWxlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLG9CQUFvQjtBQUNwQixPQUFPLEtBQUssS0FBSyxNQUFNLE9BQU8sQ0FBQztBQUMvQixPQUFPLEVBQW9CLGdCQUFnQixFQUFFLE9BQU8sRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQzdGLE9BQU8sRUFBRSxNQUFNLEVBQWUsSUFBSSxFQUFhLEtBQUssRUFBYyxNQUFNLHVCQUF1QixDQUFDO0FBVWhHLE1BQU0sQ0FBQyxPQUFPLFVBQVUsT0FBTyxDQUFDLEtBQW1COztJQUMvQyxNQUFNLEVBQUUsU0FBUyxLQUFjLEtBQUssRUFBZCxJQUFJLFVBQUssS0FBSyxFQUE5QixhQUFzQixDQUFRLENBQUM7SUFDckMsTUFBTSxjQUFjLEdBQUcsTUFBQSxNQUFBLE9BQU8sRUFBRSxDQUFDLElBQUksMENBQUUsVUFBVSxtQ0FBSSxFQUFFLENBQUM7SUFDeEQsT0FBTyxDQUFDLG9CQUFDLElBQUksb0JBQUssZ0JBQWdCLENBQUMsU0FBUyxFQUFFLFNBQVMsQ0FBQyxFQUFNLElBQUk7UUFBRSxvQkFBQyxLQUFLLGtCQUFDLEdBQUcsRUFBRSxjQUFjLENBQUMsVUFBVSxDQUFDLElBQU0sZ0JBQWdCLENBQUMsU0FBUyxFQUFFLFFBQVEsQ0FBQyxFQUFVO1FBQUEsb0JBQUMsTUFBTSxrQkFBQyxRQUFRLEVBQUUsY0FBYyxDQUFDLFNBQVMsQ0FBQyxJQUFNLGdCQUFnQixDQUFDLFNBQVMsRUFBRSxRQUFRLENBQUMsRUFBVztRQUFBLG9CQUFDLE1BQU0sa0JBQUMsUUFBUSxFQUFFLGNBQWMsQ0FBQywwQkFBMEIsQ0FBQyxJQUFNLGdCQUFnQixDQUFDLFNBQVMsRUFBRSxRQUFRLENBQUMsRUFBVyxDQUFPLENBQUMsQ0FBQztBQUMvWCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgKi9cbmltcG9ydCAqIGFzIFJlYWN0IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHsgRXNjYXBlSGF0Y2hQcm9wcywgZ2V0T3ZlcnJpZGVQcm9wcywgdXNlQXV0aCB9IGZyb20gXCJAYXdzLWFtcGxpZnkvdWktcmVhY3QvaW50ZXJuYWxcIjtcbmltcG9ydCB7IEJ1dHRvbiwgQnV0dG9uUHJvcHMsIEZsZXgsIEZsZXhQcm9wcywgSW1hZ2UsIEltYWdlUHJvcHMgfSBmcm9tIFwiQGF3cy1hbXBsaWZ5L3VpLXJlYWN0XCI7XG5cbmV4cG9ydCBkZWNsYXJlIHR5cGUgUHJpbWl0aXZlT3ZlcnJpZGVQcm9wczxUPiA9IFBhcnRpYWw8VD4gJiBSZWFjdC5ET01BdHRyaWJ1dGVzPEhUTUxEaXZFbGVtZW50PjtleHBvcnQgZGVjbGFyZSB0eXBlIFByb2ZpbGVPdmVycmlkZXNQcm9wcyA9IHtcbiAgICBQcm9maWxlPzogUHJpbWl0aXZlT3ZlcnJpZGVQcm9wczxGbGV4UHJvcHM+O1xuICAgIGNoaWxkMT86IFByaW1pdGl2ZU92ZXJyaWRlUHJvcHM8SW1hZ2VQcm9wcz47XG4gICAgY2hpbGQyPzogUHJpbWl0aXZlT3ZlcnJpZGVQcm9wczxCdXR0b25Qcm9wcz47XG4gICAgY2hpbGQzPzogUHJpbWl0aXZlT3ZlcnJpZGVQcm9wczxCdXR0b25Qcm9wcz47XG59ICYgRXNjYXBlSGF0Y2hQcm9wcztleHBvcnQgdHlwZSBQcm9maWxlUHJvcHMgPSBSZWFjdC5Qcm9wc1dpdGhDaGlsZHJlbjxQYXJ0aWFsPEZsZXhQcm9wcz4gJiB7XG4gICAgb3ZlcnJpZGVzPzogUHJvZmlsZU92ZXJyaWRlc1Byb3BzIHwgdW5kZWZpbmVkIHwgbnVsbDtcbn0+O1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gUHJvZmlsZShwcm9wczogUHJvZmlsZVByb3BzKTogUmVhY3QuUmVhY3RFbGVtZW50IHtcbiAgICBjb25zdCB7IG92ZXJyaWRlcywgLi4ucmVzdCB9ID0gcHJvcHM7XG4gICAgY29uc3QgYXV0aEF0dHJpYnV0ZXMgPSB1c2VBdXRoKCkudXNlcj8uYXR0cmlidXRlcyA/PyB7fTtcbiAgICByZXR1cm4gKDxGbGV4IHsuLi5nZXRPdmVycmlkZVByb3BzKG92ZXJyaWRlcywgXCJQcm9maWxlXCIpfSB7Li4ucmVzdH0+PEltYWdlIHNyYz17YXV0aEF0dHJpYnV0ZXNbXCJ1c2VybmFtZVwiXX0gey4uLmdldE92ZXJyaWRlUHJvcHMob3ZlcnJpZGVzLCBcImNoaWxkMVwiKX0+PC9JbWFnZT48QnV0dG9uIGNoaWxkcmVuPXthdXRoQXR0cmlidXRlc1tcInBpY3R1cmVcIl19IHsuLi5nZXRPdmVycmlkZVByb3BzKG92ZXJyaWRlcywgXCJjaGlsZDJcIil9PjwvQnV0dG9uPjxCdXR0b24gY2hpbGRyZW49e2F1dGhBdHRyaWJ1dGVzW1wiY3VzdG9tOmZhdm9yaXRlX2ljZWNyZWFtXCJdfSB7Li4uZ2V0T3ZlcnJpZGVQcm9wcyhvdmVycmlkZXMsIFwiY2hpbGQzXCIpfT48L0J1dHRvbj48L0ZsZXg+KTtcbn0iXX0= " `; exports[`amplify render tests user specific attributes should render user specific attributes 1`] = ` "/* eslint-disable */ import * as React from \\"react\\"; import { EscapeHatchProps, getOverrideProps, useAuth, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, ButtonProps, Flex, FlexProps, Image, ImageProps, } from \\"@aws-amplify/ui-react\\"; export declare type PrimitiveOverrideProps = Partial & React.DOMAttributes; export declare type ProfileOverridesProps = { Profile?: PrimitiveOverrideProps; child1?: PrimitiveOverrideProps; child2?: PrimitiveOverrideProps; child3?: PrimitiveOverrideProps; } & EscapeHatchProps; export type ProfileProps = React.PropsWithChildren< Partial & { overrides?: ProfileOverridesProps | undefined | null; } >; export default function Profile(props: ProfileProps): React.ReactElement { const { overrides, ...rest } = props; const authAttributes = useAuth().user?.attributes ?? {}; return ( /* @ts-ignore: TS2322 */ ); } " `;