@payloadcms/richtext-lexical 3.0.0-beta.130 → 3.0.0-beta.131
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/{chunk-AE5XKHR4.js → chunk-D7PD5DUW.js} +2 -2
- package/dist/exports/client/component-KLNTKKNE.js +2 -0
- package/dist/exports/client/component-KLNTKKNE.js.map +7 -0
- package/dist/exports/client/index.js +7 -7
- package/dist/exports/client/index.js.map +3 -3
- package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +2 -11
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/index.d.ts.map +1 -1
- package/dist/features/blocks/client/component/index.js +4 -2
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +17 -11
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +3 -2
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +11 -3
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -25
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/field/bundled.css +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +7 -7
- package/dist/exports/client/component-YNHK5J3P.js +0 -2
- package/dist/exports/client/component-YNHK5J3P.js.map +0 -7
- /package/dist/exports/client/{chunk-AE5XKHR4.js.map → chunk-D7PD5DUW.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import u from"bson-objectid";import a from"react";import{DecoratorBlockNode as i}from"@lexical/react/LexicalDecoratorBlockNode.js";import c from"bson-objectid";import{deepCopyObjectSimple as f}from"payload/shared";var o=class extends i{__fields;constructor({fields:t,format:e,key:s}){super(e,s),this.__fields=t}static clone(t){return new this({fields:t.__fields,format:t.__format,key:t.__key})}static getType(){return"block"}static importDOM(){return{}}static importJSON(t){t.version===1&&(t={...t,fields:{...t.fields.data},version:2});let e=p(t.fields);return e.setFormat(t.format),e}static isInline(){return!1}decorate(t,e){return null}exportDOM(){let t=document.createElement("div"),e=document.createTextNode(this.getTextContent());return t.append(e),{element:t}}exportJSON(){return{...super.exportJSON(),type:"block",fields:this.getFields(),version:2}}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}setFields(t){let e=f(t),s=this.getWritable();s.__fields=e}};function p(r){return new o({fields:{...r,id:r?.id||new c.default().toHexString()}})}var m=a.lazy(()=>import("./component-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import u from"bson-objectid";import a from"react";import{DecoratorBlockNode as i}from"@lexical/react/LexicalDecoratorBlockNode.js";import c from"bson-objectid";import{deepCopyObjectSimple as f}from"payload/shared";var o=class extends i{__fields;constructor({fields:t,format:e,key:s}){super(e,s),this.__fields=t}static clone(t){return new this({fields:t.__fields,format:t.__format,key:t.__key})}static getType(){return"block"}static importDOM(){return{}}static importJSON(t){t.version===1&&(t={...t,fields:{...t.fields.data},version:2});let e=p(t.fields);return e.setFormat(t.format),e}static isInline(){return!1}decorate(t,e){return null}exportDOM(){let t=document.createElement("div"),e=document.createTextNode(this.getTextContent());return t.append(e),{element:t}}exportJSON(){return{...super.exportJSON(),type:"block",fields:this.getFields(),version:2}}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}setFields(t){let e=f(t),s=this.getWritable();s.__fields=e}};function p(r){return new o({fields:{...r,id:r?.id||new c.default().toHexString()}})}var m=a.lazy(()=>import("./component-KLNTKKNE.js").then(r=>({default:r.BlockComponent}))),n=class extends o{static clone(t){return super.clone(t)}static getType(){return super.getType()}static importJSON(t){t.version===1&&(t={...t,fields:{...t.fields.data},version:2});let e=d(t.fields);return e.setFormat(t.format),e}decorate(t,e){return l(m,{formData:this.getFields(),nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function d(r){return new n({fields:{...r,id:r?.id||new u.default().toHexString()}})}function v(r){return r instanceof n}export{n as a,d as b,v as c};
|
|
2
|
+
//# sourceMappingURL=chunk-D7PD5DUW.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{c as L}from"./chunk-D7PD5DUW.js";import{b as D}from"./chunk-CUIBIFW2.js";import{jsx as k,jsxs as ce}from"react/jsx-runtime";import{Collapsible as de,Form as me,Pill as ue,SectionTitle as fe,ShimmerEffect as pe,useDocumentInfo as H,useFormSubmitted as be,useServerFunctions as he,useTranslation as ke}from"@payloadcms/ui";import{abortAndIgnore as j}from"@payloadcms/ui/shared";import{useCallback as ye,useEffect as U,useMemo as _e,useRef as ge,useState as Ce}from"react";import{getTranslation as Se}from"@payloadcms/translations";import{v4 as ve}from"uuid";import{jsx as v,jsxs as w}from"react/jsx-runtime";import{useLexicalComposerContext as Q}from"@lexical/react/LexicalComposerContext.js";import{getTranslation as X}from"@payloadcms/translations";import{Button as Y,Collapsible as Z,ErrorPill as ee,Pill as te,RenderFields as oe,SectionTitle as le,useDocumentInfo as se,useFormSubmitted as re,useTranslation as ne}from"@payloadcms/ui";import{dequal as ie}from"dequal/lite";import{$getNodeByKey as K}from"lexical";import B,{useCallback as E,useEffect as ae}from"react";import{c as W}from"react/compiler-runtime";import{useAllFormFields as z}from"@payloadcms/ui";import{reduceFieldsToValues as G}from"payload/shared";import{useEffect as J}from"react";function M({fields:l}){for(let e in l){let t=l[e];Array.isArray(t.rows)&&"value"in t&&(t.disableFormData=!0)}return l}var V=l=>{let e=W(8),{onChange:t}=l,[r]=z(),m,s;e[0]!==r?(s=M({fields:r}),m=G(s,!0),e[0]=r,e[1]=m,e[2]=s):(m=e[1],s=e[2]);let n=m,o,u;return e[3]!==t||e[4]!==s||e[5]!==n?(o=()=>{t&&t({fullFieldsWithValues:s,newFormData:n})},u=[n,t,s],e[3]=t,e[4]=s,e[5]=n,e[6]=o,e[7]=u):(o=e[6],u=e[7]),J(o,u),null};function R(l){for(let e in l){let t=l[e];Array.isArray(t)&&!t?.length?delete l[e]:t&&typeof t=="object"?R(t):t==null&&delete l[e]}}var q=l=>{let{baseClass:e,clientBlock:t,field:r,formSchema:m,Label:s,nodeKey:n}=l,{formData:o}=l,{i18n:u}=ne(),[p]=Q(),{getDocPreferences:_,setDocFieldPreferences:x}=se(),[F,g]=B.useState();ae(()=>{_().then(a=>{let d=a?.fields[r.name]?.collapsed;g(d?d.includes(o.id):!1)})},[r.name,o.id,_]);let b=re(),[P,N]=B.useState(0),f=b&&P>0,A=[`${e}__row`,f?`${e}__row--has-errors`:`${e}__row--no-errors`].filter(Boolean).join(" "),I=E(({fullFieldsWithValues:a,newFormData:c})=>{if(c.id=o.id,c.blockType=o.blockType,R(c),R(o),ie(o,c)||setTimeout(()=>{p.update(()=>{let d=K(n);d&&L(d)&&(o=c,d.setFields(c))})},0),b){let d=0;for(let C of Object.values(a))C?.valid===!1&&d++;N(d)}},[p,n,b,o]),O=E(a=>{_().then(c=>{let C=c?.fields[r.name]?.collapsed,h=C&&C?.length?C:[];a?h.includes(o.id)||h.push(o.id):h.includes(o.id)&&h.splice(h.indexOf(o.id),1),x(r.name,{collapsed:h,hello:"hi"})})},[_,r.name,x,o.id]),i=E(()=>{p.update(()=>{K(n)?.remove()})},[p,n]);return typeof F!="boolean"?null:w(B.Fragment,{children:[v(Z,{className:A,collapsibleStyle:f?"error":"default",header:s||w("div",{className:`${e}__block-header`,children:[w("div",{children:[v(te,{className:`${e}__block-pill ${e}__block-pill-${o?.blockType}`,pillStyle:"white",children:typeof t?.labels?.singular=="string"?X(t?.labels.singular,u):t.slug}),v(le,{path:"blockName",readOnly:r?.admin?.readOnly||!1}),f&&v(ee,{count:P,i18n:u,withMessage:!0})]}),p.isEditable()&&v(Y,{buttonStyle:"icon-label",className:`${e}__removeButton`,disabled:r?.admin?.readOnly,icon:"x",onClick:a=>{a.preventDefault(),i()},round:!0,tooltip:"Remove Block"})]}),isCollapsed:F,onToggle:a=>{O(a),g(a)},children:v(oe,{fields:m,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:"",permissions:!0})},0),v(V,{onChange:I})]})};var y="lexical-block",Qe=l=>{let{formData:e,nodeKey:t}=l,r=be(),{id:m,collectionSlug:s,globalSlug:n}=H(),{fieldProps:{featureClientSchemaMap:o,field:u,path:p,schemaPath:_}}=D(),x=ge(new AbortController),{docPermissions:F,getDocPreferences:g}=H(),{getFormState:b}=he(),[P,N]=Ce(!1),f=`${_}.lexical_internal_feature.blocks.lexical_blocks.${e.blockType}.fields`,A=`${_}.lexical_internal_feature.blocks.lexical_blocks.${e.blockType}`,i=o.blocks[A][0].blocks[0],{i18n:a}=ke();U(()=>{let $=new AbortController;return e&&(async()=>{let{state:S}=await b({id:m,collectionSlug:s,data:e,docPermissions:{fields:!0},docPreferences:await g(),globalSlug:n,operation:"update",renderAllFields:!0,schemaPath:f,signal:$.signal});S&&(S.blockName={initialValue:"",passesCondition:!0,valid:!0,value:e.blockName},N(S))})(),()=>{j($)}},[b,f,m,s,n,g]);let c=ye(async({formState:$})=>{j(x.current);let T=new AbortController;x.current=T;let{state:S}=await b({id:m,collectionSlug:s,docPermissions:F,docPreferences:await g(),formState:$,globalSlug:n,operation:"update",schemaPath:f,signal:T.signal});return S?(S.blockName={initialValue:"",passesCondition:!0,valid:!0,value:e.blockName},S):$},[b,m,s,F,g,n,f,e.blockName]);U(()=>()=>{j(x.current)},[]);let d=[`${y}__row`,`${y}__row--no-errors`].filter(Boolean).join(" "),C=i?.admin?.components?.Label,h=_e(()=>i&&P!==!1?k(me,{beforeSubmit:[c],fields:i.fields,initialState:P,onChange:[c],submitted:r,uuid:ve(),children:k(q,{baseClass:y,clientBlock:i,field:u,formData:e,formSchema:i.fields,nodeKey:t,path:`${p}.lexical_internal_feature.blocks.${e.blockType}`,schemaPath:f})}):k(de,{className:d,collapsibleStyle:"default",header:i?.admin?.components?.Label?C:k("div",{className:`${y}__block-header`,children:ce("div",{children:[k(ue,{className:`${y}__block-pill ${y}__block-pill-${e?.blockType}`,pillStyle:"white",children:i&&typeof i.labels?.singular=="string"?Se(i.labels.singular,a):i?.slug}),k(fe,{path:"blockName",readOnly:u?.admin?.readOnly||!1})]})}),children:k(pe,{height:"35vh"})},0),[i,P,c,r,u,t,p,f,d,a]);return k("div",{className:y+" "+y+"-"+e.blockType,children:h})};export{Qe as BlockComponent};
|
|
2
|
+
//# sourceMappingURL=component-KLNTKKNE.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/features/blocks/client/component/index.tsx", "../../../src/features/blocks/client/component/BlockContent.tsx", "../../../src/features/blocks/client/component/FormSavePlugin.tsx", "../../../src/features/blocks/client/component/removeEmptyArrayValues.ts"],
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport {\n Collapsible,\n Form,\n Pill,\n SectionTitle,\n ShimmerEffect,\n useDocumentInfo,\n useFormSubmitted,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'\n\nconst baseClass = 'lexical-block'\nimport { getTranslation } from '@payloadcms/translations'\nimport { type BlocksFieldClient, type FormState } from 'payload'\nimport { v4 as uuid } from 'uuid'\n\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { BlockContent } from './BlockContent.js'\nimport './index.scss'\n\ntype Props = {\n readonly children?: React.ReactNode\n readonly formData: BlockFields\n readonly nodeKey: string\n}\n\nexport const BlockComponent: React.FC<Props> = (props) => {\n const { formData, nodeKey } = props\n const submitted = useFormSubmitted()\n const { id, collectionSlug, globalSlug } = useDocumentInfo()\n const {\n fieldProps: { featureClientSchemaMap, field: parentLexicalRichTextField, path, schemaPath },\n } = useEditorConfigContext()\n const onChangeAbortControllerRef = useRef(new AbortController())\n const { docPermissions, getDocPreferences } = useDocumentInfo()\n\n const { getFormState } = useServerFunctions()\n\n const [initialState, setInitialState] = useState<false | FormState | undefined>(false)\n\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${formData.blockType}.fields`\n\n const componentMapRenderedBlockPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${formData.blockType}`\n\n const clientSchemaMap = featureClientSchemaMap['blocks']\n\n const blocksField: BlocksFieldClient = clientSchemaMap[\n componentMapRenderedBlockPath\n ][0] as BlocksFieldClient\n\n const clientBlock = blocksField.blocks[0]\n\n const { i18n } = useTranslation()\n\n // Field Schema\n useEffect(() => {\n const abortController = new AbortController()\n\n const awaitInitialState = async () => {\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: formData,\n docPermissions: { fields: true },\n docPreferences: await getDocPreferences(),\n globalSlug,\n operation: 'update',\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: abortController.signal,\n })\n\n if (state) {\n state.blockName = {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n setInitialState(state)\n }\n }\n\n if (formData) {\n void awaitInitialState()\n }\n\n return () => {\n abortAndIgnore(abortController)\n }\n }, [\n getFormState,\n schemaFieldsPath,\n id,\n collectionSlug,\n globalSlug,\n getDocPreferences,\n // DO NOT ADD FORMDATA HERE! Adding formData will kick you out of sub block editors while writing.\n ])\n\n const onChange = useCallback(\n async ({ formState: prevFormState }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state: newFormState } = await getFormState({\n id,\n collectionSlug,\n docPermissions,\n docPreferences: await getDocPreferences(),\n formState: prevFormState,\n globalSlug,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!newFormState) {\n return prevFormState\n }\n\n newFormState.blockName = {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n return newFormState\n },\n\n [\n getFormState,\n id,\n collectionSlug,\n docPermissions,\n getDocPreferences,\n globalSlug,\n schemaFieldsPath,\n formData.blockName,\n ],\n )\n\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n const classNames = [`${baseClass}__row`, `${baseClass}__row--no-errors`].filter(Boolean).join(' ')\n\n const Label = clientBlock?.admin?.components?.Label\n\n // Memoized Form JSX\n const formContent = useMemo(() => {\n return clientBlock && initialState !== false ? (\n <Form\n beforeSubmit={[onChange]}\n fields={clientBlock.fields}\n initialState={initialState}\n onChange={[onChange]}\n submitted={submitted}\n uuid={uuid()}\n >\n <BlockContent\n baseClass={baseClass}\n clientBlock={clientBlock}\n field={parentLexicalRichTextField}\n formData={formData}\n formSchema={clientBlock.fields}\n nodeKey={nodeKey}\n path={`${path}.lexical_internal_feature.blocks.${formData.blockType}`}\n schemaPath={schemaFieldsPath}\n />\n </Form>\n ) : (\n <Collapsible\n className={classNames}\n collapsibleStyle=\"default\"\n header={\n clientBlock?.admin?.components?.Label ? (\n Label\n ) : (\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {clientBlock && typeof clientBlock.labels?.singular === 'string'\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock?.slug}\n </Pill>\n <SectionTitle\n path=\"blockName\"\n readOnly={parentLexicalRichTextField?.admin?.readOnly || false}\n />\n </div>\n </div>\n )\n }\n key={0}\n >\n <ShimmerEffect height=\"35vh\" />\n </Collapsible>\n )\n }, [\n clientBlock,\n initialState,\n onChange,\n submitted,\n parentLexicalRichTextField,\n nodeKey,\n path,\n schemaFieldsPath,\n classNames,\n i18n,\n // DO NOT ADD FORMDATA HERE! Adding formData will kick you out of sub block editors while writing.\n ])\n\n return <div className={baseClass + ' ' + baseClass + '-' + formData.blockType}>{formContent}</div>\n}\n", "'use client'\nimport type { ClientBlock, ClientField, CollapsedPreferences, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport { dequal } from 'dequal/lite'\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback, useEffect } from 'react'\n\nimport type { LexicalRichTextFieldProps } from '../../../../types.js'\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { $isBlockNode } from '../nodes/BlocksNode.js'\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n clientBlock: ClientBlock\n field: LexicalRichTextFieldProps['field']\n formData: BlockFields\n formSchema: ClientField[]\n Label?: React.ReactNode\n nodeKey: string\n path: string\n schemaPath: string\n}\n\n// Recursively remove all undefined values from even being present in formData, as they will\n// cause isDeepEqual to return false if, for example, formData has a key that fields.data\n// does not have, even if it's undefined.\n// Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n// Inside of fields.data however, that sub-blocks blockName property does not exist at all.\nfunction removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const { baseClass, clientBlock, field, formSchema, Label, nodeKey } = props\n let { formData } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>()\n\n useEffect(() => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n const collapsedArray = currentFieldPreferences?.collapsed\n setIsCollapsed(collapsedArray ? collapsedArray.includes(formData.id) : false)\n })\n }, [field.name, formData.id, getDocPreferences])\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: BlockFields\n }) => {\n newFormData.id = formData.id\n newFormData.blockType = formData.blockType\n\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!dequal(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n formData = newFormData\n node.setFields(newFormData)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n if (typeof isCollapsed !== 'boolean') {\n return null\n }\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n Label || (\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof clientBlock?.labels?.singular === 'string'\n ? getTranslation(clientBlock?.labels.singular, i18n)\n : clientBlock.slug}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.admin?.readOnly || false} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.admin?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n )\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n", "'use client'\nimport type { Data, FormState } from 'payload'\nimport type React from 'react'\n\nimport { useAllFormFields } from '@payloadcms/ui'\nimport { reduceFieldsToValues } from 'payload/shared'\nimport { useEffect } from 'react'\n\nimport { removeEmptyArrayValues } from './removeEmptyArrayValues.js'\n\ntype Props = {\n onChange?: ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => void\n}\n\nexport const FormSavePlugin: React.FC<Props> = (props) => {\n const { onChange } = props\n\n const [_fields] = useAllFormFields()\n\n const fields = removeEmptyArrayValues({ fields: _fields })\n\n // Pass in fields, and indicate if you'd like to \"unflatten\" field data.\n // The result below will reflect the data stored in the form at the given time\n const newFormData = reduceFieldsToValues(fields, true)\n\n useEffect(() => {\n if (onChange) {\n onChange({ fullFieldsWithValues: fields, newFormData })\n }\n }, [newFormData, onChange, fields])\n\n return null\n}\n", "'use client'\nimport type { FormState } from 'payload'\n\n/**\n * By default, if an array field is empty, it will be included in the form state with a value of 0.\n * We do not need this behavior here, By setting `disableFormData` to true, we can prevent the field from being included in the form state\n * like that.\n * @param fields form state\n */\nexport function removeEmptyArrayValues({ fields }: { fields: FormState }): FormState {\n for (const key in fields) {\n const field = fields[key]\n if (Array.isArray(field.rows) && 'value' in field) {\n field.disableFormData = true\n }\n }\n return fields\n}\n"],
|
|
5
|
+
"mappings": "gJAEA,OACEA,eAAAA,GACAC,QAAAA,GACAC,QAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,mBAAAA,EACAC,oBAAAA,GACAC,sBAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,kBAAAA,MAAsB,wBAC/B,OAAgBC,eAAAA,GAAaC,aAAAA,EAAWC,WAAAA,GAASC,UAAAA,GAAQC,YAAAA,OAAgB,QAGzE,OAASC,kBAAAA,OAAsB,2BAE/B,OAASC,MAAMC,OAAY,yDChB3B,OAASC,6BAAAA,MAAiC,2CAC1C,OAASC,kBAAAA,MAAsB,2BAC/B,OACEC,UAAAA,EACAC,eAAAA,EACAC,aAAAA,GACAC,QAAAA,GACAC,gBAAAA,GACAC,gBAAAA,GACAC,mBAAAA,GACAC,oBAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,UAAAA,OAAc,cACvB,OAASC,iBAAAA,MAAqB,UAC9B,OAAOC,GAASC,eAAAA,EAAaC,aAAAA,OAAiB,QClB9C,OAAAC,KAAAC,MAAA,yBAIA,OAASC,oBAAAA,MAAwB,iBACjC,OAASC,wBAAAA,MAA4B,iBACrC,OAASC,aAAAA,MAAiB,QCGnB,SAASC,EAAuB,CAAEC,OAAAA,CAAM,EAAyB,CACtE,QAAWC,KAAOD,EAAQ,CACxB,IAAME,EAAQF,EAAOC,CAAA,EACjBE,MAAMC,QAAQF,EAAMG,IAAI,GAAK,UAAWH,IAC1CA,EAAMI,gBAAkB,GAE5B,CACA,OAAON,CACT,CDGO,IAAMO,EAAkCC,GAAA,CAAA,IAAAC,EAAAC,EAAA,CAAA,EAC7C,CAAAC,SAAA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E0D,OAAOC,OAAA,EAASC,KAAK,GAAA,EAExFC,EAAQ9B,GAAa+B,OAAOC,YAAYF,MAGxCG,EAAcC,GAAQ,IACnBlC,GAAeN,IAAiB,GACrCyC,EAACC,GAAA,CACCC,aAAc,CAAClB,CAAA,EACfX,OAAQR,EAAYQ,OACpBd,aAAcA,EACdyB,SAAU,CAACA,CAAA,EACX7C,UAAWA,EACXgE,KAAMA,GAAA,WAENH,EAACI,EAAA,CACCtE,UAAWA,EACX+B,YAAaA,EACblB,MAAOC,EACPX,SAAUA,EACVoE,WAAYxC,EAAYQ,OACxBnC,QAASA,EACTW,KAAM,GAAGA,CAAA,oCAAwCZ,EAAS0B,SAAS,GACnEb,WAAYY,MAIhBsC,EAACM,GAAA,CACCC,UAAWhB,EACXiB,iBAAiB,UACjBC,OACE5C,GAAa+B,OAAOC,YAAYF,MAC9BA,EAEAK,EAAC,MAAA,CAAIO,UAAW,GAAGzE,CAAA,0BACjB4E,GAAC,MAAA,WACCV,EAACW,GAAA,CACCJ,UAAW,GAAGzE,CAAA,gBAAyBA,CAAA,gBAAyBG,GAAU0B,SAAA,GAC1EiD,UAAU,iBAET/C,GAAe,OAAOA,EAAYgD,QAAQC,UAAa,SACpDC,GAAelD,EAAYgD,OAAOC,SAAU/C,CAAA,EAC5CF,GAAamD,OAEnBhB,EAACiB,GAAA,CACCpE,KAAK,YACLqE,SAAUtE,GAA4BgD,OAAOsB,UAAY,mBAQnElB,EAACmB,GAAA,CAAcC,OAAO,UAFjB,CAAA,EAKR,CACDvD,EACAN,EACAyB,EACA7C,EACAS,EACAV,EACAW,EACAa,EACA6B,EACAxB,CAAA,CAED,EAED,OAAOiC,EAAC,MAAA,CAAIO,UAAWzE,EAAY,IAAMA,EAAY,IAAMG,EAAS0B,mBAAYmC,GAClF",
|
|
6
|
+
"names": ["Collapsible", "Form", "Pill", "SectionTitle", "ShimmerEffect", "useDocumentInfo", "useFormSubmitted", "useServerFunctions", "useTranslation", "abortAndIgnore", "useCallback", "useEffect", "useMemo", "useRef", "useState", "getTranslation", "v4", "uuid", "useLexicalComposerContext", "getTranslation", "Button", "Collapsible", "ErrorPill", "Pill", "RenderFields", "SectionTitle", "useDocumentInfo", "useFormSubmitted", "useTranslation", "dequal", "$getNodeByKey", "React", "useCallback", "useEffect", "c", "_c", "useAllFormFields", "reduceFieldsToValues", "useEffect", "removeEmptyArrayValues", "fields", "key", "field", "Array", "isArray", "rows", "disableFormData", "FormSavePlugin", "props", "$", "_c", "onChange", "_fields", "useAllFormFields", "t0", "fields", "removeEmptyArrayValues", "reduceFieldsToValues", "newFormData", "t1", "t2", "fullFieldsWithValues", "useEffect", "removeUndefinedAndNullAndEmptyArraysRecursively", "obj", "key", "value", "Array", "isArray", "length", "BlockContent", "props", "baseClass", "clientBlock", "field", "formSchema", "Label", "nodeKey", "formData", "i18n", "useTranslation", "editor", "useLexicalComposerContext", "getDocPreferences", "setDocFieldPreferences", "useDocumentInfo", "isCollapsed", "setIsCollapsed", "React", "useState", "useEffect", "then", "currentDocPreferences", "collapsedArray", "fields", "name", "collapsed", "includes", "id", "hasSubmitted", "useFormSubmitted", "errorCount", "setErrorCount", "fieldHasErrors", "classNames", "filter", "Boolean", "join", "onFormChange", "useCallback", "fullFieldsWithValues", "newFormData", "blockType", "dequal", "setTimeout", "update", "node", "$getNodeByKey", "$isBlockNode", "setFields", "rowErrorCount", "formField", "Object", "values", "valid", "onCollapsedChange", "changedCollapsed", "newCollapsed", "push", "splice", "indexOf", "hello", "removeBlock", "remove", "_jsxs", "Fragment", "_jsx", "Collapsible", "className", "collapsibleStyle", "header", "Pill", "pillStyle", "labels", "singular", "getTranslation", "slug", "SectionTitle", "path", "readOnly", "admin", "ErrorPill", "count", "withMessage", "isEditable", "Button", "buttonStyle", "disabled", "icon", "onClick", "e", "preventDefault", "round", "tooltip", "onToggle", "incomingCollapsedState", "RenderFields", "forceRender", "parentIndexPath", "parentPath", "parentSchemaPath", "permissions", "FormSavePlugin", "onChange", "baseClass", "BlockComponent", "props", "formData", "nodeKey", "submitted", "useFormSubmitted", "id", "collectionSlug", "globalSlug", "useDocumentInfo", "fieldProps", "featureClientSchemaMap", "field", "parentLexicalRichTextField", "path", "schemaPath", "useEditorConfigContext", "onChangeAbortControllerRef", "useRef", "AbortController", "docPermissions", "getDocPreferences", "getFormState", "useServerFunctions", "initialState", "setInitialState", "useState", "schemaFieldsPath", "blockType", "componentMapRenderedBlockPath", "clientBlock", "blocks", "i18n", "useTranslation", "useEffect", "abortController", "state", "data", "fields", "docPreferences", "operation", "renderAllFields", "signal", "blockName", "initialValue", "passesCondition", "valid", "value", "abortAndIgnore", "onChange", "useCallback", "formState", "prevFormState", "current", "controller", "newFormState", "classNames", "filter", "Boolean", "join", "Label", "admin", "components", "formContent", "useMemo", "_jsx", "Form", "beforeSubmit", "uuid", "BlockContent", "formSchema", "Collapsible", "className", "collapsibleStyle", "header", "_jsxs", "Pill", "pillStyle", "labels", "singular", "getTranslation", "slug", "SectionTitle", "readOnly", "ShimmerEffect", "height"]
|
|
7
|
+
}
|