From 4bf317bee0606b36e103bbcbf1042e99f1f0297e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Tamargo?= Date: Mon, 4 Nov 2024 15:38:47 +0100 Subject: [PATCH] [WIP] Update Flow to 0.251.1 https://github.com/facebook/flow/releases/tag/v0.251.0 https://github.com/facebook/flow/releases/tag/v0.251.1 Most changes are due to the deprecation of React.AbstractComponent which needs to be replaced with component types. --- flow-typed/npm/@floating-ui/react_v0.26.x.js | 10 +++++----- flow-typed/npm/react-table_v7.x.x.js | 4 ++-- package.json | 2 +- .../scripts/account/components/ApplicationForm.js | 2 +- .../scripts/account/components/EditProfileForm.js | 2 +- .../scripts/account/components/PreferencesForm.js | 2 +- .../scripts/account/components/RegisterForm.js | 2 +- root/static/scripts/alias/AliasEditForm.js | 2 +- .../scripts/annotation/AnnotationHistoryTable.js | 2 +- .../scripts/artist/components/ArtistCreditRenamer.js | 2 +- .../collection/components/CollectionEditForm.js | 2 +- .../static/scripts/common/components/AcoustIdCell.js | 2 +- root/static/scripts/common/components/Annotation.js | 2 +- .../scripts/common/components/ArtistCreditLink.js | 2 +- root/static/scripts/common/components/ArtistRoles.js | 2 +- .../scripts/common/components/AttributeList.js | 2 +- .../scripts/common/components/Autocomplete2.js | 4 ++-- .../static/scripts/common/components/CommonsImage.js | 2 +- .../common/components/CritiqueBrainzReview.js | 2 +- root/static/scripts/common/components/Filter.js | 2 +- .../scripts/common/components/FingerprintTable.js | 2 +- root/static/scripts/common/components/IsrcList.js | 2 +- root/static/scripts/common/components/IswcList.js | 2 +- .../scripts/common/components/PostParameters.js | 2 +- .../scripts/common/components/Relationships.js | 2 +- .../scripts/common/components/ReleaseEvents.js | 2 +- .../common/components/StaticRelationshipsDisplay.js | 6 +++--- root/static/scripts/common/components/TagEditor.js | 4 ++-- root/static/scripts/common/components/TaggerIcon.js | 2 +- .../scripts/common/components/WikipediaExtract.js | 2 +- root/static/scripts/common/components/WorkArtists.js | 2 +- .../scripts/edit/components/ArtistCreditBubble.js | 6 +++--- .../scripts/edit/components/ArtistCreditEditor.js | 6 +++--- .../edit/components/ArtistCreditNameEditor.js | 6 +++--- .../scripts/edit/components/DateRangeFieldset.js | 6 +++--- .../scripts/edit/components/FormRowTextList.js | 2 +- .../edit/components/GuessCaseOptionsPopover.js | 6 +++--- .../scripts/edit/components/NewNotesAlertCheckbox.js | 2 +- .../scripts/edit/components/ReleaseMergeStrategy.js | 2 +- .../scripts/edit/components/edit/RelationshipDiff.js | 6 +++--- .../static/scripts/event/components/EventEditForm.js | 2 +- .../static/scripts/genre/components/GenreEditForm.js | 2 +- .../scripts/main/components/ConfirmSeedButtons.js | 2 +- root/static/scripts/recording/RecordingName.js | 2 +- .../components/DialogAttribute/BooleanAttribute.js | 6 +++--- .../components/DialogAttribute/TextAttribute.js | 6 +++--- .../components/DialogAttributes.js | 6 +++--- .../relationship-editor/components/DialogButtons.js | 6 +++--- .../components/DialogDatePeriod.js | 6 +++--- .../components/DialogEntityCredit.js | 6 +++--- .../components/DialogLinkOrder.js | 6 +++--- .../relationship-editor/components/DialogLinkType.js | 2 +- .../relationship-editor/components/DialogPreview.js | 6 +++--- .../components/DialogSourceEntity.js | 6 +++--- .../components/DialogTargetType.js | 6 +++--- .../components/RelationshipDialogContent.js | 6 +++--- .../components/RelationshipEditorWrapper.js | 4 ++-- .../components/RelationshipItem.js | 6 +++--- .../components/RelationshipLinkTypeGroup.js | 6 +++--- .../components/RelationshipPhraseGroup.js | 6 +++--- .../components/RelationshipTargetTypeGroup.js | 6 +++--- .../components/RelationshipTargetTypeGroups.js | 6 +++--- .../release/components/BatchCreateWorksDialog.js | 6 +++--- .../scripts/release/components/EditWorkDialog.js | 6 +++--- .../release/components/MediumRelationshipEditor.js | 6 +++--- .../static/scripts/release/components/MediumTable.js | 6 +++--- .../scripts/release/components/MediumToolbox.js | 12 ++++++------ .../scripts/release/components/MediumTrackRow.js | 6 +++--- .../components/RelationshipEditorBatchTools.js | 6 +++--- .../release/components/ReleaseRelationshipEditor.js | 4 ++-- .../release/components/TrackRelationshipEditor.js | 6 +++--- .../release/components/TracklistAndCredits.js | 8 ++++---- .../release/components/WorkLanguageMultiselect.js | 9 ++++----- .../scripts/release/components/WorkTypeSelect.js | 6 +++--- .../series/components/SeriesRelationshipEditor.js | 4 ++-- .../scripts/url/components/UrlRelationshipEditor.js | 4 ++-- yarn.lock | 10 +++++----- 77 files changed, 165 insertions(+), 166 deletions(-) diff --git a/flow-typed/npm/@floating-ui/react_v0.26.x.js b/flow-typed/npm/@floating-ui/react_v0.26.x.js index 8662b7ce511..f4e9902bce4 100644 --- a/flow-typed/npm/@floating-ui/react_v0.26.x.js +++ b/flow-typed/npm/@floating-ui/react_v0.26.x.js @@ -310,7 +310,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingFocusManager: - React.AbstractComponent; + component(...FloatingFocusManagerProps); /* * FloatingNode @@ -321,7 +321,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingNode: - React.AbstractComponent; + component(...FloatingNodeProps); /* * FloatingOverlay @@ -334,7 +334,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingOverlay: - React.AbstractComponent; + component(...FloatingOverlayProps); /* * FloatingPortal @@ -345,7 +345,7 @@ declare module '@floating-ui/react' { }; declare export const FloatingPortal: - React.AbstractComponent; + component(...FloatingPortalProps); /* * FloatingTree @@ -355,5 +355,5 @@ declare module '@floating-ui/react' { }; declare export const FloatingTree: - React.AbstractComponent; + component(...FloatingTreeProps); } diff --git a/flow-typed/npm/react-table_v7.x.x.js b/flow-typed/npm/react-table_v7.x.x.js index 040f9045b08..57c5b0435c3 100644 --- a/flow-typed/npm/react-table_v7.x.x.js +++ b/flow-typed/npm/react-table_v7.x.x.js @@ -22,7 +22,7 @@ declare module 'react-table' { * `D` contravariant above. */ +accessor?: (D) => V, - +Cell?: React.AbstractComponent, mixed>, + +Cell?: component(...CellRenderProps), +Header?: React.ComponentType | React.Node, +id?: string, ... @@ -30,7 +30,7 @@ declare module 'react-table' { declare export type ColumnOptionsNoValue<-D> = { +accessor?: (D) => mixed, - +Cell?: React.AbstractComponent, mixed>, + +Cell?: component(...CellRenderProps), +Header?: React.ComponentType | React.Node, +id?: string, ... diff --git a/package.json b/package.json index 5ed66538ef8..aade883dbfb 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "eslint-plugin-react": "7.35.0", "eslint-plugin-react-hooks": "4.6.2", "eslint-plugin-simple-import-sort": "^7.0.0", - "flow-bin": "0.250.0", + "flow-bin": "0.251.1", "gettext-parser": "4.2.0", "globals": "15.9.0", "hermes-eslint": "0.23.0", diff --git a/root/static/scripts/account/components/ApplicationForm.js b/root/static/scripts/account/components/ApplicationForm.js index be0eb28ffd0..9bbf33dae94 100644 --- a/root/static/scripts/account/components/ApplicationForm.js +++ b/root/static/scripts/account/components/ApplicationForm.js @@ -126,4 +126,4 @@ export type ApplicationFormPropsT = Props; export default (hydrate( 'div.application-form', ApplicationForm, -): React.AbstractComponent); +): component(...Props)); diff --git a/root/static/scripts/account/components/EditProfileForm.js b/root/static/scripts/account/components/EditProfileForm.js index 94c9e9c7ca2..a05b89febc0 100644 --- a/root/static/scripts/account/components/EditProfileForm.js +++ b/root/static/scripts/account/components/EditProfileForm.js @@ -354,5 +354,5 @@ export type EditProfileFormPropsT = Props; export default ( hydrate('div.edit-profile-form', EditProfileForm): - React.AbstractComponent + component(...Props) ); diff --git a/root/static/scripts/account/components/PreferencesForm.js b/root/static/scripts/account/components/PreferencesForm.js index 00ae0bd822a..0a9242465a2 100644 --- a/root/static/scripts/account/components/PreferencesForm.js +++ b/root/static/scripts/account/components/PreferencesForm.js @@ -287,4 +287,4 @@ export type PreferencesFormPropsT = Props; export default (hydrate( 'div.preferences-form', PreferencesForm, -): React.AbstractComponent); +): component(...Props)); diff --git a/root/static/scripts/account/components/RegisterForm.js b/root/static/scripts/account/components/RegisterForm.js index dcbf80a4b4b..53259d8f3c0 100644 --- a/root/static/scripts/account/components/RegisterForm.js +++ b/root/static/scripts/account/components/RegisterForm.js @@ -122,4 +122,4 @@ component RegisterForm(captcha?: string, form: RegisterFormT) { export default (hydrate>( 'div.register-form', RegisterForm, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/alias/AliasEditForm.js b/root/static/scripts/alias/AliasEditForm.js index a5c7d623f03..ac011e9fc1c 100644 --- a/root/static/scripts/alias/AliasEditForm.js +++ b/root/static/scripts/alias/AliasEditForm.js @@ -355,4 +355,4 @@ const AliasEditForm = ({ export default (hydrate( 'div.alias-edit-form', AliasEditForm, -): React.AbstractComponent); +): component(...Props)); diff --git a/root/static/scripts/annotation/AnnotationHistoryTable.js b/root/static/scripts/annotation/AnnotationHistoryTable.js index 0b616776027..5854ebeb8f0 100644 --- a/root/static/scripts/annotation/AnnotationHistoryTable.js +++ b/root/static/scripts/annotation/AnnotationHistoryTable.js @@ -159,4 +159,4 @@ component AnnotationHistoryTable( export default (hydrate>( 'div.annotation-history-table', AnnotationHistoryTable, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/artist/components/ArtistCreditRenamer.js b/root/static/scripts/artist/components/ArtistCreditRenamer.js index 8bedeffc0ff..6ecfa851bd1 100644 --- a/root/static/scripts/artist/components/ArtistCreditRenamer.js +++ b/root/static/scripts/artist/components/ArtistCreditRenamer.js @@ -332,4 +332,4 @@ const ArtistCreditRenamer = ({ export default (hydrate( 'div.artist-credit-renamer', ArtistCreditRenamer, -): React.AbstractComponent); +): component(...ArtistCreditRenamerPropsT)); diff --git a/root/static/scripts/collection/components/CollectionEditForm.js b/root/static/scripts/collection/components/CollectionEditForm.js index de645513ff8..79373857d43 100644 --- a/root/static/scripts/collection/components/CollectionEditForm.js +++ b/root/static/scripts/collection/components/CollectionEditForm.js @@ -293,7 +293,7 @@ const CollaboratorsFormList = (hydrate( ); }), -): React.AbstractComponent); +): component(...CollaboratorsFormListPropsT)); type CollaboratorRowPropsT = { +collaborator: CollaboratorStateT, diff --git a/root/static/scripts/common/components/AcoustIdCell.js b/root/static/scripts/common/components/AcoustIdCell.js index 81a24cf0190..bdf3861de40 100644 --- a/root/static/scripts/common/components/AcoustIdCell.js +++ b/root/static/scripts/common/components/AcoustIdCell.js @@ -134,5 +134,5 @@ export default ( hydrate>( 'div.acoustids', AcoustIdCell, - ): React.AbstractComponent> + ): component(...React.PropsOf) ); diff --git a/root/static/scripts/common/components/Annotation.js b/root/static/scripts/common/components/Annotation.js index 57cb542ecb1..f16d39881da 100644 --- a/root/static/scripts/common/components/Annotation.js +++ b/root/static/scripts/common/components/Annotation.js @@ -141,4 +141,4 @@ export default (hydrate>( newProps.entity = newEntity; return newProps; }, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/ArtistCreditLink.js b/root/static/scripts/common/components/ArtistCreditLink.js index 89bac56eea6..1e16d80779d 100644 --- a/root/static/scripts/common/components/ArtistCreditLink.js +++ b/root/static/scripts/common/components/ArtistCreditLink.js @@ -48,7 +48,7 @@ component _MpIcon(artistCredit: ArtistCreditT) { export const MpIcon = (hydrate>( 'span.ac-mp', _MpIcon, -): React.AbstractComponent>); +): component(...React.PropsOf<_MpIcon>)); component ArtistCreditLink( artistCredit: ArtistCreditT, diff --git a/root/static/scripts/common/components/ArtistRoles.js b/root/static/scripts/common/components/ArtistRoles.js index a9dcb795afc..11613b29736 100644 --- a/root/static/scripts/common/components/ArtistRoles.js +++ b/root/static/scripts/common/components/ArtistRoles.js @@ -53,4 +53,4 @@ component ArtistRoles(relations: $ReadOnlyArray) { export default (hydrate>( 'div.artist-roles-container', ArtistRoles, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/AttributeList.js b/root/static/scripts/common/components/AttributeList.js index 48293c1d66b..169cadbdccf 100644 --- a/root/static/scripts/common/components/AttributeList.js +++ b/root/static/scripts/common/components/AttributeList.js @@ -73,4 +73,4 @@ component AttributeList( export default (hydrate>( 'div.entity-attributes-container', AttributeList, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/Autocomplete2.js b/root/static/scripts/common/components/Autocomplete2.js index 9165d295c2e..c1bb4488f43 100644 --- a/root/static/scripts/common/components/Autocomplete2.js +++ b/root/static/scripts/common/components/Autocomplete2.js @@ -864,13 +864,13 @@ component _Autocomplete2(...props: PropsT) { } // $FlowIgnore[unclear-type] -const Autocomplete2: React.AbstractComponent, mixed> = +const Autocomplete2: component(...PropsT) = React.memo(_Autocomplete2); export default Autocomplete2; // XXX Until Flow supports https://github.com/facebook/flow/issues/7672 export const ArtistAutocomplete: - React.AbstractComponent, void> = + component(...PropsT) = // $FlowIgnore[unclear-type] (Autocomplete2: any); diff --git a/root/static/scripts/common/components/CommonsImage.js b/root/static/scripts/common/components/CommonsImage.js index 289623eef71..7ac7516ff7f 100644 --- a/root/static/scripts/common/components/CommonsImage.js +++ b/root/static/scripts/common/components/CommonsImage.js @@ -56,4 +56,4 @@ export default (hydrate( 'div.commons-image', CommonsImage, minimalEntity, -): React.AbstractComponent); +): component(...Props)); diff --git a/root/static/scripts/common/components/CritiqueBrainzReview.js b/root/static/scripts/common/components/CritiqueBrainzReview.js index 0c80fe61259..598eb49f4c1 100644 --- a/root/static/scripts/common/components/CritiqueBrainzReview.js +++ b/root/static/scripts/common/components/CritiqueBrainzReview.js @@ -57,4 +57,4 @@ component CritiqueBrainzReview(review: CritiqueBrainzReviewT, title: string) { export default (hydrate>( 'div.critiquebrainz-review', CritiqueBrainzReview, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/Filter.js b/root/static/scripts/common/components/Filter.js index e89414b091d..b32a32a68d4 100644 --- a/root/static/scripts/common/components/Filter.js +++ b/root/static/scripts/common/components/Filter.js @@ -69,5 +69,5 @@ component Filter(ajaxFormUrl: string, initialFilterForm: ?FilterFormT) { export default ( hydrate>('div.filter', Filter): - React.AbstractComponent> + component(...React.PropsOf) ); diff --git a/root/static/scripts/common/components/FingerprintTable.js b/root/static/scripts/common/components/FingerprintTable.js index 84e5ef08b99..bd916652e37 100644 --- a/root/static/scripts/common/components/FingerprintTable.js +++ b/root/static/scripts/common/components/FingerprintTable.js @@ -119,4 +119,4 @@ component FingerprintTable(recording: RecordingT) { export default (hydrate>( 'div.acoustid-fingerprints', FingerprintTable, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/IsrcList.js b/root/static/scripts/common/components/IsrcList.js index c9f8fa62b36..841d8dc34bc 100644 --- a/root/static/scripts/common/components/IsrcList.js +++ b/root/static/scripts/common/components/IsrcList.js @@ -52,4 +52,4 @@ component IsrcList( export default (hydrate>( 'div.isrc-list-container', IsrcList, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/IswcList.js b/root/static/scripts/common/components/IswcList.js index ca5980dd646..e362803bf35 100644 --- a/root/static/scripts/common/components/IswcList.js +++ b/root/static/scripts/common/components/IswcList.js @@ -52,4 +52,4 @@ component IswcList( export default (hydrate>( 'div.iswc-list-container', IswcList, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/PostParameters.js b/root/static/scripts/common/components/PostParameters.js index 5721d820d09..644d9ca016e 100644 --- a/root/static/scripts/common/components/PostParameters.js +++ b/root/static/scripts/common/components/PostParameters.js @@ -90,4 +90,4 @@ component PostParameters(params: PostParametersT) { export default (hydrate( 'div.post-parameters', PostParameters, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/Relationships.js b/root/static/scripts/common/components/Relationships.js index 297cba3db31..e0995a356ba 100644 --- a/root/static/scripts/common/components/Relationships.js +++ b/root/static/scripts/common/components/Relationships.js @@ -127,7 +127,7 @@ component _Relationship( ); } -const Relationships: React.AbstractComponent> = +const Relationships: component(...React.PropsOf<_Relationship>) = React.memo(_Relationship); export default Relationships; diff --git a/root/static/scripts/common/components/ReleaseEvents.js b/root/static/scripts/common/components/ReleaseEvents.js index 0f0c5a5542d..db70f4aadea 100644 --- a/root/static/scripts/common/components/ReleaseEvents.js +++ b/root/static/scripts/common/components/ReleaseEvents.js @@ -98,4 +98,4 @@ component ReleaseEvents( export default (hydrate>( 'div.release-events-container', ReleaseEvents, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/common/components/StaticRelationshipsDisplay.js b/root/static/scripts/common/components/StaticRelationshipsDisplay.js index 18d054be3d3..c38ff2fde53 100644 --- a/root/static/scripts/common/components/StaticRelationshipsDisplay.js +++ b/root/static/scripts/common/components/StaticRelationshipsDisplay.js @@ -141,8 +141,8 @@ component _StaticRelationshipsDisplay( return tables; } -const StaticRelationshipsDisplay: React.AbstractComponent< - React.PropsOf<_StaticRelationshipsDisplay> -> = React.memo(_StaticRelationshipsDisplay); +const StaticRelationshipsDisplay: component( + ...React.PropsOf<_StaticRelationshipsDisplay> +) = React.memo(_StaticRelationshipsDisplay); export default StaticRelationshipsDisplay; diff --git a/root/static/scripts/common/components/TagEditor.js b/root/static/scripts/common/components/TagEditor.js index f56ec0e5066..7f8d75353fa 100644 --- a/root/static/scripts/common/components/TagEditor.js +++ b/root/static/scripts/common/components/TagEditor.js @@ -645,7 +645,7 @@ export const MainTagEditor = (hydrate( } }, minimalEntity, -): React.AbstractComponent); +): component(...TagEditorProps)); export const SidebarTagEditor = (hydrate( 'div.sidebar-tags', @@ -703,7 +703,7 @@ export const SidebarTagEditor = (hydrate( } }, minimalEntity, -): React.AbstractComponent); +): component(...TagEditorProps)); function createInitialTagState( aggregatedTags: $ReadOnlyArray, diff --git a/root/static/scripts/common/components/TaggerIcon.js b/root/static/scripts/common/components/TaggerIcon.js index 9b88e27781e..0b1c298008d 100644 --- a/root/static/scripts/common/components/TaggerIcon.js +++ b/root/static/scripts/common/components/TaggerIcon.js @@ -82,5 +82,5 @@ export default ( hydrate>( 'span.tagger-icon', TaggerIcon, - ): React.AbstractComponent, void> + ): component(...React.PropsOf) ); diff --git a/root/static/scripts/common/components/WikipediaExtract.js b/root/static/scripts/common/components/WikipediaExtract.js index be741712377..c5f6737a1a3 100644 --- a/root/static/scripts/common/components/WikipediaExtract.js +++ b/root/static/scripts/common/components/WikipediaExtract.js @@ -86,4 +86,4 @@ export default (hydrate( 'div.wikipedia-extract', WikipediaExtract, minimalEntity, -): React.AbstractComponent); +): component(...Props)); diff --git a/root/static/scripts/common/components/WorkArtists.js b/root/static/scripts/common/components/WorkArtists.js index d7c7a70b30b..a596b9c24c6 100644 --- a/root/static/scripts/common/components/WorkArtists.js +++ b/root/static/scripts/common/components/WorkArtists.js @@ -36,4 +36,4 @@ component WorkArtists(artists: ?$ReadOnlyArray) { export default (hydrate>( 'div.work-artists-container', WorkArtists, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/edit/components/ArtistCreditBubble.js b/root/static/scripts/edit/components/ArtistCreditBubble.js index 543c760a305..592833bcd4e 100644 --- a/root/static/scripts/edit/components/ArtistCreditBubble.js +++ b/root/static/scripts/edit/components/ArtistCreditBubble.js @@ -311,8 +311,8 @@ component _ArtistCreditBubble( ); } -const ArtistCreditBubble: React.AbstractComponent< - React.PropsOf<_ArtistCreditBubble> -> = React.memo(_ArtistCreditBubble); +const ArtistCreditBubble: component( + ...React.PropsOf<_ArtistCreditBubble> +) = React.memo(_ArtistCreditBubble); export default ArtistCreditBubble; diff --git a/root/static/scripts/edit/components/ArtistCreditEditor.js b/root/static/scripts/edit/components/ArtistCreditEditor.js index bfb11d74a34..3a5eed01d88 100644 --- a/root/static/scripts/edit/components/ArtistCreditEditor.js +++ b/root/static/scripts/edit/components/ArtistCreditEditor.js @@ -596,8 +596,8 @@ component _ArtistCreditEditor( ); } -const ArtistCreditEditor: React.AbstractComponent< - React.PropsOf<_ArtistCreditEditor> -> = React.memo(_ArtistCreditEditor); +const ArtistCreditEditor: component( + ...React.PropsOf<_ArtistCreditEditor> +) = React.memo(_ArtistCreditEditor); export default ArtistCreditEditor; diff --git a/root/static/scripts/edit/components/ArtistCreditNameEditor.js b/root/static/scripts/edit/components/ArtistCreditNameEditor.js index 44870ab4add..cffab77a041 100644 --- a/root/static/scripts/edit/components/ArtistCreditNameEditor.js +++ b/root/static/scripts/edit/components/ArtistCreditNameEditor.js @@ -228,8 +228,8 @@ component _ArtistCreditNameEditor( ); } -const ArtistCreditNameEditor: React.AbstractComponent< - React.PropsOf<_ArtistCreditNameEditor> -> = React.memo(_ArtistCreditNameEditor); +const ArtistCreditNameEditor: component( + ...React.PropsOf<_ArtistCreditNameEditor> +) = React.memo(_ArtistCreditNameEditor); export default ArtistCreditNameEditor; diff --git a/root/static/scripts/edit/components/DateRangeFieldset.js b/root/static/scripts/edit/components/DateRangeFieldset.js index f75ec765c2b..cb97fbbbb89 100644 --- a/root/static/scripts/edit/components/DateRangeFieldset.js +++ b/root/static/scripts/edit/components/DateRangeFieldset.js @@ -222,8 +222,8 @@ component _DateRangeFieldset( ); } -const DateRangeFieldset: React.AbstractComponent< - React.PropsOf<_DateRangeFieldset> -> = React.memo(_DateRangeFieldset); +const DateRangeFieldset: component( + ...React.PropsOf<_DateRangeFieldset> +) = React.memo(_DateRangeFieldset); export default DateRangeFieldset; diff --git a/root/static/scripts/edit/components/FormRowTextList.js b/root/static/scripts/edit/components/FormRowTextList.js index 2b4c2606ca8..7553383bc42 100644 --- a/root/static/scripts/edit/components/FormRowTextList.js +++ b/root/static/scripts/edit/components/FormRowTextList.js @@ -174,4 +174,4 @@ export component NonHydratedFormRowTextList( export default (hydrate>( 'div.row.form-row-text-list-container', FormRowTextList, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/edit/components/GuessCaseOptionsPopover.js b/root/static/scripts/edit/components/GuessCaseOptionsPopover.js index 06c919cd73c..dd566446bad 100644 --- a/root/static/scripts/edit/components/GuessCaseOptionsPopover.js +++ b/root/static/scripts/edit/components/GuessCaseOptionsPopover.js @@ -62,8 +62,8 @@ component _GuessCaseOptionsPopover( ); } -const GuessCaseOptionsPopover: React.AbstractComponent< - React.PropsOf<_GuessCaseOptionsPopover> -> = React.memo(_GuessCaseOptionsPopover); +const GuessCaseOptionsPopover: component( + ...React.PropsOf<_GuessCaseOptionsPopover> +) = React.memo(_GuessCaseOptionsPopover); export default GuessCaseOptionsPopover; diff --git a/root/static/scripts/edit/components/NewNotesAlertCheckbox.js b/root/static/scripts/edit/components/NewNotesAlertCheckbox.js index 2c0bda67daf..2153d4c5ccc 100644 --- a/root/static/scripts/edit/components/NewNotesAlertCheckbox.js +++ b/root/static/scripts/edit/components/NewNotesAlertCheckbox.js @@ -36,5 +36,5 @@ export default ( hydrate>( 'span.new-notes-alert-checkbox', NewNotesAlertCheckbox, - ): React.AbstractComponent, void> + ): component(...React.PropsOf) ); diff --git a/root/static/scripts/edit/components/ReleaseMergeStrategy.js b/root/static/scripts/edit/components/ReleaseMergeStrategy.js index 3913d62449c..87de1e4f390 100644 --- a/root/static/scripts/edit/components/ReleaseMergeStrategy.js +++ b/root/static/scripts/edit/components/ReleaseMergeStrategy.js @@ -301,4 +301,4 @@ component ReleaseMergeStrategy( export default (hydrate>( 'div.release-merge-strategy', ReleaseMergeStrategy, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/edit/components/edit/RelationshipDiff.js b/root/static/scripts/edit/components/edit/RelationshipDiff.js index 0de5bb8c9f1..940edd4e138 100644 --- a/root/static/scripts/edit/components/edit/RelationshipDiff.js +++ b/root/static/scripts/edit/components/edit/RelationshipDiff.js @@ -240,8 +240,8 @@ component _RelationshipDiff( ); } -const RelationshipDiff: React.AbstractComponent< - React.PropsOf<_RelationshipDiff> -> = React.memo(_RelationshipDiff); +const RelationshipDiff: component( + ...React.PropsOf<_RelationshipDiff> +) = React.memo(_RelationshipDiff); export default RelationshipDiff; diff --git a/root/static/scripts/event/components/EventEditForm.js b/root/static/scripts/event/components/EventEditForm.js index 29f557ba99e..c7ad19fc261 100644 --- a/root/static/scripts/event/components/EventEditForm.js +++ b/root/static/scripts/event/components/EventEditForm.js @@ -367,4 +367,4 @@ component EventEditForm( export default (hydrate>( 'div.event-edit-form', EventEditForm, -): React.AbstractComponent>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/genre/components/GenreEditForm.js b/root/static/scripts/genre/components/GenreEditForm.js index 6c56d4b8b46..85c498aa82b 100644 --- a/root/static/scripts/genre/components/GenreEditForm.js +++ b/root/static/scripts/genre/components/GenreEditForm.js @@ -165,4 +165,4 @@ component GenreEditForm(form as initialForm: GenreFormT) { export default (hydrate>( 'div.genre-edit-form', GenreEditForm, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/main/components/ConfirmSeedButtons.js b/root/static/scripts/main/components/ConfirmSeedButtons.js index ad6d618ddb1..d9b55d73b09 100644 --- a/root/static/scripts/main/components/ConfirmSeedButtons.js +++ b/root/static/scripts/main/components/ConfirmSeedButtons.js @@ -47,4 +47,4 @@ component ConfirmSeedButtons(autoSubmit: boolean) { export default (hydrate( 'span.buttons.confirm-seed', ConfirmSeedButtons, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/recording/RecordingName.js b/root/static/scripts/recording/RecordingName.js index 46acac923d3..3823423e25e 100644 --- a/root/static/scripts/recording/RecordingName.js +++ b/root/static/scripts/recording/RecordingName.js @@ -59,4 +59,4 @@ export component RecordingName( export default (hydrate>( 'div.recording-name', RecordingName, -): React.AbstractComponent, void>); +): component(...React.PropsOf)); diff --git a/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js b/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js index 43a4b64f3e6..48d587e24d7 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js +++ b/root/static/scripts/relationship-editor/components/DialogAttribute/BooleanAttribute.js @@ -64,8 +64,8 @@ component _BooleanAttribute( ); } -const BooleanAttribute: React.AbstractComponent< - React.PropsOf<_BooleanAttribute> -> = React.memo(_BooleanAttribute); +const BooleanAttribute: component( + ...React.PropsOf<_BooleanAttribute> + ) = React.memo(_BooleanAttribute); export default BooleanAttribute; diff --git a/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js b/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js index 20900439faf..2d802ec3970 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js +++ b/root/static/scripts/relationship-editor/components/DialogAttribute/TextAttribute.js @@ -59,8 +59,8 @@ component _TextAttribute( ); } -const TextAttribute: React.AbstractComponent< - React.PropsOf<_TextAttribute> -> = React.memo(_TextAttribute); +const TextAttribute: component( + ...React.PropsOf<_TextAttribute> +) = React.memo(_TextAttribute); export default TextAttribute; diff --git a/root/static/scripts/relationship-editor/components/DialogAttributes.js b/root/static/scripts/relationship-editor/components/DialogAttributes.js index 18120033954..b559d068952 100644 --- a/root/static/scripts/relationship-editor/components/DialogAttributes.js +++ b/root/static/scripts/relationship-editor/components/DialogAttributes.js @@ -476,8 +476,8 @@ component _DialogAttributes( ); } -const DialogAttributes: React.AbstractComponent< - React.PropsOf<_DialogAttributes> -> = React.memo(_DialogAttributes); +const DialogAttributes: component( + ...React.PropsOf<_DialogAttributes> +) = React.memo(_DialogAttributes); export default DialogAttributes; diff --git a/root/static/scripts/relationship-editor/components/DialogButtons.js b/root/static/scripts/relationship-editor/components/DialogButtons.js index 94acf72c2eb..7020e00c2c8 100644 --- a/root/static/scripts/relationship-editor/components/DialogButtons.js +++ b/root/static/scripts/relationship-editor/components/DialogButtons.js @@ -36,8 +36,8 @@ component _DialogButtons( ); } -const DialogButtons: React.AbstractComponent< - React.PropsOf<_DialogButtons> -> = React.memo(_DialogButtons); +const DialogButtons: component( + ...React.PropsOf<_DialogButtons> +) = React.memo(_DialogButtons); export default DialogButtons; diff --git a/root/static/scripts/relationship-editor/components/DialogDatePeriod.js b/root/static/scripts/relationship-editor/components/DialogDatePeriod.js index fc3f62719a3..3c934a15abc 100644 --- a/root/static/scripts/relationship-editor/components/DialogDatePeriod.js +++ b/root/static/scripts/relationship-editor/components/DialogDatePeriod.js @@ -228,8 +228,8 @@ component _DialogDatePeriod( ); } -const DialogDatePeriod: React.AbstractComponent< - React.PropsOf<_DialogDatePeriod> -> = React.memo(_DialogDatePeriod); +const DialogDatePeriod: component( + ...React.PropsOf<_DialogDatePeriod> +) = React.memo(_DialogDatePeriod); export default DialogDatePeriod; diff --git a/root/static/scripts/relationship-editor/components/DialogEntityCredit.js b/root/static/scripts/relationship-editor/components/DialogEntityCredit.js index fd99f8403bf..44093f45032 100644 --- a/root/static/scripts/relationship-editor/components/DialogEntityCredit.js +++ b/root/static/scripts/relationship-editor/components/DialogEntityCredit.js @@ -215,8 +215,8 @@ component _DialogEntityCredit( ); } -const DialogEntityCredit: React.AbstractComponent< - React.PropsOf<_DialogEntityCredit> -> = React.memo(_DialogEntityCredit); +const DialogEntityCredit: component( + ...React.PropsOf<_DialogEntityCredit> +) = React.memo(_DialogEntityCredit); export default DialogEntityCredit; diff --git a/root/static/scripts/relationship-editor/components/DialogLinkOrder.js b/root/static/scripts/relationship-editor/components/DialogLinkOrder.js index 1f048ead5b5..6b7bd49b329 100644 --- a/root/static/scripts/relationship-editor/components/DialogLinkOrder.js +++ b/root/static/scripts/relationship-editor/components/DialogLinkOrder.js @@ -58,8 +58,8 @@ component _DialogLinkOrder( ); } -const DialogLinkOrder: React.AbstractComponent< - React.PropsOf<_DialogLinkOrder> -> = React.memo(_DialogLinkOrder); +const DialogLinkOrder: component( + ...React.PropsOf<_DialogLinkOrder> +) = React.memo(_DialogLinkOrder); export default DialogLinkOrder; diff --git a/root/static/scripts/relationship-editor/components/DialogLinkType.js b/root/static/scripts/relationship-editor/components/DialogLinkType.js index 6b6ce473d69..6f2849bb57c 100644 --- a/root/static/scripts/relationship-editor/components/DialogLinkType.js +++ b/root/static/scripts/relationship-editor/components/DialogLinkType.js @@ -261,7 +261,7 @@ function accumulateDialogAttributeByRootId( } const LinkTypeAutocomplete: - React.AbstractComponent> = + component(...AutocompletePropsT) = Autocomplete2; component _DialogLinkType( diff --git a/root/static/scripts/relationship-editor/components/DialogPreview.js b/root/static/scripts/relationship-editor/components/DialogPreview.js index 4484b884ab2..384dfba3248 100644 --- a/root/static/scripts/relationship-editor/components/DialogPreview.js +++ b/root/static/scripts/relationship-editor/components/DialogPreview.js @@ -232,8 +232,8 @@ component _DialogPreview( ); } -const DialogPreview: React.AbstractComponent< - React.PropsOf<_DialogPreview> -> = React.memo(_DialogPreview); +const DialogPreview: component( + ...React.PropsOf<_DialogPreview> +) = React.memo(_DialogPreview); export default DialogPreview; diff --git a/root/static/scripts/relationship-editor/components/DialogSourceEntity.js b/root/static/scripts/relationship-editor/components/DialogSourceEntity.js index f5fdd967c9a..0e180d0ae2f 100644 --- a/root/static/scripts/relationship-editor/components/DialogSourceEntity.js +++ b/root/static/scripts/relationship-editor/components/DialogSourceEntity.js @@ -132,8 +132,8 @@ component _DialogSourceEntity( ); } -const DialogSourceEntity: React.AbstractComponent< - React.PropsOf<_DialogSourceEntity> -> = React.memo(_DialogSourceEntity); +const DialogSourceEntity: component( + ...React.PropsOf<_DialogSourceEntity> +) = React.memo(_DialogSourceEntity); export default DialogSourceEntity; diff --git a/root/static/scripts/relationship-editor/components/DialogTargetType.js b/root/static/scripts/relationship-editor/components/DialogTargetType.js index 5e357bfbdbe..df59806040a 100644 --- a/root/static/scripts/relationship-editor/components/DialogTargetType.js +++ b/root/static/scripts/relationship-editor/components/DialogTargetType.js @@ -59,8 +59,8 @@ component _DialogTargetType( ); } -const DialogTargetType: React.AbstractComponent< - React.PropsOf<_DialogTargetType> -> = React.memo(_DialogTargetType); +const DialogTargetType: component( + ...React.PropsOf<_DialogTargetType> +) = React.memo(_DialogTargetType); export default DialogTargetType; diff --git a/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js b/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js index ca4a65b34af..cdaa506696b 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js +++ b/root/static/scripts/relationship-editor/components/RelationshipDialogContent.js @@ -1013,9 +1013,9 @@ component _RelationshipDialogContent(...props: PropsT) { ); } -const RelationshipDialogContent: React.AbstractComponent< - React.PropsOf<_RelationshipDialogContent> -> = React.memo(_RelationshipDialogContent); +const RelationshipDialogContent: component( + ...React.PropsOf<_RelationshipDialogContent> +) = React.memo(_RelationshipDialogContent); function getBatchSelectionMessage(sourceType: RelatableEntityTypeT) { switch (sourceType) { diff --git a/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js b/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js index 89c5a1af79e..6275d03581a 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js +++ b/root/static/scripts/relationship-editor/components/RelationshipEditorWrapper.js @@ -57,7 +57,7 @@ component _RelationshipEditorWrapper(...props: PropsT) { } export const NonHydratedRelationshipEditorWrapper: - React.AbstractComponent = + component(...PropsT) = withLoadedTypeInfoForRelationshipEditor( _RelationshipEditorWrapper, ); @@ -65,6 +65,6 @@ export const NonHydratedRelationshipEditorWrapper: const RelationshipEditorWrapper = (hydrate( 'div.relationship-editor', NonHydratedRelationshipEditorWrapper, -): React.AbstractComponent); +): component(...PropsT)); export default RelationshipEditorWrapper; diff --git a/root/static/scripts/relationship-editor/components/RelationshipItem.js b/root/static/scripts/relationship-editor/components/RelationshipItem.js index 7ce6ffdc8a7..f43d2d386d9 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipItem.js +++ b/root/static/scripts/relationship-editor/components/RelationshipItem.js @@ -281,9 +281,9 @@ component _RelationshipItem( ); } -const RelationshipItem: React.AbstractComponent< - React.PropsOf<_RelationshipItem> -> = React.memo(_RelationshipItem); +const RelationshipItem: component( + ...React.PropsOf<_RelationshipItem> +) = React.memo(_RelationshipItem); function getRelationshipStyling(relationship: RelationshipStateT) { return 'rel-' + getRelationshipStatusName(relationship); diff --git a/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js b/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js index ba4f1c73ad2..e6db43db57b 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js +++ b/root/static/scripts/relationship-editor/components/RelationshipLinkTypeGroup.js @@ -52,8 +52,8 @@ component _RelationshipLinkTypeGroup( return elements; } -const RelationshipLinkTypeGroup: React.AbstractComponent< - React.PropsOf<_RelationshipLinkTypeGroup> -> = React.memo(_RelationshipLinkTypeGroup); +const RelationshipLinkTypeGroup: component( + ...React.PropsOf<_RelationshipLinkTypeGroup> +) = React.memo(_RelationshipLinkTypeGroup); export default RelationshipLinkTypeGroup; diff --git a/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js b/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js index b7727b0fdf4..1732dc61bba 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js +++ b/root/static/scripts/relationship-editor/components/RelationshipPhraseGroup.js @@ -302,8 +302,8 @@ component _RelationshipPhraseGroup( ) : null; } -const RelationshipPhraseGroup: React.AbstractComponent< - React.PropsOf<_RelationshipPhraseGroup> -> = React.memo(_RelationshipPhraseGroup); +const RelationshipPhraseGroup: component( + ...React.PropsOf<_RelationshipPhraseGroup> +) = React.memo(_RelationshipPhraseGroup); export default RelationshipPhraseGroup; diff --git a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js index c10b9cc3473..44df9b354e6 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js +++ b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroup.js @@ -55,8 +55,8 @@ component _RelationshipTargetTypeGroup( return elements; } -const RelationshipTargetTypeGroup: React.AbstractComponent< - React.PropsOf<_RelationshipTargetTypeGroup> -> = React.memo(_RelationshipTargetTypeGroup); +const RelationshipTargetTypeGroup: component( + ...React.PropsOf<_RelationshipTargetTypeGroup> +) = React.memo(_RelationshipTargetTypeGroup); export default RelationshipTargetTypeGroup; diff --git a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js index 55748ab9df3..a923bb115b7 100644 --- a/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js +++ b/root/static/scripts/relationship-editor/components/RelationshipTargetTypeGroups.js @@ -113,8 +113,8 @@ component _RelationshipTargetTypeGroups( ); } -const RelationshipTargetTypeGroups: React.AbstractComponent< - React.PropsOf<_RelationshipTargetTypeGroups> -> = React.memo(_RelationshipTargetTypeGroups); +const RelationshipTargetTypeGroups: component( + ...React.PropsOf<_RelationshipTargetTypeGroups> +) = React.memo(_RelationshipTargetTypeGroups); export default RelationshipTargetTypeGroups; diff --git a/root/static/scripts/release/components/BatchCreateWorksDialog.js b/root/static/scripts/release/components/BatchCreateWorksDialog.js index 9841cc9454f..71e96794650 100644 --- a/root/static/scripts/release/components/BatchCreateWorksDialog.js +++ b/root/static/scripts/release/components/BatchCreateWorksDialog.js @@ -334,6 +334,6 @@ component _BatchCreateWorksButtonPopover( ); } -export const BatchCreateWorksButtonPopover: React.AbstractComponent< - React.PropsOf<_BatchCreateWorksButtonPopover> -> = React.memo(_BatchCreateWorksButtonPopover); +export const BatchCreateWorksButtonPopover: component( + ...React.PropsOf<_BatchCreateWorksButtonPopover> +) = React.memo(_BatchCreateWorksButtonPopover); diff --git a/root/static/scripts/release/components/EditWorkDialog.js b/root/static/scripts/release/components/EditWorkDialog.js index 55153601212..3509d231d75 100644 --- a/root/static/scripts/release/components/EditWorkDialog.js +++ b/root/static/scripts/release/components/EditWorkDialog.js @@ -187,8 +187,8 @@ component _EditWorkDialog( ); } -const EditWorkDialog: React.AbstractComponent< - React.PropsOf<_EditWorkDialog> -> = React.memo(_EditWorkDialog); +const EditWorkDialog: component( + ...React.PropsOf<_EditWorkDialog> +) = React.memo(_EditWorkDialog); export default EditWorkDialog; diff --git a/root/static/scripts/release/components/MediumRelationshipEditor.js b/root/static/scripts/release/components/MediumRelationshipEditor.js index dd09023980f..4665899e197 100644 --- a/root/static/scripts/release/components/MediumRelationshipEditor.js +++ b/root/static/scripts/release/components/MediumRelationshipEditor.js @@ -188,8 +188,8 @@ component _MediumRelationshipEditor( ); } -const MediumRelationshipEditor: React.AbstractComponent< - React.PropsOf<_MediumRelationshipEditor> -> = React.memo(_MediumRelationshipEditor); +const MediumRelationshipEditor: component( + ...React.PropsOf<_MediumRelationshipEditor> +) = React.memo(_MediumRelationshipEditor); export default MediumRelationshipEditor; diff --git a/root/static/scripts/release/components/MediumTable.js b/root/static/scripts/release/components/MediumTable.js index d8880be0947..43ac7c3d3da 100644 --- a/root/static/scripts/release/components/MediumTable.js +++ b/root/static/scripts/release/components/MediumTable.js @@ -137,8 +137,8 @@ component _MediumTable( ); } -const MediumTable: React.AbstractComponent< - React.PropsOf<_MediumTable> -> = React.memo(_MediumTable); +const MediumTable: component( + ...React.PropsOf<_MediumTable> +) = React.memo(_MediumTable); export default MediumTable; diff --git a/root/static/scripts/release/components/MediumToolbox.js b/root/static/scripts/release/components/MediumToolbox.js index e3db12fe66d..bdad8694fb3 100644 --- a/root/static/scripts/release/components/MediumToolbox.js +++ b/root/static/scripts/release/components/MediumToolbox.js @@ -54,9 +54,9 @@ component _ToggleAllMediumsButtons( ); } -export const ToggleAllMediumsButtons: React.AbstractComponent< - React.PropsOf<_ToggleAllMediumsButtons> -> = React.memo(_ToggleAllMediumsButtons); +export const ToggleAllMediumsButtons: component( + ...React.PropsOf<_ToggleAllMediumsButtons> +) = React.memo(_ToggleAllMediumsButtons); component _MediumToolbox( creditsMode: CreditsModeT, @@ -90,8 +90,8 @@ component _MediumToolbox( ); } -const MediumToolbox: React.AbstractComponent< - React.PropsOf<_MediumToolbox> -> = React.memo(_MediumToolbox); +const MediumToolbox: component( + ...React.PropsOf<_MediumToolbox> +) = React.memo(_MediumToolbox); export default MediumToolbox; diff --git a/root/static/scripts/release/components/MediumTrackRow.js b/root/static/scripts/release/components/MediumTrackRow.js index e37f2e00160..1d9893c13ba 100644 --- a/root/static/scripts/release/components/MediumTrackRow.js +++ b/root/static/scripts/release/components/MediumTrackRow.js @@ -84,8 +84,8 @@ component _MediumTrackRow( ); } -const MediumTrackRow: React.AbstractComponent< - React.PropsOf<_MediumTrackRow> -> = React.memo(_MediumTrackRow); +const MediumTrackRow: component( + ...React.PropsOf<_MediumTrackRow> +) = React.memo(_MediumTrackRow); export default MediumTrackRow; diff --git a/root/static/scripts/release/components/RelationshipEditorBatchTools.js b/root/static/scripts/release/components/RelationshipEditorBatchTools.js index 50100489462..38fd3af3f25 100644 --- a/root/static/scripts/release/components/RelationshipEditorBatchTools.js +++ b/root/static/scripts/release/components/RelationshipEditorBatchTools.js @@ -165,8 +165,8 @@ component _RelationshipEditorBatchTools( ); } -const RelationshipEditorBatchTools: React.AbstractComponent< - React.PropsOf<_RelationshipEditorBatchTools> -> = React.memo(_RelationshipEditorBatchTools); +const RelationshipEditorBatchTools: component( + ...React.PropsOf<_RelationshipEditorBatchTools> +) = React.memo(_RelationshipEditorBatchTools); export default RelationshipEditorBatchTools; diff --git a/root/static/scripts/release/components/ReleaseRelationshipEditor.js b/root/static/scripts/release/components/ReleaseRelationshipEditor.js index 924137ac0c7..40bb7ccab48 100644 --- a/root/static/scripts/release/components/ReleaseRelationshipEditor.js +++ b/root/static/scripts/release/components/ReleaseRelationshipEditor.js @@ -1857,7 +1857,7 @@ component _ReleaseRelationshipEditor() { ); } -const NonHydratedReleaseRelationshipEditor: React.AbstractComponent<{}> = +const NonHydratedReleaseRelationshipEditor: component(...{}) = withLoadedTypeInfoForRelationshipEditor<{}>( _ReleaseRelationshipEditor, ['language', 'work_type'], @@ -1866,6 +1866,6 @@ const NonHydratedReleaseRelationshipEditor: React.AbstractComponent<{}> = const ReleaseRelationshipEditor = (hydrate<{}>( 'div.release-relationship-editor', NonHydratedReleaseRelationshipEditor, -): React.AbstractComponent<{}, void>); +): component(...{})); export default ReleaseRelationshipEditor; diff --git a/root/static/scripts/release/components/TrackRelationshipEditor.js b/root/static/scripts/release/components/TrackRelationshipEditor.js index e5daa7b116e..f94ec5945c4 100644 --- a/root/static/scripts/release/components/TrackRelationshipEditor.js +++ b/root/static/scripts/release/components/TrackRelationshipEditor.js @@ -495,9 +495,9 @@ component _TrackRelationshipEditor( ); } -const TrackRelationshipEditor: React.AbstractComponent< - React.PropsOf<_TrackRelationshipEditor> -> = React.memo(_TrackRelationshipEditor); +const TrackRelationshipEditor: component( + ...React.PropsOf<_TrackRelationshipEditor> +) = React.memo(_TrackRelationshipEditor); TrackRelationshipEditor.displayName = 'TrackRelationshipEditor'; diff --git a/root/static/scripts/release/components/TracklistAndCredits.js b/root/static/scripts/release/components/TracklistAndCredits.js index e83e7976a65..864215c276c 100644 --- a/root/static/scripts/release/components/TracklistAndCredits.js +++ b/root/static/scripts/release/components/TracklistAndCredits.js @@ -411,11 +411,11 @@ component _TracklistAndCredits( ); } -const TracklistAndCredits: React.AbstractComponent< - React.PropsOf<_TracklistAndCredits> -> = React.memo(_TracklistAndCredits); +const TracklistAndCredits: component( + ...React.PropsOf<_TracklistAndCredits> +) = React.memo(_TracklistAndCredits); export default (hydrate>( 'div.tracklist-and-credits', TracklistAndCredits, -): React.AbstractComponent, void>); +): component(...React.PropsOf<_TracklistAndCredits>)); diff --git a/root/static/scripts/release/components/WorkLanguageMultiselect.js b/root/static/scripts/release/components/WorkLanguageMultiselect.js index 074e416c052..dc0adf01684 100644 --- a/root/static/scripts/release/components/WorkLanguageMultiselect.js +++ b/root/static/scripts/release/components/WorkLanguageMultiselect.js @@ -120,14 +120,13 @@ const LanguageMultiselect = ( // eslint-disable-next-line ft-flow/enforce-suppression-code // $FlowIgnore Multiselect: - React.AbstractComponent< - MultiselectPropsT< + component( + ...MultiselectPropsT< LanguageT, MultiselectLanguageValueStateT, MultiselectLanguageStateT, - >, - mixed, - > + > + ) ); const WorkLanguageMultiselect: React.AbstractComponent< diff --git a/root/static/scripts/release/components/WorkTypeSelect.js b/root/static/scripts/release/components/WorkTypeSelect.js index 4ce479a1cfe..fb60bcfd043 100644 --- a/root/static/scripts/release/components/WorkTypeSelect.js +++ b/root/static/scripts/release/components/WorkTypeSelect.js @@ -68,8 +68,8 @@ component _WorkTypeSelect( ); } -const WorkTypeSelect: React.AbstractComponent< - React.PropsOf<_WorkTypeSelect> -> = React.memo(_WorkTypeSelect); +const WorkTypeSelect: component( + ...React.PropsOf<_WorkTypeSelect> +) = React.memo(_WorkTypeSelect); export default WorkTypeSelect; diff --git a/root/static/scripts/series/components/SeriesRelationshipEditor.js b/root/static/scripts/series/components/SeriesRelationshipEditor.js index a827c24a236..6892809dc5b 100644 --- a/root/static/scripts/series/components/SeriesRelationshipEditor.js +++ b/root/static/scripts/series/components/SeriesRelationshipEditor.js @@ -179,7 +179,7 @@ component _SeriesRelationshipEditor(...props: PropsT) { ); } -const NonHydratedSeriesRelationshipEditor: React.AbstractComponent = +const NonHydratedSeriesRelationshipEditor: component(...PropsT) = withLoadedTypeInfoForRelationshipEditor( _SeriesRelationshipEditor, ); @@ -187,6 +187,6 @@ const NonHydratedSeriesRelationshipEditor: React.AbstractComponent = const SeriesRelationshipEditor = (hydrate( 'div.relationship-editor', NonHydratedSeriesRelationshipEditor, -): React.AbstractComponent); +): component(...PropsT)); export default SeriesRelationshipEditor; diff --git a/root/static/scripts/url/components/UrlRelationshipEditor.js b/root/static/scripts/url/components/UrlRelationshipEditor.js index 7e9c60339c6..b838f8865a4 100644 --- a/root/static/scripts/url/components/UrlRelationshipEditor.js +++ b/root/static/scripts/url/components/UrlRelationshipEditor.js @@ -63,7 +63,7 @@ component _UrlRelationshipEditor(...props: PropsT) { ); } -const NonHydratedUrlRelationshipEditor: React.AbstractComponent = +const NonHydratedUrlRelationshipEditor: component(...PropsT) = withLoadedTypeInfoForRelationshipEditor( _UrlRelationshipEditor, ); @@ -71,6 +71,6 @@ const NonHydratedUrlRelationshipEditor: React.AbstractComponent = const UrlRelationshipEditor = (hydrate( 'div.relationship-editor', NonHydratedUrlRelationshipEditor, -): React.AbstractComponent); +): component(...PropsT)); export default UrlRelationshipEditor; diff --git a/yarn.lock b/yarn.lock index 54b8f297e1a..b90ff846b14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4396,12 +4396,12 @@ __metadata: languageName: node linkType: hard -"flow-bin@npm:0.250.0": - version: 0.250.0 - resolution: "flow-bin@npm:0.250.0" +"flow-bin@npm:0.251.1": + version: 0.251.1 + resolution: "flow-bin@npm:0.251.1" bin: flow: cli.js - checksum: 10c0/9ca0e669945594ba60b0583ce1d88abdc9c731410b9906ed61bcc254beaa6df0905578284318696a2a562eb82d94db1756b567848693a4af6660ac386aac142a + checksum: 10c0/eff0a30bc9330a1b101ae280590160f6817ec39c68dc7db133ff0dbd226072582aab0b86737da56d50b6b785a5efa629deca8af86bae9a39775988fabc69082f languageName: node linkType: hard @@ -6346,7 +6346,7 @@ __metadata: eslint-plugin-simple-import-sort: "npm:^7.0.0" fast-diff: "npm:1.3.0" filesize: "npm:10.1.4" - flow-bin: "npm:0.250.0" + flow-bin: "npm:0.251.1" generic-diff: "npm:1.0.1" gettext-parser: "npm:4.2.0" globals: "npm:15.9.0"