From 0a7933685c237d03169541f1a6b431040cf9c617 Mon Sep 17 00:00:00 2001 From: amitbadala Date: Tue, 7 Nov 2023 14:47:47 +0530 Subject: [PATCH] Revert "Reset password now supports getDefaultValue" This reverts commit be4c00a024401d093a5b80033a6c3e7ea9839cb1. --- lib/build/emailpassword-shared4.js | 9 +-------- lib/build/recipe/emailpassword/types.d.ts | 4 +--- lib/ts/recipe/emailpassword/types.ts | 4 +--- lib/ts/recipe/emailpassword/utils.ts | 1 - 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/build/emailpassword-shared4.js b/lib/build/emailpassword-shared4.js index 2bcac4ce7..e3070936a 100644 --- a/lib/build/emailpassword-shared4.js +++ b/lib/build/emailpassword-shared4.js @@ -275,7 +275,6 @@ function getDefaultPasswordFormField() { }; } function normaliseResetPasswordUsingTokenFeature(signUpPasswordFieldValidate, signUpEmailField, config) { - var _a; if (config === undefined) { config = {}; } @@ -314,13 +313,7 @@ function normaliseResetPasswordUsingTokenFeature(signUpPasswordFieldValidate, si formFields: [ genericComponentOverrideContext.__assign( genericComponentOverrideContext.__assign({}, getDefaultEmailFormField()), - { - validate: signUpEmailField.validate, - placeholder: "", - autofocus: true, - getDefaultValue: - (_a = config.enterEmailForm) === null || _a === void 0 ? void 0 : _a.getDefaultValue, - } + { validate: signUpEmailField.validate, placeholder: "", autofocus: true } ), ], }; diff --git a/lib/build/recipe/emailpassword/types.d.ts b/lib/build/recipe/emailpassword/types.d.ts index b87dbee45..d1cb6e9ea 100644 --- a/lib/build/recipe/emailpassword/types.d.ts +++ b/lib/build/recipe/emailpassword/types.d.ts @@ -100,9 +100,7 @@ export declare type FormFieldSignInConfig = FormFieldBaseConfig; export declare type ResetPasswordUsingTokenUserInput = { disableDefaultUI?: boolean; submitNewPasswordForm?: FeatureBaseConfig; - enterEmailForm?: FeatureBaseConfig & { - getDefaultValue?: () => string; - }; + enterEmailForm?: FeatureBaseConfig; }; export declare type NormalisedResetPasswordUsingTokenFeatureConfig = { disableDefaultUI: boolean; diff --git a/lib/ts/recipe/emailpassword/types.ts b/lib/ts/recipe/emailpassword/types.ts index d65b31dd5..5ffe5b3d1 100644 --- a/lib/ts/recipe/emailpassword/types.ts +++ b/lib/ts/recipe/emailpassword/types.ts @@ -198,9 +198,7 @@ export type ResetPasswordUsingTokenUserInput = { /* * enterEmailForm config. */ - enterEmailForm?: FeatureBaseConfig & { - getDefaultValue?: () => string; - }; + enterEmailForm?: FeatureBaseConfig; }; export type NormalisedResetPasswordUsingTokenFeatureConfig = { diff --git a/lib/ts/recipe/emailpassword/utils.ts b/lib/ts/recipe/emailpassword/utils.ts index 97b96625e..6220af0c5 100644 --- a/lib/ts/recipe/emailpassword/utils.ts +++ b/lib/ts/recipe/emailpassword/utils.ts @@ -266,7 +266,6 @@ export function normaliseResetPasswordUsingTokenFeature( validate: signUpEmailField.validate, placeholder: "", autofocus: true, - getDefaultValue: config.enterEmailForm?.getDefaultValue, }, ], };