From c49fd6692231b68ca61b079103a0fd7aa4673be1 Mon Sep 17 00:00:00 2001 From: Alessio Gravili <70709113+AlessioGr@users.noreply.github.com> Date: Fri, 15 Dec 2023 18:33:16 +0100 Subject: [PATCH] feat(richtext-lexical)!: rename TreeviewFeature into TreeViewFeature (#4520) Breaking: If you import TreeviewFeature in your project, you have to rename the import to use TreeViewFeature (capitalized "V") --- .../src/field/features/debug/TreeView/index.ts | 2 +- packages/richtext-lexical/src/index.ts | 2 +- test/fields/collections/Lexical/index.ts | 6 +++--- test/fields/collections/LexicalMigrate/index.ts | 6 +++--- test/fields/collections/RichText/index.ts | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/richtext-lexical/src/field/features/debug/TreeView/index.ts b/packages/richtext-lexical/src/field/features/debug/TreeView/index.ts index 23a35bf28..ecdeec7c2 100644 --- a/packages/richtext-lexical/src/field/features/debug/TreeView/index.ts +++ b/packages/richtext-lexical/src/field/features/debug/TreeView/index.ts @@ -1,6 +1,6 @@ import type { FeatureProvider } from '../../types' -export const TreeviewFeature = (): FeatureProvider => { +export const TreeViewFeature = (): FeatureProvider => { return { feature: () => { return { diff --git a/packages/richtext-lexical/src/index.ts b/packages/richtext-lexical/src/index.ts index 2d282fc7c..05d1bde9e 100644 --- a/packages/richtext-lexical/src/index.ts +++ b/packages/richtext-lexical/src/index.ts @@ -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' diff --git a/test/fields/collections/Lexical/index.ts b/test/fields/collections/Lexical/index.ts index aea1f1b0e..92236732b 100644 --- a/test/fields/collections/Lexical/index.ts +++ b/test/fields/collections/Lexical/index.ts @@ -3,7 +3,7 @@ import type { CollectionConfig } from '../../../../packages/payload/src/collecti import { BlocksFeature, LinkFeature, - TreeviewFeature, + TreeViewFeature, UploadFeature, lexicalEditor, } from '../../../../packages/richtext-lexical/src' @@ -42,7 +42,7 @@ export const LexicalFields: CollectionConfig = { features: ({ defaultFeatures }) => [ ...defaultFeatures, //TestRecorderFeature(), - TreeviewFeature(), + TreeViewFeature(), BlocksFeature({ blocks: [ RichTextBlock, @@ -67,7 +67,7 @@ export const LexicalFields: CollectionConfig = { features: ({ defaultFeatures }) => [ ...defaultFeatures, //TestRecorderFeature(), - TreeviewFeature(), + TreeViewFeature(), //HTMLConverterFeature(), LinkFeature({ fields: [ diff --git a/test/fields/collections/LexicalMigrate/index.ts b/test/fields/collections/LexicalMigrate/index.ts index d33d05771..5f3e8cb41 100644 --- a/test/fields/collections/LexicalMigrate/index.ts +++ b/test/fields/collections/LexicalMigrate/index.ts @@ -5,7 +5,7 @@ import { LexicalPluginToLexicalFeature, LinkFeature, SlateToLexicalFeature, - TreeviewFeature, + TreeViewFeature, UploadFeature, lexicalEditor, lexicalHTML, @@ -35,7 +35,7 @@ export const LexicalMigrateFields: CollectionConfig = { features: ({ defaultFeatures }) => [ ...defaultFeatures, LexicalPluginToLexicalFeature(), - TreeviewFeature(), + TreeViewFeature(), HTMLConverterFeature(), LinkFeature({ fields: [ @@ -75,7 +75,7 @@ export const LexicalMigrateFields: CollectionConfig = { features: ({ defaultFeatures }) => [ ...defaultFeatures, SlateToLexicalFeature(), - TreeviewFeature(), + TreeViewFeature(), HTMLConverterFeature(), LinkFeature({ fields: [ diff --git a/test/fields/collections/RichText/index.ts b/test/fields/collections/RichText/index.ts index dba830cf6..9c93e2846 100644 --- a/test/fields/collections/RichText/index.ts +++ b/test/fields/collections/RichText/index.ts @@ -4,7 +4,7 @@ import { BlocksFeature, HTMLConverterFeature, LinkFeature, - TreeviewFeature, + TreeViewFeature, UploadFeature, lexicalEditor, } from '../../../../packages/richtext-lexical/src' @@ -34,7 +34,7 @@ const RichTextFields: CollectionConfig = { editor: lexicalEditor({ features: ({ defaultFeatures }) => [ ...defaultFeatures, - TreeviewFeature(), + TreeViewFeature(), HTMLConverterFeature({}), LinkFeature({ fields: [ @@ -102,7 +102,7 @@ const RichTextFields: CollectionConfig = { }, }, editor: lexicalEditor({ - features: ({ defaultFeatures }) => [...defaultFeatures, TreeviewFeature()], + features: ({ defaultFeatures }) => [...defaultFeatures, TreeViewFeature()], }), }, {