@payloadcms/next 3.46.0-canary.3 → 3.46.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/ResetPassword/ResetPasswordForm/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/ResetPassword/ResetPasswordForm/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAuE5C,CAAA"}
|
|
@@ -6,20 +6,8 @@ import { ConfirmPasswordField, Form, FormSubmit, HiddenField, PasswordField, use
|
|
|
6
6
|
import { useRouter } from 'next/navigation.js';
|
|
7
7
|
import { formatAdminURL } from 'payload/shared';
|
|
8
8
|
import React from 'react';
|
|
9
|
-
const initialState = {
|
|
10
|
-
'confirm-password': {
|
|
11
|
-
initialValue: '',
|
|
12
|
-
valid: false,
|
|
13
|
-
value: ''
|
|
14
|
-
},
|
|
15
|
-
password: {
|
|
16
|
-
initialValue: '',
|
|
17
|
-
valid: false,
|
|
18
|
-
value: ''
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
9
|
export const ResetPasswordForm = t0 => {
|
|
22
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(12);
|
|
23
11
|
const {
|
|
24
12
|
token
|
|
25
13
|
} = t0;
|
|
@@ -69,11 +57,27 @@ export const ResetPasswordForm = t0 => {
|
|
|
69
57
|
t5 = $[4];
|
|
70
58
|
}
|
|
71
59
|
const onSuccess = t5;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
let t6;
|
|
61
|
+
if ($[5] !== apiRoute || $[6] !== i18n || $[7] !== onSuccess || $[8] !== serverURL || $[9] !== token || $[10] !== userSlug) {
|
|
62
|
+
const initialState = {
|
|
63
|
+
"confirm-password": {
|
|
64
|
+
initialValue: "",
|
|
65
|
+
valid: false,
|
|
66
|
+
value: ""
|
|
67
|
+
},
|
|
68
|
+
password: {
|
|
69
|
+
initialValue: "",
|
|
70
|
+
valid: false,
|
|
71
|
+
value: ""
|
|
72
|
+
},
|
|
73
|
+
token: {
|
|
74
|
+
initialValue: token,
|
|
75
|
+
valid: true,
|
|
76
|
+
value: token
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
t6 = _jsxs(Form, {
|
|
80
|
+
action: `${serverURL}${apiRoute}/${userSlug}/reset-password`,
|
|
77
81
|
initialState,
|
|
78
82
|
method: "POST",
|
|
79
83
|
onSuccess,
|
|
@@ -97,15 +101,16 @@ export const ResetPasswordForm = t0 => {
|
|
|
97
101
|
children: i18n.t("authentication:resetPassword")
|
|
98
102
|
})]
|
|
99
103
|
});
|
|
100
|
-
$[5] =
|
|
101
|
-
$[6] =
|
|
102
|
-
$[7] =
|
|
103
|
-
$[8] =
|
|
104
|
-
$[9] =
|
|
105
|
-
$[10] =
|
|
104
|
+
$[5] = apiRoute;
|
|
105
|
+
$[6] = i18n;
|
|
106
|
+
$[7] = onSuccess;
|
|
107
|
+
$[8] = serverURL;
|
|
108
|
+
$[9] = token;
|
|
109
|
+
$[10] = userSlug;
|
|
110
|
+
$[11] = t6;
|
|
106
111
|
} else {
|
|
107
|
-
|
|
112
|
+
t6 = $[11];
|
|
108
113
|
}
|
|
109
|
-
return
|
|
114
|
+
return t6;
|
|
110
115
|
};
|
|
111
116
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","ConfirmPasswordField","Form","FormSubmit","HiddenField","PasswordField","useAuth","useConfig","useTranslation","useRouter","formatAdminURL","React","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","ConfirmPasswordField","Form","FormSubmit","HiddenField","PasswordField","useAuth","useConfig","useTranslation","useRouter","formatAdminURL","React","ResetPasswordForm","t0","$","token","i18n","config","t1","admin","t2","routes","t3","serverURL","t4","user","userSlug","login","loginRoute","adminRoute","api","apiRoute","history","fetchFullUser","t5","push","path","onSuccess","t6","initialState","initialValue","valid","value","password","_jsxs","action","method","children","className","_jsx","field","name","label","t","required","schemaPath","size"],"sources":["../../../../src/views/ResetPassword/ResetPasswordForm/index.tsx"],"sourcesContent":["'use client'\nimport {\n ConfirmPasswordField,\n Form,\n FormSubmit,\n HiddenField,\n PasswordField,\n useAuth,\n useConfig,\n useTranslation,\n} from '@payloadcms/ui'\nimport { useRouter } from 'next/navigation.js'\nimport { type FormState } from 'payload'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\ntype Args = {\n readonly token: string\n}\n\nexport const ResetPasswordForm: React.FC<Args> = ({ token }) => {\n const i18n = useTranslation()\n const {\n config: {\n admin: {\n routes: { login: loginRoute },\n user: userSlug,\n },\n routes: { admin: adminRoute, api: apiRoute },\n serverURL,\n },\n } = useConfig()\n\n const history = useRouter()\n const { fetchFullUser } = useAuth()\n\n const onSuccess = React.useCallback(async () => {\n const user = await fetchFullUser()\n if (user) {\n history.push(adminRoute)\n } else {\n history.push(\n formatAdminURL({\n adminRoute,\n path: loginRoute,\n }),\n )\n }\n }, [adminRoute, fetchFullUser, history, loginRoute])\n\n const initialState: FormState = {\n 'confirm-password': {\n initialValue: '',\n valid: false,\n value: '',\n },\n password: {\n initialValue: '',\n valid: false,\n value: '',\n },\n token: {\n initialValue: token,\n valid: true,\n value: token,\n },\n }\n\n return (\n <Form\n action={`${serverURL}${apiRoute}/${userSlug}/reset-password`}\n initialState={initialState}\n method=\"POST\"\n onSuccess={onSuccess}\n >\n <div className=\"inputWrap\">\n <PasswordField\n field={{\n name: 'password',\n label: i18n.t('authentication:newPassword'),\n required: true,\n }}\n path=\"password\"\n schemaPath={`${userSlug}.password`}\n />\n <ConfirmPasswordField />\n <HiddenField path=\"token\" schemaPath={`${userSlug}.token`} value={token} />\n </div>\n <FormSubmit size=\"large\">{i18n.t('authentication:resetPassword')}</FormSubmit>\n </Form>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SACEC,oBAAoB,EACpBC,IAAI,EACJC,UAAU,EACVC,WAAW,EACXC,aAAa,EACbC,OAAO,EACPC,SAAS,EACTC,cAAc,QACT;AACP,SAASC,SAAS,QAAQ;AAE1B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAMlB,OAAO,MAAMC,iBAAA,GAAoCC,EAAA;EAAA,MAAAC,CAAA,GAAAd,EAAA;EAAC;IAAAe;EAAA,IAAAF,EAAS;EACzD,MAAAG,IAAA,GAAaR,cAAA;EACb;IAAAS,MAAA,EAAAC;EAAA,IASIX,SAAA;EARM;IAAAY,KAAA,EAAAC,EAAA;IAAAC,MAAA,EAAAC,EAAA;IAAAC;EAAA,IAAAL,EAOP;EANQ;IAAAG,MAAA,EAAAG,EAAA;IAAAC,IAAA,EAAAC;EAAA,IAAAN,EAGN;EAFS;IAAAO,KAAA,EAAAC;EAAA,IAAAJ,EAAqB;EAGvB;IAAAL,KAAA,EAAAU,UAAA;IAAAC,GAAA,EAAAC;EAAA,IAAAT,EAAoC;EAKhD,MAAAU,OAAA,GAAgBvB,SAAA;EAChB;IAAAwB;EAAA,IAA0B3B,OAAA;EAAA,IAAA4B,EAAA;EAAA,IAAApB,CAAA,QAAAe,UAAA,IAAAf,CAAA,QAAAmB,aAAA,IAAAnB,CAAA,QAAAkB,OAAA,IAAAlB,CAAA,QAAAc,UAAA;IAEUM,EAAA,SAAAA,CAAA;MAClC,MAAA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QAAA;QAAmB,C,GAEpCuB,IAAA,CAAAhD,oBAAA,IAAC,GACDgD,IAAA,CAAA7C,WAAA;UAAAgC,IAAA,EAAkB;UAAAmB,UAAA,EAAoB,GAAG7B,QAAA,QAAgB;UAAAgB,KAAA,EAAS3B;QAAA,C;UAEpEkC,IAAA,CAAA9C,UAAA;QAAAqD,IAAA,EAAiB;QAAAT,QAAA,EAAS/B,IAAA,CAAAqC,CAAA,CAAO;MAAA,C;;;;;;;;;;;;SAnBnCf,E;CAsBJ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/next",
|
|
3
|
-
"version": "3.46.0
|
|
3
|
+
"version": "3.46.0",
|
|
4
4
|
"homepage": "https://payloadcms.com",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"qs-esm": "7.0.2",
|
|
88
88
|
"sass": "1.77.4",
|
|
89
89
|
"uuid": "10.0.0",
|
|
90
|
-
"@payloadcms/graphql": "3.46.0
|
|
91
|
-
"@payloadcms/
|
|
92
|
-
"@payloadcms/
|
|
90
|
+
"@payloadcms/graphql": "3.46.0",
|
|
91
|
+
"@payloadcms/ui": "3.46.0",
|
|
92
|
+
"@payloadcms/translations": "3.46.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@babel/cli": "7.27.2",
|
|
@@ -107,12 +107,12 @@
|
|
|
107
107
|
"esbuild-sass-plugin": "3.3.1",
|
|
108
108
|
"swc-plugin-transform-remove-imports": "4.0.4",
|
|
109
109
|
"@payloadcms/eslint-config": "3.28.0",
|
|
110
|
-
"payload": "3.46.0
|
|
110
|
+
"payload": "3.46.0"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
113
|
"graphql": "^16.8.1",
|
|
114
114
|
"next": "^15.2.3",
|
|
115
|
-
"payload": "3.46.0
|
|
115
|
+
"payload": "3.46.0"
|
|
116
116
|
},
|
|
117
117
|
"engines": {
|
|
118
118
|
"node": "^18.20.2 || >=20.9.0"
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
"scripts": {
|
|
124
124
|
"build": "pnpm build:reactcompiler",
|
|
125
125
|
"build:babel": "rm -rf dist_optimized && babel dist --out-dir dist_optimized --source-maps --extensions .ts,.js,.tsx,.jsx,.cjs,.mjs && rm -rf dist && mv dist_optimized dist",
|
|
126
|
+
"build:bundle-for-analysis": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && pnpm build:swc && pnpm build:babel && pnpm copyfiles && node ./bundle.js esbuild",
|
|
126
127
|
"build:cjs": "swc ./src/withPayload.js -o ./dist/cjs/withPayload.cjs --config-file .swcrc-cjs --strip-leading-paths",
|
|
127
128
|
"build:esbuild": "node bundleScss.js",
|
|
128
129
|
"build:reactcompiler": "rm -rf dist && rm -rf tsconfig.tsbuildinfo && pnpm build:swc && pnpm build:babel && pnpm copyfiles && pnpm build:types && pnpm build:esbuild && pnpm build:cjs",
|