Compare commits
15 Commits
live-previ
...
richtext-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3e47b64c1 | ||
|
|
070f4d5bb5 | ||
|
|
48f1299fcb | ||
|
|
61dca16f91 | ||
|
|
6e9ae65374 | ||
|
|
35f54a7be3 | ||
|
|
128f9c4e7e | ||
|
|
1469fc26c7 | ||
|
|
e03ff791b6 | ||
|
|
403c3d3e08 | ||
|
|
d7765ef9e1 | ||
|
|
df4f346f2f | ||
|
|
93fa7b608f | ||
|
|
989aba665e | ||
|
|
c582f948c7 |
2
.github/reproduction-guide.md
vendored
2
.github/reproduction-guide.md
vendored
@@ -61,4 +61,4 @@ Once they are installed you can open the `testing` tab in vscode sidebar and dri
|
||||
|
||||
#### Notes
|
||||
|
||||
- It is recommended to add the test credentials (located in `test/credentials.ts`) to your autofill for `localhost:3000/admin` as this will be required on every nodemon restart. The default credentials are `dev@payloadcms.com` as email and `test` as password.
|
||||
The default credentials are `dev@payloadcms.com` as email and `test` as password. They can be found in `test/credentials.ts`. By default, these will be autofilled, so no log-in is required.
|
||||
|
||||
76
CHANGELOG.md
76
CHANGELOG.md
@@ -1,3 +1,79 @@
|
||||
## [2.4.0](https://github.com/payloadcms/payload/compare/v2.3.1...v2.4.0) (2023-12-06)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Chinese Traditional translation ([#4372](https://github.com/payloadcms/payload/issues/4372)) ([50253f6](https://github.com/payloadcms/payload/commit/50253f617c22d0d185bbac7f9d4304cddbc01f06))
|
||||
* async live preview urls ([#4339](https://github.com/payloadcms/payload/issues/4339)) ([5f17324](https://github.com/payloadcms/payload/commit/5f173241df6dc316d498767b1c81718e9c2b9a51))
|
||||
* pass path to FieldDescription ([#4364](https://github.com/payloadcms/payload/issues/4364)) ([3b8a27d](https://github.com/payloadcms/payload/commit/3b8a27d199b3969cbca6ca750450798cb70f21e8))
|
||||
* **richtext-lexical:** lazy import React components to prevent client-only code from leaking into the server ([#4290](https://github.com/payloadcms/payload/issues/4290)) ([5de347f](https://github.com/payloadcms/payload/commit/5de347ffffca3bf38315d3d87d2ccc5c28cd2723))
|
||||
* **richtext-lexical:** Link & Relationship Feature: field-level configurable allowed relationships ([#4182](https://github.com/payloadcms/payload/issues/4182)) ([7af8f29](https://github.com/payloadcms/payload/commit/7af8f29b4a8dddf389356e4db142f8d434cdc964))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **db-postgres:** sorting on a not-configured field throws error ([#4382](https://github.com/payloadcms/payload/issues/4382)) ([dbaecda](https://github.com/payloadcms/payload/commit/dbaecda0e92fcb0fa67b4c5ac085e025f02de53a))
|
||||
* defaultValues computed on new globals ([#4380](https://github.com/payloadcms/payload/issues/4380)) ([b6cffce](https://github.com/payloadcms/payload/commit/b6cffcea07b9fa21698b00b8bbed6f27197ded41))
|
||||
* handles null upload field values ([#4397](https://github.com/payloadcms/payload/issues/4397)) ([cf9a370](https://github.com/payloadcms/payload/commit/cf9a3704df21ce8b32feb0680793cba804cd66f7))
|
||||
* **live-preview:** populates rte uploads and relationships ([#4379](https://github.com/payloadcms/payload/issues/4379)) ([4090aeb](https://github.com/payloadcms/payload/commit/4090aebb0e94e776258f0c1c761044a4744a1857))
|
||||
* **live-preview:** sends raw js objects through window.postMessage instead of json ([#4354](https://github.com/payloadcms/payload/issues/4354)) ([03a3872](https://github.com/payloadcms/payload/commit/03a387233d1b8876a2fcaa5f3b3fd5ed512c0bc4))
|
||||
* simplifies query validation and fixes nested relationship fields ([#4391](https://github.com/payloadcms/payload/issues/4391)) ([4b5453e](https://github.com/payloadcms/payload/commit/4b5453e8e5484f7afcadbf5bccf8369b552969c6))
|
||||
* upload editing error with plugin-cloud ([#4170](https://github.com/payloadcms/payload/issues/4170)) ([fcbe574](https://github.com/payloadcms/payload/commit/fcbe5744d945dc43642cdaa2007ddc252ecafafa))
|
||||
* uploads files after validation ([#4218](https://github.com/payloadcms/payload/issues/4218)) ([65adfd2](https://github.com/payloadcms/payload/commit/65adfd21ed538b79628dc4f8ce9e1a5a1bba6aed))
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **richtext-lexical:** lazy import React components to prevent client-only code from leaking into the server (#4290)
|
||||
|
||||
### ⚠️ @payloadcms/richtext-lexical
|
||||
|
||||
Most important: If you are updating `@payloadcms/richtext-lexical` to v0.4.0 or higher, you will HAVE to update `payload` to the latest version as well. If you don't update it, payload likely won't start up due to validation errors. It's generally good practice to upgrade packages prefixed with `@payloadcms/` together with `payload` and keep the versions in sync.
|
||||
|
||||
`@payloadcms/richtext-slate` is not affected by this.
|
||||
|
||||
Every single property in the `Feature` interface which accepts a React component now no longer accepts a React component, but a function which imports a React component instead. This is done to ensure no unnecessary client-only code is leaked to the server when importing Features on a server.
|
||||
Here's an example migration:
|
||||
|
||||
Old:
|
||||
|
||||
```ts
|
||||
import { BlockIcon } from '../../lexical/ui/icons/Block'
|
||||
...
|
||||
Icon: BlockIcon,
|
||||
```
|
||||
|
||||
New:
|
||||
|
||||
```ts
|
||||
// import { BlockIcon } from '../../lexical/ui/icons/Block' // <= Remove this import
|
||||
...
|
||||
Icon: () =>
|
||||
// @ts-expect-error
|
||||
import('../../lexical/ui/icons/Block').then((module) => module.BlockIcon),
|
||||
```
|
||||
|
||||
Or alternatively, if you're using default exports instead of named exports:
|
||||
|
||||
```ts
|
||||
// import BlockIcon from '../../lexical/ui/icons/Block' // <= Remove this import
|
||||
...
|
||||
Icon: () =>
|
||||
// @ts-expect-error
|
||||
import('../../lexical/ui/icons/Block'),
|
||||
```
|
||||
|
||||
The types for `SanitizedEditorConfig` and `EditorConfig` have changed. Their respective `lexical` property no longer expects the `LexicalEditorConfig`. It now expects a function returning the `LexicalEditorConfig`. You will have to adjust this if you adjusted that property anywhere, e.g. when initializing the lexical field editor property, or when initializing a new headless editor.
|
||||
|
||||
The following exports are now exported from the `@payloadcms/richtext-lexical/components` subpath exports instead of `@payloadcms/richtext-lexical`:
|
||||
|
||||
- ToolbarButton
|
||||
- ToolbarDropdown
|
||||
- RichTextCell
|
||||
- RichTextField
|
||||
- defaultEditorLexicalConfig
|
||||
|
||||
You will have to adjust your imports, only if you import any of those properties in your project.
|
||||
|
||||
## [2.3.1](https://github.com/payloadcms/payload/compare/v2.3.0...v2.3.1) (2023-12-01)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/db-postgres",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "The officially supported Postgres database adapter for Payload",
|
||||
"repository": "https://github.com/payloadcms/payload",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -240,6 +240,7 @@ export const getTableColumnFromPath = ({
|
||||
let newTableName: string
|
||||
const hasBlockField = field.blocks.some((block) => {
|
||||
newTableName = `${tableName}_blocks_${toSnakeCase(block.slug)}`
|
||||
constraintPath = `${constraintPath}${field.name}.%.`
|
||||
let result
|
||||
const blockConstraints = []
|
||||
const blockSelectFields = {}
|
||||
@@ -247,7 +248,7 @@ export const getTableColumnFromPath = ({
|
||||
result = getTableColumnFromPath({
|
||||
adapter,
|
||||
collectionPath,
|
||||
constraintPath: '',
|
||||
constraintPath,
|
||||
constraints: blockConstraints,
|
||||
fields: block.fields,
|
||||
joinAliases,
|
||||
@@ -285,7 +286,7 @@ export const getTableColumnFromPath = ({
|
||||
adapter.tables[newTableName]._parentID,
|
||||
)
|
||||
}
|
||||
return result
|
||||
return true
|
||||
})
|
||||
if (hasBlockField) {
|
||||
return {
|
||||
@@ -294,7 +295,7 @@ export const getTableColumnFromPath = ({
|
||||
field: blockTableColumn.field,
|
||||
pathSegments: pathSegments.slice(1),
|
||||
rawColumn: blockTableColumn.rawColumn,
|
||||
table: adapter.tables[newTableName],
|
||||
table: blockTableColumn.table,
|
||||
}
|
||||
}
|
||||
if (pathSegments[1] === 'blockType') {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/live-preview",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "The official live preview JavaScript SDK for Payload",
|
||||
"repository": "https://github.com/payloadcms/payload",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "payload",
|
||||
"version": "2.3.1",
|
||||
"version": "2.4.0",
|
||||
"description": "Node, React and MongoDB Headless CMS and Application Framework",
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/richtext-lexical",
|
||||
"version": "0.3.1",
|
||||
"version": "0.4.1",
|
||||
"description": "The officially supported Lexical richtext adapter for Payload",
|
||||
"repository": "https://github.com/payloadcms/payload",
|
||||
"license": "MIT",
|
||||
@@ -19,20 +19,20 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@faceless-ui/modal": "2.0.1",
|
||||
"@lexical/headless": "0.12.4",
|
||||
"@lexical/link": "0.12.4",
|
||||
"@lexical/list": "0.12.4",
|
||||
"@lexical/mark": "0.12.4",
|
||||
"@lexical/markdown": "0.12.4",
|
||||
"@lexical/react": "0.12.4",
|
||||
"@lexical/rich-text": "0.12.4",
|
||||
"@lexical/selection": "0.12.4",
|
||||
"@lexical/utils": "0.12.4",
|
||||
"@lexical/headless": "0.12.5",
|
||||
"@lexical/link": "0.12.5",
|
||||
"@lexical/list": "0.12.5",
|
||||
"@lexical/mark": "0.12.5",
|
||||
"@lexical/markdown": "0.12.5",
|
||||
"@lexical/react": "0.12.5",
|
||||
"@lexical/rich-text": "0.12.5",
|
||||
"@lexical/selection": "0.12.5",
|
||||
"@lexical/utils": "0.12.5",
|
||||
"bson-objectid": "2.0.4",
|
||||
"classnames": "^2.3.2",
|
||||
"deep-equal": "2.2.3",
|
||||
"i18next": "22.5.1",
|
||||
"lexical": "0.12.4",
|
||||
"lexical": "0.12.5",
|
||||
"lodash": "4.17.21",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
@@ -47,7 +47,7 @@
|
||||
"payload": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"payload": "^2.3.0"
|
||||
"payload": "^2.4.0"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { SerializedQuoteNode } from '@lexical/rich-text'
|
||||
|
||||
import { $createQuoteNode, QuoteNode } from '@lexical/rich-text'
|
||||
import { $setBlocksType } from '@lexical/selection'
|
||||
import { $getSelection, $isRangeSelection } from 'lexical'
|
||||
import { $INTERNAL_isPointSelection, $getSelection } from 'lexical'
|
||||
|
||||
import type { HTMLConverter } from '../converters/html/converter/types'
|
||||
import type { FeatureProvider } from '../types'
|
||||
@@ -31,7 +31,7 @@ export const BlockQuoteFeature = (): FeatureProvider => {
|
||||
onClick: ({ editor }) => {
|
||||
editor.update(() => {
|
||||
const selection = $getSelection()
|
||||
if ($isRangeSelection(selection)) {
|
||||
if ($INTERNAL_isPointSelection(selection)) {
|
||||
$setBlocksType(selection, () => $createQuoteNode())
|
||||
}
|
||||
})
|
||||
@@ -82,7 +82,7 @@ export const BlockQuoteFeature = (): FeatureProvider => {
|
||||
keywords: ['quote', 'blockquote'],
|
||||
onSelect: () => {
|
||||
const selection = $getSelection()
|
||||
if ($isRangeSelection(selection)) {
|
||||
if ($INTERNAL_isPointSelection(selection)) {
|
||||
$setBlocksType(selection, () => $createQuoteNode())
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { HeadingTagType, SerializedHeadingNode } from '@lexical/rich-text'
|
||||
|
||||
import { $createHeadingNode, HeadingNode } from '@lexical/rich-text'
|
||||
import { $setBlocksType } from '@lexical/selection'
|
||||
import { $getSelection, $isRangeSelection, DEPRECATED_$isGridSelection } from 'lexical'
|
||||
import { $INTERNAL_isPointSelection, $getSelection } from 'lexical'
|
||||
|
||||
import type { HTMLConverter } from '../converters/html/converter/types'
|
||||
import type { FeatureProvider } from '../types'
|
||||
@@ -14,7 +14,7 @@ import { MarkdownTransformer } from './markdownTransformer'
|
||||
|
||||
const setHeading = (headingSize: HeadingTagType) => {
|
||||
const selection = $getSelection()
|
||||
if ($isRangeSelection(selection) || DEPRECATED_$isGridSelection(selection)) {
|
||||
if ($INTERNAL_isPointSelection(selection)) {
|
||||
$setBlocksType(selection, () => $createHeadingNode(headingSize))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import type { BaseSelection } from 'lexical'
|
||||
|
||||
import { addClassNamesToElement, isHTMLAnchorElement } from '@lexical/utils'
|
||||
import {
|
||||
$applyNodeReplacement,
|
||||
@@ -18,11 +20,9 @@ import {
|
||||
type DOMConversionOutput,
|
||||
type EditorConfig,
|
||||
ElementNode,
|
||||
type GridSelection,
|
||||
type LexicalCommand,
|
||||
type LexicalNode,
|
||||
type NodeKey,
|
||||
type NodeSelection,
|
||||
type RangeSelection,
|
||||
type SerializedElementNode,
|
||||
type Spread,
|
||||
@@ -146,7 +146,7 @@ export class LinkNode extends ElementNode {
|
||||
|
||||
extractWithChild(
|
||||
child: LexicalNode,
|
||||
selection: GridSelection | NodeSelection | RangeSelection,
|
||||
selection: BaseSelection,
|
||||
destination: 'clone' | 'html',
|
||||
): boolean {
|
||||
if (!$isRangeSelection(selection)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { $setBlocksType } from '@lexical/selection'
|
||||
import { $createParagraphNode, $getSelection, $isRangeSelection } from 'lexical'
|
||||
import { $INTERNAL_isPointSelection, $createParagraphNode, $getSelection } from 'lexical'
|
||||
|
||||
import type { FeatureProvider } from '../types'
|
||||
|
||||
@@ -23,7 +23,7 @@ export const ParagraphFeature = (): FeatureProvider => {
|
||||
onClick: ({ editor }) => {
|
||||
editor.update(() => {
|
||||
const selection = $getSelection()
|
||||
if ($isRangeSelection(selection)) {
|
||||
if ($INTERNAL_isPointSelection(selection)) {
|
||||
$setBlocksType(selection, () => $createParagraphNode())
|
||||
}
|
||||
})
|
||||
@@ -49,7 +49,7 @@ export const ParagraphFeature = (): FeatureProvider => {
|
||||
onSelect: ({ editor }) => {
|
||||
editor.update(() => {
|
||||
const selection = $getSelection()
|
||||
if ($isRangeSelection(selection)) {
|
||||
if ($INTERNAL_isPointSelection(selection)) {
|
||||
$setBlocksType(selection, () => $createParagraphNode())
|
||||
}
|
||||
})
|
||||
|
||||
@@ -98,13 +98,33 @@ export const lexicalHTML: (
|
||||
return result
|
||||
}
|
||||
}
|
||||
} else if ('blocks' in curField) {
|
||||
for (const block of curField.blocks) {
|
||||
if (block?.fields?.length) {
|
||||
const result = findFieldPathAndSiblingFields(block.fields, [
|
||||
...path,
|
||||
curField.name,
|
||||
block.slug,
|
||||
])
|
||||
if (result) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
const { path, siblingFields } = findFieldPathAndSiblingFields(fields, [])
|
||||
|
||||
const foundSiblingFields = findFieldPathAndSiblingFields(fields, [])
|
||||
|
||||
if (!foundSiblingFields)
|
||||
throw new Error(
|
||||
`Could not find sibling fields of current lexicalHTML field with name ${field?.name}`,
|
||||
)
|
||||
|
||||
const { siblingFields } = foundSiblingFields
|
||||
const lexicalField: RichTextField<SerializedEditorState, AdapterProps> =
|
||||
siblingFields.find(
|
||||
(field) => 'name' in field && field.name === lexicalFieldName,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import type { GridSelection, LexicalEditor, NodeSelection, RangeSelection } from 'lexical'
|
||||
import type { BaseSelection, LexicalEditor } from 'lexical'
|
||||
|
||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||
import { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'
|
||||
@@ -141,7 +141,7 @@ function useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | nul
|
||||
const [isRecording, setIsRecording] = useState(false)
|
||||
const [, setCurrentInnerHTML] = useState('')
|
||||
const [templatedTest, setTemplatedTest] = useState('')
|
||||
const previousSelectionRef = useRef<GridSelection | NodeSelection | RangeSelection | null>(null)
|
||||
const previousSelectionRef = useRef<BaseSelection | null>(null)
|
||||
const skipNextSelectionChangeRef = useRef(false)
|
||||
const preRef = useRef<HTMLPreElement>(null)
|
||||
|
||||
|
||||
@@ -48,11 +48,14 @@ html[data-theme='light'] {
|
||||
|
||||
&-text {
|
||||
margin-left: 6px;
|
||||
text-wrap: nowrap;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.icon {
|
||||
color: var(--color-base-500);
|
||||
min-width: fit-content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,11 +25,7 @@ export type LexicalEditorProps = {
|
||||
lexical?: LexicalEditorConfig
|
||||
}
|
||||
|
||||
export type LexicalRichTextAdapter = RichTextAdapter<
|
||||
SerializedEditorState,
|
||||
AdapterProps,
|
||||
AdapterProps
|
||||
> & {
|
||||
export type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {
|
||||
editorConfig: SanitizedEditorConfig
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@payloadcms/richtext-slate",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.1",
|
||||
"description": "The officially supported Slate richtext adapter for Payload",
|
||||
"repository": "https://github.com/payloadcms/payload",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -9,9 +9,7 @@ import { richTextRelationshipPromise } from './data/richTextRelationshipPromise'
|
||||
import { richTextValidate } from './data/validation'
|
||||
import RichTextField from './field'
|
||||
|
||||
export function slateEditor(
|
||||
args: AdapterArguments,
|
||||
): RichTextAdapter<any[], AdapterArguments, AdapterArguments> {
|
||||
export function slateEditor(args: AdapterArguments): RichTextAdapter<any[], AdapterArguments, any> {
|
||||
return {
|
||||
CellComponent: withMergedProps({
|
||||
Component: RichTextCell,
|
||||
|
||||
@@ -73,4 +73,4 @@ export type AdapterArguments = {
|
||||
}
|
||||
}
|
||||
|
||||
export type FieldProps = RichTextFieldProps<any, AdapterArguments, AdapterArguments>
|
||||
export type FieldProps = RichTextFieldProps<any[], AdapterArguments, AdapterArguments>
|
||||
|
||||
316
pnpm-lock.yaml
generated
316
pnpm-lock.yaml
generated
@@ -1313,32 +1313,32 @@ importers:
|
||||
specifier: 2.0.1
|
||||
version: 2.0.1(react-dom@18.2.0)(react@18.2.0)
|
||||
'@lexical/headless':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)
|
||||
'@lexical/link':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)
|
||||
'@lexical/list':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)
|
||||
'@lexical/mark':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)
|
||||
'@lexical/markdown':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(lexical@0.12.5)
|
||||
'@lexical/react':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.8)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.8)
|
||||
'@lexical/rich-text':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(@lexical/utils@0.12.4)(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(@lexical/utils@0.12.5)(lexical@0.12.5)
|
||||
'@lexical/selection':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils':
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4(lexical@0.12.4)
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5(lexical@0.12.5)
|
||||
bson-objectid:
|
||||
specifier: 2.0.4
|
||||
version: 2.0.4
|
||||
@@ -1352,8 +1352,8 @@ importers:
|
||||
specifier: 22.5.1
|
||||
version: 22.5.1
|
||||
lexical:
|
||||
specifier: 0.12.4
|
||||
version: 0.12.4
|
||||
specifier: 0.12.5
|
||||
version: 0.12.5
|
||||
lodash:
|
||||
specifier: 4.17.21
|
||||
version: 4.17.21
|
||||
@@ -3981,171 +3981,171 @@ packages:
|
||||
resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==}
|
||||
dev: true
|
||||
|
||||
/@lexical/clipboard@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-kFR+UdhtLCMTQgZCyDmYzp2yjPFMNpUZ4TaRjuRBpCRFYwKMlgie4p1J4VJm6sT23kkAFZtVjOfp+gDEYnPHRQ==}
|
||||
/@lexical/clipboard@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-A0k0g5mCHDgROLF33TwiKdjMWEfajyPcIF64lsHapZ19ZTi1iabGkXvpHnyHaMq79py1Se/e6tOcmFe9nOJkrQ==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/html': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/list': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/selection': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/html': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/list': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/selection': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/code@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-pX7rJCjbjCl6VdOPl2hl/UkjP3iPPyCQgH2VQ+WlXapDd+0uZ54nPL1MKCCaFUZocHPmOmSRKKGUp6K2CNiqzg==}
|
||||
/@lexical/code@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-YV879sO2C0efWXgj4ZUzpowPWxbid8T5I0vysQIzuWPiaQG0fjilz1maYV+X95hD2VXW8yhyOnEdScfeKk62Zg==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
prismjs: 1.29.0
|
||||
dev: false
|
||||
|
||||
/@lexical/dragon@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-7DaXdQ/5GJ8HRpPYr2+SjaUi912tG9L6ukg9IglG1t51lWGxqLx2chW17tp50XDTtY05w9VnoMaxtgsuCN5Pmg==}
|
||||
/@lexical/dragon@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-RFU6wIIUS0/ab5JtLp2rKaUi7nltDT96+GdmvNVHpAfa7TZuepYsoi7PtZB9aF/Outye4U7dQU2tNwesDBf8kg==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/hashtag@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-iCxQRBZmgwAV6kypmxtWg7HVhBC7PKclmqLNaLDLoKBm+keEXpKnGB5iEtgK/tCMiwkzrg+wGcrw5qi+YjvM9Q==}
|
||||
/@lexical/hashtag@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-nlPFScTiuZgUtuBSnRkHK9AuRDV35zZug4JLG1Hkky+Fh1PJ+0MK+/K8mhoatp13zm7GqN2fMOrrUGufqEingw==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/headless@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-6UQNTpYtrk0lSY4u+sExG4jiIj2xmulas26BtHxeRPAbSrp67A9fCxSZ1I2w7us4XxBLRzWy0R8EmTnhzip83Q==}
|
||||
/@lexical/headless@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-Bj8ucxEO23mf8y6ZlAuXdnZWyUGte/gqnvR+t3DVnt6JKYMbVTD901JxsRU8PFrs1m4us338D842jf6pOPVTpQ==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/history@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-XLbSSr9FueAxuKHo4LBi+lZNVAEReNNDCt4MM2Ol8UZhWPlpNskSB/sECYEEQ6/ItlzgtnKyKWjfDFBHRWvC2g==}
|
||||
/@lexical/history@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-nF5TurEE4qRbuNP/i5pDtVfWHQXb4ONof+MvKmHNfLRJbxSj7Ee33MVG9x851PjAzXoXuGJvw6FMBCasGXQx7A==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/html@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-RD/n9n1eCuTZtLaTEI3wuUDlJjCn6j+/0c9GvzqLKhNz9f+E5zMVExhzTT4cZQh5WXbzGFNlwC/cuOtaM3wODg==}
|
||||
/@lexical/html@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-OzsWKVcr9wUGvAbgyUdG+32/cI2RclI4I4JmIyfLbiYMBYdafu+j160cjohNWu9gQFjVFszIjG4CBxfwRM+Sag==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/selection': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/selection': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/link@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-gmEs0GJGDhgwV1x0IrO7Br2GCALijZLIayGWoLAgYiXZee4WZpvjbngZuC6yghYBhrme6muPRMG2sLMwV2cWiQ==}
|
||||
/@lexical/link@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-h7p5G+XXKqNrb4lk55mJL23Us5pz2szbzZevccADJ9Om6o3i4aNyjv1MeC29WXjmgS0YKHDlYcnKEgyAPKvVMw==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/list@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-qxwRIz+4Aj2u2fzyGPo86vX+1ebwCnamppr/c5ZWuqpRTWtYDWjq5LQKIwAvZBxCzPdtP5jzwyZ6VYWQXYW4Kg==}
|
||||
/@lexical/list@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-KNJ262krlpcDZ2U1LC8xp86uw2nqt88iEQgpF+khv3SAqqLbhT8tMpyZ6+eWbW3mHPhQIxFutJGazMAqMW3uUA==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/mark@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-NFFk/3AFFJARjsth8wd5HdeW8XhcaECoQ8wwnJ4fRZzgN0lu3ZSiq+CuVm0NRN5xA5KoUT6sfIQqGOzIPfvdsw==}
|
||||
/@lexical/mark@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-61ctAYrxTGl4uMDTnE5fRH4yrs8sqnRyivuNWyOmQR6W/G3s0gHwkUZC7akOSnPLYhfnXRl3C4haY8pH93sWQg==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/markdown@0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-cOk0dkafyvQI4DMwwMfkP329bRVfyhXcVF3dcRiydl6ZIgqOrj/EMi+C0qxQkcqg0MO26Rky6LLJ4vQi6AgJDg==}
|
||||
/@lexical/markdown@0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-F3cBcuhoGWxxCqERUXF4fYfJhceK7gFYQPRsXir5mYriSNZIQIMhJoeAt8Pjer0UjFyQvNfQ+AzzXHu5xYNLLA==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/code': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/link': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/list': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/rich-text': 0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(@lexical/utils@0.12.4)(lexical@0.12.4)
|
||||
'@lexical/text': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/code': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/link': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/list': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/rich-text': 0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(@lexical/utils@0.12.5)(lexical@0.12.5)
|
||||
'@lexical/text': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
transitivePeerDependencies:
|
||||
- '@lexical/clipboard'
|
||||
- '@lexical/selection'
|
||||
dev: false
|
||||
|
||||
/@lexical/offset@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-6fjXCx+YD1TMl6GFL4wowhBgbIg+UX3j2OOXh3F7WEp3SDvzoJsJ6F7xRctrHQbluCITM3oDwOyHa1J0m5lrFg==}
|
||||
/@lexical/offset@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-K+Mt4tOmwKarsJ1esdqNgN9Ep/JaeFa9ZQ7DKx8KIOkXL35nPb9NXuBvYyJjh1crP/iwsuP15kymgDjxj9ciMw==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/overflow@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-mEWgVukoOgcyDruHvzk1amy9jgGDVXFYiPn20ykxgrVQz6XEpq+lfyic/BUnN4toNR8p6jc/Yxi2lF1ELCU0Kg==}
|
||||
/@lexical/overflow@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-boP1oTgBbNmbo8+1tgpDAs1P/lbTk4oWZ6x88E9VNVBJSkG2ZrmQKQoJzKzHwpjXbm+Cechf77JxfgTOabzYxw==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/plain-text@0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(@lexical/utils@0.12.4)(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-osbqOyt19oFG0kTbV71jxxCdgnUqNYW6QXIIaS1SwcCN/N1CdFZ0sNpjPkHIFx9AdZ/Tmi4u9SNFUo16DjvThA==}
|
||||
/@lexical/plain-text@0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(@lexical/utils@0.12.5)(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-n24aQvTIy4AN+LaoQce6BIuSY4pUshiTp4OpiRh48o5c9NU0DmzEa0l9fBS1GfvjZL9bN5luiINFYn/bMB49nA==}
|
||||
peerDependencies:
|
||||
'@lexical/clipboard': 0.12.4
|
||||
'@lexical/selection': 0.12.4
|
||||
'@lexical/utils': 0.12.4
|
||||
lexical: 0.12.4
|
||||
'@lexical/clipboard': 0.12.5
|
||||
'@lexical/selection': 0.12.5
|
||||
'@lexical/utils': 0.12.5
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/clipboard': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/selection': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/clipboard': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/selection': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/react@0.12.4(lexical@0.12.4)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.8):
|
||||
resolution: {integrity: sha512-tz4ebqJ++YP/Y6FCjk5aU3bvgrps8+i9abqvaaNCSzSQavI0qHtdS7EGy4S9qyO6qKuthXcOGIQxGTweRTkDsA==}
|
||||
/@lexical/react@0.12.5(lexical@0.12.5)(react-dom@18.2.0)(react@18.2.0)(yjs@13.6.8):
|
||||
resolution: {integrity: sha512-pAbJQksin223Yp1p1VsPKxkRtSppVij+HcLTzP89q2QuSA0z0p/T+f5jZjs8eV6tecMtmrjizhdLTbk0jkej1w==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
react: '>=17.x'
|
||||
react-dom: '>=17.x'
|
||||
dependencies:
|
||||
'@lexical/clipboard': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/code': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/dragon': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/hashtag': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/history': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/link': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/list': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/mark': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/markdown': 0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(lexical@0.12.4)
|
||||
'@lexical/overflow': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/plain-text': 0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(@lexical/utils@0.12.4)(lexical@0.12.4)
|
||||
'@lexical/rich-text': 0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(@lexical/utils@0.12.4)(lexical@0.12.4)
|
||||
'@lexical/selection': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/table': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/text': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/yjs': 0.12.4(lexical@0.12.4)(yjs@13.6.8)
|
||||
lexical: 0.12.4
|
||||
'@lexical/clipboard': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/code': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/dragon': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/hashtag': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/history': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/link': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/list': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/mark': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/markdown': 0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(lexical@0.12.5)
|
||||
'@lexical/overflow': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/plain-text': 0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(@lexical/utils@0.12.5)(lexical@0.12.5)
|
||||
'@lexical/rich-text': 0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(@lexical/utils@0.12.5)(lexical@0.12.5)
|
||||
'@lexical/selection': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/table': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/text': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/yjs': 0.12.5(lexical@0.12.5)(yjs@13.6.8)
|
||||
lexical: 0.12.5
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
react-error-boundary: 3.1.4(react@18.2.0)
|
||||
@@ -4153,64 +4153,64 @@ packages:
|
||||
- yjs
|
||||
dev: false
|
||||
|
||||
/@lexical/rich-text@0.12.4(@lexical/clipboard@0.12.4)(@lexical/selection@0.12.4)(@lexical/utils@0.12.4)(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-gWMDmdRRFPk00JfQv52650qcpjTN6oBrrYwBydYvEG8WTC8o1k8qEOZaOFja6GElPt0520dpyvcWHTlIL0jv3Q==}
|
||||
/@lexical/rich-text@0.12.5(@lexical/clipboard@0.12.5)(@lexical/selection@0.12.5)(@lexical/utils@0.12.5)(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-33R8ODRI5kKGbF70A/FWdISbbSPk+q4hKtiEJaV67zYPBuzrz0YHcni+tgKiykS05LgCksI/e43sfEkiykjrVQ==}
|
||||
peerDependencies:
|
||||
'@lexical/clipboard': 0.12.4
|
||||
'@lexical/selection': 0.12.4
|
||||
'@lexical/utils': 0.12.4
|
||||
lexical: 0.12.4
|
||||
'@lexical/clipboard': 0.12.5
|
||||
'@lexical/selection': 0.12.5
|
||||
'@lexical/utils': 0.12.5
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/clipboard': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/selection': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/clipboard': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/selection': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/selection@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-9lJt9PBJW7lWYiPDo/PGl2nZ6NrdYaDBidEoMNhyusPjeBEr35z4Hm0qWUhDrPDQPhK2i1oBw6nZa94bxuS9Lw==}
|
||||
/@lexical/selection@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-oWJ87T4j6plf2yQzElOeudUyv7kdwTkuhzTZbcCTBNH/cSMdp55/Kv2doBynxhfHYEceuBKE7f8rci//T9DUPQ==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/table@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-Lyy6y1HOQqzU8O2cH5Zhzek46B0UU7NceM2fJKM7qiBSuxY/nE0BzkFq0xDk3x5W+vhXob6Z32sJSNFImtuqKw==}
|
||||
/@lexical/table@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-vgSTsjvGw+TrYYBmf3FR0kYJ+j1oOlBmrO1sqvuIrGPXKWmvYL+RbKIkm2xhtApVHVYgqfFvxNiZrPL5Wf9dXg==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/utils': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/utils': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/text@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-r/7402eCf6C/7BqUNR7ZLZQQjsE62wjeuf0rFeW1ulOpwiti/dFn1o+EsCb0hvNeHPzfGgRC+FuDT9KSEKu7Ig==}
|
||||
/@lexical/text@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-PU1ntXQCqon3HTjrEPl/HdKB/boyW36vKgiPvojoaAhBhkEnuiN+Pq9hrexORBcZPyLFp6wYoWXjKSO4fJVYeA==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/utils@0.12.4(lexical@0.12.4):
|
||||
resolution: {integrity: sha512-ColV11ANBY6deT7CdGwP4lzv3pb5caFfFLcVKdGDMMJSUYFQ5l69aZvDP2qWWnNqzGLb+AJSunMd142wWc5LGg==}
|
||||
/@lexical/utils@0.12.5(lexical@0.12.5):
|
||||
resolution: {integrity: sha512-wPVyvi1Cvtf7aHwVKlG/9RlgHxSUzpGvXm87t889Rg7uZfOteyvXHJStjpSCZ3pvZ60y5ETin4OoetaVZciPfw==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
dependencies:
|
||||
'@lexical/list': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/selection': 0.12.4(lexical@0.12.4)
|
||||
'@lexical/table': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/list': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/selection': 0.12.5(lexical@0.12.5)
|
||||
'@lexical/table': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
dev: false
|
||||
|
||||
/@lexical/yjs@0.12.4(lexical@0.12.4)(yjs@13.6.8):
|
||||
resolution: {integrity: sha512-qtCiABugE1CiZ7K5iFfQnB1KqfWtLyiRK0nxAaSxuZzQTO4+Kh3WDh7ULppPa53Sf3pKpw8Sq2XB4AXP6csbkg==}
|
||||
/@lexical/yjs@0.12.5(lexical@0.12.5)(yjs@13.6.8):
|
||||
resolution: {integrity: sha512-GNiRND/8ePdTWuSDFloPo/1355V0ce6OtH/25qxCq5D9MLNiIkAcwqQfnWFUdOtVMuNJOVc4OfCE9ARCGuEjyQ==}
|
||||
peerDependencies:
|
||||
lexical: 0.12.4
|
||||
lexical: 0.12.5
|
||||
yjs: '>=13.5.22'
|
||||
dependencies:
|
||||
'@lexical/offset': 0.12.4(lexical@0.12.4)
|
||||
lexical: 0.12.4
|
||||
'@lexical/offset': 0.12.5(lexical@0.12.5)
|
||||
lexical: 0.12.5
|
||||
yjs: 13.6.8
|
||||
dev: false
|
||||
|
||||
@@ -12762,8 +12762,8 @@ packages:
|
||||
resolution: {integrity: sha512-Kxavd+ETjxtVwG/hvPd6WZfXD44sLOKe9Vlkwxy7lBQ1qZArS+rZfs+u5iXwXe6tX9f2PIM0u3RHsrCEDDE0fw==}
|
||||
dev: true
|
||||
|
||||
/lexical@0.12.4:
|
||||
resolution: {integrity: sha512-giNrnp45H6P4IHFhkKaHEPTF+bKLBWdEIDL/FGjRZf+to7l7TORIBk/23Zdchzt/VGgKGWu950EOvGh53gkVMQ==}
|
||||
/lexical@0.12.5:
|
||||
resolution: {integrity: sha512-ZMqisIxNe+JBqaUa1Qmz7ghpvnmARHxgYz+F0rcXRtSPZtgEL8OT2c9xk8CJ4ccVpf+qRQlONzCEIZfQQHd/RA==}
|
||||
dev: false
|
||||
|
||||
/lib0@0.2.85:
|
||||
|
||||
@@ -5,7 +5,6 @@ import { mediaSlug } from '../Media'
|
||||
export const postsSlug = 'posts'
|
||||
|
||||
export const PostsCollection: CollectionConfig = {
|
||||
slug: postsSlug,
|
||||
fields: [
|
||||
{
|
||||
name: 'text',
|
||||
@@ -13,12 +12,13 @@ export const PostsCollection: CollectionConfig = {
|
||||
},
|
||||
{
|
||||
name: 'associatedMedia',
|
||||
type: 'upload',
|
||||
relationTo: mediaSlug,
|
||||
access: {
|
||||
create: () => true,
|
||||
update: () => false,
|
||||
},
|
||||
relationTo: mediaSlug,
|
||||
type: 'upload',
|
||||
},
|
||||
],
|
||||
slug: postsSlug,
|
||||
}
|
||||
|
||||
@@ -1,88 +1,81 @@
|
||||
import type { CollectionConfig } from '../../../../packages/payload/src/collections/config/types'
|
||||
import type { BlockField } from '../../../../packages/payload/src/fields/config/types'
|
||||
|
||||
import { blockFieldsSlug } from '../../slugs'
|
||||
import { blockFieldsSlug, textFieldsSlug } from '../../slugs'
|
||||
import { AddCustomBlocks } from './components/AddCustomBlocks'
|
||||
import { getBlocksFieldSeedData } from './shared'
|
||||
|
||||
export const getBlocksField = (prefix?: string): BlockField => ({
|
||||
name: 'blocks',
|
||||
type: 'blocks',
|
||||
required: true,
|
||||
blocks: [
|
||||
{
|
||||
slug: prefix ? `${prefix}Content` : 'content',
|
||||
fields: [
|
||||
{
|
||||
name: 'text',
|
||||
type: 'text',
|
||||
required: true,
|
||||
type: 'text',
|
||||
},
|
||||
{
|
||||
name: 'richText',
|
||||
type: 'richText',
|
||||
},
|
||||
],
|
||||
slug: prefix ? `${prefix}Content` : 'content',
|
||||
},
|
||||
{
|
||||
slug: prefix ? `${prefix}Number` : 'number',
|
||||
fields: [
|
||||
{
|
||||
name: 'number',
|
||||
type: 'number',
|
||||
required: true,
|
||||
type: 'number',
|
||||
},
|
||||
],
|
||||
slug: prefix ? `${prefix}Number` : 'number',
|
||||
},
|
||||
{
|
||||
slug: prefix ? `${prefix}SubBlocks` : 'subBlocks',
|
||||
fields: [
|
||||
{
|
||||
type: 'collapsible',
|
||||
label: 'Collapsible within Block',
|
||||
fields: [
|
||||
{
|
||||
name: 'subBlocks',
|
||||
type: 'blocks',
|
||||
blocks: [
|
||||
{
|
||||
slug: 'text',
|
||||
fields: [
|
||||
{
|
||||
name: 'text',
|
||||
type: 'text',
|
||||
required: true,
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
slug: 'text',
|
||||
},
|
||||
{
|
||||
slug: 'number',
|
||||
fields: [
|
||||
{
|
||||
name: 'number',
|
||||
type: 'number',
|
||||
required: true,
|
||||
type: 'number',
|
||||
},
|
||||
],
|
||||
slug: 'number',
|
||||
},
|
||||
],
|
||||
type: 'blocks',
|
||||
},
|
||||
],
|
||||
label: 'Collapsible within Block',
|
||||
type: 'collapsible',
|
||||
},
|
||||
],
|
||||
slug: prefix ? `${prefix}SubBlocks` : 'subBlocks',
|
||||
},
|
||||
{
|
||||
slug: prefix ? `${prefix}Tabs` : 'tabs',
|
||||
fields: [
|
||||
{
|
||||
type: 'tabs',
|
||||
tabs: [
|
||||
{
|
||||
label: 'Tab with Collapsible',
|
||||
fields: [
|
||||
{
|
||||
type: 'collapsible',
|
||||
label: 'Collapsible within Block',
|
||||
fields: [
|
||||
{
|
||||
// collapsible
|
||||
@@ -90,9 +83,10 @@ export const getBlocksField = (prefix?: string): BlockField => ({
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
label: 'Collapsible within Block',
|
||||
type: 'collapsible',
|
||||
},
|
||||
{
|
||||
type: 'row',
|
||||
fields: [
|
||||
{
|
||||
// collapsible
|
||||
@@ -100,28 +94,33 @@ export const getBlocksField = (prefix?: string): BlockField => ({
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
type: 'row',
|
||||
},
|
||||
],
|
||||
label: 'Tab with Collapsible',
|
||||
},
|
||||
],
|
||||
type: 'tabs',
|
||||
},
|
||||
],
|
||||
slug: prefix ? `${prefix}Tabs` : 'tabs',
|
||||
},
|
||||
],
|
||||
defaultValue: getBlocksFieldSeedData(prefix),
|
||||
required: true,
|
||||
type: 'blocks',
|
||||
})
|
||||
|
||||
const BlockFields: CollectionConfig = {
|
||||
slug: blockFieldsSlug,
|
||||
fields: [
|
||||
getBlocksField(),
|
||||
{
|
||||
...getBlocksField('localized'),
|
||||
name: 'collapsedByDefaultBlocks',
|
||||
localized: true,
|
||||
admin: {
|
||||
initCollapsed: true,
|
||||
},
|
||||
localized: true,
|
||||
},
|
||||
{
|
||||
...getBlocksField('localized'),
|
||||
@@ -129,135 +128,152 @@ const BlockFields: CollectionConfig = {
|
||||
localized: true,
|
||||
},
|
||||
{
|
||||
type: 'blocks',
|
||||
name: 'i18nBlocks',
|
||||
label: {
|
||||
en: 'Block en',
|
||||
es: 'Block es',
|
||||
},
|
||||
labels: {
|
||||
singular: {
|
||||
en: 'Block en',
|
||||
es: 'Block es',
|
||||
},
|
||||
plural: {
|
||||
en: 'Blocks en',
|
||||
es: 'Blocks es',
|
||||
},
|
||||
},
|
||||
blocks: [
|
||||
{
|
||||
slug: 'text',
|
||||
graphQL: {
|
||||
singularName: 'I18nText',
|
||||
},
|
||||
labels: {
|
||||
singular: {
|
||||
en: 'Text en',
|
||||
es: 'Text es',
|
||||
},
|
||||
plural: {
|
||||
en: 'Texts en',
|
||||
es: 'Texts es',
|
||||
},
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'text',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
graphQL: {
|
||||
singularName: 'I18nText',
|
||||
},
|
||||
labels: {
|
||||
plural: {
|
||||
en: 'Texts en',
|
||||
es: 'Texts es',
|
||||
},
|
||||
singular: {
|
||||
en: 'Text en',
|
||||
es: 'Text es',
|
||||
},
|
||||
},
|
||||
slug: 'text',
|
||||
},
|
||||
],
|
||||
label: {
|
||||
en: 'Block en',
|
||||
es: 'Block es',
|
||||
},
|
||||
labels: {
|
||||
plural: {
|
||||
en: 'Blocks en',
|
||||
es: 'Blocks es',
|
||||
},
|
||||
singular: {
|
||||
en: 'Block en',
|
||||
es: 'Block es',
|
||||
},
|
||||
},
|
||||
type: 'blocks',
|
||||
},
|
||||
{
|
||||
type: 'blocks',
|
||||
name: 'blocksWithSimilarConfigs',
|
||||
blocks: [
|
||||
{
|
||||
slug: 'block-a',
|
||||
fields: [
|
||||
{
|
||||
type: 'array',
|
||||
name: 'items',
|
||||
fields: [
|
||||
{
|
||||
type: 'text',
|
||||
name: 'title',
|
||||
required: true,
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
type: 'array',
|
||||
},
|
||||
],
|
||||
slug: 'block-a',
|
||||
},
|
||||
{
|
||||
slug: 'block-b',
|
||||
fields: [
|
||||
{
|
||||
type: 'array',
|
||||
name: 'items',
|
||||
fields: [
|
||||
{
|
||||
type: 'text',
|
||||
name: 'title2',
|
||||
required: true,
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
type: 'array',
|
||||
},
|
||||
],
|
||||
slug: 'block-b',
|
||||
},
|
||||
],
|
||||
type: 'blocks',
|
||||
},
|
||||
{
|
||||
name: 'blocksWithMinRows',
|
||||
type: 'blocks',
|
||||
minRows: 2,
|
||||
blocks: [
|
||||
{
|
||||
slug: 'block',
|
||||
fields: [
|
||||
{
|
||||
name: 'blockTitle',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
slug: 'block',
|
||||
},
|
||||
],
|
||||
minRows: 2,
|
||||
type: 'blocks',
|
||||
},
|
||||
{
|
||||
name: 'customBlocks',
|
||||
type: 'blocks',
|
||||
blocks: [
|
||||
{
|
||||
slug: 'block-1',
|
||||
fields: [
|
||||
{
|
||||
name: 'block1Title',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
slug: 'block-1',
|
||||
},
|
||||
{
|
||||
slug: 'block-2',
|
||||
fields: [
|
||||
{
|
||||
name: 'block2Title',
|
||||
type: 'text',
|
||||
},
|
||||
],
|
||||
slug: 'block-2',
|
||||
},
|
||||
],
|
||||
type: 'blocks',
|
||||
},
|
||||
{
|
||||
name: 'relationshipBlocks',
|
||||
blocks: [
|
||||
{
|
||||
fields: [
|
||||
{
|
||||
name: 'relationship',
|
||||
relationTo: textFieldsSlug,
|
||||
type: 'relationship',
|
||||
},
|
||||
],
|
||||
slug: 'relationships',
|
||||
},
|
||||
],
|
||||
type: 'blocks',
|
||||
},
|
||||
{
|
||||
type: 'ui',
|
||||
name: 'ui',
|
||||
admin: {
|
||||
components: {
|
||||
Field: AddCustomBlocks,
|
||||
},
|
||||
},
|
||||
type: 'ui',
|
||||
},
|
||||
],
|
||||
slug: blockFieldsSlug,
|
||||
}
|
||||
|
||||
export default BlockFields
|
||||
|
||||
@@ -29,7 +29,14 @@ import {
|
||||
import { tabsDoc } from './collections/Tabs/shared'
|
||||
import { defaultText } from './collections/Text/shared'
|
||||
import { clearAndSeedEverything } from './seed'
|
||||
import { arrayFieldsSlug, groupFieldsSlug, relationshipFieldsSlug, tabsFieldsSlug } from './slugs'
|
||||
import {
|
||||
arrayFieldsSlug,
|
||||
blockFieldsSlug,
|
||||
groupFieldsSlug,
|
||||
relationshipFieldsSlug,
|
||||
tabsFieldsSlug,
|
||||
textFieldsSlug,
|
||||
} from './slugs'
|
||||
|
||||
let client: RESTClient
|
||||
let graphQLClient: GraphQLClient
|
||||
@@ -898,6 +905,35 @@ describe('Fields', () => {
|
||||
const { docs } = blockFields
|
||||
expect(docs).toHaveLength(2)
|
||||
})
|
||||
|
||||
it('should query blocks with nested relationship', async () => {
|
||||
const textDoc = await payload.create({
|
||||
collection: textFieldsSlug,
|
||||
data: {
|
||||
text: 'test',
|
||||
},
|
||||
})
|
||||
const blockDoc = await payload.create({
|
||||
collection: blockFieldsSlug,
|
||||
data: {
|
||||
relationshipBlocks: [
|
||||
{
|
||||
blockType: 'relationships',
|
||||
relationship: textDoc.id,
|
||||
},
|
||||
],
|
||||
},
|
||||
})
|
||||
const result = await payload.find({
|
||||
collection: blockFieldsSlug,
|
||||
where: {
|
||||
'relationshipBlocks.relationship': { equals: textDoc.id },
|
||||
},
|
||||
})
|
||||
|
||||
expect(result.docs).toHaveLength(1)
|
||||
expect(result.docs[0]).toMatchObject(blockDoc)
|
||||
})
|
||||
})
|
||||
|
||||
describe('json', () => {
|
||||
|
||||
Reference in New Issue
Block a user