@payloadcms/next 3.56.0-internal.72f4fd2 → 3.57.0-canary.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.
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +41 -19
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -1
- package/dist/elements/Nav/index.client.js +48 -28
- package/dist/elements/Nav/index.client.js.map +1 -1
- package/dist/layouts/Root/index.js +1 -1
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
- package/dist/utilities/handleServerFunctions.js +3 -9
- package/dist/utilities/handleServerFunctions.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/getIsLocked.d.ts.map +1 -1
- package/dist/views/Document/getIsLocked.js +18 -3
- package/dist/views/Document/getIsLocked.js.map +1 -1
- package/dist/views/List/transformColumnsToSelect.d.ts.map +1 -1
- package/dist/views/List/transformColumnsToSelect.js +10 -6
- package/dist/views/List/transformColumnsToSelect.js.map +1 -1
- package/dist/views/Logout/LogoutClient.js +31 -29
- package/dist/views/Logout/LogoutClient.js.map +1 -1
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Root/index.js +4 -5
- package/dist/views/Root/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +34 -18
- package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +8 -2
- package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +27 -17
- package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +4 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.scss +5 -0
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +48 -33
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +30 -21
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts +6 -6
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +35 -35
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +88 -88
- package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts +3 -3
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +6 -6
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +28 -16
- package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +1 -1
- package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js +50 -16
- package/dist/views/Version/SelectComparison/VersionDrawer/CreatedAtCell.js.map +1 -1
- package/dist/views/Version/SelectComparison/VersionDrawer/index.js +12 -8
- package/dist/views/Version/SelectComparison/VersionDrawer/index.js.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.js +23 -14
- package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
- package/dist/views/Versions/cells/CreatedAt/index.js +53 -27
- package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
- package/package.json +9 -9
- package/dist/views/Root/SyncClientConfig.d.ts +0 -11
- package/dist/views/Root/SyncClientConfig.d.ts.map +0 -1
- package/dist/views/Root/SyncClientConfig.js +0 -38
- package/dist/views/Root/SyncClientConfig.js.map +0 -1
|
@@ -7,7 +7,7 @@ import React from 'react';
|
|
|
7
7
|
import { VersionPillLabel } from '../../../Version/VersionPillLabel/VersionPillLabel.js';
|
|
8
8
|
const baseClass = 'autosave-cell';
|
|
9
9
|
export const AutosaveCell = t0 => {
|
|
10
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(8);
|
|
11
11
|
const {
|
|
12
12
|
currentlyPublishedVersion,
|
|
13
13
|
latestDraftVersion,
|
|
@@ -17,13 +17,22 @@ export const AutosaveCell = t0 => {
|
|
|
17
17
|
t
|
|
18
18
|
} = useTranslation();
|
|
19
19
|
let t1;
|
|
20
|
-
if ($[0] !==
|
|
21
|
-
t1 =
|
|
20
|
+
if ($[0] !== rowData?.autosave || $[1] !== t) {
|
|
21
|
+
t1 = rowData?.autosave && _jsx(Pill, {
|
|
22
|
+
size: "small",
|
|
23
|
+
children: t("version:autosave")
|
|
24
|
+
});
|
|
25
|
+
$[0] = rowData?.autosave;
|
|
26
|
+
$[1] = t;
|
|
27
|
+
$[2] = t1;
|
|
28
|
+
} else {
|
|
29
|
+
t1 = $[2];
|
|
30
|
+
}
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[3] !== currentlyPublishedVersion || $[4] !== latestDraftVersion || $[5] !== rowData || $[6] !== t1) {
|
|
33
|
+
t2 = _jsxs("div", {
|
|
22
34
|
className: `${baseClass}__items`,
|
|
23
|
-
children: [
|
|
24
|
-
size: "small",
|
|
25
|
-
children: t("version:autosave")
|
|
26
|
-
}), _jsx(VersionPillLabel, {
|
|
35
|
+
children: [t1, _jsx(VersionPillLabel, {
|
|
27
36
|
currentlyPublishedVersion,
|
|
28
37
|
disableDate: true,
|
|
29
38
|
doc: rowData,
|
|
@@ -32,14 +41,14 @@ export const AutosaveCell = t0 => {
|
|
|
32
41
|
latestDraftVersion
|
|
33
42
|
})]
|
|
34
43
|
});
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
$[
|
|
38
|
-
$[
|
|
39
|
-
$[
|
|
44
|
+
$[3] = currentlyPublishedVersion;
|
|
45
|
+
$[4] = latestDraftVersion;
|
|
46
|
+
$[5] = rowData;
|
|
47
|
+
$[6] = t1;
|
|
48
|
+
$[7] = t2;
|
|
40
49
|
} else {
|
|
41
|
-
|
|
50
|
+
t2 = $[7];
|
|
42
51
|
}
|
|
43
|
-
return
|
|
52
|
+
return t2;
|
|
44
53
|
};
|
|
45
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","Pill","useTranslation","React","VersionPillLabel","baseClass","AutosaveCell","t0","$","currentlyPublishedVersion","latestDraftVersion","rowData","t","t1","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","Pill","useTranslation","React","VersionPillLabel","baseClass","AutosaveCell","t0","$","currentlyPublishedVersion","latestDraftVersion","rowData","t","t1","autosave","_jsx","size","children","t2","_jsxs","className","disableDate","doc","labelFirst","labelStyle"],"sources":["../../../../../src/views/Versions/cells/AutosaveCell/index.tsx"],"sourcesContent":["'use client'\nimport { Pill, useTranslation } from '@payloadcms/ui'\nimport React from 'react'\n\nimport './index.scss'\nimport { VersionPillLabel } from '../../../Version/VersionPillLabel/VersionPillLabel.js'\n\nconst baseClass = 'autosave-cell'\n\ntype AutosaveCellProps = {\n currentlyPublishedVersion?: {\n id: number | string\n updatedAt: string\n }\n latestDraftVersion?: {\n id: number | string\n updatedAt: string\n }\n rowData: {\n autosave?: boolean\n id: number | string\n localeStatus?: Record<string, 'draft' | 'published'>\n publishedLocale?: string\n version: {\n _status: string\n }\n }\n}\n\nexport const AutosaveCell: React.FC<AutosaveCellProps> = ({\n currentlyPublishedVersion,\n latestDraftVersion,\n rowData,\n}) => {\n const { t } = useTranslation()\n\n return (\n <div className={`${baseClass}__items`}>\n {rowData?.autosave && <Pill size=\"small\">{t('version:autosave')}</Pill>}\n <VersionPillLabel\n currentlyPublishedVersion={currentlyPublishedVersion}\n disableDate={true}\n doc={rowData}\n labelFirst={false}\n labelStyle=\"pill\"\n latestDraftVersion={latestDraftVersion}\n />\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,IAAI,EAAEC,cAAc,QAAQ;AACrC,OAAOC,KAAA,MAAW;AAGlB,SAASC,gBAAgB,QAAQ;AAEjC,MAAMC,SAAA,GAAY;AAsBlB,OAAO,MAAMC,YAAA,GAA4CC,EAAA;EAAA,MAAAC,CAAA,GAAAR,EAAA;EAAC;IAAAS,yBAAA;IAAAC,kBAAA;IAAAC;EAAA,IAAAJ,EAIzD;EACC;IAAAK;EAAA,IAAcV,cAAA;EAAA,IAAAW,EAAA;EAAA,IAAAL,CAAA,QAAAG,OAAA,EAAAG,QAAA,IAAAN,CAAA,QAAAI,CAAA;IAITC,EAAA,GAAAF,OAAA,EAAAG,QAAA,IAAqBC,IAAA,CAAAd,IAAA;MAAAe,IAAA,EAAW;MAAAC,QAAA,EAASL,CAAA,CAAE;IAAA,C;;;;;;;;;IAD9CM,EAAA,GAAAC,KAAA,CAAC;MAAAC,SAAA,EAAe,GAAAf,SAAA,SAAqB;MAAAY,QAAA,GAClCJ,E,EACDE,IAAA,CAAAX,gBAAA;QAAAK,yBAAA;QAAAY,WAAA;QAAAC,GAAA,EAGOX,OAAA;QAAAY,UAAA;QAAAC,UAAA,EAEM;QAAAd;MAAA,C;;;;;;;;;;SAPfQ,E;CAYJ","ignoreList":[]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
import { Link, useConfig, useTranslation } from '@payloadcms/ui';
|
|
5
6
|
import { formatDate } from '@payloadcms/ui/shared';
|
|
6
7
|
import { formatAdminURL } from 'payload/shared';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export const CreatedAtCell = t0 => {
|
|
10
|
+
const $ = _c(12);
|
|
9
11
|
const {
|
|
10
12
|
collectionSlug,
|
|
11
13
|
docID,
|
|
@@ -13,48 +15,72 @@ export const CreatedAtCell = t0 => {
|
|
|
13
15
|
isTrashed,
|
|
14
16
|
rowData: t1
|
|
15
17
|
} = t0;
|
|
18
|
+
let t2;
|
|
19
|
+
if ($[0] !== t1) {
|
|
20
|
+
t2 = t1 === undefined ? {} : t1;
|
|
21
|
+
$[0] = t1;
|
|
22
|
+
$[1] = t2;
|
|
23
|
+
} else {
|
|
24
|
+
t2 = $[1];
|
|
25
|
+
}
|
|
16
26
|
const {
|
|
17
27
|
id,
|
|
18
28
|
updatedAt
|
|
19
|
-
} =
|
|
29
|
+
} = t2;
|
|
20
30
|
const {
|
|
21
|
-
config:
|
|
31
|
+
config: t3
|
|
22
32
|
} = useConfig();
|
|
23
33
|
const {
|
|
24
|
-
admin:
|
|
25
|
-
routes:
|
|
26
|
-
} =
|
|
34
|
+
admin: t4,
|
|
35
|
+
routes: t5
|
|
36
|
+
} = t3;
|
|
27
37
|
const {
|
|
28
38
|
dateFormat
|
|
29
|
-
} =
|
|
39
|
+
} = t4;
|
|
30
40
|
const {
|
|
31
41
|
admin: adminRoute
|
|
32
|
-
} =
|
|
42
|
+
} = t5;
|
|
33
43
|
const {
|
|
34
44
|
i18n
|
|
35
45
|
} = useTranslation();
|
|
36
46
|
const trashedDocPrefix = isTrashed ? "trash/" : "";
|
|
37
|
-
let
|
|
38
|
-
if (collectionSlug) {
|
|
39
|
-
to
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
let t6;
|
|
48
|
+
if ($[2] !== adminRoute || $[3] !== collectionSlug || $[4] !== dateFormat || $[5] !== docID || $[6] !== globalSlug || $[7] !== i18n || $[8] !== id || $[9] !== trashedDocPrefix || $[10] !== updatedAt) {
|
|
49
|
+
let to;
|
|
50
|
+
if (collectionSlug) {
|
|
51
|
+
to = formatAdminURL({
|
|
52
|
+
adminRoute,
|
|
53
|
+
path: `/collections/${collectionSlug}/${trashedDocPrefix}${docID}/versions/${id}`
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
if (globalSlug) {
|
|
57
|
+
to = formatAdminURL({
|
|
58
|
+
adminRoute,
|
|
59
|
+
path: `/globals/${globalSlug}/versions/${id}`
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
t6 = _jsx(Link, {
|
|
63
|
+
href: to,
|
|
64
|
+
prefetch: false,
|
|
65
|
+
children: formatDate({
|
|
66
|
+
date: updatedAt,
|
|
67
|
+
i18n,
|
|
68
|
+
pattern: dateFormat
|
|
69
|
+
})
|
|
48
70
|
});
|
|
71
|
+
$[2] = adminRoute;
|
|
72
|
+
$[3] = collectionSlug;
|
|
73
|
+
$[4] = dateFormat;
|
|
74
|
+
$[5] = docID;
|
|
75
|
+
$[6] = globalSlug;
|
|
76
|
+
$[7] = i18n;
|
|
77
|
+
$[8] = id;
|
|
78
|
+
$[9] = trashedDocPrefix;
|
|
79
|
+
$[10] = updatedAt;
|
|
80
|
+
$[11] = t6;
|
|
81
|
+
} else {
|
|
82
|
+
t6 = $[11];
|
|
49
83
|
}
|
|
50
|
-
return
|
|
51
|
-
href: to,
|
|
52
|
-
prefetch: false,
|
|
53
|
-
children: formatDate({
|
|
54
|
-
date: updatedAt,
|
|
55
|
-
i18n,
|
|
56
|
-
pattern: dateFormat
|
|
57
|
-
})
|
|
58
|
-
});
|
|
84
|
+
return t6;
|
|
59
85
|
};
|
|
60
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Link","useConfig","useTranslation","formatDate","formatAdminURL","React","CreatedAtCell","t0","collectionSlug","docID","globalSlug","isTrashed","rowData","t1","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","Link","useConfig","useTranslation","formatDate","formatAdminURL","React","CreatedAtCell","t0","$","collectionSlug","docID","globalSlug","isTrashed","rowData","t1","t2","undefined","id","updatedAt","config","t3","admin","t4","routes","t5","dateFormat","adminRoute","i18n","trashedDocPrefix","t6","to","_jsx","href","prefetch","children","date","pattern"],"sources":["../../../../../src/views/Versions/cells/CreatedAt/index.tsx"],"sourcesContent":["'use client'\nimport { Link, useConfig, useTranslation } from '@payloadcms/ui'\nimport { formatDate } from '@payloadcms/ui/shared'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nexport type CreatedAtCellProps = {\n collectionSlug?: string\n docID?: number | string\n globalSlug?: string\n isTrashed?: boolean\n rowData?: {\n id: number | string\n updatedAt: Date | number | string\n }\n}\n\nexport const CreatedAtCell: React.FC<CreatedAtCellProps> = ({\n collectionSlug,\n docID,\n globalSlug,\n isTrashed,\n rowData: { id, updatedAt } = {},\n}) => {\n const {\n config: {\n admin: { dateFormat },\n routes: { admin: adminRoute },\n },\n } = useConfig()\n\n const { i18n } = useTranslation()\n\n const trashedDocPrefix = isTrashed ? 'trash/' : ''\n\n let to: string\n\n if (collectionSlug) {\n to = formatAdminURL({\n adminRoute,\n path: `/collections/${collectionSlug}/${trashedDocPrefix}${docID}/versions/${id}`,\n })\n }\n\n if (globalSlug) {\n to = formatAdminURL({\n adminRoute,\n path: `/globals/${globalSlug}/versions/${id}`,\n })\n }\n\n return (\n <Link href={to} prefetch={false}>\n {formatDate({ date: updatedAt, i18n, pattern: dateFormat })}\n </Link>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,IAAI,EAAEC,SAAS,EAAEC,cAAc,QAAQ;AAChD,SAASC,UAAU,QAAQ;AAC3B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAalB,OAAO,MAAMC,aAAA,GAA8CC,EAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EAAC;IAAAU,cAAA;IAAAC,KAAA;IAAAC,UAAA;IAAAC,SAAA;IAAAC,OAAA,EAAAC;EAAA,IAAAP,EAM3D;EAAA,IAAAQ,EAAA;EAAA,IAAAP,CAAA,QAAAM,EAAA;IADUC,EAAA,GAAAD,EAAsB,KAAAE,SAAA,QAAtBF,EAAsB;IAAAN,CAAA,MAAAM,EAAA;IAAAN,CAAA,MAAAO,EAAA;EAAA;IAAAA,EAAA,GAAAP,CAAA;EAAA;EAAtB;IAAAS,EAAA;IAAAC;EAAA,IAAAH,EAAsB;EAE/B;IAAAI,MAAA,EAAAC;EAAA,IAKInB,SAAA;EAJM;IAAAoB,KAAA,EAAAC,EAAA;IAAAC,MAAA,EAAAC;EAAA,IAAAJ,EAGP;EAFQ;IAAAK;EAAA,IAAAH,EAAc;EACb;IAAAD,KAAA,EAAAK;EAAA,IAAAF,EAAqB;EAIjC;IAAAG;EAAA,IAAiBzB,cAAA;EAEjB,MAAA0B,gBAAA,GAAyBhB,SAAA,GAAY,WAAW;EAAA,IAAAiB,EAAA;EAAA,IAAArB,CAAA,QAAAkB,UAAA,IAAAlB,CAAA,QAAAC,cAAA,IAAAD,CAAA,QAAAiB,UAAA,IAAAjB,CAAA,QAAAE,KAAA,IAAAF,CAAA,QAAAG,UAAA,IAAAH,CAAA,QAAAmB,IAAA,IAAAnB,CAAA,QAAAS,EAAA,IAAAT,CAAA,QAAAoB,gBAAA,IAAApB,CAAA,SAAAU,SAAA;IAE5CY,GAAA,CAAAA,EAAA;IAAA,IAEArB,cAAA;MACFqB,EAAA,CAAAA,CAAA,CAAKA;QAAAA;QAAAA,KAAA,CAEGA,gBAAgBrB,cAAA,IAAkBmB,gBAAA,GAAmBlB,KAAA,aAAkBO,EAAA;MAAI,CACnF;IAHA;IAAA,IAMEN,UAAA;MACFmB,EAAA,CAAAA,CAAA,CAAKA;QAAAA;QAAAA,KAAA,CAEGA,YAAYnB,UAAA,aAAuBM,EAAA;MAAI,CAC/C;IAHA;IAOAY,EAAA,GAAAE,IAAA,CAAA/B,IAAA;MAAAgC,IAAA,EAAYF,EAAA;MAAAG,QAAA;MAAAC,QAAA,EACT/B,UAAA;QAAAgC,IAAA,EAAmBjB,SAAA;QAAAS,IAAA;QAAAS,OAAA,EAA0BX;MAAA,CAAW;IAAA,C;;;;;;;;;;;;;;SAD3DI,E;CAIJ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/next",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.57.0-canary.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.
|
|
91
|
-
"@payloadcms/
|
|
92
|
-
"@payloadcms/
|
|
90
|
+
"@payloadcms/graphql": "3.57.0-canary.0",
|
|
91
|
+
"@payloadcms/ui": "3.57.0-canary.0",
|
|
92
|
+
"@payloadcms/translations": "3.57.0-canary.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@babel/cli": "7.27.2",
|
|
@@ -99,20 +99,20 @@
|
|
|
99
99
|
"@babel/preset-typescript": "7.27.1",
|
|
100
100
|
"@next/eslint-plugin-next": "15.4.4",
|
|
101
101
|
"@types/busboy": "1.5.4",
|
|
102
|
-
"@types/react": "19.1.
|
|
103
|
-
"@types/react-dom": "19.1.
|
|
102
|
+
"@types/react": "19.1.8",
|
|
103
|
+
"@types/react-dom": "19.1.6",
|
|
104
104
|
"@types/uuid": "10.0.0",
|
|
105
|
-
"babel-plugin-react-compiler": "19.1.0-rc.
|
|
105
|
+
"babel-plugin-react-compiler": "19.1.0-rc.2",
|
|
106
106
|
"esbuild": "0.25.5",
|
|
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.
|
|
110
|
+
"payload": "3.57.0-canary.0"
|
|
111
111
|
},
|
|
112
112
|
"peerDependencies": {
|
|
113
113
|
"graphql": "^16.8.1",
|
|
114
114
|
"next": "^15.2.3",
|
|
115
|
-
"payload": "3.
|
|
115
|
+
"payload": "3.57.0-canary.0"
|
|
116
116
|
},
|
|
117
117
|
"engines": {
|
|
118
118
|
"node": "^18.20.2 || >=20.9.0"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ClientConfig } from 'payload';
|
|
2
|
-
/**
|
|
3
|
-
* This component is required in order for the _page_ to be able to refresh the client config,
|
|
4
|
-
* which may have been cached on the _layout_ level, where the ConfigProvider is managed.
|
|
5
|
-
* Since the layout does not re-render on page navigation / authentication, we need to manually
|
|
6
|
-
* update the config, as the user may have been authenticated in the process, which affects the client config.
|
|
7
|
-
*/
|
|
8
|
-
export declare const SyncClientConfig: ({ clientConfig }: {
|
|
9
|
-
clientConfig: ClientConfig;
|
|
10
|
-
}) => any;
|
|
11
|
-
//# sourceMappingURL=SyncClientConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SyncClientConfig.d.ts","sourceRoot":"","sources":["../../../src/views/Root/SyncClientConfig.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAK3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,qBAAsB;IAAE,YAAY,EAAE,YAAY,CAAA;CAAE,QAQhF,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { c as _c } from "react/compiler-runtime";
|
|
4
|
-
import { useConfig } from '@payloadcms/ui';
|
|
5
|
-
import { useEffect } from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* This component is required in order for the _page_ to be able to refresh the client config,
|
|
8
|
-
* which may have been cached on the _layout_ level, where the ConfigProvider is managed.
|
|
9
|
-
* Since the layout does not re-render on page navigation / authentication, we need to manually
|
|
10
|
-
* update the config, as the user may have been authenticated in the process, which affects the client config.
|
|
11
|
-
*/
|
|
12
|
-
export const SyncClientConfig = t0 => {
|
|
13
|
-
const $ = _c(4);
|
|
14
|
-
const {
|
|
15
|
-
clientConfig
|
|
16
|
-
} = t0;
|
|
17
|
-
const {
|
|
18
|
-
setConfig
|
|
19
|
-
} = useConfig();
|
|
20
|
-
let t1;
|
|
21
|
-
let t2;
|
|
22
|
-
if ($[0] !== clientConfig || $[1] !== setConfig) {
|
|
23
|
-
t1 = () => {
|
|
24
|
-
setConfig(clientConfig);
|
|
25
|
-
};
|
|
26
|
-
t2 = [clientConfig, setConfig];
|
|
27
|
-
$[0] = clientConfig;
|
|
28
|
-
$[1] = setConfig;
|
|
29
|
-
$[2] = t1;
|
|
30
|
-
$[3] = t2;
|
|
31
|
-
} else {
|
|
32
|
-
t1 = $[2];
|
|
33
|
-
t2 = $[3];
|
|
34
|
-
}
|
|
35
|
-
useEffect(t1, t2);
|
|
36
|
-
return null;
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=SyncClientConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SyncClientConfig.js","names":["c","_c","useConfig","useEffect","SyncClientConfig","t0","$","clientConfig","setConfig","t1","t2"],"sources":["../../../src/views/Root/SyncClientConfig.tsx"],"sourcesContent":["'use client'\nimport type { ClientConfig } from 'payload'\n\nimport { useConfig } from '@payloadcms/ui'\nimport { useEffect } from 'react'\n\n/**\n * This component is required in order for the _page_ to be able to refresh the client config,\n * which may have been cached on the _layout_ level, where the ConfigProvider is managed.\n * Since the layout does not re-render on page navigation / authentication, we need to manually\n * update the config, as the user may have been authenticated in the process, which affects the client config.\n */\nexport const SyncClientConfig = ({ clientConfig }: { clientConfig: ClientConfig }) => {\n const { setConfig } = useConfig()\n\n useEffect(() => {\n setConfig(clientConfig)\n }, [clientConfig, setConfig])\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAGA,SAASC,SAAS,QAAQ;AAC1B,SAASC,SAAS,QAAQ;AAE1B;;;;;;AAMA,OAAO,MAAMC,gBAAA,GAAmBC,EAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EAAC;IAAAM;EAAA,IAAAF,EAAgD;EAC/E;IAAAG;EAAA,IAAsBN,SAAA;EAAA,IAAAO,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAJ,CAAA,QAAAC,YAAA,IAAAD,CAAA,QAAAE,SAAA;IAEZC,EAAA,GAAAA,CAAA;MACRD,SAAA,CAAUD,YAAA;IAAA;IACTG,EAAA,IAACH,YAAA,EAAcC,SAAA;IAAUF,CAAA,MAAAC,YAAA;IAAAD,CAAA,MAAAE,SAAA;IAAAF,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAI,EAAA;EAAA;IAAAD,EAAA,GAAAH,CAAA;IAAAI,EAAA,GAAAJ,CAAA;EAAA;EAF5BH,SAAA,CAAUM,EAEV,EAAGC,EAAyB;EAAA;AAAA,CAG9B","ignoreList":[]}
|