Skip to content

Commit

Permalink
feat(richtext-lexical)!: rename TreeviewFeature into TreeViewFeature (#…
Browse files Browse the repository at this point in the history
…4520)

Breaking: If you import TreeviewFeature in your project, you have to rename the import to use TreeViewFeature (capitalized "V")
  • Loading branch information
AlessioGr committed Dec 15, 2023
1 parent 3e9ef84 commit c49fd66
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FeatureProvider } from '../../types'

export const TreeviewFeature = (): FeatureProvider => {
export const TreeViewFeature = (): FeatureProvider => {
return {
feature: () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion packages/richtext-lexical/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export { consolidateHTMLConverters } from './field/features/converters/html/fiel
export { lexicalHTML } from './field/features/converters/html/field'

export { TestRecorderFeature } from './field/features/debug/TestRecorder'
export { TreeviewFeature } from './field/features/debug/TreeView'
export { TreeViewFeature } from './field/features/debug/TreeView'

export { BoldTextFeature } from './field/features/format/Bold'
export { InlineCodeTextFeature } from './field/features/format/InlineCode'
Expand Down
6 changes: 3 additions & 3 deletions test/fields/collections/Lexical/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CollectionConfig } from '../../../../packages/payload/src/collecti
import {
BlocksFeature,
LinkFeature,
TreeviewFeature,
TreeViewFeature,
UploadFeature,
lexicalEditor,
} from '../../../../packages/richtext-lexical/src'
Expand Down Expand Up @@ -42,7 +42,7 @@ export const LexicalFields: CollectionConfig = {
features: ({ defaultFeatures }) => [
...defaultFeatures,
//TestRecorderFeature(),
TreeviewFeature(),
TreeViewFeature(),
BlocksFeature({
blocks: [
RichTextBlock,
Expand All @@ -67,7 +67,7 @@ export const LexicalFields: CollectionConfig = {
features: ({ defaultFeatures }) => [
...defaultFeatures,
//TestRecorderFeature(),
TreeviewFeature(),
TreeViewFeature(),
//HTMLConverterFeature(),
LinkFeature({
fields: [
Expand Down
6 changes: 3 additions & 3 deletions test/fields/collections/LexicalMigrate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
LexicalPluginToLexicalFeature,
LinkFeature,
SlateToLexicalFeature,
TreeviewFeature,
TreeViewFeature,
UploadFeature,
lexicalEditor,
lexicalHTML,
Expand Down Expand Up @@ -35,7 +35,7 @@ export const LexicalMigrateFields: CollectionConfig = {
features: ({ defaultFeatures }) => [
...defaultFeatures,
LexicalPluginToLexicalFeature(),
TreeviewFeature(),
TreeViewFeature(),
HTMLConverterFeature(),
LinkFeature({
fields: [
Expand Down Expand Up @@ -75,7 +75,7 @@ export const LexicalMigrateFields: CollectionConfig = {
features: ({ defaultFeatures }) => [
...defaultFeatures,
SlateToLexicalFeature(),
TreeviewFeature(),
TreeViewFeature(),
HTMLConverterFeature(),
LinkFeature({
fields: [
Expand Down
6 changes: 3 additions & 3 deletions test/fields/collections/RichText/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
BlocksFeature,
HTMLConverterFeature,
LinkFeature,
TreeviewFeature,
TreeViewFeature,
UploadFeature,
lexicalEditor,
} from '../../../../packages/richtext-lexical/src'
Expand Down Expand Up @@ -34,7 +34,7 @@ const RichTextFields: CollectionConfig = {
editor: lexicalEditor({
features: ({ defaultFeatures }) => [
...defaultFeatures,
TreeviewFeature(),
TreeViewFeature(),
HTMLConverterFeature({}),
LinkFeature({
fields: [
Expand Down Expand Up @@ -102,7 +102,7 @@ const RichTextFields: CollectionConfig = {
},
},
editor: lexicalEditor({
features: ({ defaultFeatures }) => [...defaultFeatures, TreeviewFeature()],
features: ({ defaultFeatures }) => [...defaultFeatures, TreeViewFeature()],
}),
},
{
Expand Down

0 comments on commit c49fd66

Please sign in to comment.