@payloadcms/richtext-lexical 0.7.0 → 3.0.0-alpha.18
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/README.md +1 -3
- package/components.d.ts +1 -1
- package/components.js +3 -3
- package/dist/cell/index.d.ts +4 -4
- package/dist/cell/index.d.ts.map +1 -1
- package/dist/cell/index.js +93 -23
- package/dist/exports/components.d.ts +1 -1
- package/dist/exports/components.d.ts.map +1 -1
- package/dist/exports/components.js +3 -3
- package/dist/field/Field.d.ts +8 -3
- package/dist/field/Field.d.ts.map +1 -1
- package/dist/field/Field.js +16 -37
- package/dist/field/features/align/feature.client.d.ts +3 -0
- package/dist/field/features/align/feature.client.d.ts.map +1 -0
- package/dist/field/features/align/feature.client.js +81 -0
- package/dist/field/features/align/feature.server.d.ts +3 -0
- package/dist/field/features/align/feature.server.d.ts.map +1 -0
- package/dist/field/features/align/feature.server.js +26 -0
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +1 -1
- package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +5 -46
- package/dist/field/features/blockquote/feature.client.d.ts +3 -0
- package/dist/field/features/blockquote/feature.client.d.ts.map +1 -0
- package/dist/field/features/blockquote/feature.client.js +77 -0
- package/dist/field/features/blockquote/feature.server.d.ts +3 -0
- package/dist/field/features/blockquote/feature.server.d.ts.map +1 -0
- package/dist/field/features/blockquote/feature.server.js +56 -0
- package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/blockquote/markdownTransformer.js +50 -0
- package/dist/field/features/blocks/component/BlockContent.d.ts +25 -0
- package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -0
- package/dist/field/features/blocks/component/BlockContent.js +214 -0
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts +12 -0
- package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -0
- package/dist/field/features/blocks/component/FormSavePlugin.js +34 -0
- package/dist/field/features/blocks/component/index.d.ts +16 -0
- package/dist/field/features/blocks/component/index.d.ts.map +1 -0
- package/dist/field/features/blocks/component/index.js +172 -0
- package/dist/field/features/blocks/component/index.scss +153 -0
- package/dist/field/features/blocks/drawer/index.d.ts.map +1 -0
- package/dist/field/features/blocks/drawer/index.js +137 -0
- package/dist/field/features/blocks/feature.client.d.ts +7 -0
- package/dist/field/features/blocks/feature.client.d.ts.map +1 -0
- package/dist/field/features/blocks/feature.client.js +71 -0
- package/dist/field/features/blocks/feature.server.d.ts +8 -0
- package/dist/field/features/blocks/feature.server.d.ts.map +1 -0
- package/dist/field/features/blocks/feature.server.js +96 -0
- package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -0
- package/dist/field/features/blocks/nodes/BlocksNode.js +158 -0
- package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -0
- package/dist/field/features/blocks/plugin/commands.js +14 -0
- package/dist/field/features/blocks/plugin/index.d.ts +5 -0
- package/dist/field/features/blocks/plugin/index.d.ts.map +1 -0
- package/dist/field/features/blocks/plugin/index.js +91 -0
- package/dist/field/features/blocks/populationPromise.d.ts +5 -0
- package/dist/field/features/blocks/populationPromise.d.ts.map +1 -0
- package/dist/field/features/blocks/populationPromise.js +55 -0
- package/dist/field/features/blocks/validate.d.ts +5 -0
- package/dist/field/features/blocks/validate.d.ts.map +1 -0
- package/dist/field/features/blocks/validate.js +59 -0
- package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +3 -3
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +1 -1
- package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +5 -46
- package/dist/field/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/converters/paragraph.js +4 -3
- package/dist/field/features/converters/html/converter/index.d.ts +11 -2
- package/dist/field/features/converters/html/converter/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/converter/index.js +9 -6
- package/dist/field/features/converters/html/converter/types.d.ts +6 -1
- package/dist/field/features/converters/html/converter/types.d.ts.map +1 -1
- package/dist/field/features/converters/html/feature.server.d.ts +9 -0
- package/dist/field/features/converters/html/feature.server.d.ts.map +1 -0
- package/dist/field/features/converters/html/feature.server.js +24 -0
- package/dist/field/features/converters/html/field/index.d.ts +2 -2
- package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
- package/dist/field/features/converters/html/field/index.js +8 -7
- package/dist/field/features/createClientComponent.d.ts +7 -0
- package/dist/field/features/createClientComponent.d.ts.map +1 -0
- package/dist/field/features/createClientComponent.js +20 -0
- package/dist/field/features/createFeaturePropComponent.d.ts +6 -0
- package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -0
- package/dist/field/features/createFeaturePropComponent.js +24 -0
- package/dist/field/features/debug/testrecorder/feature.client.d.ts +3 -0
- package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/feature.client.js +30 -0
- package/dist/field/features/debug/testrecorder/feature.server.d.ts +3 -0
- package/dist/field/features/debug/testrecorder/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/feature.server.js +25 -0
- package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/testrecorder/plugin/index.js +504 -0
- package/dist/field/features/debug/testrecorder/plugin/index.scss +49 -0
- package/dist/field/features/debug/treeview/feature.client.d.ts +3 -0
- package/dist/field/features/debug/treeview/feature.client.d.ts.map +1 -0
- package/dist/field/features/debug/treeview/feature.client.js +30 -0
- package/dist/field/features/debug/treeview/feature.server.d.ts +3 -0
- package/dist/field/features/debug/treeview/feature.server.d.ts.map +1 -0
- package/dist/field/features/debug/treeview/feature.server.js +25 -0
- package/dist/field/features/debug/treeview/plugin/index.d.ts +4 -0
- package/dist/field/features/debug/treeview/plugin/index.d.ts.map +1 -0
- package/dist/field/features/debug/treeview/plugin/index.js +70 -0
- package/dist/field/features/format/bold/feature.client.d.ts +3 -0
- package/dist/field/features/format/bold/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/bold/feature.client.js +57 -0
- package/dist/field/features/format/bold/feature.server.d.ts +3 -0
- package/dist/field/features/format/bold/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/bold/feature.server.js +37 -0
- package/dist/field/features/format/bold/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/bold/markdownTransformers.js +58 -0
- package/dist/field/features/format/common/floatingSelectToolbarSection.js +3 -3
- package/dist/field/features/format/inlinecode/feature.client.d.ts +3 -0
- package/dist/field/features/format/inlinecode/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/feature.client.js +52 -0
- package/dist/field/features/format/inlinecode/feature.server.d.ts +3 -0
- package/dist/field/features/format/inlinecode/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/feature.server.js +29 -0
- package/dist/field/features/format/inlinecode/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/inlinecode/markdownTransformers.js +19 -0
- package/dist/field/features/format/italic/feature.client.d.ts +3 -0
- package/dist/field/features/format/italic/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/italic/feature.client.js +53 -0
- package/dist/field/features/format/italic/feature.server.d.ts +3 -0
- package/dist/field/features/format/italic/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/italic/feature.server.js +30 -0
- package/dist/field/features/format/italic/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/format/italic/markdownTransformers.js +35 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts +3 -0
- package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/strikethrough/feature.client.js +52 -0
- package/dist/field/features/format/strikethrough/feature.server.d.ts +3 -0
- package/dist/field/features/format/strikethrough/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/strikethrough/feature.server.js +29 -0
- package/dist/field/features/format/strikethrough/markdownTransformers.js +3 -3
- package/dist/field/features/format/subscript/feature.client.d.ts +3 -0
- package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/subscript/feature.client.js +48 -0
- package/dist/field/features/format/subscript/feature.server.d.ts +3 -0
- package/dist/field/features/format/subscript/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/subscript/feature.server.js +25 -0
- package/dist/field/features/format/superscript/feature.client.d.ts +3 -0
- package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/superscript/feature.client.js +48 -0
- package/dist/field/features/format/superscript/feature.server.d.ts +3 -0
- package/dist/field/features/format/superscript/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/superscript/feature.server.js +25 -0
- package/dist/field/features/format/underline/feature.client.d.ts +3 -0
- package/dist/field/features/format/underline/feature.client.d.ts.map +1 -0
- package/dist/field/features/format/underline/feature.client.js +48 -0
- package/dist/field/features/format/underline/feature.server.d.ts +3 -0
- package/dist/field/features/format/underline/feature.server.d.ts.map +1 -0
- package/dist/field/features/format/underline/feature.server.js +25 -0
- package/dist/field/features/heading/feature.client.d.ts +4 -0
- package/dist/field/features/heading/feature.client.d.ts.map +1 -0
- package/dist/field/features/heading/feature.client.js +104 -0
- package/dist/field/features/heading/feature.server.d.ts +7 -0
- package/dist/field/features/heading/feature.server.d.ts.map +1 -0
- package/dist/field/features/heading/feature.server.js +67 -0
- package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/heading/markdownTransformer.js +39 -0
- package/dist/field/features/indent/feature.client.d.ts +3 -0
- package/dist/field/features/indent/feature.client.d.ts.map +1 -0
- package/dist/field/features/indent/feature.client.js +67 -0
- package/dist/field/features/indent/feature.server.d.ts +3 -0
- package/dist/field/features/indent/feature.server.d.ts.map +1 -0
- package/dist/field/features/indent/feature.server.js +26 -0
- package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +3 -3
- package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -0
- package/dist/field/features/link/drawer/baseFields.js +128 -0
- package/dist/field/features/link/drawer/index.d.ts.map +1 -0
- package/dist/field/features/link/drawer/index.js +133 -0
- package/dist/field/features/link/drawer/index.scss +50 -0
- package/dist/field/features/link/drawer/types.d.ts +8 -0
- package/dist/field/features/link/drawer/types.d.ts.map +1 -0
- package/dist/field/features/link/feature.client.d.ts +5 -0
- package/dist/field/features/link/feature.client.d.ts.map +1 -0
- package/dist/field/features/link/feature.client.js +98 -0
- package/dist/field/features/link/feature.server.d.ts +33 -0
- package/dist/field/features/link/feature.server.d.ts.map +1 -0
- package/dist/field/features/link/feature.server.js +108 -0
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts +16 -0
- package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -0
- package/dist/field/features/link/nodes/AutoLinkNode.js +79 -0
- package/dist/field/features/link/nodes/LinkNode.d.ts +35 -0
- package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -0
- package/dist/field/features/link/nodes/LinkNode.js +326 -0
- package/dist/field/features/link/nodes/types.d.ts +19 -0
- package/dist/field/features/link/nodes/types.d.ts.map +1 -0
- package/dist/field/features/link/plugins/autoLink/index.d.ts +19 -0
- package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/autoLink/index.js +336 -0
- package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/clickableLink/index.js +23 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +14 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts +5 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +293 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +6 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.js +64 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +78 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts +13 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +12 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -0
- package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +45 -0
- package/dist/field/features/link/plugins/link/index.d.ts.map +1 -0
- package/dist/field/features/link/plugins/link/index.js +69 -0
- package/dist/field/features/link/populationPromise.d.ts +5 -0
- package/dist/field/features/link/populationPromise.d.ts.map +1 -0
- package/dist/field/features/link/populationPromise.js +56 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts +3 -0
- package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/feature.client.js +91 -0
- package/dist/field/features/lists/checklist/feature.server.d.ts +3 -0
- package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/feature.server.js +45 -0
- package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/markdownTransformers.js +26 -0
- package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -0
- package/dist/field/features/lists/checklist/plugin/index.js +23 -0
- package/dist/field/features/lists/common/markdown.js +1 -1
- package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
- package/dist/field/features/lists/htmlConverter.js +7 -5
- package/dist/field/features/lists/orderedlist/feature.client.d.ts +3 -0
- package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/feature.client.js +81 -0
- package/dist/field/features/lists/orderedlist/feature.server.d.ts +3 -0
- package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/feature.server.js +45 -0
- package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/orderedlist/markdownTransformer.js +26 -0
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts +3 -0
- package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/feature.client.js +81 -0
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts +3 -0
- package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/feature.server.js +45 -0
- package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +1 -0
- package/dist/field/features/lists/unorderedlist/markdownTransformer.js +26 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +30 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +41 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +32 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +32 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +30 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +36 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +6 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js +16 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +35 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +18 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +28 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.d.ts +17 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.js +87 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.d.ts +31 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +3 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.js +44 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts +9 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +57 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +23 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +131 -0
- package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +14 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +33 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.js +39 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.js +45 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.js +40 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.js +35 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +36 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +28 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.js +37 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +36 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +6 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.js +16 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +31 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.js +18 -0
- package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.js +34 -0
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts +19 -0
- package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/index.js +134 -0
- package/dist/field/features/migrations/slateToLexical/converter/types.d.ts +25 -0
- package/dist/field/features/migrations/slateToLexical/converter/types.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/converter/types.js +6 -0
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +3 -0
- package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/feature.client.js +44 -0
- package/dist/field/features/migrations/slateToLexical/feature.server.d.ts +9 -0
- package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/feature.server.js +57 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +23 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +131 -0
- package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +14 -0
- package/dist/field/features/paragraph/feature.client.d.ts +3 -0
- package/dist/field/features/paragraph/feature.client.d.ts.map +1 -0
- package/dist/field/features/paragraph/feature.client.js +73 -0
- package/dist/field/features/paragraph/feature.server.d.ts +3 -0
- package/dist/field/features/paragraph/feature.server.d.ts.map +1 -0
- package/dist/field/features/paragraph/feature.server.js +26 -0
- package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -0
- package/dist/field/features/relationship/drawer/commands.js +14 -0
- package/dist/field/features/relationship/drawer/index.d.ts.map +1 -0
- package/dist/field/features/relationship/drawer/index.js +130 -0
- package/dist/field/features/relationship/feature.client.d.ts +4 -0
- package/dist/field/features/relationship/feature.client.d.ts.map +1 -0
- package/dist/field/features/relationship/feature.client.js +66 -0
- package/dist/field/features/relationship/feature.server.d.ts +18 -0
- package/dist/field/features/relationship/feature.server.d.ts.map +1 -0
- package/dist/field/features/relationship/feature.server.js +36 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -0
- package/dist/field/features/relationship/nodes/RelationshipNode.js +172 -0
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -0
- package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +154 -0
- package/dist/field/features/relationship/nodes/components/index.scss +97 -0
- package/dist/field/features/relationship/plugins/index.d.ts +7 -0
- package/dist/field/features/relationship/plugins/index.d.ts.map +1 -0
- package/dist/field/features/relationship/plugins/index.js +107 -0
- package/dist/field/features/relationship/populationPromise.d.ts.map +1 -0
- package/dist/field/features/relationship/populationPromise.js +34 -0
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -0
- package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +84 -0
- package/dist/field/features/types.d.ts +139 -70
- package/dist/field/features/types.d.ts.map +1 -1
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -0
- package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +158 -0
- package/dist/field/features/upload/component/index.d.ts.map +1 -0
- package/dist/field/features/upload/component/index.js +186 -0
- package/dist/field/features/upload/component/index.scss +152 -0
- package/dist/field/features/upload/drawer/commands.d.ts.map +1 -0
- package/dist/field/features/upload/drawer/commands.js +15 -0
- package/dist/field/features/upload/drawer/index.d.ts.map +1 -0
- package/dist/field/features/upload/drawer/index.js +127 -0
- package/dist/field/features/upload/feature.client.d.ts +10 -0
- package/dist/field/features/upload/feature.client.d.ts.map +1 -0
- package/dist/field/features/upload/feature.client.js +65 -0
- package/dist/field/features/upload/feature.server.d.ts +12 -0
- package/dist/field/features/upload/feature.server.d.ts.map +1 -0
- package/dist/field/features/upload/feature.server.js +113 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts +47 -0
- package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -0
- package/dist/field/features/upload/nodes/UploadNode.js +160 -0
- package/dist/field/features/upload/plugin/index.d.ts.map +1 -0
- package/dist/field/features/upload/plugin/index.js +111 -0
- package/dist/field/features/upload/populationPromise.d.ts +5 -0
- package/dist/field/features/upload/populationPromise.d.ts.map +1 -0
- package/dist/field/features/upload/populationPromise.js +56 -0
- package/dist/field/features/upload/validate.d.ts.map +1 -0
- package/dist/field/features/upload/validate.js +29 -0
- package/dist/field/index.d.ts +7 -2
- package/dist/field/index.d.ts.map +1 -1
- package/dist/field/index.js +77 -5
- package/dist/field/index.scss +2 -2
- package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
- package/dist/field/lexical/EditorPlugin.js +4 -12
- package/dist/field/lexical/LexicalEditor.js +2 -2
- package/dist/field/lexical/LexicalEditor.scss +1 -3
- package/dist/field/lexical/LexicalProvider.d.ts +8 -4
- package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
- package/dist/field/lexical/LexicalProvider.js +18 -20
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +24 -0
- package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -0
- package/dist/field/lexical/config/client/EditorConfigProvider.js +99 -0
- package/dist/field/lexical/config/client/default.d.ts +3 -0
- package/dist/field/lexical/config/client/default.d.ts.map +1 -0
- package/dist/field/lexical/config/client/default.js +18 -0
- package/dist/field/lexical/config/client/loader.d.ts +11 -0
- package/dist/field/lexical/config/client/loader.d.ts.map +1 -0
- package/dist/field/lexical/config/client/loader.js +53 -0
- package/dist/field/lexical/config/client/sanitize.d.ts +6 -0
- package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -0
- package/dist/field/lexical/config/client/sanitize.js +144 -0
- package/dist/field/lexical/config/server/default.d.ts +8 -0
- package/dist/field/lexical/config/server/default.d.ts.map +1 -0
- package/dist/field/lexical/config/server/default.js +75 -0
- package/dist/field/lexical/config/server/loader.d.ts +7 -0
- package/dist/field/lexical/config/server/loader.d.ts.map +1 -0
- package/dist/field/lexical/config/server/loader.js +136 -0
- package/dist/field/lexical/config/server/sanitize.d.ts +5 -0
- package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -0
- package/dist/field/lexical/config/server/sanitize.js +83 -0
- package/dist/field/lexical/config/types.d.ts +18 -9
- package/dist/field/lexical/config/types.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.d.ts +2 -2
- package/dist/field/lexical/nodes/index.d.ts.map +1 -1
- package/dist/field/lexical/nodes/index.js +7 -2
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.scss +0 -2
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +3 -3
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js +9 -9
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +8 -58
- package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.scss +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +8 -28
- package/dist/field/lexical/plugins/FloatingSelectToolbar/index.scss +1 -1
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +4 -4
- package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/MarkdownShortcut/index.js +2 -2
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +1 -8
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +6 -6
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
- package/dist/field/lexical/plugins/SlashMenu/index.js +6 -13
- package/dist/field/lexical/plugins/SlashMenu/index.scss +1 -1
- package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -2
- package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -2
- package/dist/field/lexical/theme/EditorTheme.scss +0 -2
- package/dist/generateComponentMap.d.ts +6 -0
- package/dist/generateComponentMap.d.ts.map +1 -0
- package/dist/generateComponentMap.js +92 -0
- package/dist/generateSchemaMap.d.ts +6 -0
- package/dist/generateSchemaMap.d.ts.map +1 -0
- package/dist/generateSchemaMap.js +37 -0
- package/dist/index.d.ts +59 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +138 -109
- package/dist/populate/defaultValue.js +6 -6
- package/dist/populate/recurseNestedFields.d.ts.map +1 -1
- package/dist/populate/recurseNestedFields.js +3 -1
- package/dist/populate/richTextRelationshipPromise.js +2 -2
- package/dist/scss/app.scss +209 -0
- package/dist/scss/colors.scss +269 -0
- package/dist/scss/custom.css +1 -0
- package/dist/scss/fonts.scss +75 -0
- package/dist/scss/queries.scss +27 -0
- package/dist/scss/resets.scss +17 -0
- package/dist/scss/styles.scss +11 -0
- package/dist/scss/svg.scss +10 -0
- package/dist/scss/toastify.scss +58 -0
- package/dist/scss/type.scss +117 -0
- package/dist/scss/vars.scss +220 -0
- package/dist/scss/z-index.scss +9 -0
- package/dist/types.d.ts +8 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/useLexicalFeature.d.ts +3 -0
- package/dist/useLexicalFeature.d.ts.map +1 -0
- package/dist/useLexicalFeature.js +19 -0
- package/dist/validate/index.d.ts +4 -4
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +2 -3
- package/dist/validate/validateNodes.d.ts +2 -4
- package/dist/validate/validateNodes.d.ts.map +1 -1
- package/dist/validate/validateNodes.js +2 -4
- package/package.json +13 -7
- package/dist/field/features/BlockQuote/index.d.ts +0 -3
- package/dist/field/features/BlockQuote/index.d.ts.map +0 -1
- package/dist/field/features/BlockQuote/index.js +0 -140
- package/dist/field/features/BlockQuote/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/BlockQuote/markdownTransformer.js +0 -50
- package/dist/field/features/Blocks/component/BlockContent.d.ts +0 -20
- package/dist/field/features/Blocks/component/BlockContent.d.ts.map +0 -1
- package/dist/field/features/Blocks/component/BlockContent.js +0 -220
- package/dist/field/features/Blocks/component/FormSavePlugin.d.ts +0 -11
- package/dist/field/features/Blocks/component/FormSavePlugin.d.ts.map +0 -1
- package/dist/field/features/Blocks/component/FormSavePlugin.js +0 -34
- package/dist/field/features/Blocks/component/index.d.ts +0 -15
- package/dist/field/features/Blocks/component/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/component/index.js +0 -150
- package/dist/field/features/Blocks/component/index.scss +0 -153
- package/dist/field/features/Blocks/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/drawer/index.js +0 -140
- package/dist/field/features/Blocks/index.d.ts +0 -7
- package/dist/field/features/Blocks/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/index.js +0 -147
- package/dist/field/features/Blocks/nodes/BlocksNode.d.ts.map +0 -1
- package/dist/field/features/Blocks/nodes/BlocksNode.js +0 -173
- package/dist/field/features/Blocks/plugin/commands.d.ts.map +0 -1
- package/dist/field/features/Blocks/plugin/commands.js +0 -14
- package/dist/field/features/Blocks/plugin/index.d.ts +0 -5
- package/dist/field/features/Blocks/plugin/index.d.ts.map +0 -1
- package/dist/field/features/Blocks/plugin/index.js +0 -91
- package/dist/field/features/Blocks/populationPromise.d.ts +0 -5
- package/dist/field/features/Blocks/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Blocks/populationPromise.js +0 -55
- package/dist/field/features/Blocks/utils/transformInputFormData.d.ts +0 -11
- package/dist/field/features/Blocks/utils/transformInputFormData.d.ts.map +0 -1
- package/dist/field/features/Blocks/utils/transformInputFormData.js +0 -35
- package/dist/field/features/Blocks/utils/transformInputFormSchema.d.ts +0 -3
- package/dist/field/features/Blocks/utils/transformInputFormSchema.d.ts.map +0 -1
- package/dist/field/features/Blocks/utils/transformInputFormSchema.js +0 -43
- package/dist/field/features/Blocks/validate.d.ts +0 -5
- package/dist/field/features/Blocks/validate.d.ts.map +0 -1
- package/dist/field/features/Blocks/validate.js +0 -62
- package/dist/field/features/Heading/index.d.ts +0 -8
- package/dist/field/features/Heading/index.d.ts.map +0 -1
- package/dist/field/features/Heading/index.js +0 -164
- package/dist/field/features/Heading/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/Heading/markdownTransformer.js +0 -39
- package/dist/field/features/Link/drawer/baseFields.d.ts.map +0 -1
- package/dist/field/features/Link/drawer/baseFields.js +0 -128
- package/dist/field/features/Link/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Link/drawer/index.js +0 -40
- package/dist/field/features/Link/drawer/index.scss +0 -50
- package/dist/field/features/Link/drawer/types.d.ts +0 -8
- package/dist/field/features/Link/drawer/types.d.ts.map +0 -1
- package/dist/field/features/Link/index.d.ts +0 -33
- package/dist/field/features/Link/index.d.ts.map +0 -1
- package/dist/field/features/Link/index.js +0 -201
- package/dist/field/features/Link/nodes/AutoLinkNode.d.ts +0 -16
- package/dist/field/features/Link/nodes/AutoLinkNode.d.ts.map +0 -1
- package/dist/field/features/Link/nodes/AutoLinkNode.js +0 -79
- package/dist/field/features/Link/nodes/LinkNode.d.ts +0 -50
- package/dist/field/features/Link/nodes/LinkNode.d.ts.map +0 -1
- package/dist/field/features/Link/nodes/LinkNode.js +0 -326
- package/dist/field/features/Link/plugins/autoLink/index.d.ts +0 -19
- package/dist/field/features/Link/plugins/autoLink/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/autoLink/index.js +0 -336
- package/dist/field/features/Link/plugins/clickableLink/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/clickableLink/index.js +0 -23
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/commands.js +0 -14
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/index.d.ts +0 -6
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/LinkEditor/index.js +0 -336
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.d.ts +0 -7
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.js +0 -65
- package/dist/field/features/Link/plugins/floatingLinkEditor/index.scss +0 -78
- package/dist/field/features/Link/plugins/floatingLinkEditor/types.d.ts +0 -13
- package/dist/field/features/Link/plugins/floatingLinkEditor/types.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/utilities.d.ts +0 -12
- package/dist/field/features/Link/plugins/floatingLinkEditor/utilities.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/floatingLinkEditor/utilities.js +0 -45
- package/dist/field/features/Link/plugins/link/index.d.ts.map +0 -1
- package/dist/field/features/Link/plugins/link/index.js +0 -69
- package/dist/field/features/Link/populationPromise.d.ts +0 -5
- package/dist/field/features/Link/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Link/populationPromise.js +0 -56
- package/dist/field/features/Paragraph/index.d.ts +0 -3
- package/dist/field/features/Paragraph/index.d.ts.map +0 -1
- package/dist/field/features/Paragraph/index.js +0 -114
- package/dist/field/features/Relationship/drawer/commands.d.ts.map +0 -1
- package/dist/field/features/Relationship/drawer/commands.js +0 -14
- package/dist/field/features/Relationship/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Relationship/drawer/index.js +0 -130
- package/dist/field/features/Relationship/index.d.ts +0 -18
- package/dist/field/features/Relationship/index.d.ts.map +0 -1
- package/dist/field/features/Relationship/index.js +0 -115
- package/dist/field/features/Relationship/nodes/RelationshipNode.d.ts.map +0 -1
- package/dist/field/features/Relationship/nodes/RelationshipNode.js +0 -172
- package/dist/field/features/Relationship/nodes/components/RelationshipComponent.d.ts.map +0 -1
- package/dist/field/features/Relationship/nodes/components/RelationshipComponent.js +0 -161
- package/dist/field/features/Relationship/nodes/components/index.scss +0 -97
- package/dist/field/features/Relationship/plugins/index.d.ts +0 -7
- package/dist/field/features/Relationship/plugins/index.d.ts.map +0 -1
- package/dist/field/features/Relationship/plugins/index.js +0 -107
- package/dist/field/features/Relationship/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Relationship/populationPromise.js +0 -34
- package/dist/field/features/Relationship/utils/EnabledRelationshipsCondition.d.ts.map +0 -1
- package/dist/field/features/Relationship/utils/EnabledRelationshipsCondition.js +0 -84
- package/dist/field/features/Upload/component/ExtraFieldsDrawer/index.d.ts.map +0 -1
- package/dist/field/features/Upload/component/ExtraFieldsDrawer/index.js +0 -148
- package/dist/field/features/Upload/component/index.d.ts.map +0 -1
- package/dist/field/features/Upload/component/index.js +0 -191
- package/dist/field/features/Upload/component/index.scss +0 -152
- package/dist/field/features/Upload/drawer/commands.d.ts.map +0 -1
- package/dist/field/features/Upload/drawer/commands.js +0 -14
- package/dist/field/features/Upload/drawer/index.d.ts.map +0 -1
- package/dist/field/features/Upload/drawer/index.js +0 -127
- package/dist/field/features/Upload/index.d.ts +0 -11
- package/dist/field/features/Upload/index.d.ts.map +0 -1
- package/dist/field/features/Upload/index.js +0 -168
- package/dist/field/features/Upload/nodes/UploadNode.d.ts +0 -47
- package/dist/field/features/Upload/nodes/UploadNode.d.ts.map +0 -1
- package/dist/field/features/Upload/nodes/UploadNode.js +0 -160
- package/dist/field/features/Upload/plugin/index.d.ts.map +0 -1
- package/dist/field/features/Upload/plugin/index.js +0 -111
- package/dist/field/features/Upload/populationPromise.d.ts +0 -5
- package/dist/field/features/Upload/populationPromise.d.ts.map +0 -1
- package/dist/field/features/Upload/populationPromise.js +0 -56
- package/dist/field/features/Upload/validate.d.ts.map +0 -1
- package/dist/field/features/Upload/validate.js +0 -29
- package/dist/field/features/align/index.d.ts +0 -3
- package/dist/field/features/align/index.d.ts.map +0 -1
- package/dist/field/features/align/index.js +0 -121
- package/dist/field/features/converters/html/index.d.ts +0 -13
- package/dist/field/features/converters/html/index.d.ts.map +0 -1
- package/dist/field/features/converters/html/index.js +0 -25
- package/dist/field/features/debug/TestRecorder/index.d.ts +0 -3
- package/dist/field/features/debug/TestRecorder/index.d.ts.map +0 -1
- package/dist/field/features/debug/TestRecorder/index.js +0 -70
- package/dist/field/features/debug/TestRecorder/plugin/index.d.ts.map +0 -1
- package/dist/field/features/debug/TestRecorder/plugin/index.js +0 -500
- package/dist/field/features/debug/TestRecorder/plugin/index.scss +0 -51
- package/dist/field/features/debug/TreeView/index.d.ts +0 -3
- package/dist/field/features/debug/TreeView/index.d.ts.map +0 -1
- package/dist/field/features/debug/TreeView/index.js +0 -70
- package/dist/field/features/debug/TreeView/plugin.d.ts +0 -4
- package/dist/field/features/debug/TreeView/plugin.d.ts.map +0 -1
- package/dist/field/features/debug/TreeView/plugin.js +0 -70
- package/dist/field/features/format/Bold/index.d.ts +0 -3
- package/dist/field/features/format/Bold/index.d.ts.map +0 -1
- package/dist/field/features/format/Bold/index.js +0 -98
- package/dist/field/features/format/Bold/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/format/Bold/markdownTransformers.js +0 -58
- package/dist/field/features/format/InlineCode/index.d.ts +0 -3
- package/dist/field/features/format/InlineCode/index.d.ts.map +0 -1
- package/dist/field/features/format/InlineCode/index.js +0 -90
- package/dist/field/features/format/InlineCode/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/format/InlineCode/markdownTransformers.js +0 -19
- package/dist/field/features/format/Italic/index.d.ts +0 -3
- package/dist/field/features/format/Italic/index.d.ts.map +0 -1
- package/dist/field/features/format/Italic/index.js +0 -91
- package/dist/field/features/format/Italic/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/format/Italic/markdownTransformers.js +0 -35
- package/dist/field/features/format/strikethrough/index.d.ts +0 -3
- package/dist/field/features/format/strikethrough/index.d.ts.map +0 -1
- package/dist/field/features/format/strikethrough/index.js +0 -90
- package/dist/field/features/format/subscript/index.d.ts +0 -3
- package/dist/field/features/format/subscript/index.d.ts.map +0 -1
- package/dist/field/features/format/subscript/index.js +0 -86
- package/dist/field/features/format/superscript/index.d.ts +0 -3
- package/dist/field/features/format/superscript/index.d.ts.map +0 -1
- package/dist/field/features/format/superscript/index.js +0 -86
- package/dist/field/features/format/underline/index.d.ts +0 -3
- package/dist/field/features/format/underline/index.d.ts.map +0 -1
- package/dist/field/features/format/underline/index.js +0 -86
- package/dist/field/features/indent/index.d.ts +0 -3
- package/dist/field/features/indent/index.d.ts.map +0 -1
- package/dist/field/features/indent/index.js +0 -114
- package/dist/field/features/indent/plugin.d.ts +0 -3
- package/dist/field/features/indent/plugin.d.ts.map +0 -1
- package/dist/field/features/indent/plugin.js +0 -17
- package/dist/field/features/lists/CheckList/index.d.ts +0 -3
- package/dist/field/features/lists/CheckList/index.d.ts.map +0 -1
- package/dist/field/features/lists/CheckList/index.js +0 -135
- package/dist/field/features/lists/CheckList/markdownTransformers.d.ts.map +0 -1
- package/dist/field/features/lists/CheckList/markdownTransformers.js +0 -26
- package/dist/field/features/lists/CheckList/plugin/index.d.ts.map +0 -1
- package/dist/field/features/lists/CheckList/plugin/index.js +0 -23
- package/dist/field/features/lists/OrderedList/index.d.ts +0 -3
- package/dist/field/features/lists/OrderedList/index.d.ts.map +0 -1
- package/dist/field/features/lists/OrderedList/index.js +0 -133
- package/dist/field/features/lists/OrderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/OrderedList/markdownTransformer.js +0 -26
- package/dist/field/features/lists/UnorderedList/index.d.ts +0 -3
- package/dist/field/features/lists/UnorderedList/index.d.ts.map +0 -1
- package/dist/field/features/lists/UnorderedList/index.js +0 -133
- package/dist/field/features/lists/UnorderedList/markdownTransformer.d.ts.map +0 -1
- package/dist/field/features/lists/UnorderedList/markdownTransformer.js +0 -26
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/heading.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/heading.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/heading.js +0 -30
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/link.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/link.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/link.js +0 -41
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/list.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/list.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/list.js +0 -32
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/listItem.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/listItem.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/listItem.js +0 -32
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/quote.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/quote.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/quote.js +0 -30
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/unknown.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/unknown.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/unknown.js +0 -36
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/upload.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/upload.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/converters/upload.js +0 -35
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/defaultConverters.js +0 -28
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/index.d.ts +0 -18
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/index.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/index.js +0 -90
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/types.d.ts +0 -20
- package/dist/field/features/migrations/LexicalPluginToLexical/converter/types.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/index.d.ts +0 -10
- package/dist/field/features/migrations/LexicalPluginToLexical/index.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/index.js +0 -50
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -23
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -131
- package/dist/field/features/migrations/LexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -16
- package/dist/field/features/migrations/SlateToLexical/converter/converters/blockquote.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/blockquote.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/blockquote.js +0 -33
- package/dist/field/features/migrations/SlateToLexical/converter/converters/heading.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/heading.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/heading.js +0 -39
- package/dist/field/features/migrations/SlateToLexical/converter/converters/indent.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/indent.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/indent.js +0 -57
- package/dist/field/features/migrations/SlateToLexical/converter/converters/link.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/link.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/link.js +0 -40
- package/dist/field/features/migrations/SlateToLexical/converter/converters/listItem.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/listItem.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/listItem.js +0 -35
- package/dist/field/features/migrations/SlateToLexical/converter/converters/orderedList.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/orderedList.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/orderedList.js +0 -36
- package/dist/field/features/migrations/SlateToLexical/converter/converters/relationship.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/relationship.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/relationship.js +0 -28
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unknown.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unknown.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unknown.js +0 -37
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unorderedList.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unorderedList.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/unorderedList.js +0 -36
- package/dist/field/features/migrations/SlateToLexical/converter/converters/upload.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/converters/upload.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/converters/upload.js +0 -31
- package/dist/field/features/migrations/SlateToLexical/converter/defaultConverters.d.ts +0 -3
- package/dist/field/features/migrations/SlateToLexical/converter/defaultConverters.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/defaultConverters.js +0 -34
- package/dist/field/features/migrations/SlateToLexical/converter/index.d.ts +0 -19
- package/dist/field/features/migrations/SlateToLexical/converter/index.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/converter/index.js +0 -131
- package/dist/field/features/migrations/SlateToLexical/converter/types.d.ts +0 -16
- package/dist/field/features/migrations/SlateToLexical/converter/types.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/index.d.ts +0 -10
- package/dist/field/features/migrations/SlateToLexical/index.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/index.js +0 -50
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/Component.js +0 -23
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/index.js +0 -131
- package/dist/field/features/migrations/SlateToLexical/nodes/unknownConvertedNode/index.scss +0 -16
- package/dist/field/lexical/config/EditorConfigProvider.d.ts +0 -16
- package/dist/field/lexical/config/EditorConfigProvider.d.ts.map +0 -1
- package/dist/field/lexical/config/EditorConfigProvider.js +0 -99
- package/dist/field/lexical/config/default.d.ts +0 -6
- package/dist/field/lexical/config/default.d.ts.map +0 -1
- package/dist/field/lexical/config/default.js +0 -112
- package/dist/field/lexical/config/defaultClient.d.ts +0 -3
- package/dist/field/lexical/config/defaultClient.d.ts.map +0 -1
- package/dist/field/lexical/config/defaultClient.js +0 -17
- package/dist/field/lexical/config/loader.d.ts +0 -7
- package/dist/field/lexical/config/loader.d.ts.map +0 -1
- package/dist/field/lexical/config/loader.js +0 -133
- package/dist/field/lexical/config/sanitize.d.ts +0 -5
- package/dist/field/lexical/config/sanitize.d.ts.map +0 -1
- package/dist/field/lexical/config/sanitize.js +0 -170
- /package/dist/field/features/{BlockQuote → blockquote}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/{Blocks → blocks}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Blocks → blocks}/nodes/BlocksNode.d.ts +0 -0
- /package/dist/field/features/{Blocks → blocks}/plugin/commands.d.ts +0 -0
- /package/dist/field/features/debug/{TestRecorder → testrecorder}/plugin/index.d.ts +0 -0
- /package/dist/field/features/debug/{TreeView → treeview/plugin}/index.scss +0 -0
- /package/dist/field/features/format/{Bold → bold}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{InlineCode → inlinecode}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/format/{Italic → italic}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/{Heading → heading}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/{Link → link}/drawer/baseFields.d.ts +0 -0
- /package/dist/field/features/{Link → link}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Link → link}/drawer/types.js +0 -0
- /package/dist/field/features/{Link/plugins/floatingLinkEditor → link/nodes}/types.js +0 -0
- /package/dist/field/features/{Link → link}/plugins/clickableLink/index.d.ts +0 -0
- /package/dist/field/features/{Link → link}/plugins/floatingLinkEditor/LinkEditor/commands.d.ts +0 -0
- /package/dist/field/features/{migrations/LexicalPluginToLexical/converter → link/plugins/floatingLinkEditor}/types.js +0 -0
- /package/dist/field/features/{Link → link}/plugins/link/index.d.ts +0 -0
- /package/dist/field/features/lists/{CheckList → checklist}/markdownTransformers.d.ts +0 -0
- /package/dist/field/features/lists/{CheckList → checklist}/plugin/index.d.ts +0 -0
- /package/dist/field/features/lists/{OrderedList → orderedlist}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/lists/{UnorderedList → unorderedlist}/markdownTransformer.d.ts +0 -0
- /package/dist/field/features/migrations/{SlateToLexical → lexicalPluginToLexical}/converter/types.js +0 -0
- /package/dist/field/features/migrations/{LexicalPluginToLexical → lexicalPluginToLexical}/nodes/unknownConvertedNode/Component.d.ts +0 -0
- /package/dist/field/features/migrations/{LexicalPluginToLexical → lexicalPluginToLexical}/nodes/unknownConvertedNode/index.d.ts +0 -0
- /package/dist/field/features/migrations/{SlateToLexical → slateToLexical}/nodes/unknownConvertedNode/Component.d.ts +0 -0
- /package/dist/field/features/migrations/{SlateToLexical → slateToLexical}/nodes/unknownConvertedNode/index.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/drawer/commands.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/nodes/RelationshipNode.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/nodes/components/RelationshipComponent.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/populationPromise.d.ts +0 -0
- /package/dist/field/features/{Relationship → relationship}/utils/EnabledRelationshipsCondition.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/component/ExtraFieldsDrawer/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/component/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/drawer/commands.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/drawer/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/plugin/index.d.ts +0 -0
- /package/dist/field/features/{Upload → upload}/validate.d.ts +0 -0
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "BlocksFeature", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return BlocksFeature;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _config = require("payload/config");
|
|
12
|
-
const _utilities = require("payload/utilities");
|
|
13
|
-
const _types = require("../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types");
|
|
14
|
-
const _BlocksNode = require("./nodes/BlocksNode");
|
|
15
|
-
const _commands = require("./plugin/commands");
|
|
16
|
-
const _populationPromise = require("./populationPromise");
|
|
17
|
-
const _validate = require("./validate");
|
|
18
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
19
|
-
if (typeof WeakMap !== "function") return null;
|
|
20
|
-
var cacheBabelInterop = new WeakMap();
|
|
21
|
-
var cacheNodeInterop = new WeakMap();
|
|
22
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
23
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
24
|
-
})(nodeInterop);
|
|
25
|
-
}
|
|
26
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
27
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
28
|
-
return obj;
|
|
29
|
-
}
|
|
30
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
31
|
-
return {
|
|
32
|
-
default: obj
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
36
|
-
if (cache && cache.has(obj)) {
|
|
37
|
-
return cache.get(obj);
|
|
38
|
-
}
|
|
39
|
-
var newObj = {
|
|
40
|
-
__proto__: null
|
|
41
|
-
};
|
|
42
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
43
|
-
for(var key in obj){
|
|
44
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
45
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
46
|
-
if (desc && (desc.get || desc.set)) {
|
|
47
|
-
Object.defineProperty(newObj, key, desc);
|
|
48
|
-
} else {
|
|
49
|
-
newObj[key] = obj[key];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
newObj.default = obj;
|
|
54
|
-
if (cache) {
|
|
55
|
-
cache.set(obj, newObj);
|
|
56
|
-
}
|
|
57
|
-
return newObj;
|
|
58
|
-
}
|
|
59
|
-
const BlocksFeature = (props)=>{
|
|
60
|
-
// Sanitization taken from payload/src/fields/config/sanitize.ts
|
|
61
|
-
if (props?.blocks?.length) {
|
|
62
|
-
props.blocks = props.blocks.map((block)=>{
|
|
63
|
-
return {
|
|
64
|
-
...block,
|
|
65
|
-
fields: block.fields.concat(_config.baseBlockFields),
|
|
66
|
-
labels: !block.labels ? (0, _utilities.formatLabels)(block.slug) : block.labels
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
// unsanitizedBlock.fields are sanitized in the React component and not here.
|
|
70
|
-
// That's because we do not have access to the payload config here.
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
feature: ()=>{
|
|
74
|
-
return {
|
|
75
|
-
generatedTypes: {
|
|
76
|
-
modifyOutputSchema: ({ currentSchema, field, interfaceNameDefinitions })=>{
|
|
77
|
-
const blocksField = {
|
|
78
|
-
name: field?.name + '_lexical_blocks',
|
|
79
|
-
blocks: props.blocks,
|
|
80
|
-
type: 'blocks'
|
|
81
|
-
};
|
|
82
|
-
// This is only done so that interfaceNameDefinitions sets those block's interfaceNames.
|
|
83
|
-
// we don't actually use the JSON Schema itself in the generated types yet.
|
|
84
|
-
(0, _utilities.fieldsToJSONSchema)({}, [
|
|
85
|
-
blocksField
|
|
86
|
-
], interfaceNameDefinitions);
|
|
87
|
-
return currentSchema;
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
nodes: [
|
|
91
|
-
{
|
|
92
|
-
node: _BlocksNode.BlockNode,
|
|
93
|
-
populationPromises: [
|
|
94
|
-
(0, _populationPromise.blockPopulationPromiseHOC)(props)
|
|
95
|
-
],
|
|
96
|
-
type: _BlocksNode.BlockNode.getType(),
|
|
97
|
-
validations: [
|
|
98
|
-
(0, _validate.blockValidationHOC)(props)
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
plugins: [
|
|
103
|
-
{
|
|
104
|
-
Component: ()=>// @ts-expect-error
|
|
105
|
-
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("./plugin"))).then((module)=>module.BlocksPlugin),
|
|
106
|
-
position: 'normal'
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
props: props,
|
|
110
|
-
slashMenu: {
|
|
111
|
-
options: [
|
|
112
|
-
{
|
|
113
|
-
displayName: 'Blocks',
|
|
114
|
-
key: 'blocks',
|
|
115
|
-
options: [
|
|
116
|
-
...props.blocks.map((block)=>{
|
|
117
|
-
return new _types.SlashMenuOption('block-' + block.slug, {
|
|
118
|
-
Icon: ()=>// @ts-expect-error
|
|
119
|
-
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("../../lexical/ui/icons/Block"))).then((module)=>module.BlockIcon),
|
|
120
|
-
displayName: ({ i18n })=>{
|
|
121
|
-
return (0, _utilities.getTranslation)(block.labels.singular, i18n);
|
|
122
|
-
},
|
|
123
|
-
keywords: [
|
|
124
|
-
'block',
|
|
125
|
-
'blocks',
|
|
126
|
-
block.slug
|
|
127
|
-
],
|
|
128
|
-
onSelect: ({ editor })=>{
|
|
129
|
-
editor.dispatchCommand(_commands.INSERT_BLOCK_COMMAND, {
|
|
130
|
-
id: null,
|
|
131
|
-
blockName: '',
|
|
132
|
-
blockType: block.slug
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
})
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
key: 'blocks'
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9CbG9ja3MvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBCbG9jaywgQmxvY2tGaWVsZCB9IGZyb20gJ3BheWxvYWQvdHl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hY3R1YWxseSB1c2UgdGhlIEpTT04gU2NoZW1hIGl0c2VsZiBpbiB0aGUgZ2VuZXJhdGVkIHR5cGVzIHlldC5cbiAgICAgICAgICAgIGZpZWxkc1RvSlNPTlNjaGVtYSh7fSwgW2Jsb2Nrc0ZpZWxkXSwgaW50ZXJmYWNlTmFtZURlZmluaXRpb25zKVxuXG4gICAgICAgICAgICByZXR1cm4gY3VycmVudFNjaGVtYVxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICAgIG5vZGVzOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgbm9kZTogQmxvY2tOb2RlLFxuICAgICAgICAgICAgcG9wdWxhdGlvblByb21pc2VzOiBbYmxvY2tQb3B1bGF0aW9uUHJvbWlzZUhPQyhwcm9wcyldLFxuICAgICAgICAgICAgdHlwZTogQmxvY2tOb2RlLmdldFR5cGUoKSxcbiAgICAgICAgICAgIHZhbGlkYXRpb25zOiBbYmxvY2tWYWxpZGF0aW9uSE9DKHByb3BzKV0sXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgcGx1Z2luczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIENvbXBvbmVudDogKCkgPT5cbiAgICAgICAgICAgICAgLy8gQHRzLWV4cGVjdC1lcnJvclxuICAgICAgICAgICAgICBpbXBvcnQoJy4vcGx1Z2luJykudGhlbigobW9kdWxlKSA9PiBtb2R1bGUuQmxvY2tzUGx1Z2luKSxcbiAgICAgICAgICAgIHBvc2l0aW9uOiAnbm9ybWFsJyxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgICBwcm9wczogcHJvcHMsXG4gICAgICAgIHNsYXNoTWVudToge1xuICAgICAgICAgIG9wdGlvbnM6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgZGlzcGxheU5hbWU6ICdCbG9ja3MnLFxuICAgICAgICAgICAgICBrZXk6ICdibG9ja3MnLFxuICAgICAgICAgICAgICBvcHRpb25zOiBbXG4gICAgICAgICAgICAgICAgLi4ucHJvcHMuYmxvY2tzLm1hcCgoYmxvY2spID0+IHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU2xhc2hNZW51T3B0aW9uKCdibG9jay0nICsgYmxvY2suc2x1Zywge1xuICAgICAgICAgICAgICAgICAgICBJY29uOiAoKSA9PlxuICAgICAgICAgICAgICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3JcbiAgICAgICAgICAgICAgICAgICAgICBpbXBvcnQoJy4uLy4uL2xleGljYWwvdWkvaWNvbnMvQmxvY2snKS50aGVuKChtb2R1bGUpID0+IG1vZHVsZS5CbG9ja0ljb24pLFxuICAgICAgICAgICAgICAgICAgICBkaXNwbGF5TmFtZTogKHsgaTE4biB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldFRyYW5zbGF0aW9uKGJsb2NrLmxhYmVscy5zaW5ndWxhciwgaTE4bilcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAga2V5d29yZHM6IFsnYmxvY2snLCAnYmxvY2tzJywgYmxvY2suc2x1Z10sXG4gICAgICAgICAgICAgICAgICAgIG9uU2VsZWN0OiAoeyBlZGl0b3IgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5kaXNwYXRjaENvbW1hbmQoSU5TRVJUX0JMT0NLX0NPTU1BTkQsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tOYW1lOiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrVHlwZTogYmxvY2suc2x1ZyxcbiAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgX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S;IAgBjE,MAAM,CAAC,QAAQ,IAAI,KAAK;IAGxB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAalE,SAAS,IAAI,eAAe;IAQ5B,UAAU,IAAI,mBAAmB;IASjC,SAAS,IAAI,WAAW;IAIxB,cAAc,IAAI,MAAM;IAIxB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;CAiBrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,CAO9E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,SAAS,CAEhG"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
$createBlockNode: function() {
|
|
13
|
-
return $createBlockNode;
|
|
14
|
-
},
|
|
15
|
-
$isBlockNode: function() {
|
|
16
|
-
return $isBlockNode;
|
|
17
|
-
},
|
|
18
|
-
BlockNode: function() {
|
|
19
|
-
return BlockNode;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
const _LexicalDecoratorBlockNode = require("@lexical/react/LexicalDecoratorBlockNode");
|
|
23
|
-
const _bsonobjectid = /*#__PURE__*/ _interop_require_default(require("bson-objectid"));
|
|
24
|
-
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
25
|
-
const _transformInputFormData = require("../utils/transformInputFormData");
|
|
26
|
-
function _interop_require_default(obj) {
|
|
27
|
-
return obj && obj.__esModule ? obj : {
|
|
28
|
-
default: obj
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
32
|
-
if (typeof WeakMap !== "function") return null;
|
|
33
|
-
var cacheBabelInterop = new WeakMap();
|
|
34
|
-
var cacheNodeInterop = new WeakMap();
|
|
35
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
36
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
37
|
-
})(nodeInterop);
|
|
38
|
-
}
|
|
39
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
40
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
41
|
-
return obj;
|
|
42
|
-
}
|
|
43
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
44
|
-
return {
|
|
45
|
-
default: obj
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
49
|
-
if (cache && cache.has(obj)) {
|
|
50
|
-
return cache.get(obj);
|
|
51
|
-
}
|
|
52
|
-
var newObj = {
|
|
53
|
-
__proto__: null
|
|
54
|
-
};
|
|
55
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
56
|
-
for(var key in obj){
|
|
57
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
58
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
59
|
-
if (desc && (desc.get || desc.set)) {
|
|
60
|
-
Object.defineProperty(newObj, key, desc);
|
|
61
|
-
} else {
|
|
62
|
-
newObj[key] = obj[key];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
newObj.default = obj;
|
|
67
|
-
if (cache) {
|
|
68
|
-
cache.set(obj, newObj);
|
|
69
|
-
}
|
|
70
|
-
return newObj;
|
|
71
|
-
}
|
|
72
|
-
const BlockComponent = /*#__PURE__*/ _react.default.lazy(()=>// @ts-expect-error TypeScript being dumb
|
|
73
|
-
Promise.resolve().then(()=>/*#__PURE__*/ _interop_require_wildcard(require("../component"))).then((module)=>({
|
|
74
|
-
default: module.BlockComponent
|
|
75
|
-
})));
|
|
76
|
-
class BlockNode extends _LexicalDecoratorBlockNode.DecoratorBlockNode {
|
|
77
|
-
__fields;
|
|
78
|
-
constructor({ fields, format, key }){
|
|
79
|
-
super(format, key);
|
|
80
|
-
this.__fields = fields;
|
|
81
|
-
}
|
|
82
|
-
static clone(node) {
|
|
83
|
-
return new BlockNode({
|
|
84
|
-
fields: node.__fields,
|
|
85
|
-
format: node.__format,
|
|
86
|
-
key: node.__key
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
static getType() {
|
|
90
|
-
return 'block';
|
|
91
|
-
}
|
|
92
|
-
static importDOM() {
|
|
93
|
-
return {};
|
|
94
|
-
}
|
|
95
|
-
static importJSON(serializedNode) {
|
|
96
|
-
if (serializedNode.version === 1) {
|
|
97
|
-
// Convert (version 1 had the fields wrapped in another, unnecessary data property)
|
|
98
|
-
serializedNode = {
|
|
99
|
-
...serializedNode,
|
|
100
|
-
fields: {
|
|
101
|
-
...serializedNode.fields.data
|
|
102
|
-
},
|
|
103
|
-
version: 2
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
const node = $createBlockNode(serializedNode.fields);
|
|
107
|
-
node.setFormat(serializedNode.format);
|
|
108
|
-
return node;
|
|
109
|
-
}
|
|
110
|
-
static isInline() {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
decorate(editor, config) {
|
|
114
|
-
const blockFieldWrapperName = this.getFields().blockType + '-' + this.getFields().id;
|
|
115
|
-
const transformedFormData = (0, _transformInputFormData.transformInputFormData)(this.getFields(), blockFieldWrapperName);
|
|
116
|
-
return /*#__PURE__*/ _react.default.createElement(BlockComponent, {
|
|
117
|
-
blockFieldWrapperName: blockFieldWrapperName,
|
|
118
|
-
formData: transformedFormData,
|
|
119
|
-
nodeKey: this.getKey()
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
exportDOM() {
|
|
123
|
-
const element = document.createElement('div');
|
|
124
|
-
const text = document.createTextNode(this.getTextContent());
|
|
125
|
-
element.append(text);
|
|
126
|
-
return {
|
|
127
|
-
element
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
exportJSON() {
|
|
131
|
-
return {
|
|
132
|
-
...super.exportJSON(),
|
|
133
|
-
type: this.getType(),
|
|
134
|
-
fields: this.getFields(),
|
|
135
|
-
version: 2
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
getFields() {
|
|
139
|
-
return this.getLatest().__fields;
|
|
140
|
-
}
|
|
141
|
-
getTextContent() {
|
|
142
|
-
return `Block Field`;
|
|
143
|
-
}
|
|
144
|
-
setFields(fields) {
|
|
145
|
-
let fieldsCopy = JSON.parse(JSON.stringify(fields));
|
|
146
|
-
// Possibly transform fields
|
|
147
|
-
const blockFieldWrapperName = fieldsCopy.blockType + '-' + fieldsCopy.id;
|
|
148
|
-
if (fieldsCopy[blockFieldWrapperName]) {
|
|
149
|
-
fieldsCopy = {
|
|
150
|
-
id: fieldsCopy.id,
|
|
151
|
-
blockName: fieldsCopy.blockName,
|
|
152
|
-
blockType: fieldsCopy.blockType,
|
|
153
|
-
...fieldsCopy[blockFieldWrapperName]
|
|
154
|
-
};
|
|
155
|
-
delete fieldsCopy[blockFieldWrapperName];
|
|
156
|
-
}
|
|
157
|
-
const writable = this.getWritable();
|
|
158
|
-
writable.__fields = fieldsCopy;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function $createBlockNode(fields) {
|
|
162
|
-
return new BlockNode({
|
|
163
|
-
fields: {
|
|
164
|
-
...fields,
|
|
165
|
-
id: fields?.id || new _bsonobjectid.default().toHexString()
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
function $isBlockNode(node) {
|
|
170
|
-
return node instanceof BlockNode;
|
|
171
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AAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAI7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,kBAAkB,CAC7B,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "INSERT_BLOCK_COMMAND", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return INSERT_BLOCK_COMMAND;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _lexical = require("lexical");
|
|
12
|
-
const INSERT_BLOCK_COMMAND = (0, _lexical.createCommand)('INSERT_BLOCK_COMMAND');
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9CbG9ja3MvcGx1Z2luL2NvbW1hbmRzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgTGV4aWNhbENvbW1hbmQgfSBmcm9tICdsZXhpY2FsJ1xuXG5pbXBvcnQgeyBjcmVhdGVDb21tYW5kIH0gZnJvbSAnbGV4aWNhbCdcblxuaW1wb3J0IHR5cGUgeyBJbnNlcnRCbG9ja1BheWxvYWQgfSBmcm9tICcuL2luZGV4J1xuXG5leHBvcnQgY29uc3QgSU5TRVJUX0JMT0NLX0NPTU1BTkQ6IExleGljYWxDb21tYW5kPEluc2VydEJsb2NrUGF5bG9hZD4gPVxuICBjcmVhdGVDb21tYW5kKCdJTlNFUlRfQkxPQ0tfQ09NTUFORCcpXG4iXSwibmFtZXMiOlsiSU5TRVJUX0JMT0NLX0NPTU1BTkQiLCJjcmVhdGVDb21tYW5kIl0sIm1hcHBpbmdzIjoiOzs7OytCQU1hQTs7O2VBQUFBOzs7eUJBSmlCO0FBSXZCLE1BQU1BLHVCQUNYQyxJQUFBQSxzQkFBYSxFQUFDIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/Blocks/plugin/index.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAMtD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;AAE3D,wBAAgB,YAAY,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CA8CjD"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "BlocksPlugin", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return BlocksPlugin;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
13
|
-
const _utils = require("@lexical/utils");
|
|
14
|
-
const _lexical = require("lexical");
|
|
15
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
16
|
-
const _drawer = require("../drawer");
|
|
17
|
-
const _BlocksNode = require("../nodes/BlocksNode");
|
|
18
|
-
const _commands = require("./commands");
|
|
19
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
20
|
-
if (typeof WeakMap !== "function") return null;
|
|
21
|
-
var cacheBabelInterop = new WeakMap();
|
|
22
|
-
var cacheNodeInterop = new WeakMap();
|
|
23
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
24
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
25
|
-
})(nodeInterop);
|
|
26
|
-
}
|
|
27
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
28
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
29
|
-
return obj;
|
|
30
|
-
}
|
|
31
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
32
|
-
return {
|
|
33
|
-
default: obj
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
37
|
-
if (cache && cache.has(obj)) {
|
|
38
|
-
return cache.get(obj);
|
|
39
|
-
}
|
|
40
|
-
var newObj = {
|
|
41
|
-
__proto__: null
|
|
42
|
-
};
|
|
43
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
44
|
-
for(var key in obj){
|
|
45
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
46
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
47
|
-
if (desc && (desc.get || desc.set)) {
|
|
48
|
-
Object.defineProperty(newObj, key, desc);
|
|
49
|
-
} else {
|
|
50
|
-
newObj[key] = obj[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
newObj.default = obj;
|
|
55
|
-
if (cache) {
|
|
56
|
-
cache.set(obj, newObj);
|
|
57
|
-
}
|
|
58
|
-
return newObj;
|
|
59
|
-
}
|
|
60
|
-
function BlocksPlugin() {
|
|
61
|
-
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
62
|
-
(0, _react.useEffect)(()=>{
|
|
63
|
-
if (!editor.hasNodes([
|
|
64
|
-
_BlocksNode.BlockNode
|
|
65
|
-
])) {
|
|
66
|
-
throw new Error('BlocksPlugin: BlocksNode not registered on editor');
|
|
67
|
-
}
|
|
68
|
-
return (0, _utils.mergeRegister)(editor.registerCommand(_commands.INSERT_BLOCK_COMMAND, (payload)=>{
|
|
69
|
-
editor.update(()=>{
|
|
70
|
-
const blockNode = (0, _BlocksNode.$createBlockNode)(payload);
|
|
71
|
-
const selection = (0, _lexical.$getSelection)() || (0, _lexical.$getPreviousSelection)();
|
|
72
|
-
if ((0, _lexical.$isRangeSelection)(selection)) {
|
|
73
|
-
const { focus } = selection;
|
|
74
|
-
const focusNode = focus.getNode();
|
|
75
|
-
// First, delete currently selected node if it's an empty paragraph and if there are sufficient
|
|
76
|
-
// paragraph nodes (more than 1) left in the parent node, so that we don't "trap" the user
|
|
77
|
-
if ((0, _lexical.$isParagraphNode)(focusNode) && focusNode.getTextContentSize() === 0 && focusNode.getParent().getChildren().filter((node)=>(0, _lexical.$isParagraphNode)(node)).length > 1) {
|
|
78
|
-
focusNode.remove();
|
|
79
|
-
}
|
|
80
|
-
(0, _utils.$insertNodeToNearestRoot)(blockNode);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
return true;
|
|
84
|
-
}, _lexical.COMMAND_PRIORITY_EDITOR));
|
|
85
|
-
}, [
|
|
86
|
-
editor
|
|
87
|
-
]);
|
|
88
|
-
return /*#__PURE__*/ _react.default.createElement(_drawer.BlocksDrawerComponent, null);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJlcy9CbG9ja3MvcGx1Z2luL2luZGV4LnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIGNsaWVudCdcbmltcG9ydCB7IHVzZUxleGljYWxDb21wb3NlckNvbnRleHQgfSBmcm9tICdAbGV4aWNhbC9yZWFjdC9MZXhpY2FsQ29tcG9zZXJDb250ZXh0J1xuaW1wb3J0IHsgJGluc2VydE5vZGVUb05lYXJlc3RSb290LCBtZXJnZVJlZ2lzdGVyIH0gZnJvbSAnQGxleGljYWwvdXRpbHMnXG5pbXBvcnQge1xuICAkZ2V0UHJldmlvdXNTZWxlY3Rpb24sXG4gICRnZ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ICAgIChwYXlsb2FkOiBJbnNlcnRCbG9ja1BheWxvYWQpID0+IHtcbiAgICAgICAgICBlZGl0b3IudXBkYXRlKCgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGJsb2NrTm9kZSA9ICRjcmVhdGVCbG9ja05vZGUocGF5bG9hZClcblxuICAgICAgICAgICAgY29uc3Qgc2VsZWN0aW9uID0gJGdldFNlbGVjdGlvbigpIHx8ICRnZXRQcmV2aW91c1NlbGVjdGlvbigpXG5cbiAgICAgICAgICAgIGlmICgkaXNSYW5nZVNlbGVjdGlvbihzZWxlY3Rpb24pKSB7XG4gICAgICAgICAgICAgIGNvbnN0IHsgZm9jdXMgfSA9IHNlbGVjdGlvblxuICAgICAgICAgICAgICBjb25zdCBmb2N1c05vZGUgPSBmb2N1cy5nZXROb2RlKClcblxuICAgICAgICAgICAgICAvLyBGaXJzdCwgZGVsZXRlIGN1cnJlbnRseSBzZWxlY3RlZCBub2RlIGlmIGl0J3MgYW4gZW1wdHkgcGFyYWdyYXBoIGFuZCBpZiB0aGVyZSBhcmUgc3VmZmljaWVudFxuICAgICAgICAgICAgICAvLyBwYXJhZ3JhcGggbm9kZXMgKG1vcmUgdGhhbiAxKSBsZWZ0IGluIHRoZSBwYXJlbnQgbm9kZSwgc28gdGhhdCB3ZSBkb24ndCBcInRyYXBcIiB0aGUgdXNlclxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgJGlzUGFyYWdyYXBoTm9kZShmb2N1c05vZGUpICYmXG4gICAgICAgICAgICAgICAgZm9jdXNOb2RlLmdldFRleHRDb250ZW50U2l6ZSgpID09PSAwICYmXG4gICAgICAgICAgICAgICAgZm9jdXNOb2RlXG4gICAgICAgICAgICAgICAgICAuZ2V0UGFyZW50KClcbiAgICAgICAgICAgICAgICAgIC5nZXRDaGlsZHJlbigpXG4gICAgICAgICAgICAgICAgICAuZmlsdGVyKChub2RlKSA9PiAkaXNQYXJhZ3JhcGhOb2RlKG5vZGUpKS5sZW5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BQXdCLEVBQUNqQjtnQkFDM0I7WUFDRjtZQUVBLE9BQU87UUFDVCxHQUNBa0IsZ0NBQXVCO0lBRzdCLEdBQUc7UUFBQzdCO0tBQU87SUFFWCxxQkFBTyw2QkFBQzhCLDZCQUFxQjtBQUMvQiJ9
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { BlocksFeatureProps } from '.';
|
|
2
|
-
import type { PopulationPromise } from '../types';
|
|
3
|
-
import type { SerializedBlockNode } from './nodes/BlocksNode';
|
|
4
|
-
export declare const blockPopulationPromiseHOC: (props: BlocksFeatureProps) => PopulationPromise<SerializedBlockNode>;
|
|
5
|
-
//# sourceMappingURL=populationPromise.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/Blocks/populationPromise.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAA;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAI7D,eAAO,MAAM,yBAAyB,UAC7B,kBAAkB,KACxB,kBAAkB,mBAAmB,CA2DvC,CAAA"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "blockPopulationPromiseHOC", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return blockPopulationPromiseHOC;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _config = require("payload/config");
|
|
12
|
-
const _recurseNestedFields = require("../../../populate/recurseNestedFields");
|
|
13
|
-
const blockPopulationPromiseHOC = (props)=>{
|
|
14
|
-
const blockPopulationPromise = ({ context, currentDepth, depth, editorPopulationPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
|
|
15
|
-
const blocks = props.blocks;
|
|
16
|
-
const blockFieldData = node.fields;
|
|
17
|
-
const promises = [];
|
|
18
|
-
// Sanitize block's fields here. This is done here and not in the feature, because the payload config is available here
|
|
19
|
-
const payloadConfig = req.payload.config;
|
|
20
|
-
const validRelationships = payloadConfig.collections.map((c)=>c.slug) || [];
|
|
21
|
-
blocks.forEach((block)=>{
|
|
22
|
-
block.fields = (0, _config.sanitizeFields)({
|
|
23
|
-
config: payloadConfig,
|
|
24
|
-
fields: block.fields,
|
|
25
|
-
validRelationships
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
// find block used in this node
|
|
29
|
-
const block = props.blocks.find((block)=>block.slug === blockFieldData.blockType);
|
|
30
|
-
if (!block || !block?.fields?.length || !blockFieldData) {
|
|
31
|
-
return promises;
|
|
32
|
-
}
|
|
33
|
-
(0, _recurseNestedFields.recurseNestedFields)({
|
|
34
|
-
context,
|
|
35
|
-
currentDepth,
|
|
36
|
-
data: blockFieldData,
|
|
37
|
-
depth,
|
|
38
|
-
editorPopulationPromises,
|
|
39
|
-
fields: block.fields,
|
|
40
|
-
findMany,
|
|
41
|
-
flattenLocales,
|
|
42
|
-
overrideAccess,
|
|
43
|
-
populationPromises,
|
|
44
|
-
promises,
|
|
45
|
-
req,
|
|
46
|
-
showHiddenFields,
|
|
47
|
-
// The afterReadPromise gets its data from looking for field.name inside of the siblingDoc. Thus, here we cannot pass the whole document's siblingDoc, but only the siblingDoc (sibling fields) of the current field.
|
|
48
|
-
siblingDoc: blockFieldData
|
|
49
|
-
});
|
|
50
|
-
return promises;
|
|
51
|
-
};
|
|
52
|
-
return blockPopulationPromise;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9maWVsZC9mZWF0dXJ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UFBUUY7Z0JBQ1JGLFFBQVFXLE1BQU1YLE1BQU07Z0JBQ3BCSztZQUNGO1FBQ0Y7UUFFQSwrQkFBK0I7UUFDL0IsTUFBTU0sUUFBUTNCLE1BQU1jLE1BQU0sQ0FBQ2UsSUFBSSxDQUFDLENBQUNGLFFBQVVBLE1BQU1GLElBQUksS0FBS1YsZUFBZWUsU0FBUztRQUNsRixJQUFJLENBQUNILFNBQVMsQ0FBQ0EsT0FBT1gsUUFBUWUsVUFBVSxDQUFDaEIsZ0JBQWdCO1lBQ3ZELE9BQU9FO1FBQ1Q7UUFFQWUsSUFBQUEsd0NBQW1CLEVBQUM7WUFDbEI5QjtZQUNBQztZQUNBOEIsTUFBTWxCO1lBQ05YO1lBQ0FDO1lBQ0FXLFFBQVFXLE1BQU1YLE1BQU07WUFDcEJWO1lBQ0FDO1lBQ0FFO1lBQ0FDO1lBQ0FPO1lBQ0FOO1lBQ0FDO1lBQ0EscU5BQXFOO1lBQ3JOQyxZQUFZRTtRQUNkO1FBRUEsT0FBT0U7SUFDVDtJQUVBLE9BQU9oQjtBQUNUIn0=
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wraps the input formData in a blockFieldWrapperName, so that it can be read by the RenderFields component
|
|
3
|
-
* which requires it to be wrapped in a group field
|
|
4
|
-
*/
|
|
5
|
-
export declare function transformInputFormData(data: any, blockFieldWrapperName: string): {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
id: any;
|
|
8
|
-
blockName: any;
|
|
9
|
-
blockType: any;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=transformInputFormData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformInputFormData.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/Blocks/utils/transformInputFormData.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM;;;;;EAoB9E"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wraps the input formData in a blockFieldWrapperName, so that it can be read by the RenderFields component
|
|
3
|
-
* which requires it to be wrapped in a group field
|
|
4
|
-
*/ "use strict";
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "transformInputFormData", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function() {
|
|
11
|
-
return transformInputFormData;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
function transformInputFormData(data, blockFieldWrapperName) {
|
|
15
|
-
const dataCopy = JSON.parse(JSON.stringify(data));
|
|
16
|
-
const fieldDataWithoutBlockFields = {
|
|
17
|
-
...dataCopy
|
|
18
|
-
};
|
|
19
|
-
delete fieldDataWithoutBlockFields['id'];
|
|
20
|
-
delete fieldDataWithoutBlockFields['blockName'];
|
|
21
|
-
delete fieldDataWithoutBlockFields['blockType'];
|
|
22
|
-
// Wrap all fields inside blockFieldWrapperName.
|
|
23
|
-
// This is necessary, because blockFieldWrapperName is set as the 'base' path for all fields in the block (in the RenderFields component).
|
|
24
|
-
// Thus, in order for the data to be read, it has to be wrapped in this blockFieldWrapperName, as it's expected to be there.
|
|
25
|
-
// Why are we doing this? Because that way, all rendered fields of the blocks have different paths and names, and thus don't conflict with each other.
|
|
26
|
-
// They have different paths and names, because they are wrapped in the blockFieldWrapperName, which has a name that is unique for each block.
|
|
27
|
-
return {
|
|
28
|
-
id: dataCopy.id,
|
|
29
|
-
[blockFieldWrapperName]: fieldDataWithoutBlockFields,
|
|
30
|
-
blockName: dataCopy.blockName,
|
|
31
|
-
blockType: dataCopy.blockType
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Ny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7OytCQUNlQTs7O2VBQUFBOzs7QUFBVCxTQUFTQSx1QkFBdUJDLElBQVMsRUFBRUMscUJBQTZCO0lBQzdFLE1BQU1DLFdBQVdDLEtBQUtDLEtBQUssQ0FBQ0QsS0FBS0UsU0FBUyxDQUFDTDtJQUUzQyxNQUFNTSw4QkFBOEI7UUFBRSxHQUFHSixRQUFRO0lBQUM7SUFDbEQsT0FBT0ksMkJBQTJCLENBQUMsS0FBSztJQUN4QyxPQUFPQSwyQkFBMkIsQ0FBQyxZQUFZO0lBQy9DLE9BQU9BLDJCQUEyQixDQUFDLFlBQVk7SUFFL0MsZ0RBQWdEO0lBQ2hELDBJQUEwSTtJQUMxSSw0SEFBNEg7SUFFNUgsc0pBQXNKO0lBQ3RKLDhJQUE4STtJQUM5SSxPQUFPO1FBQ0xDLElBQUlMLFNBQVNLLEVBQUU7UUFDZixDQUFDTixzQkFBc0IsRUFBRUs7UUFDekJFLFdBQVdOLFNBQVNNLFNBQVM7UUFDN0JDLFdBQVdQLFNBQVNPLFNBQVM7SUFDL0I7QUFDRiJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformInputFormSchema.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/Blocks/utils/transformInputFormSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,GAAG,KAAK,EAAE,CA4BhG"}
|