@payloadcms/richtext-lexical 3.68.0-internal-debug.591ab42 → 3.68.0-internal-debug.e9b66ee
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/cell/rscEntry.js +2 -21
- package/dist/cell/rscEntry.js.map +1 -1
- package/dist/features/blocks/client/component/BlockContent.js +13 -48
- package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockCollapsible.js +1 -10
- package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockEditButton.js +1 -7
- package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js +1 -7
- package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/component/index.js +81 -247
- package/dist/features/blocks/client/component/index.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +1 -9
- package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +1 -7
- package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +1 -7
- package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +1 -7
- package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
- package/dist/features/blocks/client/componentInline/index.js +68 -217
- package/dist/features/blocks/client/componentInline/index.js.map +1 -1
- package/dist/features/blocks/client/getBlockImageComponent.js +4 -15
- package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
- package/dist/features/blocks/client/nodes/BlocksNode.js +1 -12
- package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js +2 -12
- package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js +26 -127
- package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js +49 -65
- package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +3 -16
- package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +4 -25
- package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
- package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
- package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/Component/index.js +2 -13
- package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +1 -8
- package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +1 -8
- package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +1 -6
- package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +1 -6
- package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js +10 -19
- package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js +16 -63
- package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +4 -19
- package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js +12 -45
- package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js +11 -57
- package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +7 -46
- package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
- package/dist/features/converters/lexicalToJSX/converter/index.js +5 -12
- package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
- package/dist/features/debug/jsxConverter/client/plugin/index.js +3 -16
- package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
- package/dist/features/debug/testRecorder/client/plugin/index.js +38 -113
- package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
- package/dist/features/debug/treeView/client/plugin/index.js +1 -15
- package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +79 -357
- package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +7 -41
- package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +9 -39
- package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +28 -59
- package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +0 -1
- package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
- package/dist/features/indent/client/IndentPlugin.js +1 -6
- package/dist/features/indent/client/IndentPlugin.js.map +1 -1
- package/dist/features/link/client/plugins/clickableLink/index.js +1 -7
- package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +59 -151
- package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -9
- package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
- package/dist/features/link/nodes/LinkNode.js.map +1 -1
- package/dist/features/lists/checklist/client/plugin/index.js +1 -7
- package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
- package/dist/features/lists/plugin/index.js +1 -7
- package/dist/features/lists/plugin/index.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +3 -18
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -9
- package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +3 -18
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -9
- package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
- package/dist/features/relationship/client/components/RelationshipComponent.js +31 -100
- package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
- package/dist/features/relationship/client/drawer/index.js +4 -21
- package/dist/features/relationship/client/drawer/index.js.map +1 -1
- package/dist/features/relationship/client/nodes/RelationshipNode.js +2 -12
- package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/relationship/client/plugins/index.js +1 -8
- package/dist/features/relationship/client/plugins/index.js.map +1 -1
- package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
- package/dist/features/textState/feature.client.js +5 -22
- package/dist/features/textState/feature.client.js.map +1 -1
- package/dist/features/toolbars/fixed/client/Toolbar/index.js +27 -123
- package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/inline/client/Toolbar/index.js +18 -111
- package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarButton/index.js +4 -14
- package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +56 -135
- package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js +16 -70
- package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
- package/dist/features/upload/client/component/index.js +43 -167
- package/dist/features/upload/client/component/index.js.map +1 -1
- package/dist/features/upload/client/component/pending/index.js +3 -16
- package/dist/features/upload/client/component/pending/index.js.map +1 -1
- package/dist/features/upload/client/drawer/index.js +4 -21
- package/dist/features/upload/client/drawer/index.js.map +1 -1
- package/dist/features/upload/client/nodes/UploadNode.js +3 -17
- package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
- package/dist/features/upload/client/plugin/index.js +2 -9
- package/dist/features/upload/client/plugin/index.js.map +1 -1
- package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
- package/dist/field/Diff/converters/listitem/index.js +11 -54
- package/dist/field/Diff/converters/listitem/index.js.map +1 -1
- package/dist/field/Diff/converters/relationship/index.js +18 -60
- package/dist/field/Diff/converters/relationship/index.js.map +1 -1
- package/dist/field/Diff/converters/unknown/index.js +7 -42
- package/dist/field/Diff/converters/unknown/index.js.map +1 -1
- package/dist/field/Diff/converters/upload/index.js +21 -91
- package/dist/field/Diff/converters/upload/index.js.map +1 -1
- package/dist/field/Diff/index.js +4 -17
- package/dist/field/Diff/index.js.map +1 -1
- package/dist/field/Field.js +25 -124
- package/dist/field/Field.js.map +1 -1
- package/dist/field/RenderLexical/index.js +15 -47
- package/dist/field/RenderLexical/index.js.map +1 -1
- package/dist/field/index.js +5 -24
- package/dist/field/index.js.map +1 -1
- package/dist/field/rscEntry.js +1 -9
- package/dist/field/rscEntry.js.map +1 -1
- package/dist/lexical/EditorPlugin.js +2 -17
- package/dist/lexical/EditorPlugin.js.map +1 -1
- package/dist/lexical/LexicalEditor.js +69 -232
- package/dist/lexical/LexicalEditor.js.map +1 -1
- package/dist/lexical/LexicalProvider.js +13 -64
- package/dist/lexical/LexicalProvider.js.map +1 -1
- package/dist/lexical/config/client/EditorConfigProvider.js +2 -11
- package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +5 -28
- package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +1 -14
- package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
- package/dist/lexical/plugins/SlashMenu/index.js +31 -98
- package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +7 -27
- package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +7 -45
- package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
- package/dist/lexical/ui/ContentEditable.js +3 -18
- package/dist/lexical/ui/ContentEditable.js.map +1 -1
- package/dist/lexical/ui/icons/AI/index.js +10 -58
- package/dist/lexical/ui/icons/AI/index.js.map +1 -1
- package/dist/lexical/ui/icons/Add/index.js +4 -31
- package/dist/lexical/ui/icons/Add/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignCenter/index.js +5 -45
- package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignJustify/index.js +5 -45
- package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignLeft/index.js +5 -45
- package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
- package/dist/lexical/ui/icons/AlignRight/index.js +5 -45
- package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
- package/dist/lexical/ui/icons/Block/index.js +5 -54
- package/dist/lexical/ui/icons/Block/index.js.map +1 -1
- package/dist/lexical/ui/icons/Blockquote/index.js +3 -24
- package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
- package/dist/lexical/ui/icons/Bold/index.js +3 -24
- package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
- package/dist/lexical/ui/icons/Checklist/index.js +4 -39
- package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
- package/dist/lexical/ui/icons/Code/index.js +4 -34
- package/dist/lexical/ui/icons/Code/index.js.map +1 -1
- package/dist/lexical/ui/icons/CodeBlock/index.js +3 -22
- package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
- package/dist/lexical/ui/icons/Collapse/index.js +3 -23
- package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
- package/dist/lexical/ui/icons/H1/index.js +3 -24
- package/dist/lexical/ui/icons/H1/index.js.map +1 -1
- package/dist/lexical/ui/icons/H2/index.js +3 -24
- package/dist/lexical/ui/icons/H2/index.js.map +1 -1
- package/dist/lexical/ui/icons/H3/index.js +3 -24
- package/dist/lexical/ui/icons/H3/index.js.map +1 -1
- package/dist/lexical/ui/icons/H4/index.js +3 -24
- package/dist/lexical/ui/icons/H4/index.js.map +1 -1
- package/dist/lexical/ui/icons/H5/index.js +3 -24
- package/dist/lexical/ui/icons/H5/index.js.map +1 -1
- package/dist/lexical/ui/icons/H6/index.js +3 -24
- package/dist/lexical/ui/icons/H6/index.js.map +1 -1
- package/dist/lexical/ui/icons/HorizontalRule/index.js +3 -27
- package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentDecrease/index.js +6 -53
- package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/IndentIncrease/index.js +6 -53
- package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
- package/dist/lexical/ui/icons/InlineBlocks/index.js +3 -26
- package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
- package/dist/lexical/ui/icons/Italic/index.js +3 -24
- package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
- package/dist/lexical/ui/icons/Link/index.js +3 -25
- package/dist/lexical/ui/icons/Link/index.js.map +1 -1
- package/dist/lexical/ui/icons/Meatballs/index.js +5 -39
- package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
- package/dist/lexical/ui/icons/OrderedList/index.js +7 -61
- package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Relationship/index.js +10 -58
- package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
- package/dist/lexical/ui/icons/Strikethrough/index.js +4 -34
- package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
- package/dist/lexical/ui/icons/Subscript/index.js +3 -24
- package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Superscript/index.js +3 -24
- package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
- package/dist/lexical/ui/icons/Table/index.js +3 -24
- package/dist/lexical/ui/icons/Table/index.js.map +1 -1
- package/dist/lexical/ui/icons/Text/index.js +3 -24
- package/dist/lexical/ui/icons/Text/index.js.map +1 -1
- package/dist/lexical/ui/icons/TextState/index.js +12 -18
- package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
- package/dist/lexical/ui/icons/Underline/index.js +4 -34
- package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
- package/dist/lexical/ui/icons/UnorderedList/index.js +8 -81
- package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
- package/dist/lexical/ui/icons/Upload/index.js +5 -48
- package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
- package/dist/lexical/utils/point.js.map +1 -1
- package/dist/lexical/utils/rect.js.map +1 -1
- package/dist/utilities/fieldsDrawer/Drawer.js +16 -41
- package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/DrawerContent.js +10 -42
- package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +1 -9
- package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +3 -11
- package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
- package/package.json +7 -7
package/dist/cell/rscEntry.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
2
1
|
import { getTranslation } from '@payloadcms/translations';
|
|
3
2
|
import { Link } from '@payloadcms/ui';
|
|
4
3
|
import { formatAdminURL } from 'payload/shared';
|
|
5
|
-
import React from 'react';
|
|
6
4
|
function recurseEditorState(editorState, textContent, i = 0) {
|
|
7
5
|
for (const node of editorState){
|
|
8
6
|
i++;
|
|
@@ -10,17 +8,7 @@ function recurseEditorState(editorState, textContent, i = 0) {
|
|
|
10
8
|
textContent.push(node.text);
|
|
11
9
|
} else {
|
|
12
10
|
if (!('children' in node)) {
|
|
13
|
-
textContent.push(
|
|
14
|
-
children: [
|
|
15
|
-
" [",
|
|
16
|
-
node.type,
|
|
17
|
-
"]"
|
|
18
|
-
]
|
|
19
|
-
}, i, true, {
|
|
20
|
-
fileName: "src/cell/rscEntry.tsx",
|
|
21
|
-
lineNumber: 21,
|
|
22
|
-
columnNumber: 26
|
|
23
|
-
}, this));
|
|
11
|
+
textContent.push(<code key={i}> [{node.type}]</code>);
|
|
24
12
|
}
|
|
25
13
|
}
|
|
26
14
|
if ('children' in node && node.children) {
|
|
@@ -69,14 +57,7 @@ export const RscEntryLexicalCell = (props)=>{
|
|
|
69
57
|
})
|
|
70
58
|
];
|
|
71
59
|
}
|
|
72
|
-
return
|
|
73
|
-
...wrapElementProps,
|
|
74
|
-
children: textContent
|
|
75
|
-
}, void 0, false, {
|
|
76
|
-
fileName: "src/cell/rscEntry.tsx",
|
|
77
|
-
lineNumber: 104,
|
|
78
|
-
columnNumber: 10
|
|
79
|
-
}, this);
|
|
60
|
+
return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>;
|
|
80
61
|
};
|
|
81
62
|
|
|
82
63
|
//# sourceMappingURL=rscEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}> [{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"names":["getTranslation","Link","formatAdminURL","
|
|
1
|
+
{"version":3,"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}> [{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"names":["getTranslation","Link","formatAdminURL","recurseEditorState","editorState","textContent","i","node","text","push","code","key","type","children","RscEntryLexicalCell","props","cellData","className","classNameFromProps","collectionConfig","field","admin","i18n","link","onClick","onClickFromProps","payload","rowData","classNameFromConfigContext","undefined","adminRoute","config","routes","WrapElement","wrapElementProps","prefetch","href","slug","path","id","collectionSlug","root","length","t","label"],"mappings":"AAEA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,SAASC,IAAI,QAAQ,iBAAgB;AACrC,SAASC,cAAc,QAAQ,iBAAgB;AAK/C,SAASC,mBACPC,WAAoC,EACpCC,WAA8B,EAC9BC,IAAY,CAAC;IAEb,KAAK,MAAMC,QAAQH,YAAa;QAC9BE;QACA,IAAI,UAAUC,QAAQA,KAAKC,IAAI,EAAE;YAC/BH,YAAYI,IAAI,CAACF,KAAKC,IAAI;QAC5B,OAAO;YACL,IAAI,CAAE,CAAA,cAAcD,IAAG,GAAI;gBACzBF,YAAYI,IAAI,EAAEC,KAAKC,KAAKL,GAAG,MAAM,CAACC,KAAKK,IAAI,CAAC,CAAC,EAAEF;YACrD;QACF;QACA,IAAI,cAAcH,QAAQA,KAAKM,QAAQ,EAAE;YACvCR,cAAcF,mBAAmBI,KAAKM,QAAQ,EAA6BR,aAAaC;QAC1F;IACF;IACA,OAAOD;AACT;AAEA,OAAO,MAAMS,sBAA0D,CAACC;IACtE,MAAM,EACJC,QAAQ,EACRC,WAAWC,kBAAkB,EAC7BC,gBAAgB,EAChBC,OAAO,EAAEC,KAAK,EAAE,EAChBD,KAAK,EACLE,IAAI,EACJC,IAAI,EACJC,SAASC,gBAAgB,EACzBC,OAAO,EACPC,OAAO,EACR,GAAGZ;IAEJ,MAAMa,6BAA6BP,SAAS,eAAeA,QAAQA,MAAMJ,SAAS,GAAGY;IAErF,MAAMZ,YACJC,sBACCE,CAAAA,MAAMC,KAAK,IAAI,eAAeD,MAAMC,KAAK,GAAGD,MAAMC,KAAK,CAACJ,SAAS,GAAG,IAAG,KACxEW;IACF,MAAME,aAAaJ,QAAQK,MAAM,CAACC,MAAM,CAACX,KAAK;IAE9C,MAAMG,UAAUC;IAEhB,IAAIQ,cAAiD;IAErD,MAAMC,mBAMF;QACFjB;IACF;IAEA,IAAIM,MAAM;QACRW,iBAAiBC,QAAQ,GAAG;QAC5BF,cAAchC;QACdiC,iBAAiBE,IAAI,GAAGjB,kBAAkBkB,OACtCnC,eAAe;YACb4B;YACAQ,MAAM,CAAC,aAAa,EAAEnB,kBAAkBkB,KAAK,CAAC,EAAEV,QAAQY,EAAE,EAAE;QAC9D,KACA;IACN;IAEA,IAAI,OAAOf,YAAY,YAAY;QACjCS,cAAc;QACdC,iBAAiBtB,IAAI,GAAG;QACxBsB,iBAAiBV,OAAO,GAAG;YACzBA,QAAQ;gBACNR;gBACAwB,gBAAgBrB,kBAAkBkB;gBAClCV;YACF;QACF;IACF;IAEA,IAAItB,cAAiC,EAAE;IAEvC,IAAIW,UAAUyB,MAAM5B,UAAU;QAC5BR,cAAcF,mBAAmBa,UAAUyB,MAAM5B,UAAUR;IAC7D;IAEA,IAAI,CAACA,aAAaqC,QAAQ;QACxBrC,cAAc;YACZiB,KAAKqB,CAAC,CAAC,mBAAmB;gBACxBC,OAAO5C,eAAe,AAAC,CAAA,WAAWoB,QAAQA,MAAMwB,KAAK,GAAG,IAAG,KAAM,QAAQtB;YAC3E;SACD;IACH;IAEA,QAAQW,aAAa,GAAGC,gBAAgB,GAAG7B,cAAc4B;AAC3D,EAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
2
|
import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
|
|
4
3
|
import { RenderFields, useFormSubmitted } from '@payloadcms/ui';
|
|
5
4
|
import React, { createContext, useMemo } from 'react';
|
|
@@ -26,7 +25,7 @@ import React, { createContext, useMemo } from 'react';
|
|
|
26
25
|
* Whether to show the Remove button
|
|
27
26
|
* If `Actions` is provided, this property is ignored.
|
|
28
27
|
* @default true
|
|
29
|
-
*/ const BlockComponentContext =
|
|
28
|
+
*/ const BlockComponentContext = createContext({
|
|
30
29
|
baseClass: 'LexicalEditorTheme__block',
|
|
31
30
|
BlockCollapsible: ()=>null,
|
|
32
31
|
BlockDrawer: ()=>null,
|
|
@@ -51,57 +50,23 @@ export const useBlockComponentContext = ()=>React.use(BlockComponentContext);
|
|
|
51
50
|
const isEditable = useLexicalEditable();
|
|
52
51
|
const CollapsibleWithErrorProps = useMemo(()=>(props)=>{
|
|
53
52
|
const { children, ...rest } = props;
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
...rest,
|
|
58
|
-
children: children
|
|
59
|
-
}, void 0, false, {
|
|
60
|
-
fileName: "src/features/blocks/client/component/BlockContent.tsx",
|
|
61
|
-
lineNumber: 109,
|
|
62
|
-
columnNumber: 9
|
|
63
|
-
}, this);
|
|
53
|
+
return <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>
|
|
54
|
+
{children}
|
|
55
|
+
</Collapsible>;
|
|
64
56
|
}, [
|
|
65
57
|
Collapsible,
|
|
66
58
|
fieldHasErrors,
|
|
67
59
|
errorCount
|
|
68
60
|
]);
|
|
69
|
-
return CustomBlock ?
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
lineNumber: 125,
|
|
79
|
-
columnNumber: 7
|
|
80
|
-
}, this)
|
|
81
|
-
]
|
|
82
|
-
}, void 0, true, {
|
|
83
|
-
fileName: "src/features/blocks/client/component/BlockContent.tsx",
|
|
84
|
-
lineNumber: 118,
|
|
85
|
-
columnNumber: 5
|
|
86
|
-
}, this) : /*#__PURE__*/ _jsxDEV(CollapsibleWithErrorProps, {
|
|
87
|
-
children: /*#__PURE__*/ _jsxDEV(RenderFields, {
|
|
88
|
-
fields: formSchema,
|
|
89
|
-
forceRender: true,
|
|
90
|
-
parentIndexPath: "",
|
|
91
|
-
parentPath: '',
|
|
92
|
-
parentSchemaPath: "",
|
|
93
|
-
permissions: true,
|
|
94
|
-
readOnly: !isEditable
|
|
95
|
-
}, void 0, false, {
|
|
96
|
-
fileName: "src/features/blocks/client/component/BlockContent.tsx",
|
|
97
|
-
lineNumber: 129,
|
|
98
|
-
columnNumber: 7
|
|
99
|
-
}, this)
|
|
100
|
-
}, void 0, false, {
|
|
101
|
-
fileName: "src/features/blocks/client/component/BlockContent.tsx",
|
|
102
|
-
lineNumber: 128,
|
|
103
|
-
columnNumber: 5
|
|
104
|
-
}, this);
|
|
61
|
+
return CustomBlock ? <BlockComponentContext value={{
|
|
62
|
+
...contextProps,
|
|
63
|
+
BlockCollapsible: CollapsibleWithErrorProps
|
|
64
|
+
}}>
|
|
65
|
+
{CustomBlock}
|
|
66
|
+
<BlockDrawer/>
|
|
67
|
+
</BlockComponentContext> : <CollapsibleWithErrorProps>
|
|
68
|
+
<RenderFields fields={formSchema} forceRender={true} parentIndexPath="" parentPath={''} parentSchemaPath="" permissions={true} readOnly={!isEditable}/>
|
|
69
|
+
</CollapsibleWithErrorProps>;
|
|
105
70
|
};
|
|
106
71
|
|
|
107
72
|
//# sourceMappingURL=BlockContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleProps } from '@payloadcms/ui/elements/Collapsible'\nimport type { ClientField, FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\nexport type BlockCollapsibleProps = {\n /**\n * Replace the top-right portion of the header that renders the Edit and Remove buttons with custom content.\n * If this property is provided, the `removeButton` and `editButton` properties are ignored.\n */\n Actions?: React.ReactNode\n children?: React.ReactNode\n /**\n * Additional className to the collapsible wrapper\n */\n className?: string\n /**\n * Props to pass to the underlying Collapsible component. You could use this to override the `Header` entirely, for example.\n */\n collapsibleProps?: Partial<CollapsibleProps>\n /**\n * Whether to disable rendering the block name field in the header Label\n * @default false\n */\n disableBlockName?: boolean\n /**\n * Whether to show the Edit button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n editButton?: boolean\n /**\n * Replace the default Label component with a custom Label\n */\n Label?: React.ReactNode\n /**\n * Replace the default Pill component component that's rendered within the default Label component with a custom Pill.\n * This property has no effect if you provide a custom Label component via the `Label` property.\n */\n Pill?: React.ReactNode\n /**\n * Whether to show the Remove button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n removeButton?: boolean\n}\n\nexport type BlockCollapsibleWithErrorProps = {\n errorCount?: number\n fieldHasErrors?: boolean\n} & BlockCollapsibleProps\n\nexport type BlockContentProps = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<BlockCollapsibleWithErrorProps>\n CustomBlock: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\ntype BlockComponentContextType = {\n BlockCollapsible: React.FC<BlockCollapsibleProps>\n} & Omit<BlockContentProps, 'Collapsible'>\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n baseClass: 'LexicalEditorTheme__block',\n BlockCollapsible: () => null,\n BlockDrawer: () => null,\n CustomBlock: null,\n EditButton: () => null,\n errorCount: 0,\n formSchema: [],\n initialState: false,\n nodeKey: '',\n RemoveButton: () => null,\n})\n\nexport const useBlockComponentContext = () => React.use(BlockComponentContext)\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<BlockContentProps> = (props) => {\n const { Collapsible, ...contextProps } = props\n\n const { BlockDrawer, CustomBlock, errorCount, formSchema } = contextProps\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n const isEditable = useLexicalEditable()\n\n const CollapsibleWithErrorProps = useMemo(\n () => (props: BlockCollapsibleProps) => {\n const { children, ...rest } = props\n return (\n <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>\n {children}\n </Collapsible>\n )\n },\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n return CustomBlock ? (\n <BlockComponentContext\n value={{\n ...contextProps,\n BlockCollapsible: CollapsibleWithErrorProps,\n }}\n >\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"names":["useLexicalEditable","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","baseClass","BlockCollapsible","BlockDrawer","CustomBlock","EditButton","errorCount","formSchema","initialState","nodeKey","RemoveButton","useBlockComponentContext","use","BlockContent","props","Collapsible","contextProps","hasSubmitted","fieldHasErrors","isEditable","CollapsibleWithErrorProps","children","rest","value","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"mappings":"AAAA
|
|
1
|
+
{"version":3,"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleProps } from '@payloadcms/ui/elements/Collapsible'\nimport type { ClientField, FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\nexport type BlockCollapsibleProps = {\n /**\n * Replace the top-right portion of the header that renders the Edit and Remove buttons with custom content.\n * If this property is provided, the `removeButton` and `editButton` properties are ignored.\n */\n Actions?: React.ReactNode\n children?: React.ReactNode\n /**\n * Additional className to the collapsible wrapper\n */\n className?: string\n /**\n * Props to pass to the underlying Collapsible component. You could use this to override the `Header` entirely, for example.\n */\n collapsibleProps?: Partial<CollapsibleProps>\n /**\n * Whether to disable rendering the block name field in the header Label\n * @default false\n */\n disableBlockName?: boolean\n /**\n * Whether to show the Edit button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n editButton?: boolean\n /**\n * Replace the default Label component with a custom Label\n */\n Label?: React.ReactNode\n /**\n * Replace the default Pill component component that's rendered within the default Label component with a custom Pill.\n * This property has no effect if you provide a custom Label component via the `Label` property.\n */\n Pill?: React.ReactNode\n /**\n * Whether to show the Remove button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n removeButton?: boolean\n}\n\nexport type BlockCollapsibleWithErrorProps = {\n errorCount?: number\n fieldHasErrors?: boolean\n} & BlockCollapsibleProps\n\nexport type BlockContentProps = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<BlockCollapsibleWithErrorProps>\n CustomBlock: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\ntype BlockComponentContextType = {\n BlockCollapsible: React.FC<BlockCollapsibleProps>\n} & Omit<BlockContentProps, 'Collapsible'>\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n baseClass: 'LexicalEditorTheme__block',\n BlockCollapsible: () => null,\n BlockDrawer: () => null,\n CustomBlock: null,\n EditButton: () => null,\n errorCount: 0,\n formSchema: [],\n initialState: false,\n nodeKey: '',\n RemoveButton: () => null,\n})\n\nexport const useBlockComponentContext = () => React.use(BlockComponentContext)\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<BlockContentProps> = (props) => {\n const { Collapsible, ...contextProps } = props\n\n const { BlockDrawer, CustomBlock, errorCount, formSchema } = contextProps\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n const isEditable = useLexicalEditable()\n\n const CollapsibleWithErrorProps = useMemo(\n () => (props: BlockCollapsibleProps) => {\n const { children, ...rest } = props\n return (\n <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>\n {children}\n </Collapsible>\n )\n },\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n return CustomBlock ? (\n <BlockComponentContext\n value={{\n ...contextProps,\n BlockCollapsible: CollapsibleWithErrorProps,\n }}\n >\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"names":["useLexicalEditable","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","baseClass","BlockCollapsible","BlockDrawer","CustomBlock","EditButton","errorCount","formSchema","initialState","nodeKey","RemoveButton","useBlockComponentContext","use","BlockContent","props","Collapsible","contextProps","hasSubmitted","fieldHasErrors","isEditable","CollapsibleWithErrorProps","children","rest","value","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"mappings":"AAAA;AAIA,SAASA,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,iBAAgB;AAC/D,OAAOC,SAASC,aAAa,EAAEC,OAAO,QAAQ,QAAO;AAGnD;;;GAGC,GAGD;;GAEC,GAED;;GAEC,GAED;;;GAGC,GAED;;;;GAIC,GAED;;GAEC,GAED;;;GAGC,GAED;;;;GAIC,GA2BH,MAAMC,wBAAwBF,cAAyC;IACrEG,WAAW;IACXC,kBAAkB,IAAM;IACxBC,aAAa,IAAM;IACnBC,aAAa;IACbC,YAAY,IAAM;IAClBC,YAAY;IACZC,YAAY,EAAE;IACdC,cAAc;IACdC,SAAS;IACTC,cAAc,IAAM;AACtB;AAEA,OAAO,MAAMC,2BAA2B,IAAMd,MAAMe,GAAG,CAACZ,uBAAsB;AAE9E;;;;CAIC,GACD,OAAO,MAAMa,eAA4C,CAACC;IACxD,MAAM,EAAEC,WAAW,EAAE,GAAGC,cAAc,GAAGF;IAEzC,MAAM,EAAEX,WAAW,EAAEC,WAAW,EAAEE,UAAU,EAAEC,UAAU,EAAE,GAAGS;IAE7D,MAAMC,eAAerB;IAErB,MAAMsB,iBAAiBD,gBAAgBX,aAAa;IACpD,MAAMa,aAAazB;IAEnB,MAAM0B,4BAA4BrB,QAChC,IAAM,CAACe;YACL,MAAM,EAAEO,QAAQ,EAAE,GAAGC,MAAM,GAAGR;YAC9B,QACGC,YAAYT,YAAYA,YAAYY,gBAAgBA,iBAAiB,GAAGI,IAAI,EAAE;UAC7E,CAACD,SAAS;QACZ,EAAEN;QAEN,GACA;QAACA;QAAaG;QAAgBZ;KAAW;IAG3C,OAAOF,eACJJ,sBACCuB,OAAO;QACL,GAAGP,YAAY;QACfd,kBAAkBkB;IACpB,GACD;MACC,CAAChB,YAAY;MACb,CAACD,aAAc;IACjB,EAAEH,0BAEDoB,0BAA0B;MACzB,CAACzB,aACC6B,QAAQjB,YACRkB,aAAa,MACbC,gBAAgB,GAChBC,YAAY,IACZC,iBAAiB,GACjBC,aAAa,MACbC,UAAU,CAACX,aACX;IACJ,EAAEC;AAEN,EAAC"}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
|
-
import React from 'react';
|
|
4
2
|
import { useBlockComponentContext } from '../BlockContent.js';
|
|
5
3
|
export const BlockCollapsible = (props)=>{
|
|
6
4
|
const { children, ...rest } = props;
|
|
7
5
|
const { BlockCollapsible } = useBlockComponentContext();
|
|
8
|
-
return BlockCollapsible ?
|
|
9
|
-
...rest,
|
|
10
|
-
children: children
|
|
11
|
-
}, void 0, false, {
|
|
12
|
-
fileName: "src/features/blocks/client/component/components/BlockCollapsible.tsx",
|
|
13
|
-
lineNumber: 10,
|
|
14
|
-
columnNumber: 29
|
|
15
|
-
}, this) : null;
|
|
6
|
+
return BlockCollapsible ? <BlockCollapsible {...rest}>{children}</BlockCollapsible> : null;
|
|
16
7
|
};
|
|
17
8
|
|
|
18
9
|
//# sourceMappingURL=BlockCollapsible.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockCollapsible.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { type BlockCollapsibleProps, useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockCollapsible: React.FC<BlockCollapsibleProps> = (props) => {\n const { children, ...rest } = props\n const { BlockCollapsible } = useBlockComponentContext()\n\n return BlockCollapsible ? <BlockCollapsible {...rest}>{children}</BlockCollapsible> : null\n}\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockCollapsible.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { type BlockCollapsibleProps, useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockCollapsible: React.FC<BlockCollapsibleProps> = (props) => {\n const { children, ...rest } = props\n const { BlockCollapsible } = useBlockComponentContext()\n\n return BlockCollapsible ? <BlockCollapsible {...rest}>{children}</BlockCollapsible> : null\n}\n"],"names":["useBlockComponentContext","BlockCollapsible","props","children","rest"],"mappings":"AAAA;AAGA,SAAqCA,wBAAwB,QAAQ,qBAAoB;AAEzF,OAAO,MAAMC,mBAAoD,CAACC;IAChE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAC9B,MAAM,EAAED,gBAAgB,EAAE,GAAGD;IAE7B,OAAOC,oBAAoBA,kBAAkB,GAAGG,IAAI,GAAGD,WAAWF,oBAAoB;AACxF,EAAC"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
|
-
import React from 'react';
|
|
4
2
|
import { useBlockComponentContext } from '../BlockContent.js';
|
|
5
3
|
export const BlockEditButton = ()=>{
|
|
6
4
|
const { EditButton } = useBlockComponentContext();
|
|
7
|
-
return EditButton ?
|
|
8
|
-
fileName: "src/features/blocks/client/component/components/BlockEditButton.tsx",
|
|
9
|
-
lineNumber: 9,
|
|
10
|
-
columnNumber: 23
|
|
11
|
-
}, this) : null;
|
|
5
|
+
return EditButton ? <EditButton/> : null;
|
|
12
6
|
};
|
|
13
7
|
|
|
14
8
|
//# sourceMappingURL=BlockEditButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockEditButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockEditButton = () => {\n const { EditButton } = useBlockComponentContext()\n\n return EditButton ? <EditButton /> : null\n}\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockEditButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockEditButton = () => {\n const { EditButton } = useBlockComponentContext()\n\n return EditButton ? <EditButton /> : null\n}\n"],"names":["useBlockComponentContext","BlockEditButton","EditButton"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,QAAQ,qBAAoB;AAE7D,OAAO,MAAMC,kBAAkB;IAC7B,MAAM,EAAEC,UAAU,EAAE,GAAGF;IAEvB,OAAOE,cAAcA,eAAgB;AACvC,EAAC"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
|
|
3
|
-
import React from 'react';
|
|
4
2
|
import { useBlockComponentContext } from '../BlockContent.js';
|
|
5
3
|
export const BlockRemoveButton = ()=>{
|
|
6
4
|
const { RemoveButton } = useBlockComponentContext();
|
|
7
|
-
return RemoveButton ?
|
|
8
|
-
fileName: "src/features/blocks/client/component/components/BlockRemoveButton.tsx",
|
|
9
|
-
lineNumber: 9,
|
|
10
|
-
columnNumber: 25
|
|
11
|
-
}, this) : null;
|
|
5
|
+
return RemoveButton ? <RemoveButton/> : null;
|
|
12
6
|
};
|
|
13
7
|
|
|
14
8
|
//# sourceMappingURL=BlockRemoveButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockRemoveButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockRemoveButton = () => {\n const { RemoveButton } = useBlockComponentContext()\n\n return RemoveButton ? <RemoveButton /> : null\n}\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockRemoveButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockRemoveButton = () => {\n const { RemoveButton } = useBlockComponentContext()\n\n return RemoveButton ? <RemoveButton /> : null\n}\n"],"names":["useBlockComponentContext","BlockRemoveButton","RemoveButton"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,QAAQ,qBAAoB;AAE7D,OAAO,MAAMC,oBAAoB;IAC/B,MAAM,EAAEC,YAAY,EAAE,GAAGF;IAEzB,OAAOE,gBAAgBA,iBAAkB;AAC3C,EAAC"}
|