Skip to content

Commit

Permalink
chore(richtext-lexical): upgrade lexical from v0.12.5 to v0.12.6 (#4732)
Browse files Browse the repository at this point in the history
* chore(richtext-lexical): upgrade all lexical packages from 0.12.5 to 0.12.6

* fix(richtext-lexical): fix TypeScript errors

* fix indenting
  • Loading branch information
AlessioGr authored Jan 9, 2024
1 parent 136993e commit 5050283
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 175 deletions.
20 changes: 10 additions & 10 deletions packages/richtext-lexical/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
},
"dependencies": {
"@faceless-ui/modal": "2.0.1",
"@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",
"@lexical/headless": "0.12.6",
"@lexical/link": "0.12.6",
"@lexical/list": "0.12.6",
"@lexical/mark": "0.12.6",
"@lexical/markdown": "0.12.6",
"@lexical/react": "0.12.6",
"@lexical/rich-text": "0.12.6",
"@lexical/selection": "0.12.6",
"@lexical/utils": "0.12.6",
"bson-objectid": "2.0.4",
"classnames": "^2.3.2",
"deep-equal": "2.2.3",
"i18next": "22.5.1",
"lexical": "0.12.5",
"lexical": "0.12.6",
"lodash": "4.17.21",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export class BlockNode extends DecoratorBlockNode {
exportJSON(): SerializedBlockNode {
return {
...super.exportJSON(),
fields: this.getFields(),
type: this.getType(),
fields: this.getFields(),
version: 2,
}
}
Expand All @@ -123,9 +123,6 @@ export class BlockNode extends DecoratorBlockNode {
return this.getLatest().__fields
}

getId(): string {
return this.__id
}
getTextContent(): string {
return `Block Field`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ export class RelationshipNode extends DecoratorBlockNode {
return this.getLatest().__data
}

getId(): string {
return this.__id
}

getTextContent(): string {
return `${this.__data?.relationTo} relation to ${this.__data?.value?.id}`
}
Expand Down
7 changes: 6 additions & 1 deletion packages/richtext-lexical/src/field/features/indent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export const IndentFeature = (): FeatureProvider => {
}
for (const node of selection.getNodes()) {
// If at least one node is indented, this should be active
if (node.__indent > 0 || node.getParent().__indent > 0) {
if (
('__indent' in node && (node.__indent as number) > 0) ||
(node.getParent() &&
'__indent' in node.getParent() &&
node.getParent().__indent > 0)
) {
return true
}
}
Expand Down
Loading

0 comments on commit 5050283

Please sign in to comment.