@payloadcms/richtext-lexical 3.69.0-internal.424436e → 3.69.0-internal.5029b68
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/Field-2A2VQXKP.js +2 -0
- package/dist/exports/client/Field-2A2VQXKP.js.map +7 -0
- package/dist/exports/client/bundled.css +1 -1
- package/dist/exports/client/chunk-AFXLIYGL.js +12 -0
- package/dist/exports/client/chunk-AFXLIYGL.js.map +7 -0
- package/dist/exports/client/index.d.ts +0 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +20 -20
- package/dist/exports/client/index.js.map +3 -3
- package/dist/exports/react/index.d.ts +1 -1
- package/dist/exports/react/index.d.ts.map +1 -1
- package/dist/exports/react/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts +14 -2
- package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +2 -4
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -16
- package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +4 -76
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts +10 -14
- package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +6 -11
- package/dist/field/Field.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/field/index.d.ts +0 -1
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +29 -47
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.d.ts +1 -1
- package/dist/field/rscEntry.d.ts.map +1 -1
- package/dist/field/rscEntry.js +0 -12
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/lexical/LexicalEditor.d.ts.map +1 -1
- package/dist/lexical/LexicalEditor.js +1 -2
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/lexical/LexicalProvider.js +3 -12
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/sanitize.d.ts +1 -1
- package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
- package/dist/lexical/config/client/sanitize.js +2 -3
- package/dist/lexical/config/client/sanitize.js.map +1 -1
- package/dist/lexical/config/types.d.ts +0 -4
- package/dist/lexical/config/types.d.ts.map +1 -1
- package/dist/lexical/config/types.js.map +1 -1
- package/dist/lexical/nodes/index.d.ts +2 -12
- package/dist/lexical/nodes/index.d.ts.map +1 -1
- package/dist/lexical/nodes/index.js +2 -195
- package/dist/lexical/nodes/index.js.map +1 -1
- package/dist/types.d.ts +2 -152
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utilities/generateImportMap.d.ts.map +1 -1
- package/dist/utilities/generateImportMap.js +0 -1
- package/dist/utilities/generateImportMap.js.map +1 -1
- package/dist/validate/hasText.d.ts +1 -6
- package/dist/validate/hasText.d.ts.map +1 -1
- package/dist/validate/hasText.js +4 -10
- package/dist/validate/hasText.js.map +1 -1
- package/package.json +7 -12
- package/dist/exports/client/Field-YM44WOON.js +0 -2
- package/dist/exports/client/Field-YM44WOON.js.map +0 -7
- package/dist/exports/client/chunk-6NIGQP6A.js +0 -12
- package/dist/exports/client/chunk-6NIGQP6A.js.map +0 -7
- package/dist/exports/client/internal-client.d.ts +0 -3
- package/dist/exports/client/internal-client.d.ts.map +0 -1
- package/dist/field/RichTextViewProvider.d.ts +0 -83
- package/dist/field/RichTextViewProvider.d.ts.map +0 -1
- package/dist/field/RichTextViewProvider.js +0 -87
- package/dist/field/RichTextViewProvider.js.map +0 -1
- package/dist/field/ViewSelector.d.ts +0 -4
- package/dist/field/ViewSelector.d.ts.map +0 -1
- package/dist/field/ViewSelector.js +0 -89
- package/dist/field/ViewSelector.js.map +0 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts +0 -2
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +0 -1
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +0 -48
- package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +0 -1
package/dist/field/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LexicalRichTextFieldProps } from '../types.js';
|
|
3
3
|
export declare const RichTextField: React.FC<LexicalRichTextFieldProps>;
|
|
4
|
-
export declare const RichTextFieldImpl: React.FC<LexicalRichTextFieldProps>;
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8C,MAAM,OAAO,CAAA;AAIlE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAU5D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAiE7D,CAAA"}
|
package/dist/field/index.js
CHANGED
|
@@ -2,26 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { createElement as _createElement } from "react";
|
|
6
5
|
import { ShimmerEffect, useConfig } from '@payloadcms/ui';
|
|
7
6
|
import React, { lazy, Suspense, useEffect, useState } from 'react';
|
|
8
7
|
import { defaultEditorLexicalConfig } from '../lexical/config/client/default.js';
|
|
9
8
|
import { loadClientFeatures } from '../lexical/config/client/loader.js';
|
|
10
9
|
import { sanitizeClientEditorConfig } from '../lexical/config/client/sanitize.js';
|
|
11
|
-
import { RichTextViewProvider, useRichTextView } from './RichTextViewProvider.js';
|
|
12
10
|
const RichTextEditor = /*#__PURE__*/lazy(() => import('./Field.js').then(module => ({
|
|
13
11
|
default: module.RichText
|
|
14
12
|
})));
|
|
15
13
|
export const RichTextField = props => {
|
|
16
|
-
|
|
17
|
-
views: props.views,
|
|
18
|
-
children: /*#__PURE__*/_jsx(RichTextFieldImpl, {
|
|
19
|
-
...props
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
export const RichTextFieldImpl = props => {
|
|
24
|
-
const $ = _c(19);
|
|
14
|
+
const $ = _c(18);
|
|
25
15
|
const {
|
|
26
16
|
admin: t0,
|
|
27
17
|
clientFeatures,
|
|
@@ -29,8 +19,7 @@ export const RichTextFieldImpl = props => {
|
|
|
29
19
|
featureClientSchemaMap,
|
|
30
20
|
field,
|
|
31
21
|
lexicalEditorConfig: t2,
|
|
32
|
-
schemaPath
|
|
33
|
-
views
|
|
22
|
+
schemaPath
|
|
34
23
|
} = props;
|
|
35
24
|
let t3;
|
|
36
25
|
if ($[0] !== t0) {
|
|
@@ -40,7 +29,7 @@ export const RichTextFieldImpl = props => {
|
|
|
40
29
|
} else {
|
|
41
30
|
t3 = $[1];
|
|
42
31
|
}
|
|
43
|
-
const
|
|
32
|
+
const admin = t3;
|
|
44
33
|
let t4;
|
|
45
34
|
if ($[2] !== t1) {
|
|
46
35
|
t4 = t1 === undefined ? {} : t1;
|
|
@@ -50,21 +39,16 @@ export const RichTextFieldImpl = props => {
|
|
|
50
39
|
t4 = $[3];
|
|
51
40
|
}
|
|
52
41
|
const featureClientImportMap = t4;
|
|
53
|
-
const
|
|
54
|
-
const {
|
|
55
|
-
currentView
|
|
56
|
-
} = useRichTextView();
|
|
57
|
-
const currentViewAdminConfig = views?.[currentView]?.admin ?? _admin;
|
|
58
|
-
const currentViewLexicalEditorConfig = views?.[currentView]?.lexical ?? _lexicalEditorConfig;
|
|
42
|
+
const lexicalEditorConfig = t2 === undefined ? defaultEditorLexicalConfig : t2;
|
|
59
43
|
const {
|
|
60
44
|
config
|
|
61
45
|
} = useConfig();
|
|
62
46
|
const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] = useState(null);
|
|
63
47
|
let t5;
|
|
64
48
|
let t6;
|
|
65
|
-
if ($[4] !==
|
|
49
|
+
if ($[4] !== admin || $[5] !== clientFeatures || $[6] !== config || $[7] !== featureClientImportMap || $[8] !== featureClientSchemaMap || $[9] !== field || $[10] !== finalSanitizedEditorConfig || $[11] !== lexicalEditorConfig || $[12] !== schemaPath) {
|
|
66
50
|
t5 = () => {
|
|
67
|
-
if (finalSanitizedEditorConfig
|
|
51
|
+
if (finalSanitizedEditorConfig) {
|
|
68
52
|
return;
|
|
69
53
|
}
|
|
70
54
|
const featureProvidersLocal = [];
|
|
@@ -82,46 +66,44 @@ export const RichTextFieldImpl = props => {
|
|
|
82
66
|
schemaPath: schemaPath ?? field.name,
|
|
83
67
|
unSanitizedEditorConfig: {
|
|
84
68
|
features: featureProvidersLocal,
|
|
85
|
-
lexical:
|
|
69
|
+
lexical: lexicalEditorConfig
|
|
86
70
|
}
|
|
87
71
|
});
|
|
88
|
-
setFinalSanitizedEditorConfig(sanitizeClientEditorConfig(resolvedClientFeatures,
|
|
72
|
+
setFinalSanitizedEditorConfig(sanitizeClientEditorConfig(resolvedClientFeatures, lexicalEditorConfig, admin));
|
|
89
73
|
};
|
|
90
|
-
t6 = [
|
|
91
|
-
$[4] =
|
|
92
|
-
$[5] =
|
|
93
|
-
$[6] =
|
|
94
|
-
$[7] =
|
|
95
|
-
$[8] =
|
|
96
|
-
$[9] =
|
|
97
|
-
$[10] =
|
|
98
|
-
$[11] =
|
|
99
|
-
$[12] =
|
|
100
|
-
$[13] =
|
|
101
|
-
$[14] =
|
|
102
|
-
$[15] = t6;
|
|
74
|
+
t6 = [admin, clientFeatures, config, featureClientImportMap, featureClientSchemaMap, field, finalSanitizedEditorConfig, lexicalEditorConfig, schemaPath];
|
|
75
|
+
$[4] = admin;
|
|
76
|
+
$[5] = clientFeatures;
|
|
77
|
+
$[6] = config;
|
|
78
|
+
$[7] = featureClientImportMap;
|
|
79
|
+
$[8] = featureClientSchemaMap;
|
|
80
|
+
$[9] = field;
|
|
81
|
+
$[10] = finalSanitizedEditorConfig;
|
|
82
|
+
$[11] = lexicalEditorConfig;
|
|
83
|
+
$[12] = schemaPath;
|
|
84
|
+
$[13] = t5;
|
|
85
|
+
$[14] = t6;
|
|
103
86
|
} else {
|
|
104
|
-
t5 = $[
|
|
105
|
-
t6 = $[
|
|
87
|
+
t5 = $[13];
|
|
88
|
+
t6 = $[14];
|
|
106
89
|
}
|
|
107
90
|
useEffect(t5, t6);
|
|
108
91
|
let t7;
|
|
109
|
-
if ($[
|
|
92
|
+
if ($[15] !== finalSanitizedEditorConfig || $[16] !== props) {
|
|
110
93
|
t7 = _jsx(Suspense, {
|
|
111
94
|
fallback: _jsx(ShimmerEffect, {
|
|
112
95
|
height: "35vh"
|
|
113
96
|
}),
|
|
114
|
-
children: finalSanitizedEditorConfig &&
|
|
97
|
+
children: finalSanitizedEditorConfig && _jsx(RichTextEditor, {
|
|
115
98
|
...props,
|
|
116
|
-
editorConfig: finalSanitizedEditorConfig
|
|
117
|
-
key: finalSanitizedEditorConfig.view
|
|
99
|
+
editorConfig: finalSanitizedEditorConfig
|
|
118
100
|
})
|
|
119
101
|
});
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
102
|
+
$[15] = finalSanitizedEditorConfig;
|
|
103
|
+
$[16] = props;
|
|
104
|
+
$[17] = t7;
|
|
123
105
|
} else {
|
|
124
|
-
t7 = $[
|
|
106
|
+
t7 = $[17];
|
|
125
107
|
}
|
|
126
108
|
return t7;
|
|
127
109
|
};
|
package/dist/field/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","ShimmerEffect","useConfig","React","lazy","Suspense","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","ShimmerEffect","useConfig","React","lazy","Suspense","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","RichTextEditor","then","module","default","RichText","RichTextField","props","$","admin","t0","clientFeatures","featureClientImportMap","t1","featureClientSchemaMap","field","lexicalEditorConfig","t2","schemaPath","t3","undefined","t4","config","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","t5","t6","featureProvidersLocal","clientFeature","Object","values","clientFeatureProvider","push","clientFeatureProps","resolvedClientFeatures","name","unSanitizedEditorConfig","features","lexical","t7","_jsx","fallback","height","editorConfig"],"sources":["../../src/field/index.tsx"],"sourcesContent":["'use client'\n\nimport type { RichTextFieldClient } from 'payload'\n\nimport { ShimmerEffect, useConfig } from '@payloadcms/ui'\nimport React, { lazy, Suspense, useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\nimport type { SanitizedClientEditorConfig } from '../lexical/config/types.js'\nimport type { LexicalRichTextFieldProps } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../lexical/config/client/default.js'\nimport { loadClientFeatures } from '../lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../lexical/config/client/sanitize.js'\n\nconst RichTextEditor = lazy(() =>\n import('./Field.js').then((module) => ({ default: module.RichText })),\n)\n\nexport const RichTextField: React.FC<LexicalRichTextFieldProps> = (props) => {\n const {\n admin = {},\n clientFeatures,\n featureClientImportMap = {},\n featureClientSchemaMap,\n field,\n lexicalEditorConfig = defaultEditorLexicalConfig,\n schemaPath,\n } = props\n\n const { config } = useConfig()\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<null | SanitizedClientEditorConfig>(null)\n\n useEffect(() => {\n if (finalSanitizedEditorConfig) {\n return\n }\n\n const featureProvidersLocal: FeatureProviderClient<any, any>[] = []\n for (const clientFeature of Object.values(clientFeatures)) {\n if (!clientFeature.clientFeatureProvider) {\n continue\n }\n featureProvidersLocal.push(\n clientFeature.clientFeatureProvider(clientFeature.clientFeatureProps),\n ) // Execute the clientFeatureProvider function here, as the server cannot execute functions imported from use client files\n }\n\n const resolvedClientFeatures = loadClientFeatures({\n config,\n featureClientImportMap,\n featureClientSchemaMap,\n field: field as RichTextFieldClient,\n schemaPath: schemaPath ?? field.name,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(resolvedClientFeatures, lexicalEditorConfig, admin),\n )\n }, [\n admin,\n clientFeatures,\n config,\n featureClientImportMap,\n featureClientSchemaMap,\n field,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n schemaPath,\n ]) // TODO: Optimize this and use useMemo for this in the future. This might break sub-richtext-blocks from the blocks feature. Need to investigate\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n {finalSanitizedEditorConfig && (\n <RichTextEditor {...props} editorConfig={finalSanitizedEditorConfig} />\n )}\n </Suspense>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,aAAa,EAAEC,SAAS,QAAQ;AACzC,OAAOC,KAAA,IAASC,IAAI,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAQ;AAM3D,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,0BAA0B,QAAQ;AAE3C,MAAMC,cAAA,gBAAiBP,IAAA,CAAK,MAC1B,MAAM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D,KAAA;IAGCgC,EAAA,GAAAC,IAAA,CAAA7C,QAAA;MAAA8C,QAAA,EAAoBD,IAAA,CAAAjD,aAAA;QAAAmD,MAAA,EAAsB;MAAA,C;gBACvCnB,0BAAA,IACCiB,IAAA,CAAAvC,cAAA;QAAA,GAAoBM,KAAK;QAAAoC,YAAA,EAAgBpB;MAAA,C;;;;;;;;SAF7CgB,E;CAMJ","ignoreList":[]}
|
package/dist/field/rscEntry.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ import type { SanitizedServerEditorConfig } from '../lexical/config/types.js';
|
|
|
4
4
|
import type { LexicalEditorProps } from '../types.js';
|
|
5
5
|
export declare const RscEntryLexicalField: React.FC<{
|
|
6
6
|
sanitizedEditorConfig: SanitizedServerEditorConfig;
|
|
7
|
-
} & ClientComponentProps & Pick<FieldPaths, 'path'> & Pick<LexicalEditorProps, 'admin'
|
|
7
|
+
} & ClientComponentProps & Pick<FieldPaths, 'path'> & Pick<LexicalEditorProps, 'admin'> & ServerComponentProps>;
|
|
8
8
|
//# sourceMappingURL=rscEntry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rscEntry.d.ts","sourceRoot":"","sources":["../../src/field/rscEntry.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EAGV,oBAAoB,EACrB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"rscEntry.d.ts","sourceRoot":"","sources":["../../src/field/rscEntry.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EAGV,oBAAoB,EACrB,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,KAAK,EACV,kBAAkB,EAGnB,MAAM,aAAa,CAAA;AAOpB,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CACzC;IACE,qBAAqB,EAAE,2BAA2B,CAAA;CACnD,GAAG,oBAAoB,GACtB,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GACxB,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,GACjC,oBAAoB,CA6FvB,CAAA"}
|
package/dist/field/rscEntry.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslation } from '@payloadcms/translations';
|
|
3
3
|
import { renderField } from '@payloadcms/ui/forms/renderField';
|
|
4
|
-
import { getFromImportMap } from 'payload/shared';
|
|
5
4
|
import React from 'react';
|
|
6
5
|
// eslint-disable-next-line payload/no-imports-from-exports-dir
|
|
7
6
|
import { RichTextField } from '../exports/client/index.js';
|
|
@@ -80,17 +79,6 @@ export const RscEntryLexicalField = async args => {
|
|
|
80
79
|
renderedBlocks: args.renderedBlocks,
|
|
81
80
|
schemaPath
|
|
82
81
|
};
|
|
83
|
-
if (args?.views) {
|
|
84
|
-
const viewMap = getFromImportMap({
|
|
85
|
-
importMap: args.payload.importMap,
|
|
86
|
-
PayloadComponent: args.views,
|
|
87
|
-
schemaPath: 'lexical-viewMap',
|
|
88
|
-
silent: true
|
|
89
|
-
});
|
|
90
|
-
if (viewMap) {
|
|
91
|
-
props.views = viewMap;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
82
|
if (Object.keys(admin).length) {
|
|
95
83
|
props.admin = admin;
|
|
96
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rscEntry.js","names":["getTranslation","renderField","
|
|
1
|
+
{"version":3,"file":"rscEntry.js","names":["getTranslation","renderField","React","RichTextField","buildInitialState","initLexicalFeatures","RscEntryLexicalField","args","field","path","clientField","name","schemaPath","disabled","readOnly","admin","Error","clientFeatures","featureClientImportMap","featureClientSchemaMap","clientFieldSchemaMap","fieldSchemaMap","i18n","payload","sanitizedEditorConfig","initialLexicalFormState","siblingData","root","children","length","context","id","collectionSlug","documentData","data","lexicalFieldSchemaPath","operation","permissions","preferences","renderFieldFn","req","nodeData","placeholderFromArgs","placeholder","undefined","hideGutter","hideInsertParagraphAtEnd","hideAddBlockButton","hideDraggableBlockElement","props","forceRender","lexicalEditorConfig","lexical","renderedBlocks","Object","keys","key","_jsx"],"sources":["../../src/field/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\nimport type {\n ClientComponentProps,\n FieldPaths,\n RichTextFieldClient,\n RichTextField as RichTextFieldType,\n ServerComponentProps,\n} from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { renderField } from '@payloadcms/ui/forms/renderField'\nimport React from 'react'\n\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type {\n LexicalEditorProps,\n LexicalFieldAdminClientProps,\n LexicalRichTextFieldProps,\n} from '../types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { RichTextField } from '../exports/client/index.js'\nimport { buildInitialState } from '../utilities/buildInitialState.js'\nimport { initLexicalFeatures } from '../utilities/initLexicalFeatures.js'\n\nexport const RscEntryLexicalField: React.FC<\n {\n sanitizedEditorConfig: SanitizedServerEditorConfig\n } & ClientComponentProps &\n Pick<FieldPaths, 'path'> &\n Pick<LexicalEditorProps, 'admin'> &\n ServerComponentProps\n> = async (args) => {\n const field: RichTextFieldType = args.field as RichTextFieldType\n const path = args.path ?? (args.clientField as RichTextFieldClient).name\n const schemaPath = args.schemaPath ?? path\n\n const disabled = args?.readOnly || field?.admin?.readOnly\n\n if (!(args?.clientField as RichTextFieldClient)?.name) {\n throw new Error('Initialized lexical RSC field without a field name')\n }\n\n const { clientFeatures, featureClientImportMap, featureClientSchemaMap } = initLexicalFeatures({\n clientFieldSchemaMap: args.clientFieldSchemaMap,\n fieldSchemaMap: args.fieldSchemaMap,\n i18n: args.i18n,\n path,\n payload: args.payload,\n sanitizedEditorConfig: args.sanitizedEditorConfig,\n schemaPath,\n })\n\n let initialLexicalFormState = {}\n if (args.siblingData?.[field.name]?.root?.children?.length) {\n initialLexicalFormState = await buildInitialState({\n context: {\n id: args.id,\n clientFieldSchemaMap: args.clientFieldSchemaMap,\n collectionSlug: args.collectionSlug,\n disabled,\n documentData: args.data,\n field,\n fieldSchemaMap: args.fieldSchemaMap,\n lexicalFieldSchemaPath: schemaPath,\n operation: args.operation,\n permissions: args.permissions,\n preferences: args.preferences,\n renderFieldFn: renderField,\n req: args.req,\n },\n nodeData: args.siblingData?.[field.name]?.root?.children as SerializedLexicalNode[],\n })\n }\n\n const placeholderFromArgs = args.admin?.placeholder\n const placeholder = placeholderFromArgs\n ? getTranslation(placeholderFromArgs, args.i18n)\n : undefined\n\n const admin: LexicalFieldAdminClientProps = {}\n if (placeholder) {\n admin.placeholder = placeholder\n }\n if (args.admin?.hideGutter) {\n admin.hideGutter = true\n }\n if (args.admin?.hideInsertParagraphAtEnd) {\n admin.hideInsertParagraphAtEnd = true\n }\n if (args.admin?.hideAddBlockButton) {\n admin.hideAddBlockButton = true\n }\n if (args.admin?.hideDraggableBlockElement) {\n admin.hideDraggableBlockElement = true\n }\n\n const props: LexicalRichTextFieldProps = {\n clientFeatures,\n featureClientSchemaMap, // TODO: Does client need this? Why cant this just live in the server\n field: args.clientField as RichTextFieldClient,\n forceRender: args.forceRender,\n initialLexicalFormState,\n lexicalEditorConfig: args.sanitizedEditorConfig.lexical,\n path,\n permissions: args.permissions,\n readOnly: args.readOnly,\n renderedBlocks: args.renderedBlocks,\n schemaPath,\n }\n if (Object.keys(admin).length) {\n props.admin = admin\n }\n if (Object.keys(featureClientImportMap).length) {\n props.featureClientImportMap = featureClientImportMap\n }\n\n for (const key in props) {\n if (props[key as keyof LexicalRichTextFieldProps] === undefined) {\n delete props[key as keyof LexicalRichTextFieldProps]\n }\n }\n\n return <RichTextField {...props} />\n}\n"],"mappings":";AASA,SAASA,cAAc,QAAQ;AAC/B,SAASC,WAAW,QAAQ;AAC5B,OAAOC,KAAA,MAAW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,mBAAA,EAAqB5C,IAAA,CAAKiB,qBAAqB,CAAC4B,OAAO;IACvD3C,IAAA;IACA4B,WAAA,EAAa9B,IAAA,CAAK8B,WAAW;IAC7BvB,QAAA,EAAUP,IAAA,CAAKO,QAAQ;IACvBuC,cAAA,EAAgB9C,IAAA,CAAK8C,cAAc;IACnCzC;EACF;EACA,IAAI0C,MAAA,CAAOC,IAAI,CAACxC,KAAA,EAAOc,MAAM,EAAE;IAC7BoB,KAAA,CAAMlC,KAAK,GAAGA,KAAA;EAChB;EACA,IAAIuC,MAAA,CAAOC,IAAI,CAACrC,sBAAA,EAAwBW,MAAM,EAAE;IAC9CoB,KAAA,CAAM/B,sBAAsB,GAAGA,sBAAA;EACjC;EAEA,KAAK,MAAMsC,GAAA,IAAOP,KAAA,EAAO;IACvB,IAAIA,KAAK,CAACO,GAAA,CAAuC,KAAKZ,SAAA,EAAW;MAC/D,OAAOK,KAAK,CAACO,GAAA,CAAuC;IACtD;EACF;EAEA,oBAAOC,IAAA,CAACtD,aAAA;IAAe,GAAG8C;;AAC5B","ignoreList":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export type * from './nodeTypes.js';
|
|
|
72
72
|
export { $convertFromMarkdownString } from './packages/@lexical/markdown/index.js';
|
|
73
73
|
export { defaultRichTextValue } from './populateGraphQL/defaultValue.js';
|
|
74
74
|
export { populate } from './populateGraphQL/populate.js';
|
|
75
|
-
export type {
|
|
75
|
+
export type { LexicalEditorProps, LexicalFieldAdminProps, LexicalRichTextAdapter } from './types.js';
|
|
76
76
|
export { buildDefaultEditorState, buildEditorState } from './utilities/buildEditorState.js';
|
|
77
77
|
export { createServerFeature } from './utilities/createServerFeature.js';
|
|
78
78
|
export { editorConfigFactory } from './utilities/editorConfigFactory.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|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O,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAExD,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEpG,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAE3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAA;AAElG,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -64,12 +64,10 @@ export function lexicalEditor(args) {
|
|
|
64
64
|
FieldComponent: {
|
|
65
65
|
path: '@payloadcms/richtext-lexical/rsc#RscEntryLexicalField',
|
|
66
66
|
serverProps: {
|
|
67
|
-
admin: args?.admin
|
|
68
|
-
views: args?.views
|
|
67
|
+
admin: args?.admin
|
|
69
68
|
}
|
|
70
69
|
},
|
|
71
70
|
generateImportMap: getGenerateImportMap({
|
|
72
|
-
lexicalEditorArgs: args,
|
|
73
71
|
resolvedFeatureMap
|
|
74
72
|
}),
|
|
75
73
|
generateSchemaMap: getGenerateSchemaMap({
|