@payloadcms/next 3.14.0 → 3.14.1-canary.2776826
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/prod/styles.css +1 -1
- package/dist/views/Account/ResetPreferences/ConfirmResetModal/index.d.ts +6 -0
- package/dist/views/Account/ResetPreferences/ConfirmResetModal/index.d.ts.map +1 -0
- package/dist/views/Account/ResetPreferences/ConfirmResetModal/index.js +83 -0
- package/dist/views/Account/ResetPreferences/ConfirmResetModal/index.js.map +1 -0
- package/dist/views/Account/ResetPreferences/ConfirmResetModal/index.scss +40 -0
- package/dist/views/Account/ResetPreferences/index.d.ts +6 -0
- package/dist/views/Account/ResetPreferences/index.d.ts.map +1 -0
- package/dist/views/Account/ResetPreferences/index.js +73 -0
- package/dist/views/Account/ResetPreferences/index.js.map +1 -0
- package/dist/views/Account/Settings/index.d.ts +3 -1
- package/dist/views/Account/Settings/index.d.ts.map +1 -1
- package/dist/views/Account/Settings/index.js +9 -2
- package/dist/views/Account/Settings/index.js.map +1 -1
- package/dist/views/Account/index.d.ts.map +1 -1
- package/dist/views/Account/index.js +4 -1
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.js +1 -0
- package/dist/views/CreateFirstUser/index.js.map +1 -1
- package/dist/views/Document/getDocumentData.d.ts +3 -2
- package/dist/views/Document/getDocumentData.d.ts.map +1 -1
- package/dist/views/Document/getDocumentData.js +11 -0
- package/dist/views/Document/getDocumentData.js.map +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +1 -0
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +18 -40
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/List/renderListViewSlots.d.ts.map +1 -1
- package/dist/views/List/renderListViewSlots.js.map +1 -1
- package/dist/views/LivePreview/index.client.d.ts +2 -2
- package/dist/views/LivePreview/index.client.d.ts.map +1 -1
- package/dist/views/LivePreview/index.client.js +31 -7
- package/dist/views/LivePreview/index.client.js.map +1 -1
- package/dist/views/LivePreview/index.d.ts.map +1 -1
- package/dist/views/LivePreview/index.js +6 -0
- package/dist/views/LivePreview/index.js.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/views/Account/ResetPreferences/ConfirmResetModal/index.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CA+BA,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Button, Modal, useModal, useTranslation } from '@payloadcms/ui';
|
|
6
|
+
const baseClass = 'reset-preferences-modal';
|
|
7
|
+
export const ConfirmResetModal = t0 => {
|
|
8
|
+
const $ = _c(11);
|
|
9
|
+
const {
|
|
10
|
+
slug,
|
|
11
|
+
onConfirm
|
|
12
|
+
} = t0;
|
|
13
|
+
const {
|
|
14
|
+
closeModal
|
|
15
|
+
} = useModal();
|
|
16
|
+
const {
|
|
17
|
+
t
|
|
18
|
+
} = useTranslation();
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] !== closeModal || $[1] !== slug) {
|
|
21
|
+
t1 = () => closeModal(slug);
|
|
22
|
+
$[0] = closeModal;
|
|
23
|
+
$[1] = slug;
|
|
24
|
+
$[2] = t1;
|
|
25
|
+
} else {
|
|
26
|
+
t1 = $[2];
|
|
27
|
+
}
|
|
28
|
+
const handleClose = t1;
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[3] !== handleClose || $[4] !== onConfirm) {
|
|
31
|
+
t2 = () => {
|
|
32
|
+
handleClose();
|
|
33
|
+
if (typeof onConfirm === "function") {
|
|
34
|
+
onConfirm();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
$[3] = handleClose;
|
|
38
|
+
$[4] = onConfirm;
|
|
39
|
+
$[5] = t2;
|
|
40
|
+
} else {
|
|
41
|
+
t2 = $[5];
|
|
42
|
+
}
|
|
43
|
+
const handleConfirm = t2;
|
|
44
|
+
let t3;
|
|
45
|
+
if ($[6] !== handleClose || $[7] !== handleConfirm || $[8] !== slug || $[9] !== t) {
|
|
46
|
+
t3 = _jsx(Modal, {
|
|
47
|
+
className: baseClass,
|
|
48
|
+
slug,
|
|
49
|
+
children: _jsxs("div", {
|
|
50
|
+
className: `${baseClass}__wrapper`,
|
|
51
|
+
children: [_jsxs("div", {
|
|
52
|
+
className: `${baseClass}__content`,
|
|
53
|
+
children: [_jsxs("h1", {
|
|
54
|
+
children: [t("general:resetPreferences"), "?"]
|
|
55
|
+
}), _jsx("p", {
|
|
56
|
+
children: t("general:resetPreferencesDescription")
|
|
57
|
+
})]
|
|
58
|
+
}), _jsxs("div", {
|
|
59
|
+
className: `${baseClass}__controls`,
|
|
60
|
+
children: [_jsx(Button, {
|
|
61
|
+
buttonStyle: "secondary",
|
|
62
|
+
onClick: handleClose,
|
|
63
|
+
size: "large",
|
|
64
|
+
children: t("general:cancel")
|
|
65
|
+
}), _jsx(Button, {
|
|
66
|
+
onClick: handleConfirm,
|
|
67
|
+
size: "large",
|
|
68
|
+
children: t("general:confirm")
|
|
69
|
+
})]
|
|
70
|
+
})]
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
$[6] = handleClose;
|
|
74
|
+
$[7] = handleConfirm;
|
|
75
|
+
$[8] = slug;
|
|
76
|
+
$[9] = t;
|
|
77
|
+
$[10] = t3;
|
|
78
|
+
} else {
|
|
79
|
+
t3 = $[10];
|
|
80
|
+
}
|
|
81
|
+
return t3;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","Button","Modal","useModal","useTranslation","baseClass","ConfirmResetModal","t0","$","slug","onConfirm","closeModal","t","t1","handleClose","t2","handleConfirm","t3","_jsx","className","children","_jsxs","buttonStyle","onClick","size"],"sources":["../../../../../src/views/Account/ResetPreferences/ConfirmResetModal/index.tsx"],"sourcesContent":["'use client'\nimport { Button, Modal, useModal, useTranslation } from '@payloadcms/ui'\n\nimport './index.scss'\n\nconst baseClass = 'reset-preferences-modal'\n\nexport const ConfirmResetModal: React.FC<{\n readonly onConfirm: () => void\n readonly slug: string\n}> = ({ slug, onConfirm }) => {\n const { closeModal } = useModal()\n const { t } = useTranslation()\n\n const handleClose = () => closeModal(slug)\n\n const handleConfirm = () => {\n handleClose()\n if (typeof onConfirm === 'function') {\n onConfirm()\n }\n }\n\n return (\n <Modal className={baseClass} slug={slug}>\n <div className={`${baseClass}__wrapper`}>\n <div className={`${baseClass}__content`}>\n <h1>{t('general:resetPreferences')}?</h1>\n <p>{t('general:resetPreferencesDescription')}</p>\n </div>\n <div className={`${baseClass}__controls`}>\n <Button buttonStyle=\"secondary\" onClick={handleClose} size=\"large\">\n {t('general:cancel')}\n </Button>\n <Button onClick={handleConfirm} size=\"large\">\n {t('general:confirm')}\n </Button>\n </div>\n </div>\n </Modal>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,cAAc,QAAQ;AAIxD,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,iBAAA,GAGRC,EAAA;EAAA,MAAAC,CAAA,GAAAR,EAAA;EAAC;IAAAS,IAAA;IAAAC;EAAA,IAAAH,EAAmB;EACvB;IAAAI;EAAA,IAAuB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AA,CAAAjB,MAAA;YAAAqB,WAAA,EAAoB;YAAAC,OAAA,EAAqBT,WAAA;YAAAU,IAAA,EAAkB;YAAAJ,QAAA,EACxDR,CAAA,CAAE;UAAA,C,GAELM,IAAA,CAAAjB,MAAA;YAAAsB,OAAA,EAAiBP,aAAA;YAAAQ,IAAA,EAAoB;YAAAJ,QAAA,EAClCR,CAAA,CAAE;UAAA,C;;;;;;;;;;;;SAXXK,E;CAiBJ","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import '../../../../scss/styles.scss';
|
|
2
|
+
|
|
3
|
+
@layer payload-default {
|
|
4
|
+
.reset-preferences-modal {
|
|
5
|
+
@include blur-bg;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
&__wrapper {
|
|
12
|
+
z-index: 1;
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: base(2);
|
|
17
|
+
padding: base(2);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__content {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: base(1);
|
|
24
|
+
|
|
25
|
+
> * {
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__controls {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: base(0.4);
|
|
33
|
+
|
|
34
|
+
.btn {
|
|
35
|
+
margin: 0;
|
|
36
|
+
margin-block: 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Account/ResetPreferences/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAUnC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CACrB,CA6DA,CAAA"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Button, LoadingOverlay, toast, useModal, useTranslation } from '@payloadcms/ui';
|
|
5
|
+
import * as qs from 'qs-esm';
|
|
6
|
+
import { Fragment, useCallback, useState } from 'react';
|
|
7
|
+
import { ConfirmResetModal } from './ConfirmResetModal/index.js';
|
|
8
|
+
const confirmResetModalSlug = 'confirm-reset-modal';
|
|
9
|
+
export const ResetPreferences = ({
|
|
10
|
+
apiRoute,
|
|
11
|
+
user
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
openModal
|
|
15
|
+
} = useModal();
|
|
16
|
+
const {
|
|
17
|
+
t
|
|
18
|
+
} = useTranslation();
|
|
19
|
+
const [loading, setLoading] = useState(false);
|
|
20
|
+
const handleResetPreferences = useCallback(async () => {
|
|
21
|
+
if (!user || loading) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
setLoading(true);
|
|
25
|
+
const stringifiedQuery = qs.stringify({
|
|
26
|
+
depth: 0,
|
|
27
|
+
where: {
|
|
28
|
+
user: {
|
|
29
|
+
id: {
|
|
30
|
+
equals: user.id
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
addQueryPrefix: true
|
|
36
|
+
});
|
|
37
|
+
try {
|
|
38
|
+
const res = await fetch(`${apiRoute}/payload-preferences${stringifiedQuery}`, {
|
|
39
|
+
credentials: 'include',
|
|
40
|
+
headers: {
|
|
41
|
+
'Content-Type': 'application/json'
|
|
42
|
+
},
|
|
43
|
+
method: 'DELETE'
|
|
44
|
+
});
|
|
45
|
+
const json = await res.json();
|
|
46
|
+
const message = json.message;
|
|
47
|
+
if (res.ok) {
|
|
48
|
+
toast.success(message);
|
|
49
|
+
} else {
|
|
50
|
+
toast.error(message);
|
|
51
|
+
}
|
|
52
|
+
} catch (e) {
|
|
53
|
+
// swallow error
|
|
54
|
+
} finally {
|
|
55
|
+
setLoading(false);
|
|
56
|
+
}
|
|
57
|
+
}, [apiRoute, loading, user]);
|
|
58
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
59
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
60
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
61
|
+
buttonStyle: "secondary",
|
|
62
|
+
onClick: () => openModal(confirmResetModalSlug),
|
|
63
|
+
children: t('general:resetPreferences')
|
|
64
|
+
})
|
|
65
|
+
}), /*#__PURE__*/_jsx(ConfirmResetModal, {
|
|
66
|
+
onConfirm: handleResetPreferences,
|
|
67
|
+
slug: confirmResetModalSlug
|
|
68
|
+
}), loading && /*#__PURE__*/_jsx(LoadingOverlay, {
|
|
69
|
+
loadingText: t('general:resettingPreferences')
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Button","LoadingOverlay","toast","useModal","useTranslation","qs","Fragment","useCallback","useState","ConfirmResetModal","confirmResetModalSlug","ResetPreferences","apiRoute","user","openModal","t","loading","setLoading","handleResetPreferences","stringifiedQuery","stringify","depth","where","id","equals","addQueryPrefix","res","fetch","credentials","headers","method","json","message","ok","success","error","e","_jsxs","_jsx","buttonStyle","onClick","onConfirm","slug","loadingText"],"sources":["../../../../src/views/Account/ResetPreferences/index.tsx"],"sourcesContent":["'use client'\nimport type { User } from 'payload'\n\nimport { Button, LoadingOverlay, toast, useModal, useTranslation } from '@payloadcms/ui'\nimport * as qs from 'qs-esm'\nimport { Fragment, useCallback, useState } from 'react'\n\nimport { ConfirmResetModal } from './ConfirmResetModal/index.js'\n\nconst confirmResetModalSlug = 'confirm-reset-modal'\n\nexport const ResetPreferences: React.FC<{\n readonly apiRoute: string\n readonly user?: User\n}> = ({ apiRoute, user }) => {\n const { openModal } = useModal()\n const { t } = useTranslation()\n\n const [loading, setLoading] = useState(false)\n\n const handleResetPreferences = useCallback(async () => {\n if (!user || loading) {\n return\n }\n setLoading(true)\n\n const stringifiedQuery = qs.stringify(\n {\n depth: 0,\n where: {\n user: {\n id: {\n equals: user.id,\n },\n },\n },\n },\n { addQueryPrefix: true },\n )\n\n try {\n const res = await fetch(`${apiRoute}/payload-preferences${stringifiedQuery}`, {\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n },\n method: 'DELETE',\n })\n\n const json = await res.json()\n const message = json.message\n\n if (res.ok) {\n toast.success(message)\n } else {\n toast.error(message)\n }\n } catch (e) {\n // swallow error\n } finally {\n setLoading(false)\n }\n }, [apiRoute, loading, user])\n\n return (\n <Fragment>\n <div>\n <Button buttonStyle=\"secondary\" onClick={() => openModal(confirmResetModalSlug)}>\n {t('general:resetPreferences')}\n </Button>\n </div>\n <ConfirmResetModal onConfirm={handleResetPreferences} slug={confirmResetModalSlug} />\n {loading && <LoadingOverlay loadingText={t('general:resettingPreferences')} />}\n </Fragment>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,cAAc,QAAQ;AACxE,YAAYC,EAAA,MAAQ;AACpB,SAASC,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,QAAQ;AAEhD,SAASC,iBAAiB,QAAQ;AAElC,MAAMC,qBAAA,GAAwB;AAE9B,OAAO,MAAMC,gBAAA,GAGRA,CAAC;EAAEC,QAAQ;EAAEC;AAAI,CAAE;EACtB,MAAM;IAAEC;EAAS,CAAE,GAAGX,QAAA;EACtB,MAAM;IAAEY;EAAC,CAAE,G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AWsB,IAAA,CAACrC,cAAA;MAAe0C,WAAA,EAAa5B,CAAA,CAAE;;;AAGjD","ignoreList":[]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { I18n } from '@payloadcms/translations';
|
|
2
|
-
import type { Config, LanguageOptions } from 'payload';
|
|
2
|
+
import type { BasePayload, Config, LanguageOptions, User } from 'payload';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import './index.scss';
|
|
5
5
|
export declare const Settings: React.FC<{
|
|
6
6
|
readonly className?: string;
|
|
7
7
|
readonly i18n: I18n;
|
|
8
8
|
readonly languageOptions: LanguageOptions;
|
|
9
|
+
readonly payload: BasePayload;
|
|
9
10
|
readonly theme: Config['admin']['theme'];
|
|
11
|
+
readonly user?: User;
|
|
10
12
|
}>;
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Account/Settings/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Account/Settings/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAGzE,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAMrB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAA;IACzC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAA;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CACrB,CAgBA,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FieldLabel } from '@payloadcms/ui';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { ResetPreferences } from '../ResetPreferences/index.js';
|
|
4
5
|
import { ToggleTheme } from '../ToggleTheme/index.js';
|
|
5
6
|
import { LanguageSelector } from './LanguageSelector.js';
|
|
6
7
|
const baseClass = 'payload-settings';
|
|
@@ -9,8 +10,11 @@ export const Settings = props => {
|
|
|
9
10
|
className,
|
|
10
11
|
i18n,
|
|
11
12
|
languageOptions,
|
|
12
|
-
|
|
13
|
+
payload,
|
|
14
|
+
theme,
|
|
15
|
+
user
|
|
13
16
|
} = props;
|
|
17
|
+
const apiRoute = payload.config.routes.api;
|
|
14
18
|
return /*#__PURE__*/_jsxs("div", {
|
|
15
19
|
className: [baseClass, className].filter(Boolean).join(' '),
|
|
16
20
|
children: [/*#__PURE__*/_jsx("h3", {
|
|
@@ -23,7 +27,10 @@ export const Settings = props => {
|
|
|
23
27
|
}), /*#__PURE__*/_jsx(LanguageSelector, {
|
|
24
28
|
languageOptions: languageOptions
|
|
25
29
|
})]
|
|
26
|
-
}), theme === 'all' && /*#__PURE__*/_jsx(ToggleTheme, {})
|
|
30
|
+
}), theme === 'all' && /*#__PURE__*/_jsx(ToggleTheme, {}), /*#__PURE__*/_jsx(ResetPreferences, {
|
|
31
|
+
apiRoute: apiRoute,
|
|
32
|
+
user: user
|
|
33
|
+
})]
|
|
27
34
|
});
|
|
28
35
|
};
|
|
29
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["FieldLabel","React","ToggleTheme","LanguageSelector","baseClass","Settings","props","className","i18n","languageOptions","theme","_jsxs","filter","Boolean","join","_jsx","t","htmlFor","label"],"sources":["../../../../src/views/Account/Settings/index.tsx"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { Config, LanguageOptions } from 'payload'\n\nimport { FieldLabel } from '@payloadcms/ui'\nimport React from 'react'\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["FieldLabel","React","ResetPreferences","ToggleTheme","LanguageSelector","baseClass","Settings","props","className","i18n","languageOptions","payload","theme","user","apiRoute","config","routes","api","_jsxs","filter","Boolean","join","_jsx","t","htmlFor","label"],"sources":["../../../../src/views/Account/Settings/index.tsx"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { BasePayload, Config, LanguageOptions, User } from 'payload'\n\nimport { FieldLabel } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { ResetPreferences } from '../ResetPreferences/index.js'\nimport './index.scss'\nimport { ToggleTheme } from '../ToggleTheme/index.js'\nimport { LanguageSelector } from './LanguageSelector.js'\n\nconst baseClass = 'payload-settings'\n\nexport const Settings: React.FC<{\n readonly className?: string\n readonly i18n: I18n\n readonly languageOptions: LanguageOptions\n readonly payload: BasePayload\n readonly theme: Config['admin']['theme']\n readonly user?: User\n}> = (props) => {\n const { className, i18n, languageOptions, payload, theme, user } = props\n\n const apiRoute = payload.config.routes.api\n\n return (\n <div className={[baseClass, className].filter(Boolean).join(' ')}>\n <h3>{i18n.t('general:payloadSettings')}</h3>\n <div className={`${baseClass}__language`}>\n <FieldLabel htmlFor=\"language-select\" label={i18n.t('general:language')} />\n <LanguageSelector languageOptions={languageOptions} />\n </div>\n {theme === 'all' && <ToggleTheme />}\n <ResetPreferences apiRoute={apiRoute} user={user} />\n </div>\n )\n}\n"],"mappings":";AAGA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,KAAA,MAAW;AAElB,SAASC,gBAAgB,QAAQ;AAEjC,SAASC,WAAW,QAAQ;AAC5B,SAASC,gBAAgB,QAAQ;AAEjC,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,QAAA,GAOPC,KAAA;EACJ,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC,eAAe;IAAEC,OAAO;IAAEC,KAAK;IAAEC;EAAI,CAAE,GAAGN,KAAA;EAEnE,MAAMO,QAAA,GAAWH,OAAA,CAAQI,MAAM,CAACC,MAAM,CAACC,GAAG;EAE1C,oBACEC,KAAA,CAAC;IAAIV,SAAA,EAAW,CAACH,SAAA,EAAWG,SAAA,CAAU,CAACW,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;4BAC1DC,IAAA,CAAC;gBAAIb,IAAA,CAAKc,CAAC,CAAC;qBACZL,KAAA,CAAC;MAAIV,SAAA,EAAW,GAAGH,SAAA,YAAqB;8BACtCiB,IAAA,CAACtB,UAAA;QAAWwB,OAAA,EAAQ;QAAkBC,KAAA,EAAOhB,IAAA,CAAKc,CAAC,CAAC;uBACpDD,IAAA,CAAClB,gBAAA;QAAiBM,eAAA,EAAiBA;;QAEpCE,KAAA,KAAU,sBAASU,IAAA,CAACnB,WAAA,O,aACrBmB,IAAA,CAACpB,gBAAA;MAAiBY,QAAA,EAAUA,QAAA;MAAUD,IAAA,EAAMA;;;AAGlD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Account/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAM7C,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAEnD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Account/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAM7C,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAEnD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwJ5C,CAAA"}
|
|
@@ -51,6 +51,7 @@ export const Account = async ({
|
|
|
51
51
|
collectionSlug: collectionConfig.slug,
|
|
52
52
|
locale,
|
|
53
53
|
payload,
|
|
54
|
+
req,
|
|
54
55
|
user
|
|
55
56
|
});
|
|
56
57
|
if (!data) {
|
|
@@ -119,7 +120,9 @@ export const Account = async ({
|
|
|
119
120
|
AfterFields: /*#__PURE__*/_jsx(Settings, {
|
|
120
121
|
i18n: i18n,
|
|
121
122
|
languageOptions: languageOptions,
|
|
122
|
-
|
|
123
|
+
payload: payload,
|
|
124
|
+
theme: theme,
|
|
125
|
+
user: user
|
|
123
126
|
}),
|
|
124
127
|
apiURL: `${serverURL}${api}/${userSlug}${user?.id ? `/${user.id}` : ''}`,
|
|
125
128
|
collectionSlug: userSlug,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DocumentInfoProvider","EditDepthProvider","HydrateAuthProvider","RenderServerComponent","buildFormState","notFound","React","DocumentHeader","getDocPreferences","getDocumentData","getDocumentPermissions","getIsLocked","getVersions","EditView","AccountClient","Settings","generateAccountMetadata","Account","initPageResult","params","searchParams","languageOptions","locale","permissions","req","i18n","payload","config","user","admin","theme","userSlug","routes","api","serverURL","collectionConfig","collections","find","collection","slug","id","data","collectionSlug","Error","docPreferences","docPermissions","hasPublishPermission","hasSavePermission","state","formState","code","operation","renderAllFields","schemaPath","currentEditor","isLocked","lastUpdateTime","isEditing","hasPublishedDoc","mostRecentVersionIsAutosaved","unpublishedVersionCount","versionCount","doc","_jsx","AfterFields","apiURL","initialData","initialState","_jsxs","hideTabs","Component","components","views","account","Fallback","importMap","serverProps","routeSegments"],"sources":["../../../src/views/Account/index.tsx"],"sourcesContent":["import type { AdminViewProps } from 'payload'\n\nimport { DocumentInfoProvider, EditDepthProvider, HydrateAuthProvider } from '@payloadcms/ui'\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { buildFormState } from '@payloadcms/ui/utilities/buildFormState'\nimport { notFound } from 'next/navigation.js'\nimport React from 'react'\n\nimport { DocumentHeader } from '../../elements/DocumentHeader/index.js'\nimport { getDocPreferences } from '../Document/getDocPreferences.js'\nimport { getDocumentData } from '../Document/getDocumentData.js'\nimport { getDocumentPermissions } from '../Document/getDocumentPermissions.js'\nimport { getIsLocked } from '../Document/getIsLocked.js'\nimport { getVersions } from '../Document/getVersions.js'\nimport { EditView } from '../Edit/index.js'\nimport { AccountClient } from './index.client.js'\nimport { Settings } from './Settings/index.js'\n\nexport { generateAccountMetadata } from './meta.js'\n\nexport const Account: React.FC<AdminViewProps> = async ({\n initPageResult,\n params,\n searchParams,\n}) => {\n const {\n languageOptions,\n locale,\n permissions,\n req,\n req: {\n i18n,\n payload,\n payload: { config },\n user,\n },\n } = initPageResult\n\n const {\n admin: { theme, user: userSlug },\n routes: { api },\n serverURL,\n } = config\n\n const collectionConfig = config.collections.find((collection) => collection.slug === userSlug)\n\n if (collectionConfig && user?.id) {\n // Fetch the data required for the view\n const data = await getDocumentData({\n id: user.id,\n collectionSlug: collectionConfig.slug,\n locale,\n payload,\n user,\n })\n\n if (!data) {\n throw new Error('not-found')\n }\n\n // Get document preferences\n const docPreferences = await getDocPreferences({\n id: user.id,\n collectionSlug: collectionConfig.slug,\n payload,\n user,\n })\n\n // Get permissions\n const { docPermissions, hasPublishPermission, hasSavePermission } =\n await getDocumentPermissions({\n id: user.id,\n collectionConfig,\n data,\n req,\n })\n\n // Build initial form state from data\n const { state: formState } = await buildFormState({\n id: user.id,\n collectionSlug: collectionConfig.slug,\n data,\n docPermissions,\n docPreferences,\n locale: locale?.code,\n operation: 'update',\n renderAllFields: true,\n req,\n schemaPath: collectionConfig.slug,\n })\n\n // Fetch document lock state\n const { currentEditor, isLocked, lastUpdateTime } = await getIsLocked({\n id: user.id,\n collectionConfig,\n isEditing: true,\n req,\n })\n\n // Get all versions required for UI\n const { hasPublishedDoc, mostRecentVersionIsAutosaved, unpublishedVersionCount, versionCount } =\n await getVersions({\n id: user.id,\n collectionConfig,\n doc: data,\n docPermissions,\n locale: locale?.code,\n payload,\n user,\n })\n\n return (\n <DocumentInfoProvider\n AfterFields={<Settings
|
|
1
|
+
{"version":3,"file":"index.js","names":["DocumentInfoProvider","EditDepthProvider","HydrateAuthProvider","RenderServerComponent","buildFormState","notFound","React","DocumentHeader","getDocPreferences","getDocumentData","getDocumentPermissions","getIsLocked","getVersions","EditView","AccountClient","Settings","generateAccountMetadata","Account","initPageResult","params","searchParams","languageOptions","locale","permissions","req","i18n","payload","config","user","admin","theme","userSlug","routes","api","serverURL","collectionConfig","collections","find","collection","slug","id","data","collectionSlug","Error","docPreferences","docPermissions","hasPublishPermission","hasSavePermission","state","formState","code","operation","renderAllFields","schemaPath","currentEditor","isLocked","lastUpdateTime","isEditing","hasPublishedDoc","mostRecentVersionIsAutosaved","unpublishedVersionCount","versionCount","doc","_jsx","AfterFields","apiURL","initialData","initialState","_jsxs","hideTabs","Component","components","views","account","Fallback","importMap","serverProps","routeSegments"],"sources":["../../../src/views/Account/index.tsx"],"sourcesContent":["import type { AdminViewProps } from 'payload'\n\nimport { DocumentInfoProvider, EditDepthProvider, HydrateAuthProvider } from '@payloadcms/ui'\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { buildFormState } from '@payloadcms/ui/utilities/buildFormState'\nimport { notFound } from 'next/navigation.js'\nimport React from 'react'\n\nimport { DocumentHeader } from '../../elements/DocumentHeader/index.js'\nimport { getDocPreferences } from '../Document/getDocPreferences.js'\nimport { getDocumentData } from '../Document/getDocumentData.js'\nimport { getDocumentPermissions } from '../Document/getDocumentPermissions.js'\nimport { getIsLocked } from '../Document/getIsLocked.js'\nimport { getVersions } from '../Document/getVersions.js'\nimport { EditView } from '../Edit/index.js'\nimport { AccountClient } from './index.client.js'\nimport { Settings } from './Settings/index.js'\n\nexport { generateAccountMetadata } from './meta.js'\n\nexport const Account: React.FC<AdminViewProps> = async ({\n initPageResult,\n params,\n searchParams,\n}) => {\n const {\n languageOptions,\n locale,\n permissions,\n req,\n req: {\n i18n,\n payload,\n payload: { config },\n user,\n },\n } = initPageResult\n\n const {\n admin: { theme, user: userSlug },\n routes: { api },\n serverURL,\n } = config\n\n const collectionConfig = config.collections.find((collection) => collection.slug === userSlug)\n\n if (collectionConfig && user?.id) {\n // Fetch the data required for the view\n const data = await getDocumentData({\n id: user.id,\n collectionSlug: collectionConfig.slug,\n locale,\n payload,\n req,\n user,\n })\n\n if (!data) {\n throw new Error('not-found')\n }\n\n // Get document preferences\n const docPreferences = await getDocPreferences({\n id: user.id,\n collectionSlug: collectionConfig.slug,\n payload,\n user,\n })\n\n // Get permissions\n const { docPermissions, hasPublishPermission, hasSavePermission } =\n await getDocumentPermissions({\n id: user.id,\n collectionConfig,\n data,\n req,\n })\n\n // Build initial form state from data\n const { state: formState } = await buildFormState({\n id: user.id,\n collectionSlug: collectionConfig.slug,\n data,\n docPermissions,\n docPreferences,\n locale: locale?.code,\n operation: 'update',\n renderAllFields: true,\n req,\n schemaPath: collectionConfig.slug,\n })\n\n // Fetch document lock state\n const { currentEditor, isLocked, lastUpdateTime } = await getIsLocked({\n id: user.id,\n collectionConfig,\n isEditing: true,\n req,\n })\n\n // Get all versions required for UI\n const { hasPublishedDoc, mostRecentVersionIsAutosaved, unpublishedVersionCount, versionCount } =\n await getVersions({\n id: user.id,\n collectionConfig,\n doc: data,\n docPermissions,\n locale: locale?.code,\n payload,\n user,\n })\n\n return (\n <DocumentInfoProvider\n AfterFields={\n <Settings\n i18n={i18n}\n languageOptions={languageOptions}\n payload={payload}\n theme={theme}\n user={user}\n />\n }\n apiURL={`${serverURL}${api}/${userSlug}${user?.id ? `/${user.id}` : ''}`}\n collectionSlug={userSlug}\n currentEditor={currentEditor}\n docPermissions={docPermissions}\n hasPublishedDoc={hasPublishedDoc}\n hasPublishPermission={hasPublishPermission}\n hasSavePermission={hasSavePermission}\n id={user?.id}\n initialData={data}\n initialState={formState}\n isEditing\n isLocked={isLocked}\n lastUpdateTime={lastUpdateTime}\n mostRecentVersionIsAutosaved={mostRecentVersionIsAutosaved}\n unpublishedVersionCount={unpublishedVersionCount}\n versionCount={versionCount}\n >\n <EditDepthProvider>\n <DocumentHeader\n collectionConfig={collectionConfig}\n hideTabs\n i18n={i18n}\n payload={payload}\n permissions={permissions}\n />\n <HydrateAuthProvider permissions={permissions} />\n {RenderServerComponent({\n Component: config.admin?.components?.views?.account?.Component,\n Fallback: EditView,\n importMap: payload.importMap,\n serverProps: {\n i18n,\n initPageResult,\n locale,\n params,\n payload,\n permissions,\n routeSegments: [],\n searchParams,\n user,\n },\n })}\n <AccountClient />\n </EditDepthProvider>\n </DocumentInfoProvider>\n )\n }\n\n return notFound()\n}\n"],"mappings":";AAEA,SAASA,oBAAoB,EAAEC,iBAAiB,EAAEC,mBAAmB,QAAQ;AAC7E,SAASC,qBAAqB,QAAQ;AACtC,SAASC,cAAc,QAAQ;AAC/B,SAASC,QAAQ,QAAQ;AACzB,OAAOC,KAAA,MAAW;AAElB,SAASC,cAAc,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,eAAe,QAAQ;AAChC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,WAAW,QAAQ;AAC5B,SAASC,WAAW,QAAQ;AAC5B,SAASC,QAAQ,QAAQ;AACzB,SAASC,aAAa,QAAQ;AAC9B,SAASC,QAAQ,QAAQ;AAEzB,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,OAAA,GAAoC,MAAAA,CAAO;EACtDC,cAAc;EACdC,MAAM;EACNC;AAAY,CACb;EACC,MAAM;IACJC,eAAe;IACfC,M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AAA,EAAUA,QAAA;MACVC,cAAA,EAAgBA,cAAA;MAChBG,4BAAA,EAA8BA,4BAAA;MAC9BC,uBAAA,EAAyBA,uBAAA;MACzBC,YAAA,EAAcA,YAAA;gBAEd,aAAAO,KAAA,CAACnE,iBAAA;gCACC8D,IAAA,CAACxD,cAAA;UACC4B,gBAAA,EAAkBA,gBAAA;UAClBkC,QAAQ;UACR5C,IAAA,EAAMA,IAAA;UACNC,OAAA,EAASA,OAAA;UACTH,WAAA,EAAaA;yBAEfwC,IAAA,CAAC7D,mBAAA;UAAoBqB,WAAA,EAAaA;YACjCpB,qBAAA,CAAsB;UACrBmE,SAAA,EAAW3C,MAAA,CAAOE,KAAK,EAAE0C,UAAA,EAAYC,KAAA,EAAOC,OAAA,EAASH,SAAA;UACrDI,QAAA,EAAU7D,QAAA;UACV8D,SAAA,EAAWjD,OAAA,CAAQiD,SAAS;UAC5BC,WAAA,EAAa;YACXnD,IAAA;YACAP,cAAA;YACAI,MAAA;YACAH,MAAA;YACAO,OAAA;YACAH,WAAA;YACAsD,aAAA,EAAe,EAAE;YACjBzD,YAAA;YACAQ;UACF;QACF,I,aACAmC,IAAA,CAACjD,aAAA;;;EAIT;EAEA,OAAOT,QAAA;AACT","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/CreateFirstUser/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAA;AAE3D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/CreateFirstUser/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG7C,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAA;AAE3D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmExD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["buildFormState","React","getDocPreferences","getDocumentData","getDocumentPermissions","CreateFirstUserClient","generateCreateFirstUserMetadata","CreateFirstUserView","initPageResult","locale","req","payload","config","admin","user","userSlug","collectionConfig","collections","find","collection","slug","auth","authOptions","loginWithUsername","data","collectionSlug","docPreferences","docPermissions","state","formState","code","operation","renderAllFields","schemaPath","_jsxs","className","_jsx","t","initialState"],"sources":["../../../src/views/CreateFirstUser/index.tsx"],"sourcesContent":["import type { AdminViewProps } from 'payload'\n\nimport { buildFormState } from '@payloadcms/ui/utilities/buildFormState'\nimport React from 'react'\n\nimport { getDocPreferences } from '../Document/getDocPreferences.js'\nimport { getDocumentData } from '../Document/getDocumentData.js'\nimport { getDocumentPermissions } from '../Document/getDocumentPermissions.js'\nimport { CreateFirstUserClient } from './index.client.js'\nimport './index.scss'\n\nexport { generateCreateFirstUserMetadata } from './meta.js'\n\nexport const CreateFirstUserView: React.FC<AdminViewProps> = async ({ initPageResult }) => {\n const {\n locale,\n req,\n req: {\n payload: {\n config: {\n admin: { user: userSlug },\n },\n config,\n },\n },\n } = initPageResult\n\n const collectionConfig = config.collections?.find((collection) => collection?.slug === userSlug)\n const { auth: authOptions } = collectionConfig\n const loginWithUsername = authOptions.loginWithUsername\n\n // Fetch the data required for the view\n const data = await getDocumentData({\n collectionSlug: collectionConfig.slug,\n locale,\n payload: req.payload,\n user: req.user,\n })\n\n // Get document preferences\n const docPreferences = await getDocPreferences({\n collectionSlug: collectionConfig.slug,\n payload: req.payload,\n user: req.user,\n })\n\n // Get permissions\n const { docPermissions } = await getDocumentPermissions({\n collectionConfig,\n data,\n req,\n })\n\n // Build initial form state from data\n const { state: formState } = await buildFormState({\n collectionSlug: collectionConfig.slug,\n data,\n docPermissions,\n docPreferences,\n locale: locale?.code,\n operation: 'create',\n renderAllFields: true,\n req,\n schemaPath: collectionConfig.slug,\n })\n\n return (\n <div className=\"create-first-user\">\n <h1>{req.t('general:welcome')}</h1>\n <p>{req.t('authentication:beginCreateFirstUser')}</p>\n <CreateFirstUserClient\n docPermissions={docPermissions}\n docPreferences={docPreferences}\n initialState={formState}\n loginWithUsername={loginWithUsername}\n userSlug={userSlug}\n />\n </div>\n )\n}\n"],"mappings":";AAEA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,iBAAiB,QAAQ;AAClC,SAASC,eAAe,QAAQ;AAChC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,qBAAqB,QAAQ;AAGtC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAgD,MAAAA,CAAO;EAAEC;AAAc,CAAE;EACpF,MAAM;IACJC,MAAM;IACNC,GAAG;IACHA,GAAA,EAAK;MACHC,OAAA,EAAS;QACPC,MAAA,EAAQ;UACNC,KAAA,EAAO;YAAEC,IAAA,EAAMC;UAAQ;QAAE,CAC1B;QACDH;MAAM;IACP;EACF,CACF,GAAGJ,cAAA;EAEJ,MAAMQ,gBAAA,GAAmBJ,MAAA,CAAOK,WAAW,EAAEC,IAAA,CAAMC,UAAA,IAAeA,UAAA,EAAYC,IAAA,KAASL,QAAA;EACvF,MAAM;IAAEM,IAAA,EAAMC;EAAW,CAAE,GAAGN,gBAAA;EAC9B,MAAMO,iBAAA,GAAoBD,WAAA,CAAYC,iBAAiB;EAEvD;EACA,MAAMC,IAAA,GAAO,MAAMrB,eAAA,CAAgB;IACjCsB,cAAA,EAAgBT,gBAAA,CAAiBI,IAAI;IACrCX,MAAA;IACAE,OAAA,EAASD,GAAA,CAAIC,OAAO;
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildFormState","React","getDocPreferences","getDocumentData","getDocumentPermissions","CreateFirstUserClient","generateCreateFirstUserMetadata","CreateFirstUserView","initPageResult","locale","req","payload","config","admin","user","userSlug","collectionConfig","collections","find","collection","slug","auth","authOptions","loginWithUsername","data","collectionSlug","docPreferences","docPermissions","state","formState","code","operation","renderAllFields","schemaPath","_jsxs","className","_jsx","t","initialState"],"sources":["../../../src/views/CreateFirstUser/index.tsx"],"sourcesContent":["import type { AdminViewProps } from 'payload'\n\nimport { buildFormState } from '@payloadcms/ui/utilities/buildFormState'\nimport React from 'react'\n\nimport { getDocPreferences } from '../Document/getDocPreferences.js'\nimport { getDocumentData } from '../Document/getDocumentData.js'\nimport { getDocumentPermissions } from '../Document/getDocumentPermissions.js'\nimport { CreateFirstUserClient } from './index.client.js'\nimport './index.scss'\n\nexport { generateCreateFirstUserMetadata } from './meta.js'\n\nexport const CreateFirstUserView: React.FC<AdminViewProps> = async ({ initPageResult }) => {\n const {\n locale,\n req,\n req: {\n payload: {\n config: {\n admin: { user: userSlug },\n },\n config,\n },\n },\n } = initPageResult\n\n const collectionConfig = config.collections?.find((collection) => collection?.slug === userSlug)\n const { auth: authOptions } = collectionConfig\n const loginWithUsername = authOptions.loginWithUsername\n\n // Fetch the data required for the view\n const data = await getDocumentData({\n collectionSlug: collectionConfig.slug,\n locale,\n payload: req.payload,\n req,\n user: req.user,\n })\n\n // Get document preferences\n const docPreferences = await getDocPreferences({\n collectionSlug: collectionConfig.slug,\n payload: req.payload,\n user: req.user,\n })\n\n // Get permissions\n const { docPermissions } = await getDocumentPermissions({\n collectionConfig,\n data,\n req,\n })\n\n // Build initial form state from data\n const { state: formState } = await buildFormState({\n collectionSlug: collectionConfig.slug,\n data,\n docPermissions,\n docPreferences,\n locale: locale?.code,\n operation: 'create',\n renderAllFields: true,\n req,\n schemaPath: collectionConfig.slug,\n })\n\n return (\n <div className=\"create-first-user\">\n <h1>{req.t('general:welcome')}</h1>\n <p>{req.t('authentication:beginCreateFirstUser')}</p>\n <CreateFirstUserClient\n docPermissions={docPermissions}\n docPreferences={docPreferences}\n initialState={formState}\n loginWithUsername={loginWithUsername}\n userSlug={userSlug}\n />\n </div>\n )\n}\n"],"mappings":";AAEA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,iBAAiB,QAAQ;AAClC,SAASC,eAAe,QAAQ;AAChC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,qBAAqB,QAAQ;AAGtC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAgD,MAAAA,CAAO;EAAEC;AAAc,CAAE;EACpF,MAAM;IACJC,MAAM;IACNC,GAAG;IACHA,GAAA,EAAK;MACHC,OAAA,EAAS;QACPC,MAAA,EAAQ;UACNC,KAAA,EAAO;YAAEC,IAAA,EAAMC;UAAQ;QAAE,CAC1B;QACDH;MAAM;IACP;EACF,CACF,GAAGJ,cAAA;EAEJ,MAAMQ,gBAAA,GAAmBJ,MAAA,CAAOK,WAAW,EAAEC,IAAA,CAAMC,UAAA,IAAeA,UAAA,EAAYC,IAAA,KAASL,QAAA;EACvF,MAAM;IAAEM,IAAA,EAAMC;EAAW,CAAE,GAAGN,gBAAA;EAC9B,MAAMO,iBAAA,GAAoBD,WAAA,CAAYC,iBAAiB;EAEvD;EACA,MAAMC,IAAA,GAAO,MAAMrB,eAAA,CAAgB;IACjCsB,cAAA,EAAgBT,gBAAA,CAAiBI,IAAI;IACrCX,MAAA;IACAE,OAAA,EAASD,GAAA,CAAIC,OAAO;IACpBD,GAAA;IACAI,IAAA,EAAMJ,GAAA,CAAII;EACZ;EAEA;EACA,MAAMY,cAAA,GAAiB,MAAMxB,iBAAA,CAAkB;IAC7CuB,cAAA,EAAgBT,gBAAA,CAAiBI,IAAI;IACrCT,OAAA,EAASD,GAAA,CAAIC,OAAO;IACpBG,IAAA,EAAMJ,GAAA,CAAII;EACZ;EAEA;EACA,MAAM;IAAEa;EAAc,CAAE,GAAG,MAAMvB,sBAAA,CAAuB;IACtDY,gBAAA;IACAQ,IAAA;IACAd;EACF;EAEA;EACA,MAAM;IAAEkB,KAAA,EAAOC;EAAS,CAAE,GAAG,MAAM7B,cAAA,CAAe;IAChDyB,cAAA,EAAgBT,gBAAA,CAAiBI,IAAI;IACrCI,IAAA;IACAG,cAAA;IACAD,cAAA;IACAjB,MAAA,EAAQA,MAAA,EAAQqB,IAAA;IAChBC,SAAA,EAAW;IACXC,eAAA,EAAiB;IACjBtB,GAAA;IACAuB,UAAA,EAAYjB,gBAAA,CAAiBI;EAC/B;EAEA,oBACEc,KAAA,CAAC;IAAIC,SAAA,EAAU;4BACbC,IAAA,CAAC;gBAAI1B,GAAA,CAAI2B,CAAC,CAAC;qBACXD,IAAA,CAAC;gBAAG1B,GAAA,CAAI2B,CAAC,CAAC;qBACVD,IAAA,CAAC/B,qBAAA;MACCsB,cAAA,EAAgBA,cAAA;MAChBD,cAAA,EAAgBA,cAAA;MAChBY,YAAA,EAAcT,SAAA;MACdN,iBAAA,EAAmBA,iBAAA;MACnBR,QAAA,EAAUA;;;AAIlB","ignoreList":[]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { type Locale, type Payload, type TypedUser, type TypeWithID } from 'payload';
|
|
1
|
+
import { type Locale, type Payload, type PayloadRequest, type TypedUser, type TypeWithID } from 'payload';
|
|
2
2
|
type Args = {
|
|
3
3
|
collectionSlug?: string;
|
|
4
4
|
globalSlug?: string;
|
|
5
5
|
id?: number | string;
|
|
6
6
|
locale?: Locale;
|
|
7
7
|
payload: Payload;
|
|
8
|
+
req?: PayloadRequest;
|
|
8
9
|
user?: TypedUser;
|
|
9
10
|
};
|
|
10
|
-
export declare const getDocumentData: ({ id: idArg, collectionSlug, globalSlug, locale, payload, user, }: Args) => Promise<null | Record<string, unknown> | TypeWithID>;
|
|
11
|
+
export declare const getDocumentData: ({ id: idArg, collectionSlug, globalSlug, locale, payload, req, user, }: Args) => Promise<null | Record<string, unknown> | TypeWithID>;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=getDocumentData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDocumentData.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getDocumentData.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"getDocumentData.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getDocumentData.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,UAAU,EAChB,MAAM,SAAS,CAAA;AAEhB,KAAK,IAAI,GAAG;IACV,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,eAAe,2EAQzB,IAAI,KAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CA4C5D,CAAA"}
|
|
@@ -6,6 +6,7 @@ export const getDocumentData = async ({
|
|
|
6
6
|
globalSlug,
|
|
7
7
|
locale,
|
|
8
8
|
payload,
|
|
9
|
+
req,
|
|
9
10
|
user
|
|
10
11
|
}) => {
|
|
11
12
|
const id = sanitizeID(idArg);
|
|
@@ -20,6 +21,11 @@ export const getDocumentData = async ({
|
|
|
20
21
|
fallbackLocale: false,
|
|
21
22
|
locale: locale?.code,
|
|
22
23
|
overrideAccess: false,
|
|
24
|
+
req: {
|
|
25
|
+
query: req?.query,
|
|
26
|
+
search: req?.search,
|
|
27
|
+
searchParams: req?.searchParams
|
|
28
|
+
},
|
|
23
29
|
user
|
|
24
30
|
});
|
|
25
31
|
}
|
|
@@ -31,6 +37,11 @@ export const getDocumentData = async ({
|
|
|
31
37
|
fallbackLocale: false,
|
|
32
38
|
locale: locale?.code,
|
|
33
39
|
overrideAccess: false,
|
|
40
|
+
req: {
|
|
41
|
+
query: req?.query,
|
|
42
|
+
search: req?.search,
|
|
43
|
+
searchParams: req?.searchParams
|
|
44
|
+
},
|
|
34
45
|
user
|
|
35
46
|
});
|
|
36
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDocumentData.js","names":["sanitizeID","logError","getDocumentData","id","idArg","collectionSlug","globalSlug","locale","payload","user","resolvedData","findByID","collection","depth","draft","fallbackLocale","code","overrideAccess","findGlobal","slug","err"],"sources":["../../../src/views/Document/getDocumentData.ts"],"sourcesContent":["import { sanitizeID } from '@payloadcms/ui/shared'\nimport {
|
|
1
|
+
{"version":3,"file":"getDocumentData.js","names":["sanitizeID","logError","getDocumentData","id","idArg","collectionSlug","globalSlug","locale","payload","req","user","resolvedData","findByID","collection","depth","draft","fallbackLocale","code","overrideAccess","query","search","searchParams","findGlobal","slug","err"],"sources":["../../../src/views/Document/getDocumentData.ts"],"sourcesContent":["import { sanitizeID } from '@payloadcms/ui/shared'\nimport {\n type Locale,\n logError,\n type Payload,\n type PayloadRequest,\n type TypedUser,\n type TypeWithID,\n} from 'payload'\n\ntype Args = {\n collectionSlug?: string\n globalSlug?: string\n id?: number | string\n locale?: Locale\n payload: Payload\n req?: PayloadRequest\n user?: TypedUser\n}\n\nexport const getDocumentData = async ({\n id: idArg,\n collectionSlug,\n globalSlug,\n locale,\n payload,\n req,\n user,\n}: Args): Promise<null | Record<string, unknown> | TypeWithID> => {\n const id = sanitizeID(idArg)\n let resolvedData: Record<string, unknown> | TypeWithID = null\n\n try {\n if (collectionSlug && id) {\n resolvedData = await payload.findByID({\n id,\n collection: collectionSlug,\n depth: 0,\n draft: true,\n fallbackLocale: false,\n locale: locale?.code,\n overrideAccess: false,\n req: {\n query: req?.query,\n search: req?.search,\n searchParams: req?.searchParams,\n },\n user,\n })\n }\n\n if (globalSlug) {\n resolvedData = await payload.findGlobal({\n slug: globalSlug,\n depth: 0,\n draft: true,\n fallbackLocale: false,\n locale: locale?.code,\n overrideAccess: false,\n req: {\n query: req?.query,\n search: req?.search,\n searchParams: req?.searchParams,\n },\n user,\n })\n }\n } catch (err) {\n logError({ err, payload })\n }\n\n return resolvedData\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ;AAC3B,SAEEC,QAAQ,QAKH;AAYP,OAAO,MAAMC,eAAA,GAAkB,MAAAA,CAAO;EACpCC,EAAA,EAAIC,KAAK;EACTC,cAAc;EACdC,UAAU;EACVC,MAAM;EACNC,OAAO;EACPC,GAAG;EACHC;AAAI,CACC;EACL,MAAMP,EAAA,GAAKH,UAAA,CAAWI,KAAA;EACtB,IAAIO,YAAA,GAAqD;EAEzD,IAAI;IACF,IAAIN,cAAA,IAAkBF,EAAA,EAAI;MACxBQ,YAAA,GAAe,MAAMH,OAAA,CAAQI,QAAQ,CAAC;QACpCT,EAAA;QACAU,UAAA,EAAYR,cAAA;QACZS,KAAA,EAAO;QACPC,KAAA,EAAO;QACPC,cAAA,EAAgB;QAChBT,MAAA,EAAQA,MAAA,EAAQU,IAAA;QAChBC,cAAA,EAAgB;QAChBT,GAAA,EAAK;UACHU,KAAA,EAAOV,GAAA,EAAKU,KAAA;UACZC,MAAA,EAAQX,GAAA,EAAKW,MAAA;UACbC,YAAA,EAAcZ,GAAA,EAAKY;QACrB;QACAX;MACF;IACF;IAEA,IAAIJ,UAAA,EAAY;MACdK,YAAA,GAAe,MAAMH,OAAA,CAAQc,UAAU,CAAC;QACtCC,IAAA,EAAMjB,UAAA;QACNQ,KAAA,EAAO;QACPC,KAAA,EAAO;QACPC,cAAA,EAAgB;QAChBT,MAAA,EAAQA,MAAA,EAAQU,IAAA;QAChBC,cAAA,EAAgB;QAChBT,GAAA,EAAK;UACHU,KAAA,EAAOV,GAAA,EAAKU,KAAA;UACZC,MAAA,EAAQX,GAAA,EAAKW,MAAA;UACbC,YAAA,EAAcZ,GAAA,EAAKY;QACrB;QACAX;MACF;IACF;EACF,EAAE,OAAOc,GAAA,EAAK;IACZvB,QAAA,CAAS;MAAEuB,GAAA;MAAKhB;IAAQ;EAC1B;EAEA,OAAOG,YAAA;AACT","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Document/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAA6C,MAAM,SAAS,CAAA;AAQ9F,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAcrE,eAAO,MAAM,gBAAgB,EAAE,wBAAiE,CAAA;AAKhG,eAAO,MAAM,cAAc,yKAWxB;IACD,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,GAAG,cAAc,KAAG,OAAO,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Document/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAA6C,MAAM,SAAS,CAAA;AAQ9F,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAcrE,eAAO,MAAM,gBAAgB,EAAE,wBAAiE,CAAA;AAKhG,eAAO,MAAM,cAAc,yKAWxB;IACD,wBAAwB,CAAC,EAAE,OAAO,CAAA;CACnC,GAAG,cAAc,KAAG,OAAO,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CA6UA,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAe7C,CAAA"}
|