@intlayer/design-system 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +10 -10
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +3 -3
- package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +6 -6
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +6 -6
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.cjs +7 -7
- package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +7 -7
- package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +1 -1
- package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs +8 -8
- package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +8 -8
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +1 -1
- package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.cjs.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.d.ts.map +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs +1 -1
- package/dist/components/Auth/VerifyEmailForm/VerifyEmailForm.mjs.map +1 -1
- package/dist/components/Breadcrumb/index.cjs.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/components/Breadcrumb/index.mjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +4 -4
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +4 -4
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +6 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +22 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +22 -17
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +10 -4
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +10 -4
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +6 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +6 -6
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +59 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +4 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +59 -14
- package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
- package/dist/components/IDE/CopyButton.cjs +1 -1
- package/dist/components/IDE/CopyButton.cjs.map +1 -1
- package/dist/components/IDE/CopyButton.d.ts.map +1 -1
- package/dist/components/IDE/CopyButton.mjs +1 -1
- package/dist/components/IDE/CopyButton.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +5 -5
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +5 -5
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +6 -6
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +3 -3
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +3 -3
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
- package/dist/{index-Di_3dNqI.js → index-BVYRWLUL.js} +3 -2
- package/dist/index-BVYRWLUL.js.map +1 -0
- package/dist/{index-ZARcTrR0.cjs → index-DTQyeqio.cjs} +3 -2
- package/dist/index-DTQyeqio.cjs.map +1 -0
- package/package.json +17 -17
- package/dist/index-Di_3dNqI.js.map +0 -1
- package/dist/index-ZARcTrR0.cjs.map +0 -1
package/dist/.vite/manifest.json
CHANGED
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
"src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
+
"_index-BVYRWLUL.js": {
|
|
65
|
+
"file": "index-BVYRWLUL.js",
|
|
66
|
+
"name": "index"
|
|
67
|
+
},
|
|
64
68
|
"_index-Cg-S9ry9.cjs": {
|
|
65
69
|
"file": "index-Cg-S9ry9.cjs",
|
|
66
70
|
"name": "index",
|
|
@@ -79,8 +83,8 @@
|
|
|
79
83
|
"src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"
|
|
80
84
|
]
|
|
81
85
|
},
|
|
82
|
-
"_index-
|
|
83
|
-
"file": "index-
|
|
86
|
+
"_index-DTQyeqio.cjs": {
|
|
87
|
+
"file": "index-DTQyeqio.cjs",
|
|
84
88
|
"name": "index"
|
|
85
89
|
},
|
|
86
90
|
"_index-O_7rYrbW.js": {
|
|
@@ -91,10 +95,6 @@
|
|
|
91
95
|
"src/hooks/useScrollBlockage/useScrollBlockageStore.ts"
|
|
92
96
|
]
|
|
93
97
|
},
|
|
94
|
-
"_index-ZARcTrR0.cjs": {
|
|
95
|
-
"file": "index-ZARcTrR0.cjs",
|
|
96
|
-
"name": "index"
|
|
97
|
-
},
|
|
98
98
|
"_jsx-runtime-CgFM7lM3.cjs": {
|
|
99
99
|
"file": "jsx-runtime-CgFM7lM3.cjs",
|
|
100
100
|
"name": "jsx-runtime"
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"isEntry": true,
|
|
244
244
|
"imports": [
|
|
245
245
|
"_jsx-runtime-CgFM7lM3.cjs",
|
|
246
|
-
"_index-
|
|
246
|
+
"_index-DTQyeqio.cjs",
|
|
247
247
|
"src/components/Button/Button.tsx",
|
|
248
248
|
"src/components/Auth/ExternalsLoginButtons/assets/GithubLogo.tsx",
|
|
249
249
|
"src/components/Auth/ExternalsLoginButtons/assets/GoogleLogo.tsx",
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
"imports": [
|
|
839
839
|
"_jsx-runtime-CgFM7lM3.cjs",
|
|
840
840
|
"src/hooks/intlayerAPIHooks.ts",
|
|
841
|
-
"_index-
|
|
841
|
+
"_index-DTQyeqio.cjs",
|
|
842
842
|
"src/components/Button/Button.tsx",
|
|
843
843
|
"src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
|
|
844
844
|
"src/components/Form/FormBase.tsx",
|
|
@@ -894,7 +894,7 @@
|
|
|
894
894
|
"src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
|
|
895
895
|
"src/hooks/useAsync/useAsyncStateStore.tsx",
|
|
896
896
|
"src/hooks/intlayerAPIHooks.ts",
|
|
897
|
-
"_index-
|
|
897
|
+
"_index-DTQyeqio.cjs",
|
|
898
898
|
"src/components/Button/Button.tsx",
|
|
899
899
|
"src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
|
|
900
900
|
"src/components/Form/FormBase.tsx",
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
"src/hooks/useAsync/useAsyncStateStore.tsx",
|
|
1103
1103
|
"src/hooks/intlayerAPIHooks.ts",
|
|
1104
1104
|
"src/hooks/useGetAllDictionaries.tsx",
|
|
1105
|
-
"_index-
|
|
1105
|
+
"_index-DTQyeqio.cjs",
|
|
1106
1106
|
"src/components/Button/Button.tsx",
|
|
1107
1107
|
"src/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.ts",
|
|
1108
1108
|
"src/components/Form/FormBase.tsx",
|
|
@@ -50,8 +50,8 @@ const ChangePasswordForm = ({
|
|
|
50
50
|
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
51
51
|
{
|
|
52
52
|
name: "currentPassword",
|
|
53
|
-
label: currentPasswordInput.label,
|
|
54
|
-
placeholder: currentPasswordInput.placeholder,
|
|
53
|
+
label: currentPasswordInput.label.value,
|
|
54
|
+
placeholder: currentPasswordInput.placeholder.value,
|
|
55
55
|
autoComplete: "current-password",
|
|
56
56
|
isRequired: true
|
|
57
57
|
}
|
|
@@ -60,8 +60,8 @@ const ChangePasswordForm = ({
|
|
|
60
60
|
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
61
61
|
{
|
|
62
62
|
name: "newPassword",
|
|
63
|
-
label: newPasswordInput.label,
|
|
64
|
-
placeholder: newPasswordInput.placeholder,
|
|
63
|
+
label: newPasswordInput.label.value,
|
|
64
|
+
placeholder: newPasswordInput.placeholder.value,
|
|
65
65
|
autoComplete: "new-password",
|
|
66
66
|
isRequired: true
|
|
67
67
|
}
|
|
@@ -70,8 +70,8 @@ const ChangePasswordForm = ({
|
|
|
70
70
|
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
71
71
|
{
|
|
72
72
|
name: "newPasswordConfirmation",
|
|
73
|
-
label: confirmPasswordInput.label,
|
|
74
|
-
placeholder: confirmPasswordInput.placeholder,
|
|
73
|
+
label: confirmPasswordInput.label.value,
|
|
74
|
+
placeholder: confirmPasswordInput.placeholder.value,
|
|
75
75
|
autoComplete: "new-password",
|
|
76
76
|
isRequired: true
|
|
77
77
|
}
|
|
@@ -86,17 +86,17 @@ const ChangePasswordForm = ({
|
|
|
86
86
|
isLoading: isSubmitting,
|
|
87
87
|
disabled: !isValid,
|
|
88
88
|
variant: isSubmitted ? "outline" : "default",
|
|
89
|
-
label: changePasswordButton.ariaLabel,
|
|
90
|
-
children: changePasswordButton.text
|
|
89
|
+
label: changePasswordButton.ariaLabel.value,
|
|
90
|
+
children: changePasswordButton.text.value
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
93
|
isSubmitted && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
94
94
|
components_Form_layout_FormItemLayout.Form.Button,
|
|
95
95
|
{
|
|
96
96
|
className: "mt-4 w-full",
|
|
97
|
-
label: backToHomeButton.ariaLabel,
|
|
97
|
+
label: backToHomeButton.ariaLabel.value,
|
|
98
98
|
onClick: onClickBackToHome,
|
|
99
|
-
children: backToHomeButton.text
|
|
99
|
+
children: backToHomeButton.text.value
|
|
100
100
|
}
|
|
101
101
|
)
|
|
102
102
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\nimport { changePasswordContent } from './changePasswordForm.content';\nimport {\n useChangePasswordSchema,\n type ChangePassword,\n} from './useChangePasswordSchema';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = useDictionary(changePasswordContent);\n const { user } = useUser();\n const ChangePasswordSchema = useChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label.value}\n placeholder={currentPasswordInput.placeholder.value}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label.value}\n placeholder={newPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label.value}\n placeholder={confirmPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel.value}\n >\n {changePasswordButton.text.value}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel.value}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text.value}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["useDictionary","changePasswordContent","useUser","useChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;;;AAgBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEA,cAAAA,cAAcC,8DAAAA,qBAAqB;AACjC,QAAA,EAAE,KAAK,IAAIC,sCAAQ;AACzB,QAAM,uBAAuBC,2DAAAA,wBAAwB;AAErD,QAAM,EAAE,MAAM,cAAc,aAAa,QAAQ,IAC/CC,iCAAQ,oBAAoB;AAG5B,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACD,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAE,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,OAAO,MAAM,SAAS;AAAA,cACtB,cAAa;AAAA,cACb,UAAQ;AAAA,cACR,QAAM;AAAA,cACN,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB,MAAM;AAAA,cAC9B,aAAa,iBAAiB,YAAY;AAAA,cAC1C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ,GACF;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB,UAAU;AAAA,YAErC,+BAAqB,KAAK;AAAA,UAAA;AAAA,QAC7B;AAAA,QACC,eACCC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB,UAAU;AAAA,YAClC,SAAS;AAAA,YAER,2BAAiB,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACzB;AAAA,IAAA;AAAA,EAEJ;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAkF1D,CAAC"}
|
|
@@ -48,8 +48,8 @@ const ChangePasswordForm = ({
|
|
|
48
48
|
Form.InputPassword,
|
|
49
49
|
{
|
|
50
50
|
name: "currentPassword",
|
|
51
|
-
label: currentPasswordInput.label,
|
|
52
|
-
placeholder: currentPasswordInput.placeholder,
|
|
51
|
+
label: currentPasswordInput.label.value,
|
|
52
|
+
placeholder: currentPasswordInput.placeholder.value,
|
|
53
53
|
autoComplete: "current-password",
|
|
54
54
|
isRequired: true
|
|
55
55
|
}
|
|
@@ -58,8 +58,8 @@ const ChangePasswordForm = ({
|
|
|
58
58
|
Form.InputPassword,
|
|
59
59
|
{
|
|
60
60
|
name: "newPassword",
|
|
61
|
-
label: newPasswordInput.label,
|
|
62
|
-
placeholder: newPasswordInput.placeholder,
|
|
61
|
+
label: newPasswordInput.label.value,
|
|
62
|
+
placeholder: newPasswordInput.placeholder.value,
|
|
63
63
|
autoComplete: "new-password",
|
|
64
64
|
isRequired: true
|
|
65
65
|
}
|
|
@@ -68,8 +68,8 @@ const ChangePasswordForm = ({
|
|
|
68
68
|
Form.InputPassword,
|
|
69
69
|
{
|
|
70
70
|
name: "newPasswordConfirmation",
|
|
71
|
-
label: confirmPasswordInput.label,
|
|
72
|
-
placeholder: confirmPasswordInput.placeholder,
|
|
71
|
+
label: confirmPasswordInput.label.value,
|
|
72
|
+
placeholder: confirmPasswordInput.placeholder.value,
|
|
73
73
|
autoComplete: "new-password",
|
|
74
74
|
isRequired: true
|
|
75
75
|
}
|
|
@@ -84,17 +84,17 @@ const ChangePasswordForm = ({
|
|
|
84
84
|
isLoading: isSubmitting,
|
|
85
85
|
disabled: !isValid,
|
|
86
86
|
variant: isSubmitted ? "outline" : "default",
|
|
87
|
-
label: changePasswordButton.ariaLabel,
|
|
88
|
-
children: changePasswordButton.text
|
|
87
|
+
label: changePasswordButton.ariaLabel.value,
|
|
88
|
+
children: changePasswordButton.text.value
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
91
|
isSubmitted && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
92
92
|
Form.Button,
|
|
93
93
|
{
|
|
94
94
|
className: "mt-4 w-full",
|
|
95
|
-
label: backToHomeButton.ariaLabel,
|
|
95
|
+
label: backToHomeButton.ariaLabel.value,
|
|
96
96
|
onClick: onClickBackToHome,
|
|
97
|
-
children: backToHomeButton.text
|
|
97
|
+
children: backToHomeButton.text.value
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\nimport { changePasswordContent } from './changePasswordForm.content';\nimport {\n useChangePasswordSchema,\n type ChangePassword,\n} from './useChangePasswordSchema';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = useDictionary(changePasswordContent);\n const { user } = useUser();\n const ChangePasswordSchema = useChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label.value}\n placeholder={currentPasswordInput.placeholder.value}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label.value}\n placeholder={newPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label.value}\n placeholder={confirmPasswordInput.placeholder.value}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel.value}\n >\n {changePasswordButton.text.value}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel.value}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text.value}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;AAgBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,qBAAqB;AACjC,QAAA,EAAE,KAAK,IAAI,QAAQ;AACzB,QAAM,uBAAuB,wBAAwB;AAErD,QAAM,EAAE,MAAM,cAAc,aAAa,QAAQ,IAC/C,QAAQ,oBAAoB;AAG5B,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAC,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,OAAO,MAAM,SAAS;AAAA,cACtB,cAAa;AAAA,cACb,UAAQ;AAAA,cACR,QAAM;AAAA,cACN,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB,MAAM;AAAA,cAC9B,aAAa,iBAAiB,YAAY;AAAA,cAC1C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAA,kCAAA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB,MAAM;AAAA,cAClC,aAAa,qBAAqB,YAAY;AAAA,cAC9C,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ,GACF;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB,UAAU;AAAA,YAErC,+BAAqB,KAAK;AAAA,UAAA;AAAA,QAC7B;AAAA,QACC,eACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB,UAAU;AAAA,YAClC,SAAS;AAAA,YAER,2BAAiB,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACzB;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChangePasswordSchema.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/useChangePasswordSchema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useChangePasswordSchema.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/useChangePasswordSchema.ts"],"sourcesContent":["import { useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { changePasswordSchemaContent } from './useChangePasswordSchema.content';\n\nexport const useChangePasswordSchema = () => {\n const {\n requiredErrorPassword,\n invalidTypeErrorPassword,\n invalidPasswordLengthError,\n requiredErrorNewPassword,\n invalidTypeErrorNewPassword,\n requiredErrorNewPasswordConfirmation,\n invalidTypeErrorNewPasswordConfirmation,\n passwordNotMatchError,\n } = useDictionary(changePasswordSchemaContent);\n\n return z\n .object({\n currentPassword: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPassword: z\n .string({\n required_error: requiredErrorNewPassword,\n invalid_type_error: invalidTypeErrorNewPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPasswordConfirmation: z\n .string({\n required_error: requiredErrorNewPasswordConfirmation,\n invalid_type_error: invalidTypeErrorNewPasswordConfirmation,\n })\n .min(8, { message: invalidPasswordLengthError }),\n })\n .refine((data) => data.newPassword === data.newPasswordConfirmation, {\n message: passwordNotMatchError,\n path: ['newPasswordConfirmation'], // This specifies which field the error should be associated with\n });\n};\nexport type ChangePassword = z.infer<\n ReturnType<typeof useChangePasswordSchema>\n>;\n"],"names":["useDictionary","changePasswordSchemaContent","z"],"mappings":";;;;;AAIO,MAAM,0BAA0B,MAAM;AACrC,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEA,cAAAA,cAAcC,mEAAAA,2BAA2B;AAE7C,SAAOC,IAAAA,EACJ,OAAO;AAAA,IACN,iBAAiBA,MACd,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,aAAaA,MACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,yBAAyBA,MACtB,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,2BAA4B,CAAA;AAAA,EAAA,CAClD,EACA,OAAO,CAAC,SAAS,KAAK,gBAAgB,KAAK,yBAAyB;AAAA,IACnE,SAAS;AAAA,IACT,MAAM,CAAC,yBAAyB;AAAA;AAAA,EAAA,CACjC;AACL;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChangePasswordSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/useChangePasswordSchema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useChangePasswordSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/useChangePasswordSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;EAqCnC,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAClC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAC3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChangePasswordSchema.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/useChangePasswordSchema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useChangePasswordSchema.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/useChangePasswordSchema.ts"],"sourcesContent":["import { useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { changePasswordSchemaContent } from './useChangePasswordSchema.content';\n\nexport const useChangePasswordSchema = () => {\n const {\n requiredErrorPassword,\n invalidTypeErrorPassword,\n invalidPasswordLengthError,\n requiredErrorNewPassword,\n invalidTypeErrorNewPassword,\n requiredErrorNewPasswordConfirmation,\n invalidTypeErrorNewPasswordConfirmation,\n passwordNotMatchError,\n } = useDictionary(changePasswordSchemaContent);\n\n return z\n .object({\n currentPassword: z\n .string({\n required_error: requiredErrorPassword,\n invalid_type_error: invalidTypeErrorPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPassword: z\n .string({\n required_error: requiredErrorNewPassword,\n invalid_type_error: invalidTypeErrorNewPassword,\n })\n .min(8, { message: invalidPasswordLengthError }),\n newPasswordConfirmation: z\n .string({\n required_error: requiredErrorNewPasswordConfirmation,\n invalid_type_error: invalidTypeErrorNewPasswordConfirmation,\n })\n .min(8, { message: invalidPasswordLengthError }),\n })\n .refine((data) => data.newPassword === data.newPasswordConfirmation, {\n message: passwordNotMatchError,\n path: ['newPasswordConfirmation'], // This specifies which field the error should be associated with\n });\n};\nexport type ChangePassword = z.infer<\n ReturnType<typeof useChangePasswordSchema>\n>;\n"],"names":[],"mappings":";;;AAIO,MAAM,0BAA0B,MAAM;AACrC,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,2BAA2B;AAE7C,SAAO,EACJ,OAAO;AAAA,IACN,iBAAiB,EACd,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,aAAa,EACV,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,4BAA4B;AAAA,IACjD,yBAAyB,EACtB,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,2BAA4B,CAAA;AAAA,EAAA,CAClD,EACA,OAAO,CAAC,SAAS,KAAK,gBAAgB,KAAK,yBAAyB;AAAA,IACnE,SAAS;AAAA,IACT,MAAM,CAAC,yBAAyB;AAAA;AAAA,EAAA,CACjC;AACL;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("../../../jsx-runtime-CgFM7lM3.cjs");
|
|
5
5
|
const reactIntlayer = require("react-intlayer");
|
|
6
|
-
const index = require("../../../index-
|
|
6
|
+
const index = require("../../../index-DTQyeqio.cjs");
|
|
7
7
|
require("@intlayer/config/client");
|
|
8
8
|
require("@intlayer/api");
|
|
9
9
|
const components_Button_Button = require("../../Button/Button.cjs");
|
|
@@ -20,7 +20,7 @@ const GitHubLoginButton = () => {
|
|
|
20
20
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
21
21
|
components_Button_Button.Button,
|
|
22
22
|
{
|
|
23
|
-
label: externalsLoginButtons.github.label,
|
|
23
|
+
label: externalsLoginButtons.github.label.value,
|
|
24
24
|
Icon: components_Auth_ExternalsLoginButtons_assets_GithubLogo.GithubLogo,
|
|
25
25
|
onClick: loginWithGitHub,
|
|
26
26
|
color: "text",
|
|
@@ -39,7 +39,7 @@ const GoogleLoginButton = () => {
|
|
|
39
39
|
components_Button_Button.Button,
|
|
40
40
|
{
|
|
41
41
|
className: "bg-red-400 hover:bg-red-500 dark:hover:bg-red-300",
|
|
42
|
-
label: externalsLoginButtons.google.label,
|
|
42
|
+
label: externalsLoginButtons.google.label.value,
|
|
43
43
|
Icon: components_Auth_ExternalsLoginButtons_assets_GoogleLogo.GoogleLogo,
|
|
44
44
|
onClick: loginWithGoogle,
|
|
45
45
|
color: "custom",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalsLoginButtons.cjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"ExternalsLoginButtons.cjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { intlayerAPI } from '../../../../../api/src';\nimport { Button } from '../../Button';\nimport { GithubLogo } from './assets/GithubLogo';\nimport { GoogleLogo } from './assets/GoogleLogo';\nimport { externalsLoginButtonsContent } from './externalsLoginButtons.content';\n\nexport const GitHubLoginButton: FC = () => {\n const externalsLoginButtons = useDictionary(externalsLoginButtonsContent);\n const loginWithGitHub = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n label={externalsLoginButtons.github.label.value}\n Icon={GithubLogo}\n onClick={loginWithGitHub}\n color=\"text\"\n >\n {externalsLoginButtons.github.label}\n </Button>\n );\n};\n\nexport const GoogleLoginButton: FC = () => {\n const externalsLoginButtons = useDictionary(externalsLoginButtonsContent);\n const loginWithGoogle = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n className=\"bg-red-400 hover:bg-red-500 dark:hover:bg-red-300\"\n label={externalsLoginButtons.google.label.value}\n Icon={GoogleLogo}\n onClick={loginWithGoogle}\n color=\"custom\"\n >\n {externalsLoginButtons.google.label}\n </Button>\n );\n};\n\nexport const ExternalsLoginButtons: FC = () => {\n const externalsLoginButtons = useDictionary(externalsLoginButtonsContent);\n\n return (\n <div className=\"relative flex flex-col justify-center gap-y-3\">\n <div className=\"mb-3 flex w-full items-center gap-3 text-center text-base\">\n <div className=\"bg-neutral dark:bg-neutral-dark h-px w-full\" />\n <div className=\"text-neutral dark:text-neutral-dark\">\n {externalsLoginButtons.span}\n </div>\n <div className=\"bg-neutral dark:bg-neutral-dark h-px w-full\" />\n </div>\n <GoogleLoginButton />\n <GitHubLoginButton />\n </div>\n );\n};\n"],"names":["useDictionary","externalsLoginButtonsContent","intlayerAPI","jsx","Button","GithubLogo","GoogleLogo","jsxs"],"mappings":";;;;;;;;;;;;AAUO,MAAM,oBAAwB,MAAM;AACnC,QAAA,wBAAwBA,4BAAcC,gGAA4B;AACxE,QAAM,kBAAkB,MAAM;AACtB,UAAA,SAAS,OAAO,SAAS;AAE/B,UAAM,UAAUC,MAAAA,YAAY,KAAK,sBAAsB,EAAE,QAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,EACzB;AAGE,SAAAC,2BAAA,kBAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,OAAO,sBAAsB,OAAO,MAAM;AAAA,MAC1C,MAAMC,wDAAA;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MAEL,gCAAsB,OAAO;AAAA,IAAA;AAAA,EAChC;AAEJ;AAEO,MAAM,oBAAwB,MAAM;AACnC,QAAA,wBAAwBL,4BAAcC,gGAA4B;AACxE,QAAM,kBAAkB,MAAM;AACtB,UAAA,SAAS,OAAO,SAAS;AAE/B,UAAM,UAAUC,MAAAA,YAAY,KAAK,sBAAsB,EAAE,QAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,EACzB;AAGE,SAAAC,2BAAA,kBAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,sBAAsB,OAAO,MAAM;AAAA,MAC1C,MAAME,wDAAA;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MAEL,gCAAsB,OAAO;AAAA,IAAA;AAAA,EAChC;AAEJ;AAEO,MAAM,wBAA4B,MAAM;AACvC,QAAA,wBAAwBN,4BAAcC,gGAA4B;AAGtE,SAAAM,2BAAA,kBAAA,KAAC,OAAI,EAAA,WAAU,iDACb,UAAA;AAAA,IAACA,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,6DACb,UAAA;AAAA,MAACJ,2BAAAA,kBAAAA,IAAA,OAAA,EAAI,WAAU,8CAA8C,CAAA;AAAA,MAC5DA,2BAAA,kBAAA,IAAA,OAAA,EAAI,WAAU,uCACZ,gCAAsB,MACzB;AAAA,MACAA,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,8CAA8C,CAAA;AAAA,IAAA,GAC/D;AAAA,qDACC,mBAAkB,EAAA;AAAA,qDAClB,mBAAkB,CAAA,CAAA;AAAA,EAAA,GACrB;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalsLoginButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ExternalsLoginButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQhC,eAAO,MAAM,iBAAiB,EAAE,EAoB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAqB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,EAgBnC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as jsxRuntimeExports } from "../../../jsx-runtime-DQkoUcjV.js";
|
|
3
3
|
import { useDictionary } from "react-intlayer";
|
|
4
|
-
import { i as intlayerAPI } from "../../../index-
|
|
4
|
+
import { i as intlayerAPI } from "../../../index-BVYRWLUL.js";
|
|
5
5
|
import "@intlayer/config/client";
|
|
6
6
|
import "@intlayer/api";
|
|
7
7
|
import { Button } from "../../Button/Button.mjs";
|
|
@@ -18,7 +18,7 @@ const GitHubLoginButton = () => {
|
|
|
18
18
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19
19
|
Button,
|
|
20
20
|
{
|
|
21
|
-
label: externalsLoginButtons.github.label,
|
|
21
|
+
label: externalsLoginButtons.github.label.value,
|
|
22
22
|
Icon: GithubLogo,
|
|
23
23
|
onClick: loginWithGitHub,
|
|
24
24
|
color: "text",
|
|
@@ -37,7 +37,7 @@ const GoogleLoginButton = () => {
|
|
|
37
37
|
Button,
|
|
38
38
|
{
|
|
39
39
|
className: "bg-red-400 hover:bg-red-500 dark:hover:bg-red-300",
|
|
40
|
-
label: externalsLoginButtons.google.label,
|
|
40
|
+
label: externalsLoginButtons.google.label.value,
|
|
41
41
|
Icon: GoogleLogo,
|
|
42
42
|
onClick: loginWithGoogle,
|
|
43
43
|
color: "custom",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalsLoginButtons.mjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"ExternalsLoginButtons.mjs","sources":["../../../../src/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.tsx"],"sourcesContent":["'use client';\n\nimport type { FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { intlayerAPI } from '../../../../../api/src';\nimport { Button } from '../../Button';\nimport { GithubLogo } from './assets/GithubLogo';\nimport { GoogleLogo } from './assets/GoogleLogo';\nimport { externalsLoginButtonsContent } from './externalsLoginButtons.content';\n\nexport const GitHubLoginButton: FC = () => {\n const externalsLoginButtons = useDictionary(externalsLoginButtonsContent);\n const loginWithGitHub = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGitHubURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n label={externalsLoginButtons.github.label.value}\n Icon={GithubLogo}\n onClick={loginWithGitHub}\n color=\"text\"\n >\n {externalsLoginButtons.github.label}\n </Button>\n );\n};\n\nexport const GoogleLoginButton: FC = () => {\n const externalsLoginButtons = useDictionary(externalsLoginButtonsContent);\n const loginWithGoogle = () => {\n const origin = window.location.href;\n\n const authURL = intlayerAPI.auth.getLoginWithGoogleURL({ origin });\n\n window.location.href = authURL;\n };\n\n return (\n <Button\n className=\"bg-red-400 hover:bg-red-500 dark:hover:bg-red-300\"\n label={externalsLoginButtons.google.label.value}\n Icon={GoogleLogo}\n onClick={loginWithGoogle}\n color=\"custom\"\n >\n {externalsLoginButtons.google.label}\n </Button>\n );\n};\n\nexport const ExternalsLoginButtons: FC = () => {\n const externalsLoginButtons = useDictionary(externalsLoginButtonsContent);\n\n return (\n <div className=\"relative flex flex-col justify-center gap-y-3\">\n <div className=\"mb-3 flex w-full items-center gap-3 text-center text-base\">\n <div className=\"bg-neutral dark:bg-neutral-dark h-px w-full\" />\n <div className=\"text-neutral dark:text-neutral-dark\">\n {externalsLoginButtons.span}\n </div>\n <div className=\"bg-neutral dark:bg-neutral-dark h-px w-full\" />\n </div>\n <GoogleLoginButton />\n <GitHubLoginButton />\n </div>\n );\n};\n"],"names":["jsx","jsxs"],"mappings":";;;;;;;;;;AAUO,MAAM,oBAAwB,MAAM;AACnC,QAAA,wBAAwB,cAAc,4BAA4B;AACxE,QAAM,kBAAkB,MAAM;AACtB,UAAA,SAAS,OAAO,SAAS;AAE/B,UAAM,UAAU,YAAY,KAAK,sBAAsB,EAAE,QAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,EACzB;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,sBAAsB,OAAO,MAAM;AAAA,MAC1C,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MAEL,gCAAsB,OAAO;AAAA,IAAA;AAAA,EAChC;AAEJ;AAEO,MAAM,oBAAwB,MAAM;AACnC,QAAA,wBAAwB,cAAc,4BAA4B;AACxE,QAAM,kBAAkB,MAAM;AACtB,UAAA,SAAS,OAAO,SAAS;AAE/B,UAAM,UAAU,YAAY,KAAK,sBAAsB,EAAE,QAAQ;AAEjE,WAAO,SAAS,OAAO;AAAA,EACzB;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,sBAAsB,OAAO,MAAM;AAAA,MAC1C,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAM;AAAA,MAEL,gCAAsB,OAAO;AAAA,IAAA;AAAA,EAChC;AAEJ;AAEO,MAAM,wBAA4B,MAAM;AACvC,QAAA,wBAAwB,cAAc,4BAA4B;AAGtE,SAAAC,kCAAA,KAAC,OAAI,EAAA,WAAU,iDACb,UAAA;AAAA,IAACA,kCAAAA,KAAA,OAAA,EAAI,WAAU,6DACb,UAAA;AAAA,MAACD,kCAAAA,IAAA,OAAA,EAAI,WAAU,8CAA8C,CAAA;AAAA,MAC5DA,kCAAA,IAAA,OAAA,EAAI,WAAU,uCACZ,gCAAsB,MACzB;AAAA,MACAA,kCAAAA,IAAC,OAAI,EAAA,WAAU,8CAA8C,CAAA;AAAA,IAAA,GAC/D;AAAA,0CACC,mBAAkB,EAAA;AAAA,0CAClB,mBAAkB,CAAA,CAAA;AAAA,EAAA,GACrB;AAEJ;"}
|
|
@@ -59,7 +59,7 @@ const ResetPasswordForm = ({
|
|
|
59
59
|
if (submissionState.remainingTime > 0) {
|
|
60
60
|
return `${resendInText} ${submissionState.remainingTime}s`;
|
|
61
61
|
}
|
|
62
|
-
return isSubmitted ? resendRecoveryEmailButton.text : sendRecoveryEmailButton.text;
|
|
62
|
+
return isSubmitted ? resendRecoveryEmailButton.text.value : sendRecoveryEmailButton.text.value;
|
|
63
63
|
};
|
|
64
64
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
65
65
|
components_Form_layout_FormItemLayout.Form,
|
|
@@ -74,8 +74,8 @@ const ResetPasswordForm = ({
|
|
|
74
74
|
components_Form_layout_FormItemLayout.Form.Input,
|
|
75
75
|
{
|
|
76
76
|
name: "email",
|
|
77
|
-
label: emailInput.label,
|
|
78
|
-
placeholder: emailInput.placeholder,
|
|
77
|
+
label: emailInput.label.value,
|
|
78
|
+
placeholder: emailInput.placeholder.value,
|
|
79
79
|
isRequired: true,
|
|
80
80
|
autoComplete: "email",
|
|
81
81
|
minLength: 5,
|
|
@@ -91,7 +91,7 @@ const ResetPasswordForm = ({
|
|
|
91
91
|
isLoading: isSubmitting,
|
|
92
92
|
disabled: !isValid || submissionState.isFrozen,
|
|
93
93
|
variant: isSubmitted ? "outline" : "default",
|
|
94
|
-
label: sendRecoveryEmailButton.ariaLabel,
|
|
94
|
+
label: sendRecoveryEmailButton.ariaLabel.value,
|
|
95
95
|
children: getSubmitButtonText()
|
|
96
96
|
}
|
|
97
97
|
),
|
|
@@ -99,9 +99,9 @@ const ResetPasswordForm = ({
|
|
|
99
99
|
components_Form_layout_FormItemLayout.Form.Button,
|
|
100
100
|
{
|
|
101
101
|
className: "mt-4 w-full",
|
|
102
|
-
label: backToLoginButton.text,
|
|
102
|
+
label: backToLoginButton.text.value,
|
|
103
103
|
onClick: onClickBackToLogin,
|
|
104
|
-
children: backToLoginButton.text
|
|
104
|
+
children: backToLoginButton.text.value
|
|
105
105
|
}
|
|
106
106
|
)
|
|
107
107
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.cjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.cjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Form, useForm } from '../../Form';\nimport { resetPasswordContent } from './resetPasswordContent.content';\nimport {\n useResetPasswordSchema,\n type ResetPassword,\n} from './useResetPasswordSchema';\n\ntype ForgotPasswordFormProps = {\n email?: string;\n onSubmitSuccess: (data: ResetPassword) => Promise<void>;\n onClickBackToLogin: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ResetPasswordForm: FC<ForgotPasswordFormProps> = ({\n email,\n onSubmitSuccess,\n onSubmitError,\n onClickBackToLogin,\n}) => {\n const ResetPasswordSchema = useResetPasswordSchema();\n const {\n emailInput,\n sendRecoveryEmailButton,\n resendRecoveryEmailButton,\n resendInText,\n backToLoginButton,\n } = useDictionary(resetPasswordContent);\n const { form, isSubmitting, isSubmitted, isValid } = useForm(\n ResetPasswordSchema,\n {\n defaultValues: { email },\n }\n );\n const [submissionState, setSubmissionState] = useState({\n isFrozen: isValid,\n remainingTime: 0,\n });\n\n useEffect(() => {\n // If form valid and form is not submitted, unfreeze the submission\n if (isValid && !isSubmitted) {\n setSubmissionState((prevState) => ({\n ...prevState,\n isFrozen: false,\n }));\n }\n }, [isSubmitted, isValid]);\n\n useEffect(() => {\n // If form valid and submission is frozen and there is remaining time, start the timer\n if (\n isValid &&\n submissionState.isFrozen &&\n submissionState.remainingTime > 0\n ) {\n const interval = setInterval(() => {\n setSubmissionState((prevState) => {\n if (prevState.remainingTime <= 1) {\n clearInterval(interval); // Stop the timer when reaching 0\n return { ...prevState, isFrozen: false, remainingTime: 0 };\n }\n return { ...prevState, remainingTime: prevState.remainingTime - 1 };\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }\n }, [isValid, submissionState.isFrozen, submissionState.remainingTime]);\n\n const getSubmitButtonText = (): ReactNode => {\n if (submissionState.remainingTime > 0) {\n return `${resendInText} ${submissionState.remainingTime}s`;\n }\n return isSubmitted\n ? resendRecoveryEmailButton.text.value\n : sendRecoveryEmailButton.text.value;\n };\n\n return (\n <Form\n schema={ResetPasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label.value}\n placeholder={emailInput.placeholder.value}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid || submissionState.isFrozen}\n variant={isSubmitted ? 'outline' : 'default'}\n label={sendRecoveryEmailButton.ariaLabel.value}\n >\n {getSubmitButtonText()}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToLoginButton.text.value}\n onClick={onClickBackToLogin}\n >\n {backToLoginButton.text.value}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["useResetPasswordSchema","useDictionary","resetPasswordContent","useForm","useState","useEffect","jsxs","Form","jsx"],"mappings":";;;;;;;;;;;AAkBO,MAAM,oBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,sBAAsBA,yDAAAA,uBAAuB;AAC7C,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,cAAAA,cAAcC,+DAAAA,oBAAoB;AACtC,QAAM,EAAE,MAAM,cAAc,aAAa,QAAY,IAAAC,yBAAA;AAAA,IACnD;AAAA,IACA;AAAA,MACE,eAAe,EAAE,MAAM;AAAA,IAAA;AAAA,EAE3B;AACA,QAAM,CAAC,iBAAiB,kBAAkB,IAAIC,oBAAS;AAAA,IACrD,UAAU;AAAA,IACV,eAAe;AAAA,EAAA,CAChB;AAEDC,aAAAA,UAAU,MAAM;AAEV,QAAA,WAAW,CAAC,aAAa;AAC3B,yBAAmB,CAAC,eAAe;AAAA,QACjC,GAAG;AAAA,QACH,UAAU;AAAA,MAAA,EACV;AAAA,IAAA;AAAA,EACJ,GACC,CAAC,aAAa,OAAO,CAAC;AAEzBA,aAAAA,UAAU,MAAM;AAEd,QACE,WACA,gBAAgB,YAChB,gBAAgB,gBAAgB,GAChC;AACM,YAAA,WAAW,YAAY,MAAM;AACjC,2BAAmB,CAAC,cAAc;AAC5B,cAAA,UAAU,iBAAiB,GAAG;AAChC,0BAAc,QAAQ;AACtB,mBAAO,EAAE,GAAG,WAAW,UAAU,OAAO,eAAe,EAAE;AAAA,UAAA;AAE3D,iBAAO,EAAE,GAAG,WAAW,eAAe,UAAU,gBAAgB,EAAE;AAAA,QAAA,CACnE;AAAA,SACA,GAAI;AAEA,aAAA,MAAM,cAAc,QAAQ;AAAA,IAAA;AAAA,EACrC,GACC,CAAC,SAAS,gBAAgB,UAAU,gBAAgB,aAAa,CAAC;AAErE,QAAM,sBAAsB,MAAiB;AACvC,QAAA,gBAAgB,gBAAgB,GAAG;AACrC,aAAO,GAAG,YAAY,IAAI,gBAAgB,aAAa;AAAA,IAAA;AAEzD,WAAO,cACH,0BAA0B,KAAK,QAC/B,wBAAwB,KAAK;AAAA,EACnC;AAGE,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACC,2BAAAA,kBAAAA,IAAA,OAAA,EAAI,WAAU,yBACb,UAAAA,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,aAAa,WAAW,YAAY;AAAA,YACpC,YAAU;AAAA,YACV,cAAa;AAAA,YACb,WAAW;AAAA,YACX,WAAW;AAAA,UAAA;AAAA,QAAA,GAEf;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC,WAAW,gBAAgB;AAAA,YACtC,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,wBAAwB,UAAU;AAAA,YAExC,UAAoB,oBAAA;AAAA,UAAA;AAAA,QACvB;AAAA,QACC,eACCC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,kBAAkB,KAAK;AAAA,YAC9B,SAAS;AAAA,YAER,4BAAkB,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MAC1B;AAAA,IAAA;AAAA,EAEJ;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAA6B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAA6B,MAAM,OAAO,CAAC;AAIrE,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAC;AAElC,KAAK,uBAAuB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,uBAAuB,CA2GzD,CAAC"}
|
|
@@ -57,7 +57,7 @@ const ResetPasswordForm = ({
|
|
|
57
57
|
if (submissionState.remainingTime > 0) {
|
|
58
58
|
return `${resendInText} ${submissionState.remainingTime}s`;
|
|
59
59
|
}
|
|
60
|
-
return isSubmitted ? resendRecoveryEmailButton.text : sendRecoveryEmailButton.text;
|
|
60
|
+
return isSubmitted ? resendRecoveryEmailButton.text.value : sendRecoveryEmailButton.text.value;
|
|
61
61
|
};
|
|
62
62
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
63
63
|
Form,
|
|
@@ -72,8 +72,8 @@ const ResetPasswordForm = ({
|
|
|
72
72
|
Form.Input,
|
|
73
73
|
{
|
|
74
74
|
name: "email",
|
|
75
|
-
label: emailInput.label,
|
|
76
|
-
placeholder: emailInput.placeholder,
|
|
75
|
+
label: emailInput.label.value,
|
|
76
|
+
placeholder: emailInput.placeholder.value,
|
|
77
77
|
isRequired: true,
|
|
78
78
|
autoComplete: "email",
|
|
79
79
|
minLength: 5,
|
|
@@ -89,7 +89,7 @@ const ResetPasswordForm = ({
|
|
|
89
89
|
isLoading: isSubmitting,
|
|
90
90
|
disabled: !isValid || submissionState.isFrozen,
|
|
91
91
|
variant: isSubmitted ? "outline" : "default",
|
|
92
|
-
label: sendRecoveryEmailButton.ariaLabel,
|
|
92
|
+
label: sendRecoveryEmailButton.ariaLabel.value,
|
|
93
93
|
children: getSubmitButtonText()
|
|
94
94
|
}
|
|
95
95
|
),
|
|
@@ -97,9 +97,9 @@ const ResetPasswordForm = ({
|
|
|
97
97
|
Form.Button,
|
|
98
98
|
{
|
|
99
99
|
className: "mt-4 w-full",
|
|
100
|
-
label: backToLoginButton.text,
|
|
100
|
+
label: backToLoginButton.text.value,
|
|
101
101
|
onClick: onClickBackToLogin,
|
|
102
|
-
children: backToLoginButton.text
|
|
102
|
+
children: backToLoginButton.text.value
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetPasswordForm.mjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\
|
|
1
|
+
{"version":3,"file":"ResetPasswordForm.mjs","sources":["../../../../src/components/Auth/ResetPasswordForm/ResetPasswordForm.tsx"],"sourcesContent":["'use client';\n\nimport { useState, type FC, useEffect, type ReactNode } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Form, useForm } from '../../Form';\nimport { resetPasswordContent } from './resetPasswordContent.content';\nimport {\n useResetPasswordSchema,\n type ResetPassword,\n} from './useResetPasswordSchema';\n\ntype ForgotPasswordFormProps = {\n email?: string;\n onSubmitSuccess: (data: ResetPassword) => Promise<void>;\n onClickBackToLogin: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ResetPasswordForm: FC<ForgotPasswordFormProps> = ({\n email,\n onSubmitSuccess,\n onSubmitError,\n onClickBackToLogin,\n}) => {\n const ResetPasswordSchema = useResetPasswordSchema();\n const {\n emailInput,\n sendRecoveryEmailButton,\n resendRecoveryEmailButton,\n resendInText,\n backToLoginButton,\n } = useDictionary(resetPasswordContent);\n const { form, isSubmitting, isSubmitted, isValid } = useForm(\n ResetPasswordSchema,\n {\n defaultValues: { email },\n }\n );\n const [submissionState, setSubmissionState] = useState({\n isFrozen: isValid,\n remainingTime: 0,\n });\n\n useEffect(() => {\n // If form valid and form is not submitted, unfreeze the submission\n if (isValid && !isSubmitted) {\n setSubmissionState((prevState) => ({\n ...prevState,\n isFrozen: false,\n }));\n }\n }, [isSubmitted, isValid]);\n\n useEffect(() => {\n // If form valid and submission is frozen and there is remaining time, start the timer\n if (\n isValid &&\n submissionState.isFrozen &&\n submissionState.remainingTime > 0\n ) {\n const interval = setInterval(() => {\n setSubmissionState((prevState) => {\n if (prevState.remainingTime <= 1) {\n clearInterval(interval); // Stop the timer when reaching 0\n return { ...prevState, isFrozen: false, remainingTime: 0 };\n }\n return { ...prevState, remainingTime: prevState.remainingTime - 1 };\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }\n }, [isValid, submissionState.isFrozen, submissionState.remainingTime]);\n\n const getSubmitButtonText = (): ReactNode => {\n if (submissionState.remainingTime > 0) {\n return `${resendInText} ${submissionState.remainingTime}s`;\n }\n return isSubmitted\n ? resendRecoveryEmailButton.text.value\n : sendRecoveryEmailButton.text.value;\n };\n\n return (\n <Form\n schema={ResetPasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n name=\"email\"\n label={emailInput.label.value}\n placeholder={emailInput.placeholder.value}\n isRequired\n autoComplete=\"email\"\n minLength={5}\n maxLength={50}\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid || submissionState.isFrozen}\n variant={isSubmitted ? 'outline' : 'default'}\n label={sendRecoveryEmailButton.ariaLabel.value}\n >\n {getSubmitButtonText()}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToLoginButton.text.value}\n onClick={onClickBackToLogin}\n >\n {backToLoginButton.text.value}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;;;AAkBO,MAAM,oBAAiD,CAAC;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,sBAAsB,uBAAuB;AAC7C,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE,cAAc,oBAAoB;AACtC,QAAM,EAAE,MAAM,cAAc,aAAa,QAAY,IAAA;AAAA,IACnD;AAAA,IACA;AAAA,MACE,eAAe,EAAE,MAAM;AAAA,IAAA;AAAA,EAE3B;AACA,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAS;AAAA,IACrD,UAAU;AAAA,IACV,eAAe;AAAA,EAAA,CAChB;AAED,YAAU,MAAM;AAEV,QAAA,WAAW,CAAC,aAAa;AAC3B,yBAAmB,CAAC,eAAe;AAAA,QACjC,GAAG;AAAA,QACH,UAAU;AAAA,MAAA,EACV;AAAA,IAAA;AAAA,EACJ,GACC,CAAC,aAAa,OAAO,CAAC;AAEzB,YAAU,MAAM;AAEd,QACE,WACA,gBAAgB,YAChB,gBAAgB,gBAAgB,GAChC;AACM,YAAA,WAAW,YAAY,MAAM;AACjC,2BAAmB,CAAC,cAAc;AAC5B,cAAA,UAAU,iBAAiB,GAAG;AAChC,0BAAc,QAAQ;AACtB,mBAAO,EAAE,GAAG,WAAW,UAAU,OAAO,eAAe,EAAE;AAAA,UAAA;AAE3D,iBAAO,EAAE,GAAG,WAAW,eAAe,UAAU,gBAAgB,EAAE;AAAA,QAAA,CACnE;AAAA,SACA,GAAI;AAEA,aAAA,MAAM,cAAc,QAAQ;AAAA,IAAA;AAAA,EACrC,GACC,CAAC,SAAS,gBAAgB,UAAU,gBAAgB,aAAa,CAAC;AAErE,QAAM,sBAAsB,MAAiB;AACvC,QAAA,gBAAgB,gBAAgB,GAAG;AACrC,aAAO,GAAG,YAAY,IAAI,gBAAgB,aAAa;AAAA,IAAA;AAEzD,WAAO,cACH,0BAA0B,KAAK,QAC/B,wBAAwB,KAAK;AAAA,EACnC;AAGE,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACC,kCAAAA,IAAA,OAAA,EAAI,WAAU,yBACb,UAAAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,MAAK;AAAA,YACL,OAAO,WAAW,MAAM;AAAA,YACxB,aAAa,WAAW,YAAY;AAAA,YACpC,YAAU;AAAA,YACV,cAAa;AAAA,YACb,WAAW;AAAA,YACX,WAAW;AAAA,UAAA;AAAA,QAAA,GAEf;AAAA,QAEAA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC,WAAW,gBAAgB;AAAA,YACtC,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,wBAAwB,UAAU;AAAA,YAExC,UAAoB,oBAAA;AAAA,UAAA;AAAA,QACvB;AAAA,QACC,eACCA,kCAAA;AAAA,UAAC,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,kBAAkB,KAAK;AAAA,YAC9B,SAAS;AAAA,YAER,4BAAkB,KAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MAC1B;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetPasswordSchema.cjs","sources":["../../../../src/components/Auth/ResetPasswordForm/useResetPasswordSchema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useResetPasswordSchema.cjs","sources":["../../../../src/components/Auth/ResetPasswordForm/useResetPasswordSchema.ts"],"sourcesContent":["import { useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { useResetPasswordSchemaContent } from './useResetPasswordSchema.content';\n\nexport const useResetPasswordSchema = () => {\n const { requiredErrorEmail, invalidTypeErrorEmail, invalidLengthErrorEmail } =\n useDictionary(useResetPasswordSchemaContent, undefined, false);\n\n return z.object({\n email: z\n .string({\n required_error: requiredErrorEmail,\n invalid_type_error: invalidTypeErrorEmail,\n })\n .min(1, { message: invalidLengthErrorEmail }),\n });\n};\n\nexport type ResetPassword = z.infer<ReturnType<typeof useResetPasswordSchema>>;\n"],"names":["useDictionary","useResetPasswordSchemaContent","z"],"mappings":";;;;;AAIO,MAAM,yBAAyB,MAAM;AACpC,QAAA,EAAE,oBAAoB,uBAAuB,wBAAA,IACjDA,cAAAA,cAAcC,iEAAA,+BAA+B,QAAW,KAAK;AAE/D,SAAOC,IAAAA,EAAE,OAAO;AAAA,IACd,OAAOA,MACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,wBAAyB,CAAA;AAAA,EAAA,CAC/C;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetPasswordSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPasswordForm/useResetPasswordSchema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResetPasswordSchema.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ResetPasswordForm/useResetPasswordSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,sBAAsB;;;;;;EAYlC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetPasswordSchema.mjs","sources":["../../../../src/components/Auth/ResetPasswordForm/useResetPasswordSchema.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useResetPasswordSchema.mjs","sources":["../../../../src/components/Auth/ResetPasswordForm/useResetPasswordSchema.ts"],"sourcesContent":["import { useDictionary } from 'react-intlayer';\nimport { z } from 'zod';\nimport { useResetPasswordSchemaContent } from './useResetPasswordSchema.content';\n\nexport const useResetPasswordSchema = () => {\n const { requiredErrorEmail, invalidTypeErrorEmail, invalidLengthErrorEmail } =\n useDictionary(useResetPasswordSchemaContent, undefined, false);\n\n return z.object({\n email: z\n .string({\n required_error: requiredErrorEmail,\n invalid_type_error: invalidTypeErrorEmail,\n })\n .min(1, { message: invalidLengthErrorEmail }),\n });\n};\n\nexport type ResetPassword = z.infer<ReturnType<typeof useResetPasswordSchema>>;\n"],"names":[],"mappings":";;;AAIO,MAAM,yBAAyB,MAAM;AACpC,QAAA,EAAE,oBAAoB,uBAAuB,wBAAA,IACjD,cAAc,+BAA+B,QAAW,KAAK;AAE/D,SAAO,EAAE,OAAO;AAAA,IACd,OAAO,EACJ,OAAO;AAAA,MACN,gBAAgB;AAAA,MAChB,oBAAoB;AAAA,IACrB,CAAA,EACA,IAAI,GAAG,EAAE,SAAS,wBAAyB,CAAA;AAAA,EAAA,CAC/C;AACH;"}
|
|
@@ -40,8 +40,8 @@ const SignInForm = ({
|
|
|
40
40
|
components_Form_layout_FormItemLayout.Form.Input,
|
|
41
41
|
{
|
|
42
42
|
name: "email",
|
|
43
|
-
label: emailInput.label,
|
|
44
|
-
placeholder: emailInput.placeholder,
|
|
43
|
+
label: emailInput.label.value,
|
|
44
|
+
placeholder: emailInput.placeholder.value,
|
|
45
45
|
isRequired: true,
|
|
46
46
|
autoComplete: "email"
|
|
47
47
|
}
|
|
@@ -50,8 +50,8 @@ const SignInForm = ({
|
|
|
50
50
|
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
51
51
|
{
|
|
52
52
|
name: "password",
|
|
53
|
-
label: passwordInput.label,
|
|
54
|
-
placeholder: passwordInput.placeholder,
|
|
53
|
+
label: passwordInput.label.value,
|
|
54
|
+
placeholder: passwordInput.placeholder.value,
|
|
55
55
|
isRequired: true,
|
|
56
56
|
autoComplete: "current-password"
|
|
57
57
|
}
|
|
@@ -62,7 +62,7 @@ const SignInForm = ({
|
|
|
62
62
|
{
|
|
63
63
|
className: "ml-auto mt-2 block",
|
|
64
64
|
variant: "link",
|
|
65
|
-
label: forgotPasswordLink.ariaLabel,
|
|
65
|
+
label: forgotPasswordLink.ariaLabel.value,
|
|
66
66
|
color: "text",
|
|
67
67
|
size: "sm",
|
|
68
68
|
onClick: onClickForgotPassword,
|
|
@@ -76,7 +76,7 @@ const SignInForm = ({
|
|
|
76
76
|
type: "submit",
|
|
77
77
|
color: "text",
|
|
78
78
|
isLoading: isSubmitting,
|
|
79
|
-
label: loginButton.ariaLabel,
|
|
79
|
+
label: loginButton.ariaLabel.value,
|
|
80
80
|
children: loginButton.text
|
|
81
81
|
}
|
|
82
82
|
),
|
|
@@ -86,7 +86,7 @@ const SignInForm = ({
|
|
|
86
86
|
components_Form_layout_FormItemLayout.Form.Button,
|
|
87
87
|
{
|
|
88
88
|
variant: "link",
|
|
89
|
-
label: signUpLink.ariaLabel,
|
|
89
|
+
label: signUpLink.ariaLabel.value,
|
|
90
90
|
color: "text",
|
|
91
91
|
size: "sm",
|
|
92
92
|
onClick: onClickSignUp,
|