UNPKG

@asgardeo/react

Version:
64 lines (63 loc) 1.97 kB
/** * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import { FC, ReactElement } from 'react'; import { User } from '@asgardeo/browser'; interface ExtendedFlatSchema { schemaId?: string; path?: string; } interface Schema extends ExtendedFlatSchema { caseExact?: boolean; description?: string; displayName?: string; displayOrder?: string; multiValued?: boolean; mutability?: string; name?: string; required?: boolean; returned?: string; type?: string; uniqueness?: string; value?: any; subAttributes?: Schema[]; } export interface BaseUserProfileProps { fallback?: ReactElement; className?: string; cardLayout?: boolean; profile?: User; flattenedProfile?: User; schemas?: Schema[]; mode?: 'inline' | 'popup'; title?: string; attributeMapping?: { picture?: string | string[]; firstName?: string | string[]; lastName?: string | string[]; username?: string | string[]; [key: string]: string | string[] | undefined; }; editable?: boolean; onChange?: (field: string, value: any) => void; onSubmit?: (data: any) => void; saveButtonText?: string; cancelButtonText?: string; onUpdate?: (payload: any) => Promise<void>; } declare const BaseUserProfile: FC<BaseUserProfileProps>; export default BaseUserProfile;