@payloadcms/richtext-lexical 3.0.0-beta.56 → 3.0.0-beta.57
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/exports/client/bundled.css +1 -1
- package/dist/exports/client/index.js +4 -4
- package/dist/exports/client/index.js.map +3 -3
- package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
- package/dist/features/link/plugins/autoLink/index.js +5 -2
- package/dist/features/link/plugins/autoLink/index.js.map +1 -1
- package/dist/features/typesServer.d.ts +7 -7
- package/dist/features/typesServer.d.ts.map +1 -1
- package/dist/features/typesServer.js.map +1 -1
- package/dist/field/index.js +6 -6
- package/dist/populateGraphQL/populate.d.ts +2 -2
- package/dist/populateGraphQL/populate.d.ts.map +1 -1
- package/dist/populateGraphQL/populate.js.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +2 -2
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
- package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
- package/package.json +29 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PayloadRequest } from 'payload';
|
|
2
2
|
type Arguments = {
|
|
3
3
|
currentDepth?: number;
|
|
4
4
|
data: unknown;
|
|
@@ -6,7 +6,7 @@ type Arguments = {
|
|
|
6
6
|
draft: boolean;
|
|
7
7
|
key: number | string;
|
|
8
8
|
overrideAccess: boolean;
|
|
9
|
-
req:
|
|
9
|
+
req: PayloadRequest;
|
|
10
10
|
showHiddenFields: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare const populate: ({ id, collectionSlug, currentDepth, data, depth, draft, key, overrideAccess, req, showHiddenFields, }: Arguments & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/populate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAI7C,KAAK,SAAS,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,0GAWlB,SAAS,GAAG;IACb,cAAc,EAAE,MAAM,CAAA;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CACpB,KAAG,OAAO,CAAC,IAAI,CA6Bf,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populateGraphQL/populate.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../../src/populateGraphQL/populate.ts"],"sourcesContent":["import type { PayloadRequest } from 'payload'\n\nimport { createDataloaderCacheKey } from 'payload'\n\ntype Arguments = {\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n key: number | string\n overrideAccess: boolean\n req: PayloadRequest\n showHiddenFields: boolean\n}\n\nexport const populate = async ({\n id,\n collectionSlug,\n currentDepth,\n data,\n depth,\n draft,\n key,\n overrideAccess,\n req,\n showHiddenFields,\n}: Arguments & {\n collectionSlug: string\n id: number | string\n}): Promise<void> => {\n const shouldPopulate = depth && currentDepth <= depth\n // usually depth is checked within recursivelyPopulateFieldsForGraphQL. But since this populate function can be called outside of that (in rest afterRead node hooks) we need to check here too\n if (!shouldPopulate) {\n return\n }\n\n const dataRef = data as Record<string, unknown>\n\n const doc = await req.payloadDataLoader.load(\n createDataloaderCacheKey({\n collectionSlug,\n currentDepth: currentDepth + 1,\n depth,\n docID: id as string,\n draft,\n fallbackLocale: req.fallbackLocale,\n locale: req.locale,\n overrideAccess,\n showHiddenFields,\n transactionID: req.transactionID,\n }),\n )\n\n if (doc) {\n dataRef[key] = doc\n } else {\n dataRef[key] = null\n }\n}\n"],"names":["createDataloaderCacheKey","populate","id","collectionSlug","currentDepth","data","depth","draft","key","overrideAccess","req","showHiddenFields","shouldPopulate","dataRef","doc","payloadDataLoader","load","docID","fallbackLocale","locale","transactionID"],"mappings":"AAEA,SAASA,wBAAwB,QAAQ,UAAS;AAalD,OAAO,MAAMC,WAAW,OAAO,EAC7BC,EAAE,EACFC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,GAAG,EACHC,cAAc,EACdC,GAAG,EACHC,gBAAgB,EAIjB;IACC,MAAMC,iBAAiBN,SAASF,gBAAgBE;IAChD,+LAA+L;IAC/L,IAAI,CAACM,gBAAgB;QACnB;IACF;IAEA,MAAMC,UAAUR;IAEhB,MAAMS,MAAM,MAAMJ,IAAIK,iBAAiB,CAACC,IAAI,CAC1ChB,yBAAyB;QACvBG;QACAC,cAAcA,eAAe;QAC7BE;QACAW,OAAOf;QACPK;QACAW,gBAAgBR,IAAIQ,cAAc;QAClCC,QAAQT,IAAIS,MAAM;QAClBV;QACAE;QACAS,eAAeV,IAAIU,aAAa;IAClC;IAGF,IAAIN,KAAK;QACPD,OAAO,CAACL,IAAI,GAAGM;IACjB,OAAO;QACLD,OAAO,CAACL,IAAI,GAAG;IACjB;AACF,EAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Field,
|
|
1
|
+
import type { Field, PayloadRequest, RequestContext } from 'payload';
|
|
2
2
|
import type { PopulationPromise } from '../features/typesServer.js';
|
|
3
3
|
type NestedRichTextFieldsArgs = {
|
|
4
4
|
context: RequestContext;
|
|
@@ -19,7 +19,7 @@ type NestedRichTextFieldsArgs = {
|
|
|
19
19
|
flattenLocales: boolean;
|
|
20
20
|
overrideAccess: boolean;
|
|
21
21
|
populationPromises: Promise<void>[];
|
|
22
|
-
req:
|
|
22
|
+
req: PayloadRequest;
|
|
23
23
|
showHiddenFields: boolean;
|
|
24
24
|
siblingDoc: Record<string, unknown>;
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursivelyPopulateFieldsForGraphQL.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/recursivelyPopulateFieldsForGraphQL.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"recursivelyPopulateFieldsForGraphQL.d.ts","sourceRoot":"","sources":["../../src/populateGraphQL/recursivelyPopulateFieldsForGraphQL.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,wBAAwB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAA;IAC/D;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;IACvB,kBAAkB,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAA;IACnC,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mCAAmC,2KAe7C,wBAAwB,KAAG,IAwB7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/populateGraphQL/recursivelyPopulateFieldsForGraphQL.ts"],"sourcesContent":["import type { Field,
|
|
1
|
+
{"version":3,"sources":["../../src/populateGraphQL/recursivelyPopulateFieldsForGraphQL.ts"],"sourcesContent":["import type { Field, PayloadRequest, RequestContext } from 'payload'\n\nimport { afterReadTraverseFields } from 'payload'\n\nimport type { PopulationPromise } from '../features/typesServer.js'\n\ntype NestedRichTextFieldsArgs = {\n context: RequestContext\n currentDepth?: number\n data: unknown\n depth: number\n draft: boolean\n /**\n * This maps all the population promises to the node types\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n /**\n * fieldPromises are used for things like field hooks. They should be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n fields: Field[]\n findMany: boolean\n flattenLocales: boolean\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}\n\nexport const recursivelyPopulateFieldsForGraphQL = ({\n context,\n currentDepth = 0,\n data,\n depth,\n draft,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n overrideAccess = false,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: NestedRichTextFieldsArgs): void => {\n afterReadTraverseFields({\n collection: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n context,\n currentDepth,\n depth,\n doc: data as any, // Looks like it's only needed for hooks and access control, so doesn't matter what we pass here right now\n draft,\n fallbackLocale: req.fallbackLocale,\n fieldPromises,\n fields,\n findMany,\n flattenLocales,\n global: null, // Pass from core? This is only needed for hooks, so we can leave this null for now\n locale: req.locale,\n overrideAccess,\n path: [],\n populationPromises, // This is not the same as populationPromises passed into this recurseNestedFields. These are just promises resolved at the very end.\n req,\n schemaPath: [],\n showHiddenFields,\n siblingDoc,\n triggerHooks: false,\n })\n}\n"],"names":["afterReadTraverseFields","recursivelyPopulateFieldsForGraphQL","context","currentDepth","data","depth","draft","fieldPromises","fields","findMany","flattenLocales","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","collection","doc","fallbackLocale","global","locale","path","schemaPath","triggerHooks"],"mappings":"AAEA,SAASA,uBAAuB,QAAQ,UAAS;AA4BjD,OAAO,MAAMC,sCAAsC,CAAC,EAClDC,OAAO,EACPC,eAAe,CAAC,EAChBC,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,iBAAiB,KAAK,EACtBC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACe;IACzBf,wBAAwB;QACtBgB,YAAY;QACZd;QACAC;QACAE;QACAY,KAAKb;QACLE;QACAY,gBAAgBL,IAAIK,cAAc;QAClCX;QACAC;QACAC;QACAC;QACAS,QAAQ;QACRC,QAAQP,IAAIO,MAAM;QAClBT;QACAU,MAAM,EAAE;QACRT;QACAC;QACAS,YAAY,EAAE;QACdR;QACAC;QACAQ,cAAc;IAChB;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/richtext-lexical",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.57",
|
|
4
4
|
"description": "The officially supported Lexical richtext adapter for Payload",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lexical/headless": "0.16.
|
|
34
|
-
"@lexical/link": "0.16.
|
|
35
|
-
"@lexical/list": "0.16.
|
|
36
|
-
"@lexical/mark": "0.16.
|
|
37
|
-
"@lexical/markdown": "0.16.
|
|
38
|
-
"@lexical/react": "0.16.
|
|
39
|
-
"@lexical/rich-text": "0.16.
|
|
40
|
-
"@lexical/selection": "0.16.
|
|
41
|
-
"@lexical/utils": "0.16.
|
|
33
|
+
"@lexical/headless": "0.16.1",
|
|
34
|
+
"@lexical/link": "0.16.1",
|
|
35
|
+
"@lexical/list": "0.16.1",
|
|
36
|
+
"@lexical/mark": "0.16.1",
|
|
37
|
+
"@lexical/markdown": "0.16.1",
|
|
38
|
+
"@lexical/react": "0.16.1",
|
|
39
|
+
"@lexical/rich-text": "0.16.1",
|
|
40
|
+
"@lexical/selection": "0.16.1",
|
|
41
|
+
"@lexical/utils": "0.16.1",
|
|
42
42
|
"@types/uuid": "^9.0.8",
|
|
43
43
|
"bson-objectid": "2.0.4",
|
|
44
44
|
"dequal": "2.0.3",
|
|
45
45
|
"json-schema": "^0.4.0",
|
|
46
|
-
"lexical": "0.16.
|
|
46
|
+
"lexical": "0.16.1",
|
|
47
47
|
"react-error-boundary": "4.0.13",
|
|
48
48
|
"uuid": "10.0.0"
|
|
49
49
|
},
|
|
@@ -56,30 +56,30 @@
|
|
|
56
56
|
"esbuild": "^0.21.4",
|
|
57
57
|
"esbuild-sass-plugin": "^3.3.0",
|
|
58
58
|
"@payloadcms/eslint-config": "1.1.1",
|
|
59
|
-
"@payloadcms/
|
|
60
|
-
"@payloadcms/
|
|
61
|
-
"@payloadcms/
|
|
62
|
-
"payload": "3.0.0-beta.
|
|
59
|
+
"@payloadcms/next": "3.0.0-beta.57",
|
|
60
|
+
"@payloadcms/translations": "3.0.0-beta.57",
|
|
61
|
+
"@payloadcms/ui": "3.0.0-beta.57",
|
|
62
|
+
"payload": "3.0.0-beta.57"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@faceless-ui/modal": "3.0.0-beta.0",
|
|
66
66
|
"@faceless-ui/scroll-info": "2.0.0-beta.0",
|
|
67
|
-
"@lexical/headless": "0.16.
|
|
68
|
-
"@lexical/link": "0.16.
|
|
69
|
-
"@lexical/list": "0.16.
|
|
70
|
-
"@lexical/mark": "0.16.
|
|
71
|
-
"@lexical/markdown": "0.16.
|
|
72
|
-
"@lexical/react": "0.16.
|
|
73
|
-
"@lexical/rich-text": "0.16.
|
|
74
|
-
"@lexical/selection": "0.16.
|
|
75
|
-
"@lexical/utils": "0.16.
|
|
76
|
-
"lexical": "0.16.
|
|
67
|
+
"@lexical/headless": "0.16.1",
|
|
68
|
+
"@lexical/link": "0.16.1",
|
|
69
|
+
"@lexical/list": "0.16.1",
|
|
70
|
+
"@lexical/mark": "0.16.1",
|
|
71
|
+
"@lexical/markdown": "0.16.1",
|
|
72
|
+
"@lexical/react": "0.16.1",
|
|
73
|
+
"@lexical/rich-text": "0.16.1",
|
|
74
|
+
"@lexical/selection": "0.16.1",
|
|
75
|
+
"@lexical/utils": "0.16.1",
|
|
76
|
+
"lexical": "0.16.1",
|
|
77
77
|
"react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
|
|
78
78
|
"react-dom": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
|
|
79
|
-
"@payloadcms/
|
|
80
|
-
"@payloadcms/
|
|
81
|
-
"
|
|
82
|
-
"
|
|
79
|
+
"@payloadcms/translations": "3.0.0-beta.57",
|
|
80
|
+
"@payloadcms/next": "3.0.0-beta.57",
|
|
81
|
+
"@payloadcms/ui": "3.0.0-beta.57",
|
|
82
|
+
"payload": "3.0.0-beta.57"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "^18.20.2 || >=20.9.0"
|