@supertokens-plugins/profile-details-react
Type Aliases
AccountDetails
type AccountDetails = {
connectedAccounts: ConnectedAccount[];
emails: string[];
phoneNumbers: string[];
timeJoined: number;
};
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:24
Properties
ConnectedAccount
type ConnectedAccount = {
email: string;
provider: string;
};
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:31
Properties
FieldViewComponentProps<T>
type FieldViewComponentProps<T> = {
className?: string;
options?: BaseFormSection["options"];
value: T;
};
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:15
Type Parameters
Properties
FormInputComponentMap
type FormInputComponentMap = Record<BaseFormSection, React.FC<BaseFormSection<any>>>;
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:20
FormViewComponentMap
type FormViewComponentMap = Omit<Record<BaseFormSection, React.FC<FieldViewComponentProps<any>>>, "password">;
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:21
ProfileDetails
type ProfileDetails = Record<string, string | number | boolean | null | undefined>;
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:23
SuperTokensPluginProfileDetailsConfig
type SuperTokensPluginProfileDetailsConfig = undefined;
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:6
SuperTokensPluginProfileDetailsImplementation
type SuperTokensPluginProfileDetailsImplementation = {
fieldInputComponentMap: (componentMap: FormInputComponentMap) => FormInputComponentMap;
fieldViewComponentMap: (componentMap: FormViewComponentMap) => FormViewComponentMap;
};
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:9
Properties
SuperTokensPluginProfileDetailsNormalisedConfig
type SuperTokensPluginProfileDetailsNormalisedConfig = undefined;
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:7
TranslationKeys
type TranslationKeys = keyof typeof defaultTranslationsCommonDetails["en"];
Defined in: supertokens-plugins/packages/profile-details-react/src/types.ts:14
Variables
API_PATH
const API_PATH: "plugin/supertokens-plugin-profile-details";
Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:34
default
default: {
init: any;
PLUGIN_ID: string;
PLUGIN_VERSION: string;
usePluginContext: any;
};
Defined in: supertokens-plugins/packages/profile-details-react/src/index.ts:5
Type Declaration
defaultTranslationsCommonDetails
const defaultTranslationsCommonDetails: {
en: {
PL_CD_DISABLED: "Disabled";
PL_CD_ENABLED: "Enabled";
PL_CD_IMAGE_ALT: "Preview";
PL_CD_LOADING: "Loading...";
PL_CD_NO: "No";
PL_CD_NO_EMAIL: "No email";
PL_CD_NO_IMAGE: "No image";
PL_CD_NO_PHONE: "No phone";
PL_CD_NO_URL: "No URL";
PL_CD_NONE_SELECTED: "None selected";
PL_CD_NOT_PROVIDED: "Not provided";
PL_CD_SECTION_ACCOUNT_DESCRIPTION: "Here you can find all your account details that can be used for login.";
PL_CD_SECTION_ACCOUNT_EMAIL_NO_EMAILS: "No email addresse";
PL_CD_SECTION_ACCOUNT_EMAILS: "Email addresses";
PL_CD_SECTION_ACCOUNT_ERROR_FETCHING_DETAILS: "Error getting the profile";
PL_CD_SECTION_ACCOUNT_LABEL: "Account";
PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS: "Phone numbers";
PL_CD_SECTION_ACCOUNT_PHONE_NUMBERS_NO_PHONE_NUMBERS: "No phone number";
PL_CD_SECTION_ACCOUNT_TIME_JOINED: "Join date";
PL_CD_SECTION_ACCOUNT_TIME_JOINED_NO_TIME_JOINED: "No join date";
PL_CD_SECTION_DETAILS_CANCEL_BUTTON: "Cancel";
PL_CD_SECTION_DETAILS_EDIT_BUTTON: "Edit";
PL_CD_SECTION_DETAILS_ERROR_FETCHING_DETAILS: "Error getting the profile";
PL_CD_SECTION_DETAILS_SAVE_BUTTON: "Save";
PL_CD_YES: "Yes";
};
};
Defined in: supertokens-plugins/packages/profile-details-react/src/translations.ts:1
Type Declaration
enableDebugLogs
enableDebugLogs: any;
Defined in: supertokens-plugins/packages/profile-details-react/src/logger.ts:5
FIELD_INPUT_COMPONENT_MAP
const FIELD_INPUT_COMPONENT_MAP: FormInputComponentMap;
Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:36
FIELD_VIEW_COMPONENT_MAP
const FIELD_VIEW_COMPONENT_MAP: FormViewComponentMap;
Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:63
init
const init: any;
Defined in: supertokens-plugins/packages/profile-details-react/src/plugin.ts:39
logDebugMessage
logDebugMessage: any;
Defined in: supertokens-plugins/packages/profile-details-react/src/logger.ts:5
PLUGIN_ID
const PLUGIN_ID: "supertokens-plugin-profile-details" = "supertokens-plugin-profile-details";
Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:31
PLUGIN_VERSION
const PLUGIN_VERSION: "0.0.1" = "0.0.1";
Defined in: supertokens-plugins/packages/profile-details-react/src/constants.ts:32
usePluginContext
usePluginContext: any;
Defined in: supertokens-plugins/packages/profile-details-react/src/plugin.ts:26
Functions
AccountDetailsSection()
function AccountDetailsSection(__namedParameters: {
onFetch: () => Promise<{
profile: Record<string, any>;
user: User;
}>;
}): Element;
Parameters
Returns
Element
AccountSectionWrapper()
function AccountSectionWrapper(): Element;
Defined in: supertokens-plugins/packages/profile-details-react/src/account-section-wrapper.tsx:7
Returns
Element
BooleanFieldViewComponent()
function BooleanFieldViewComponent(__namedParameters: FieldViewComponentProps<boolean>): Element;
Parameters
Returns
Element
DateFieldViewComponent()
function DateFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;
Parameters
Returns
Element
DefaultFieldViewComponent()
function DefaultFieldViewComponent(__namedParameters: FieldViewComponentProps): Element;
Parameters
Returns
Element
DetailsSectionContent()
function DetailsSectionContent(__namedParameters: {
onFetch: () => Promise<{
profile: Record<string, any>;
user: User;
}>;
onSubmit: (data: BaseFormFieldPayload[]) => Promise<any>;
section: BaseFormSection;
}): Element;
Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/details-section.tsx:15
Parameters
Returns
Element
DetailsSectionWrapper()
function DetailsSectionWrapper(__namedParameters: {
section: BaseFormSection;
}): Element;
Defined in: supertokens-plugins/packages/profile-details-react/src/details-section-wrapper.tsx:8
Parameters
Returns
Element
EmailFieldViewComponent()
function EmailFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;
Parameters
Returns
Element
FieldView()
function FieldView(__namedParameters: FieldViewComponentProps<FormFieldValue> & {
componentMap: FormViewComponentMap;
type: any;
}): Element;
Parameters
Returns
Element
getApi()
function getApi(querier: any): {
getDetails: () => Promise<any>;
getSections: () => Promise<any>;
updateProfile: (payload: {
data: BaseFormFieldPayload[];
}) => Promise<any>;
};
Defined in: supertokens-plugins/packages/profile-details-react/src/api.ts:7
Parameters
Returns
{
getDetails: () => Promise<any>;
getSections: () => Promise<any>;
updateProfile: (payload: {
data: BaseFormFieldPayload[];
}) => Promise<any>;
}
ImageUrlFieldViewComponent()
function ImageUrlFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;
Parameters
Returns
Element
MultiselectFieldViewComponent()
function MultiselectFieldViewComponent(__namedParameters: FieldViewComponentProps<string[]>): Element;
Parameters
Returns
Element
PhoneFieldViewComponent()
function PhoneFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;
Parameters
Returns
Element
SectionEdit()
function SectionEdit(__namedParameters: {
fields: any;
id: any;
onCancel: any;
onSubmit: any;
values: any;
}): Element;
Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/section-edit.tsx:12
Parameters
Returns
Element
SectionView()
function SectionView(__namedParameters: {
fields: any;
onEdit: any;
values: any;
}): Element;
Defined in: supertokens-plugins/packages/profile-details-react/src/components/details-section/section-view.tsx:11
Parameters
Returns
Element
SelectFieldViewComponent()
function SelectFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;
Parameters
Returns
Element
ToggleFieldViewComponent()
function ToggleFieldViewComponent(__namedParameters: FieldViewComponentProps<boolean>): Element;
Parameters
Returns
Element
UrlFieldViewComponent()
function UrlFieldViewComponent(__namedParameters: FieldViewComponentProps<string>): Element;
Parameters
Returns
Element