From d36178c44f61e57b0318c8aa3824a90bfd4d7efe Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Tue, 19 Oct 2021 14:46:47 +0200 Subject: [PATCH] Added component display names for better error reporting --- src/panelWebView/components/ActionButton.tsx | 7 ++- src/panelWebView/components/Actions.tsx | 7 ++- .../components/ArticleDetails.tsx | 7 ++- src/panelWebView/components/BaseView.tsx | 7 ++- src/panelWebView/components/Collapsible.tsx | 7 ++- src/panelWebView/components/CustomScript.tsx | 7 ++- .../components/Fields/TextField.tsx | 2 - src/panelWebView/components/FileItem.tsx | 7 ++- src/panelWebView/components/FileList.tsx | 7 ++- .../components/FolderAndFiles.tsx | 7 ++- .../components/GlobalSettings.tsx | 7 ++- src/panelWebView/components/Icon.tsx | 7 ++- src/panelWebView/components/Metadata.tsx | 7 ++- .../components/OtherActionButton.tsx | 7 ++- src/panelWebView/components/OtherActions.tsx | 7 ++- src/panelWebView/components/Preview.tsx | 7 ++- src/panelWebView/components/PublishAction.tsx | 7 ++- src/panelWebView/components/SeoDetails.tsx | 7 ++- src/panelWebView/components/SeoFieldInfo.tsx | 7 ++- .../components/SeoKeywordInfo.tsx | 7 ++- src/panelWebView/components/SeoKeywords.tsx | 9 ++-- src/panelWebView/components/SeoStatus.tsx | 44 ++++++++++++------- src/panelWebView/components/SlugAction.tsx | 7 ++- src/panelWebView/components/Spinner.tsx | 7 ++- src/panelWebView/components/SponsorMsg.tsx | 7 ++- src/panelWebView/components/Tag.tsx | 7 ++- src/panelWebView/components/TagPicker.tsx | 7 ++- src/panelWebView/components/Tags.tsx | 7 ++- src/panelWebView/components/ValidInfo.tsx | 7 ++- 29 files changed, 162 insertions(+), 75 deletions(-) diff --git a/src/panelWebView/components/ActionButton.tsx b/src/panelWebView/components/ActionButton.tsx index 799a88d4..b96a76ab 100644 --- a/src/panelWebView/components/ActionButton.tsx +++ b/src/panelWebView/components/ActionButton.tsx @@ -7,10 +7,13 @@ export interface IActionButtonProps { onClick: (e: React.SyntheticEvent) => void; } -export const ActionButton: React.FunctionComponent = ({className, onClick, disabled,title}: React.PropsWithChildren) => { +const ActionButton: React.FunctionComponent = ({className, onClick, disabled,title}: React.PropsWithChildren) => { return (
); -}; \ No newline at end of file +}; + +ActionButton.displayName = 'ActionButton'; +export { ActionButton }; \ No newline at end of file diff --git a/src/panelWebView/components/Actions.tsx b/src/panelWebView/components/Actions.tsx index 1d0d511e..b07ffcc7 100644 --- a/src/panelWebView/components/Actions.tsx +++ b/src/panelWebView/components/Actions.tsx @@ -10,7 +10,7 @@ export interface IActionsProps { settings: PanelSettings; } -export const Actions: React.FunctionComponent = (props: React.PropsWithChildren) => { +const Actions: React.FunctionComponent = (props: React.PropsWithChildren) => { const { metadata, settings } = props; if (!metadata || Object.keys(metadata).length === 0 || !settings) { @@ -35,4 +35,7 @@ export const Actions: React.FunctionComponent = (props: React.Pro ); -}; \ No newline at end of file +}; + +Actions.displayName = 'Actions'; +export { Actions }; \ No newline at end of file diff --git a/src/panelWebView/components/ArticleDetails.tsx b/src/panelWebView/components/ArticleDetails.tsx index a0ba922f..3969cc69 100644 --- a/src/panelWebView/components/ArticleDetails.tsx +++ b/src/panelWebView/components/ArticleDetails.tsx @@ -9,7 +9,7 @@ export interface IArticleDetailsProps { } } -export const ArticleDetails: React.FunctionComponent = ({details}: React.PropsWithChildren) => { +const ArticleDetails: React.FunctionComponent = ({details}: React.PropsWithChildren) => { if (!details || (details.headings === undefined && details.paragraphs === undefined)) { return null; @@ -46,4 +46,7 @@ export const ArticleDetails: React.FunctionComponent = ({d ); -}; \ No newline at end of file +}; + +ArticleDetails.displayName = 'ArticleDetails'; +export { ArticleDetails }; \ No newline at end of file diff --git a/src/panelWebView/components/BaseView.tsx b/src/panelWebView/components/BaseView.tsx index 40ea7009..e036d2b0 100644 --- a/src/panelWebView/components/BaseView.tsx +++ b/src/panelWebView/components/BaseView.tsx @@ -13,7 +13,7 @@ export interface IBaseViewProps { folderAndFiles: FolderInfo[] | undefined; } -export const BaseView: React.FunctionComponent = ({settings, folderAndFiles}: React.PropsWithChildren) => { +const BaseView: React.FunctionComponent = ({settings, folderAndFiles}: React.PropsWithChildren) => { const openDashboard = () => { MessageHelper.sendMessage(CommandToCode.openDashboard); @@ -48,4 +48,7 @@ export const BaseView: React.FunctionComponent = ({settings, fol ); -}; \ No newline at end of file +}; + +BaseView.displayName = 'BaseView'; +export { BaseView }; \ No newline at end of file diff --git a/src/panelWebView/components/Collapsible.tsx b/src/panelWebView/components/Collapsible.tsx index c1a07107..93f6598d 100644 --- a/src/panelWebView/components/Collapsible.tsx +++ b/src/panelWebView/components/Collapsible.tsx @@ -10,7 +10,7 @@ export interface ICollapsibleProps { sendUpdate?: (open: boolean) => void; } -export const Collapsible: React.FunctionComponent = ({id, children, title, sendUpdate, className}: React.PropsWithChildren) => { +const Collapsible: React.FunctionComponent = ({id, children, title, sendUpdate, className}: React.PropsWithChildren) => { const [ isOpen, setIsOpen ] = React.useState(false); const collapseKey = `collapse-${id}`; @@ -55,4 +55,7 @@ export const Collapsible: React.FunctionComponent = ({id, chi ); -}; \ No newline at end of file +}; + +Collapsible.displayName = 'Collapsible'; +export { Collapsible }; \ No newline at end of file diff --git a/src/panelWebView/components/CustomScript.tsx b/src/panelWebView/components/CustomScript.tsx index 76991086..d39eb2ea 100644 --- a/src/panelWebView/components/CustomScript.tsx +++ b/src/panelWebView/components/CustomScript.tsx @@ -8,7 +8,7 @@ export interface ICustomScriptProps { script: string; } -export const CustomScript: React.FunctionComponent = ({title, script}: React.PropsWithChildren) => { +const CustomScript: React.FunctionComponent = ({title, script}: React.PropsWithChildren) => { const runCustomScript = () => { MessageHelper.sendMessage(CommandToCode.runCustomScript, { title, script }); @@ -17,4 +17,7 @@ export const CustomScript: React.FunctionComponent = ({title return ( ); -}; \ No newline at end of file +}; + +CustomScript.displayName = 'CustomScript'; +export { CustomScript }; \ No newline at end of file diff --git a/src/panelWebView/components/Fields/TextField.tsx b/src/panelWebView/components/Fields/TextField.tsx index 4a8c66c5..41623872 100644 --- a/src/panelWebView/components/Fields/TextField.tsx +++ b/src/panelWebView/components/Fields/TextField.tsx @@ -59,8 +59,6 @@ export const TextField: React.FunctionComponent = ({singleLine, ) } - - { limit && limit > 0 && (text || "").length > limit && (
diff --git a/src/panelWebView/components/FileItem.tsx b/src/panelWebView/components/FileItem.tsx index f75fbf94..1d2db400 100644 --- a/src/panelWebView/components/FileItem.tsx +++ b/src/panelWebView/components/FileItem.tsx @@ -9,7 +9,7 @@ export interface IFileItemProps { path: string; } -export const FileItem: React.FunctionComponent = ({ name, path }: React.PropsWithChildren) => { +const FileItem: React.FunctionComponent = ({ name, path }: React.PropsWithChildren) => { const openFile = () => { MessageHelper.sendMessage(CommandToCode.openInEditor, path); @@ -29,4 +29,7 @@ export const FileItem: React.FunctionComponent = ({ name, path } {name} ); -}; \ No newline at end of file +}; + +FileItem.displayName = 'FileItem'; +export { FileItem }; \ No newline at end of file diff --git a/src/panelWebView/components/FileList.tsx b/src/panelWebView/components/FileList.tsx index 857d6373..85b8d9e3 100644 --- a/src/panelWebView/components/FileList.tsx +++ b/src/panelWebView/components/FileList.tsx @@ -9,7 +9,7 @@ export interface IFileListProps { totalFiles: number; } -export const FileList: React.FunctionComponent = ({files, folderName, totalFiles}: React.PropsWithChildren) => { +const FileList: React.FunctionComponent = ({files, folderName, totalFiles}: React.PropsWithChildren) => { if (!files || files.length === 0) { return null; @@ -28,4 +28,7 @@ export const FileList: React.FunctionComponent = ({files, folder
); -}; \ No newline at end of file +}; + +FileList.displayName = 'FileList'; +export { FileList }; \ No newline at end of file diff --git a/src/panelWebView/components/FolderAndFiles.tsx b/src/panelWebView/components/FolderAndFiles.tsx index 9cfba778..93610cf3 100644 --- a/src/panelWebView/components/FolderAndFiles.tsx +++ b/src/panelWebView/components/FolderAndFiles.tsx @@ -9,7 +9,7 @@ export interface IFolderAndFilesProps { isBase?: boolean; } -export const FolderAndFiles: React.FunctionComponent = ({data, isBase}: React.PropsWithChildren) => { +const FolderAndFiles: React.FunctionComponent = ({data, isBase}: React.PropsWithChildren) => { if (!data) { return null; @@ -42,4 +42,7 @@ export const FolderAndFiles: React.FunctionComponent = ({d } ); -}; \ No newline at end of file +}; + +FolderAndFiles.displayName = 'FolderAndFiles'; +export { FolderAndFiles }; \ No newline at end of file diff --git a/src/panelWebView/components/GlobalSettings.tsx b/src/panelWebView/components/GlobalSettings.tsx index 85fd8446..fe503b15 100644 --- a/src/panelWebView/components/GlobalSettings.tsx +++ b/src/panelWebView/components/GlobalSettings.tsx @@ -11,7 +11,7 @@ export interface IGlobalSettingsProps { isBase?: boolean; } -export const GlobalSettings: React.FunctionComponent = ({settings, isBase}: React.PropsWithChildren) => { +const GlobalSettings: React.FunctionComponent = ({settings, isBase}: React.PropsWithChildren) => { const { modifiedDateUpdate, fmHighlighting } = settings || {}; const [ previewUrl, setPreviewUrl ] = React.useState(""); const [ isDirty, setIsDirty ] = React.useState(false); @@ -65,4 +65,7 @@ export const GlobalSettings: React.FunctionComponent = ({s ); -}; \ No newline at end of file +}; + +GlobalSettings.displayName = 'GlobalSettings'; +export { GlobalSettings }; \ No newline at end of file diff --git a/src/panelWebView/components/Icon.tsx b/src/panelWebView/components/Icon.tsx index 81848dd3..96cc048b 100644 --- a/src/panelWebView/components/Icon.tsx +++ b/src/panelWebView/components/Icon.tsx @@ -4,7 +4,10 @@ export interface IIconProps { name: string; } -export const Icon: React.FunctionComponent = ({ name }: React.PropsWithChildren) => { +const Icon: React.FunctionComponent = ({ name }: React.PropsWithChildren) => { return (); -}; \ No newline at end of file +}; + +Icon.displayName = 'Icon'; +export { Icon }; \ No newline at end of file diff --git a/src/panelWebView/components/Metadata.tsx b/src/panelWebView/components/Metadata.tsx index dc42d039..eff704c1 100644 --- a/src/panelWebView/components/Metadata.tsx +++ b/src/panelWebView/components/Metadata.tsx @@ -26,7 +26,7 @@ export interface IMetadataProps { unsetFocus: () => void; } -export const Metadata: React.FunctionComponent = ({settings, metadata, focusElm, unsetFocus}: React.PropsWithChildren) => { +const Metadata: React.FunctionComponent = ({settings, metadata, focusElm, unsetFocus}: React.PropsWithChildren) => { const contentType = useContentType(settings, metadata); const sendUpdate = (field: string | undefined, value: any) => { @@ -200,4 +200,7 @@ export const Metadata: React.FunctionComponent = ({settings, met } ); -}; \ No newline at end of file +}; + +Metadata.displayName = 'Metadata'; +export { Metadata }; \ No newline at end of file diff --git a/src/panelWebView/components/OtherActionButton.tsx b/src/panelWebView/components/OtherActionButton.tsx index a9641fea..308c9071 100644 --- a/src/panelWebView/components/OtherActionButton.tsx +++ b/src/panelWebView/components/OtherActionButton.tsx @@ -6,10 +6,13 @@ export interface IOtherActionButtonProps { onClick: (e: React.SyntheticEvent) => void; } -export const OtherActionButton: React.FunctionComponent = ({ className, disabled, onClick, children}: React.PropsWithChildren) => { +const OtherActionButton: React.FunctionComponent = ({ className, disabled, onClick, children}: React.PropsWithChildren) => { return (
); -}; \ No newline at end of file +}; + +OtherActionButton.displayName = 'OtherActionButton'; +export { OtherActionButton }; \ No newline at end of file diff --git a/src/panelWebView/components/OtherActions.tsx b/src/panelWebView/components/OtherActions.tsx index 6603fce3..a3362fe1 100644 --- a/src/panelWebView/components/OtherActions.tsx +++ b/src/panelWebView/components/OtherActions.tsx @@ -19,7 +19,7 @@ export interface IOtherActionsProps { isBase?: boolean; } -export const OtherActions: React.FunctionComponent = ({isFile, settings, isBase}: React.PropsWithChildren) => { +const OtherActions: React.FunctionComponent = ({isFile, settings, isBase}: React.PropsWithChildren) => { const openSettings = () => { MessageHelper.sendMessage(CommandToCode.openSettings); @@ -64,4 +64,7 @@ export const OtherActions: React.FunctionComponent = ({isFil ); -}; \ No newline at end of file +}; + +OtherActions.displayName = 'OtherActions'; +export { OtherActions }; \ No newline at end of file diff --git a/src/panelWebView/components/Preview.tsx b/src/panelWebView/components/Preview.tsx index 5f0d063c..738cc3be 100644 --- a/src/panelWebView/components/Preview.tsx +++ b/src/panelWebView/components/Preview.tsx @@ -7,7 +7,7 @@ export interface IPreviewProps { slug: string; } -export const Preview: React.FunctionComponent = ({slug}: React.PropsWithChildren) => { +const Preview: React.FunctionComponent = ({slug}: React.PropsWithChildren) => { const open = () => { MessageHelper.sendMessage(CommandToCode.openPreview); @@ -20,4 +20,7 @@ export const Preview: React.FunctionComponent = ({slug}: React.Pr return ( ); -}; \ No newline at end of file +}; + +Preview.displayName = 'Preview'; +export { Preview }; \ No newline at end of file diff --git a/src/panelWebView/components/PublishAction.tsx b/src/panelWebView/components/PublishAction.tsx index 55d98941..e9012c02 100644 --- a/src/panelWebView/components/PublishAction.tsx +++ b/src/panelWebView/components/PublishAction.tsx @@ -9,7 +9,7 @@ export interface IPublishActionProps { draft: boolean; } -export const PublishAction: React.FunctionComponent = (props: React.PropsWithChildren) => { +const PublishAction: React.FunctionComponent = (props: React.PropsWithChildren) => { const { draft } = props; const publish = () => { @@ -19,4 +19,7 @@ export const PublishAction: React.FunctionComponent = (prop return ( ); -}; \ No newline at end of file +}; + +PublishAction.displayName = 'PublishAction'; +export { PublishAction }; \ No newline at end of file diff --git a/src/panelWebView/components/SeoDetails.tsx b/src/panelWebView/components/SeoDetails.tsx index 27c91680..52e44d7c 100644 --- a/src/panelWebView/components/SeoDetails.tsx +++ b/src/panelWebView/components/SeoDetails.tsx @@ -9,7 +9,7 @@ export interface ISeoDetailsProps { noValidation?: boolean; } -export const SeoDetails: React.FunctionComponent = (props: React.PropsWithChildren) => { +const SeoDetails: React.FunctionComponent = (props: React.PropsWithChildren) => { const { allowedLength, title, value, valueTitle, noValidation } = props; const validate = () => { @@ -38,4 +38,7 @@ export const SeoDetails: React.FunctionComponent = (props: Rea ); -}; \ No newline at end of file +}; + +SeoDetails.displayName = 'SeoDetails'; +export { SeoDetails }; \ No newline at end of file diff --git a/src/panelWebView/components/SeoFieldInfo.tsx b/src/panelWebView/components/SeoFieldInfo.tsx index 2b13dd05..d61cf4f5 100644 --- a/src/panelWebView/components/SeoFieldInfo.tsx +++ b/src/panelWebView/components/SeoFieldInfo.tsx @@ -9,7 +9,7 @@ export interface ISeoFieldInfoProps { isValid?: boolean; } -export const SeoFieldInfo: React.FunctionComponent = ({ title, value, recommendation, isValid }: React.PropsWithChildren) => { +const SeoFieldInfo: React.FunctionComponent = ({ title, value, recommendation, isValid }: React.PropsWithChildren) => { return ( {title} @@ -19,4 +19,7 @@ export const SeoFieldInfo: React.FunctionComponent = ({ titl ); -}; \ No newline at end of file +}; + +SeoFieldInfo.displayName = 'SeoFieldInfo'; +export { SeoFieldInfo }; \ No newline at end of file diff --git a/src/panelWebView/components/SeoKeywordInfo.tsx b/src/panelWebView/components/SeoKeywordInfo.tsx index 4f2dd8d8..bdf0b451 100644 --- a/src/panelWebView/components/SeoKeywordInfo.tsx +++ b/src/panelWebView/components/SeoKeywordInfo.tsx @@ -10,7 +10,7 @@ export interface ISeoKeywordInfoProps { content: string; } -export const SeoKeywordInfo: React.FunctionComponent = ({keyword, title, description, slug, content}: React.PropsWithChildren) => { +const SeoKeywordInfo: React.FunctionComponent = ({keyword, title, description, slug, content}: React.PropsWithChildren) => { if (!keyword) { return null; @@ -33,4 +33,7 @@ export const SeoKeywordInfo: React.FunctionComponent = ({k ); -}; \ No newline at end of file +}; + +SeoKeywordInfo.displayName = 'SeoKeywordInfo'; +export { SeoKeywordInfo }; \ No newline at end of file diff --git a/src/panelWebView/components/SeoKeywords.tsx b/src/panelWebView/components/SeoKeywords.tsx index 46af35d9..177804d5 100644 --- a/src/panelWebView/components/SeoKeywords.tsx +++ b/src/panelWebView/components/SeoKeywords.tsx @@ -11,7 +11,7 @@ export interface ISeoKeywordsProps { content: string; } -export const SeoKeywords: React.FunctionComponent = ({keywords, ...data}: React.PropsWithChildren) => { +const SeoKeywords: React.FunctionComponent = ({keywords, ...data}: React.PropsWithChildren) => { const validateKeywords = () => { if (!keywords) { @@ -55,8 +55,9 @@ export const SeoKeywords: React.FunctionComponent = ({keyword } - - ); -}; \ No newline at end of file +}; + +SeoKeywords.displayName = 'SeoKeywords'; +export { SeoKeywords }; \ No newline at end of file diff --git a/src/panelWebView/components/SeoStatus.tsx b/src/panelWebView/components/SeoStatus.tsx index 407b562c..357a8568 100644 --- a/src/panelWebView/components/SeoStatus.tsx +++ b/src/panelWebView/components/SeoStatus.tsx @@ -11,14 +11,34 @@ export interface ISeoStatusProps { data: any; } -export const SeoStatus: React.FunctionComponent = (props: React.PropsWithChildren) => { +const SeoStatus: React.FunctionComponent = (props: React.PropsWithChildren) => { const { data, seo } = props; const { title } = data; const [ isOpen, setIsOpen ] = React.useState(true); const tableRef = React.useRef(); + const pushUpdate = React.useRef((value: boolean) => { + setTimeout(() => { + setIsOpen(value); + }, 10); + }).current; const { descriptionField } = seo; + // Workaround for lit components not updating render + React.useEffect(() => { + setTimeout(() => { + let height = 0; + + tableRef.current?.childNodes.forEach((elm: any) => { + height += elm.clientHeight; + }); + + if (height > 0 && tableRef.current) { + tableRef.current.style.height = `${height}px`; + } + }, 10); + }, [title, data[descriptionField], data?.articleDetails?.wordCount]); + if (!title && !data[descriptionField]) { return null; } @@ -72,24 +92,14 @@ export const SeoStatus: React.FunctionComponent = (props: React ); }; - // Workaround for lit components not updating render - React.useEffect(() => { - setTimeout(() => { - let height = 0; - - tableRef.current?.childNodes.forEach((elm: any) => { - height += elm.clientHeight; - }); - - if (height > 0 && tableRef.current) { - tableRef.current.style.height = `${height}px`; - } - }, 10); - }, [title, data[descriptionField], data?.articleDetails?.wordCount]); + return ( - setIsOpen(value)}> + { renderContent() } ); -}; \ No newline at end of file +}; + +SeoStatus.displayName = 'SeoStatus'; +export { SeoStatus }; \ No newline at end of file diff --git a/src/panelWebView/components/SlugAction.tsx b/src/panelWebView/components/SlugAction.tsx index 85f57809..15967aad 100644 --- a/src/panelWebView/components/SlugAction.tsx +++ b/src/panelWebView/components/SlugAction.tsx @@ -11,7 +11,7 @@ export interface ISlugActionProps { slugOpts: Slug; } -export const SlugAction: React.FunctionComponent = (props: React.PropsWithChildren) => { +const SlugAction: React.FunctionComponent = (props: React.PropsWithChildren) => { const { value, crntValue, slugOpts } = props; let slug = SlugHelper.createSlug(value); @@ -24,4 +24,7 @@ export const SlugAction: React.FunctionComponent = (props: Rea return ( ); -}; \ No newline at end of file +}; + +SlugAction.displayName = 'SlugAction'; +export { SlugAction }; \ No newline at end of file diff --git a/src/panelWebView/components/Spinner.tsx b/src/panelWebView/components/Spinner.tsx index 4b0d34ac..ebb4d187 100644 --- a/src/panelWebView/components/Spinner.tsx +++ b/src/panelWebView/components/Spinner.tsx @@ -2,8 +2,11 @@ import * as React from 'react'; export interface ISpinnerProps {} -export const Spinner: React.FunctionComponent = (props: React.PropsWithChildren) => { +const Spinner: React.FunctionComponent = (props: React.PropsWithChildren) => { return (
Loading...
); -}; \ No newline at end of file +}; + +Spinner.displayName = 'Spinner'; +export { Spinner }; \ No newline at end of file diff --git a/src/panelWebView/components/SponsorMsg.tsx b/src/panelWebView/components/SponsorMsg.tsx index c0c92b48..e1c6c6bd 100644 --- a/src/panelWebView/components/SponsorMsg.tsx +++ b/src/panelWebView/components/SponsorMsg.tsx @@ -4,7 +4,7 @@ import { HeartIcon } from './Icons/HeartIcon'; export interface ISponsorMsgProps {} -export const SponsorMsg: React.FunctionComponent = (props: React.PropsWithChildren) => { +const SponsorMsg: React.FunctionComponent = (props: React.PropsWithChildren) => { return (

@@ -12,4 +12,7 @@ export const SponsorMsg: React.FunctionComponent = (props: Rea

); -}; \ No newline at end of file +}; + +SponsorMsg.displayName = 'SponsorMsg'; +export { SponsorMsg }; \ No newline at end of file diff --git a/src/panelWebView/components/Tag.tsx b/src/panelWebView/components/Tag.tsx index 03f900e5..23527b0f 100644 --- a/src/panelWebView/components/Tag.tsx +++ b/src/panelWebView/components/Tag.tsx @@ -13,7 +13,7 @@ export interface ITagProps { onRemove: (tags: string) => void; } -export const Tag: React.FunctionComponent = (props: React.PropsWithChildren) => { +const Tag: React.FunctionComponent = (props: React.PropsWithChildren) => { const { value, className, title, onRemove, onCreate, disableConfigurable } = props; return ( @@ -25,4 +25,7 @@ export const Tag: React.FunctionComponent = (props: React.PropsWithCh ); -}; \ No newline at end of file +}; + +Tag.displayName = 'Tag'; +export { Tag }; \ No newline at end of file diff --git a/src/panelWebView/components/TagPicker.tsx b/src/panelWebView/components/TagPicker.tsx index 9be777ef..e25fc294 100644 --- a/src/panelWebView/components/TagPicker.tsx +++ b/src/panelWebView/components/TagPicker.tsx @@ -20,7 +20,7 @@ export interface ITagPickerProps { disableConfigurable?: boolean; } -export const TagPicker: React.FunctionComponent = (props: React.PropsWithChildren) => { +const TagPicker: React.FunctionComponent = (props: React.PropsWithChildren) => { const { label, icon, type, crntSelected, options, freeform, focussed, unsetFocus, disableConfigurable } = props; const [ selected, setSelected ] = React.useState([]); const [ inputValue, setInputValue ] = React.useState(""); @@ -194,4 +194,7 @@ export const TagPicker: React.FunctionComponent = (props: React disableConfigurable={!!disableConfigurable} /> ); -}; \ No newline at end of file +}; + +TagPicker.displayName = 'TagPicker'; +export { TagPicker }; \ No newline at end of file diff --git a/src/panelWebView/components/Tags.tsx b/src/panelWebView/components/Tags.tsx index 9a5091a3..a7f2cead 100644 --- a/src/panelWebView/components/Tags.tsx +++ b/src/panelWebView/components/Tags.tsx @@ -11,7 +11,7 @@ export interface ITagsProps { onRemove: (tags: string) => void; } -export const Tags: React.FunctionComponent = (props: React.PropsWithChildren) => { +const Tags: React.FunctionComponent = (props: React.PropsWithChildren) => { const { values, options, onCreate, onRemove, disableConfigurable } = props; const knownTags = values.filter(v => options.includes(v)); @@ -38,4 +38,7 @@ export const Tags: React.FunctionComponent = (props: React.PropsWith } ); -}; \ No newline at end of file +}; + +Tags.displayName = 'Tags'; +export { Tags }; \ No newline at end of file diff --git a/src/panelWebView/components/ValidInfo.tsx b/src/panelWebView/components/ValidInfo.tsx index 9936018a..431f923a 100644 --- a/src/panelWebView/components/ValidInfo.tsx +++ b/src/panelWebView/components/ValidInfo.tsx @@ -6,7 +6,7 @@ export interface IValidInfoProps { isValid: boolean; } -export const ValidInfo: React.FunctionComponent = ({isValid}: React.PropsWithChildren) => { +const ValidInfo: React.FunctionComponent = ({isValid}: React.PropsWithChildren) => { return ( <> { @@ -18,4 +18,7 @@ export const ValidInfo: React.FunctionComponent = ({isValid}: R } ); -}; \ No newline at end of file +}; + +ValidInfo.displayName = 'ValidInfo'; +export { ValidInfo }; \ No newline at end of file