From 3caf8b2dcb43d6e52b89012b311e0636de3e1bdd Mon Sep 17 00:00:00 2001 From: Mozafar Haider Date: Wed, 11 Sep 2024 18:42:28 +0100 Subject: [PATCH 1/4] upgrade for vite --- .gitignore | 1 + d2.config.js | 2 +- i18n/en.pot | 89 +- src/{App.js => App.jsx} | 0 .../{BasicOptions.js => BasicOptions.jsx} | 0 .../{DatePicker.js => DatePicker.jsx} | 0 ...DatePicker.test.js => DatePicker.test.jsx} | 0 ...DatePickerField.js => DatePickerField.jsx} | 0 .../__snapshots__/DatePicker.test.jsx.snap | 44 + .../{DurationField.js => DurationField.jsx} | 0 ...entIdScheme.js => DataElementIdScheme.jsx} | 0 .../{EventIdScheme.js => EventIdScheme.jsx} | 0 .../{IdScheme.js => IdScheme.jsx} | 0 ...OrgUnitIdScheme.js => OrgUnitIdScheme.jsx} | 0 ...SchemeContainer.js => SchemeContainer.jsx} | 0 .../{FileUpload.js => FileUpload.jsx} | 0 .../{FormAlerts.js => FormAlerts.jsx} | 0 ...FormAlerts.test.js => FormAlerts.test.jsx} | 0 .../__snapshots__/FormAlerts.test.jsx.snap | 5 + .../FormField/{FormField.js => FormField.jsx} | 0 .../{FormField.test.js => FormField.test.jsx} | 0 .../__snapshots__/FormField.test.jsx.snap | 16 + ...ePicker.js => GeometryAttributePicker.jsx} | 0 .../{GeometryFormat.js => GeometryFormat.jsx} | 0 ...ertyMatch.js => GeometryPropertyMatch.jsx} | 0 src/components/Geometry/index.js | 6 +- src/components/Icon/{Icon.js => Icon.jsx} | 0 .../Icon/{Icon.test.js => Icon.test.jsx} | 0 .../Icon/__snapshots__/Icon.test.jsx.snap | 15 + ...rtButtonStrip.js => ImportButtonStrip.jsx} | 0 ...rip.test.js => ImportButtonStrip.test.jsx} | 0 .../ImportButtonStrip.test.jsx.snap | 44 + ...signedUserMode.js => AssignedUserMode.jsx} | 0 .../Inputs/{AtomicMode.js => AtomicMode.jsx} | 0 .../Inputs/{ClassKey.js => ClassKey.jsx} | 0 .../{Compression.js => Compression.jsx} | 0 ...entIdScheme.js => DataElementIdScheme.jsx} | 0 .../{DataSetPicker.js => DataSetPicker.jsx} | 0 src/components/Inputs/{Dates.js => Dates.jsx} | 0 .../Inputs/{EndDate.js => EndDate.jsx} | 2 +- .../{EventIdScheme.js => EventIdScheme.jsx} | 0 .../{ExportButton.js => ExportButton.jsx} | 0 .../Inputs/{FileUpload.js => FileUpload.jsx} | 2 +- ...rstRowIsHeader.js => FirstRowIsHeader.jsx} | 0 .../Inputs/{FlushMode.js => FlushMode.jsx} | 0 .../{FollowUpStatus.js => FollowUpStatus.jsx} | 0 .../Inputs/{FormAlerts.js => FormAlerts.jsx} | 0 .../Inputs/{Format.js => Format.jsx} | 0 .../Inputs/{IdScheme.js => IdScheme.jsx} | 0 .../Inputs/{Identifier.js => Identifier.jsx} | 0 ...rtButtonStrip.js => ImportButtonStrip.jsx} | 0 ...portReportMode.js => ImportReportMode.jsx} | 0 .../{ImportStrategy.js => ImportStrategy.jsx} | 0 ...Attributes.js => IncludeAllAttributes.jsx} | 0 ...IncludeChildren.js => IncludeChildren.jsx} | 0 .../{IncludeDeleted.js => IncludeDeleted.jsx} | 0 .../Inputs/{Inclusion.js => Inclusion.jsx} | 0 ...usionStrategy.js => InclusionStrategy.jsx} | 0 .../Inputs/{IsAsync.js => IsAsync.jsx} | 0 ...tedDuration.js => LastUpdatedDuration.jsx} | 2 +- ...datedEndDate.js => LastUpdatedEndDate.jsx} | 2 +- ...UpdatedFilter.js => LastUpdatedFilter.jsx} | 0 ...dStartDate.js => LastUpdatedStartDate.jsx} | 2 +- .../Inputs/{MergeMode.js => MergeMode.jsx} | 0 .../Inputs/{ObjectType.js => ObjectType.jsx} | 0 .../Inputs/{Objects.js => Objects.jsx} | 0 ...OrgUnitIdScheme.js => OrgUnitIdScheme.jsx} | 0 ...dSchemeCore.js => OrgUnitIdSchemeCore.jsx} | 0 .../{OrgUnitMode.js => OrgUnitMode.jsx} | 0 .../{OrgUnitTree.js => OrgUnitTree.jsx} | 2 +- .../{PreheatCache.js => PreheatCache.jsx} | 0 .../{PreheatMode.js => PreheatMode.jsx} | 0 .../{ProgramEndDate.js => ProgramEndDate.jsx} | 2 +- .../{ProgramPicker.js => ProgramPicker.jsx} | 0 .../{ProgramStages.js => ProgramStages.jsx} | 2 +- ...ogramStartDate.js => ProgramStartDate.jsx} | 2 +- .../{ProgramStatus.js => ProgramStatus.jsx} | 0 .../Inputs/{Schemas.js => Schemas.jsx} | 2 +- .../Inputs/{SkipAudit.js => SkipAudit.jsx} | 0 ...ExistingCheck.js => SkipExistingCheck.jsx} | 0 .../{SkipSharing.js => SkipSharing.jsx} | 0 .../{SkipValidation.js => SkipValidation.jsx} | 0 .../Inputs/{StartDate.js => StartDate.jsx} | 2 +- .../Inputs/{Strategy.js => Strategy.jsx} | 0 .../{TEITypeFilter.js => TEITypeFilter.jsx} | 0 .../{TETypePicker.js => TETypePicker.jsx} | 0 .../Inputs/{UserPicker.js => UserPicker.jsx} | 0 ...mPicker.test.js => ProgramPicker.test.jsx} | 2 +- src/components/Inputs/index.js | 110 +- .../{ChipContainer.js => ChipContainer.jsx} | 0 .../{JobOverview.js => JobOverview.jsx} | 6 +- .../MenuLabel/{MenuLabel.js => MenuLabel.jsx} | 0 ...bOverview.test.js => JobOverview.test.jsx} | 2 +- .../{MenuLabel.test.js => MenuLabel.test.jsx} | 2 +- .../__snapshots__/JobOverview.test.jsx.snap | 38 + .../__snapshots__/MenuLabel.test.jsx.snap | 38 + src/components/JobOverview/helper.js | 2 +- .../Details/{Details.js => Details.jsx} | 0 .../{JobSummary.js => JobSummary.jsx} | 6 +- .../JobSummary/Log/{Log.js => Log.jsx} | 0 .../Messages/{Messages.js => Messages.jsx} | 0 .../{MiniJobSummary.js => MiniJobSummary.jsx} | 2 +- ...leStatusTable.js => SingleStatusTable.jsx} | 0 .../{SingleSummary.js => SingleSummary.jsx} | 2 +- .../Summary/{Summary.js => Summary.jsx} | 4 +- .../TypeCount/{TypeCount.js => TypeCount.jsx} | 0 ...ReportSummary.js => TypeReportSummary.jsx} | 6 +- .../{Details.test.js => Details.test.jsx} | 2 +- ...JobSummary.test.js => JobSummary.test.jsx} | 2 +- .../__test__/{Log.test.js => Log.test.jsx} | 2 +- .../{Messages.test.js => Messages.test.jsx} | 2 +- ...ble.test.js => SingleStatusTable.test.jsx} | 2 +- ...Summary.test.js => SingleSummary.test.jsx} | 2 +- .../{Summary.test.js => Summary.test.jsx} | 2 +- .../{TypeCount.test.js => TypeCount.test.jsx} | 2 +- ...ary.test.js => TypeReportSummary.test.jsx} | 2 +- .../__snapshots__/Details.test.jsx.snap | 233 + .../__snapshots__/JobSummary.test.jsx.snap | 1229 +++++ .../__test__/__snapshots__/Log.test.jsx.snap | 124 + .../__snapshots__/Messages.test.jsx.snap | 116 + .../SingleStatusTable.test.jsx.snap | 53 + .../__snapshots__/SingleSummary.test.jsx.snap | 222 + .../__snapshots__/Summary.test.jsx.snap | 807 +++ .../__snapshots__/TypeCount.test.jsx.snap | 152 + .../TypeReportSummary.test.jsx.snap | 359 ++ .../{MergeOperation.js => MergeOperation.jsx} | 0 .../{MoreOptions.js => MoreOptions.jsx} | 0 ...reOptions.test.js => MoreOptions.test.jsx} | 0 .../__snapshots__/MoreOptions.test.jsx.snap | 136 + ...gUnitTreeField.js => OrgUnitTreeField.jsx} | 0 src/components/Page/{Page.js => Page.jsx} | 0 .../Page/{Page.test.js => Page.test.jsx} | 0 .../Page/__snapshots__/Page.test.jsx.snap | 614 +++ .../{ProgramStages.js => ProgramStages.jsx} | 0 .../{RadioGroup.js => RadioGroup.jsx} | 0 ...RadioGroup.test.js => RadioGroup.test.jsx} | 0 ...RadioGroupField.js => RadioGroupField.jsx} | 0 .../__snapshots__/RadioGroup.test.jsx.snap | 153 + .../{ResourcePicker.js => ResourcePicker.jsx} | 0 ...PickerField.js => ResourcePickerField.jsx} | 0 .../Router/{Router.js => Router.jsx} | 2 +- .../{ScrollToTop.js => ScrollToTop.jsx} | 0 .../{SchemaGroup.js => SchemaGroup.jsx} | 0 .../Schemas/{Schemas.js => Schemas.jsx} | 2 +- .../{SchemasField.js => SchemasField.jsx} | 0 .../Select/{Select.js => Select.jsx} | 0 .../{Select.test.js => Select.test.jsx} | 0 .../{SelectField.js => SelectField.jsx} | 0 .../Select/__snapshots__/Select.test.jsx.snap | 77 + ...nHeader.js => ExportMenuSectionHeader.jsx} | 2 +- ...nHeader.js => ImportMenuSectionHeader.jsx} | 2 +- ...SectionHeader.js => MenuSectionHeader.jsx} | 0 .../Sidebar/{Sidebar.js => Sidebar.jsx} | 4 +- .../{StyledField.js => StyledField.jsx} | 0 .../Switch/{Switch.js => Switch.jsx} | 0 .../Tooltip/{Tooltip.js => Tooltip.jsx} | 0 ...dationSummary.js => ValidationSummary.jsx} | 0 ...thority.test.js => WithAuthority.test.jsx} | 0 src/components/index.js | 72 +- src/hooks/useTasks.js | 2 +- .../{DataExport.js => DataExport.jsx} | 0 src/pages/DataExport/form-helper.js | 2 +- .../{DataImport.js => DataImport.jsx} | 0 ...hEngineImport.js => EarthEngineImport.jsx} | 6 +- ...mportForm.js => EarthEngineImportForm.jsx} | 16 +- ...atedGeometry.js => AssociatedGeometry.jsx} | 2 +- ...appingTable.js => BandCocMappingTable.jsx} | 2 +- .../{DataElements.js => DataElements.jsx} | 2 +- .../{DataPreview.js => DataPreview.jsx} | 4 +- .../{EarthEngineId.js => EarthEngineId.jsx} | 0 ...gUnitDimension.js => OrgUnitDimension.jsx} | 0 ...nisationUnits.js => OrganisationUnits.jsx} | 4 +- .../components/{Periods.js => Periods.jsx} | 0 ....js => PopulationAgegroupsDataPreview.jsx} | 2 +- ...taPreview.js => PopulationDataPreview.jsx} | 0 .../components/{Rounding.js => Rounding.jsx} | 0 ...eryProvider.js => CachedQueryProvider.jsx} | 0 .../util/earthEngineHelper.js | 3 + .../util/getEarthEngineConfig.js | 2 +- .../{EventExport.js => EventExport.jsx} | 0 src/pages/EventExport/form-helper.js | 2 +- .../{EventImport.js => EventImport.jsx} | 0 .../{GMLImport.js => GMLImport.jsx} | 2 +- .../{GeometryImport.js => GeometryImport.jsx} | 0 src/pages/Home/{Home.js => Home.jsx} | 2 +- src/pages/Home/{HomeCard.js => HomeCard.jsx} | 0 src/pages/Home/pages.js | 22 +- .../{JobOverview.js => JobOverview.jsx} | 0 ...Export.js => MetadataDependencyExport.jsx} | 0 .../{MetadataExport.js => MetadataExport.jsx} | 0 .../{MetadataImport.js => MetadataImport.jsx} | 0 .../TEIExport/{TEIExport.js => TEIExport.jsx} | 0 src/pages/TEIExport/form-helper.js | 2 +- .../TEIImport/{TEIImport.js => TEIImport.jsx} | 0 src/pages/index.js | 28 +- src/utils/{tasks.js => tasks.jsx} | 2 +- yalc.lock | 11 + yarn.lock | 4676 ++++++----------- 198 files changed, 6363 insertions(+), 3272 deletions(-) rename src/{App.js => App.jsx} (100%) rename src/components/BasicOptions/{BasicOptions.js => BasicOptions.jsx} (100%) rename src/components/DatePicker/{DatePicker.js => DatePicker.jsx} (100%) rename src/components/DatePicker/{DatePicker.test.js => DatePicker.test.jsx} (100%) rename src/components/DatePicker/{DatePickerField.js => DatePickerField.jsx} (100%) create mode 100644 src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap rename src/components/Duration/{DurationField.js => DurationField.jsx} (100%) rename src/components/ElementSchemes/{DataElementIdScheme.js => DataElementIdScheme.jsx} (100%) rename src/components/ElementSchemes/{EventIdScheme.js => EventIdScheme.jsx} (100%) rename src/components/ElementSchemes/{IdScheme.js => IdScheme.jsx} (100%) rename src/components/ElementSchemes/{OrgUnitIdScheme.js => OrgUnitIdScheme.jsx} (100%) rename src/components/ElementSchemes/{SchemeContainer.js => SchemeContainer.jsx} (100%) rename src/components/FileUpload/{FileUpload.js => FileUpload.jsx} (100%) rename src/components/FormAlerts/{FormAlerts.js => FormAlerts.jsx} (100%) rename src/components/FormAlerts/{FormAlerts.test.js => FormAlerts.test.jsx} (100%) create mode 100644 src/components/FormAlerts/__snapshots__/FormAlerts.test.jsx.snap rename src/components/FormField/{FormField.js => FormField.jsx} (100%) rename src/components/FormField/{FormField.test.js => FormField.test.jsx} (100%) create mode 100644 src/components/FormField/__snapshots__/FormField.test.jsx.snap rename src/components/Geometry/{GeometryAttributePicker.js => GeometryAttributePicker.jsx} (100%) rename src/components/Geometry/{GeometryFormat.js => GeometryFormat.jsx} (100%) rename src/components/Geometry/{GeometryPropertyMatch.js => GeometryPropertyMatch.jsx} (100%) rename src/components/Icon/{Icon.js => Icon.jsx} (100%) rename src/components/Icon/{Icon.test.js => Icon.test.jsx} (100%) create mode 100644 src/components/Icon/__snapshots__/Icon.test.jsx.snap rename src/components/ImportButtonStrip/{ImportButtonStrip.js => ImportButtonStrip.jsx} (100%) rename src/components/ImportButtonStrip/{ImportButtonStrip.test.js => ImportButtonStrip.test.jsx} (100%) create mode 100644 src/components/ImportButtonStrip/__snapshots__/ImportButtonStrip.test.jsx.snap rename src/components/Inputs/{AssignedUserMode.js => AssignedUserMode.jsx} (100%) rename src/components/Inputs/{AtomicMode.js => AtomicMode.jsx} (100%) rename src/components/Inputs/{ClassKey.js => ClassKey.jsx} (100%) rename src/components/Inputs/{Compression.js => Compression.jsx} (100%) rename src/components/Inputs/{DataElementIdScheme.js => DataElementIdScheme.jsx} (100%) rename src/components/Inputs/{DataSetPicker.js => DataSetPicker.jsx} (100%) rename src/components/Inputs/{Dates.js => Dates.jsx} (100%) rename src/components/Inputs/{EndDate.js => EndDate.jsx} (99%) rename src/components/Inputs/{EventIdScheme.js => EventIdScheme.jsx} (100%) rename src/components/Inputs/{ExportButton.js => ExportButton.jsx} (100%) rename src/components/Inputs/{FileUpload.js => FileUpload.jsx} (99%) rename src/components/Inputs/{FirstRowIsHeader.js => FirstRowIsHeader.jsx} (100%) rename src/components/Inputs/{FlushMode.js => FlushMode.jsx} (100%) rename src/components/Inputs/{FollowUpStatus.js => FollowUpStatus.jsx} (100%) rename src/components/Inputs/{FormAlerts.js => FormAlerts.jsx} (100%) rename src/components/Inputs/{Format.js => Format.jsx} (100%) rename src/components/Inputs/{IdScheme.js => IdScheme.jsx} (100%) rename src/components/Inputs/{Identifier.js => Identifier.jsx} (100%) rename src/components/Inputs/{ImportButtonStrip.js => ImportButtonStrip.jsx} (100%) rename src/components/Inputs/{ImportReportMode.js => ImportReportMode.jsx} (100%) rename src/components/Inputs/{ImportStrategy.js => ImportStrategy.jsx} (100%) rename src/components/Inputs/{IncludeAllAttributes.js => IncludeAllAttributes.jsx} (100%) rename src/components/Inputs/{IncludeChildren.js => IncludeChildren.jsx} (100%) rename src/components/Inputs/{IncludeDeleted.js => IncludeDeleted.jsx} (100%) rename src/components/Inputs/{Inclusion.js => Inclusion.jsx} (100%) rename src/components/Inputs/{InclusionStrategy.js => InclusionStrategy.jsx} (100%) rename src/components/Inputs/{IsAsync.js => IsAsync.jsx} (100%) rename src/components/Inputs/{LastUpdatedDuration.js => LastUpdatedDuration.jsx} (99%) rename src/components/Inputs/{LastUpdatedEndDate.js => LastUpdatedEndDate.jsx} (98%) rename src/components/Inputs/{LastUpdatedFilter.js => LastUpdatedFilter.jsx} (100%) rename src/components/Inputs/{LastUpdatedStartDate.js => LastUpdatedStartDate.jsx} (98%) rename src/components/Inputs/{MergeMode.js => MergeMode.jsx} (100%) rename src/components/Inputs/{ObjectType.js => ObjectType.jsx} (100%) rename src/components/Inputs/{Objects.js => Objects.jsx} (100%) rename src/components/Inputs/{OrgUnitIdScheme.js => OrgUnitIdScheme.jsx} (100%) rename src/components/Inputs/{OrgUnitIdSchemeCore.js => OrgUnitIdSchemeCore.jsx} (100%) rename src/components/Inputs/{OrgUnitMode.js => OrgUnitMode.jsx} (100%) rename src/components/Inputs/{OrgUnitTree.js => OrgUnitTree.jsx} (96%) rename src/components/Inputs/{PreheatCache.js => PreheatCache.jsx} (100%) rename src/components/Inputs/{PreheatMode.js => PreheatMode.jsx} (100%) rename src/components/Inputs/{ProgramEndDate.js => ProgramEndDate.jsx} (98%) rename src/components/Inputs/{ProgramPicker.js => ProgramPicker.jsx} (100%) rename src/components/Inputs/{ProgramStages.js => ProgramStages.jsx} (96%) rename src/components/Inputs/{ProgramStartDate.js => ProgramStartDate.jsx} (98%) rename src/components/Inputs/{ProgramStatus.js => ProgramStatus.jsx} (100%) rename src/components/Inputs/{Schemas.js => Schemas.jsx} (99%) rename src/components/Inputs/{SkipAudit.js => SkipAudit.jsx} (100%) rename src/components/Inputs/{SkipExistingCheck.js => SkipExistingCheck.jsx} (100%) rename src/components/Inputs/{SkipSharing.js => SkipSharing.jsx} (100%) rename src/components/Inputs/{SkipValidation.js => SkipValidation.jsx} (100%) rename src/components/Inputs/{StartDate.js => StartDate.jsx} (99%) rename src/components/Inputs/{Strategy.js => Strategy.jsx} (100%) rename src/components/Inputs/{TEITypeFilter.js => TEITypeFilter.jsx} (100%) rename src/components/Inputs/{TETypePicker.js => TETypePicker.jsx} (100%) rename src/components/Inputs/{UserPicker.js => UserPicker.jsx} (100%) rename src/components/Inputs/__tests__/{ProgramPicker.test.js => ProgramPicker.test.jsx} (96%) rename src/components/JobOverview/{ChipContainer.js => ChipContainer.jsx} (100%) rename src/components/JobOverview/{JobOverview.js => JobOverview.jsx} (95%) rename src/components/JobOverview/MenuLabel/{MenuLabel.js => MenuLabel.jsx} (100%) rename src/components/JobOverview/__test__/{JobOverview.test.js => JobOverview.test.jsx} (98%) rename src/components/JobOverview/__test__/{MenuLabel.test.js => MenuLabel.test.jsx} (84%) create mode 100644 src/components/JobOverview/__test__/__snapshots__/JobOverview.test.jsx.snap create mode 100644 src/components/JobOverview/__test__/__snapshots__/MenuLabel.test.jsx.snap rename src/components/JobSummary/Details/{Details.js => Details.jsx} (100%) rename src/components/JobSummary/{JobSummary.js => JobSummary.jsx} (95%) rename src/components/JobSummary/Log/{Log.js => Log.jsx} (100%) rename src/components/JobSummary/Messages/{Messages.js => Messages.jsx} (100%) rename src/components/JobSummary/MiniJobSummary/{MiniJobSummary.js => MiniJobSummary.jsx} (94%) rename src/components/JobSummary/SingleStatusTable/{SingleStatusTable.js => SingleStatusTable.jsx} (100%) rename src/components/JobSummary/SingleSummary/{SingleSummary.js => SingleSummary.jsx} (99%) rename src/components/JobSummary/Summary/{Summary.js => Summary.jsx} (99%) rename src/components/JobSummary/TypeCount/{TypeCount.js => TypeCount.jsx} (100%) rename src/components/JobSummary/TypeReportSummary/{TypeReportSummary.js => TypeReportSummary.jsx} (91%) rename src/components/JobSummary/__test__/{Details.test.js => Details.test.jsx} (88%) rename src/components/JobSummary/__test__/{JobSummary.test.js => JobSummary.test.jsx} (98%) rename src/components/JobSummary/__test__/{Log.test.js => Log.test.jsx} (94%) rename src/components/JobSummary/__test__/{Messages.test.js => Messages.test.jsx} (92%) rename src/components/JobSummary/__test__/{SingleStatusTable.test.js => SingleStatusTable.test.jsx} (96%) rename src/components/JobSummary/__test__/{SingleSummary.test.js => SingleSummary.test.jsx} (99%) rename src/components/JobSummary/__test__/{Summary.test.js => Summary.test.jsx} (93%) rename src/components/JobSummary/__test__/{TypeCount.test.js => TypeCount.test.jsx} (92%) rename src/components/JobSummary/__test__/{TypeReportSummary.test.js => TypeReportSummary.test.jsx} (98%) create mode 100644 src/components/JobSummary/__test__/__snapshots__/Details.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/JobSummary.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/Log.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/Messages.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/SingleStatusTable.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/SingleSummary.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/Summary.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/TypeCount.test.jsx.snap create mode 100644 src/components/JobSummary/__test__/__snapshots__/TypeReportSummary.test.jsx.snap rename src/components/MergeOperation/{MergeOperation.js => MergeOperation.jsx} (100%) rename src/components/MoreOptions/{MoreOptions.js => MoreOptions.jsx} (100%) rename src/components/MoreOptions/{MoreOptions.test.js => MoreOptions.test.jsx} (100%) create mode 100644 src/components/MoreOptions/__snapshots__/MoreOptions.test.jsx.snap rename src/components/OrgUnitTree/{OrgUnitTreeField.js => OrgUnitTreeField.jsx} (100%) rename src/components/Page/{Page.js => Page.jsx} (100%) rename src/components/Page/{Page.test.js => Page.test.jsx} (100%) create mode 100644 src/components/Page/__snapshots__/Page.test.jsx.snap rename src/components/ProgramStages/{ProgramStages.js => ProgramStages.jsx} (100%) rename src/components/RadioGroup/{RadioGroup.js => RadioGroup.jsx} (100%) rename src/components/RadioGroup/{RadioGroup.test.js => RadioGroup.test.jsx} (100%) rename src/components/RadioGroup/{RadioGroupField.js => RadioGroupField.jsx} (100%) create mode 100644 src/components/RadioGroup/__snapshots__/RadioGroup.test.jsx.snap rename src/components/ResourcePicker/{ResourcePicker.js => ResourcePicker.jsx} (100%) rename src/components/ResourcePicker/{ResourcePickerField.js => ResourcePickerField.jsx} (100%) rename src/components/Router/{Router.js => Router.jsx} (96%) rename src/components/Router/{ScrollToTop.js => ScrollToTop.jsx} (100%) rename src/components/Schemas/{SchemaGroup.js => SchemaGroup.jsx} (100%) rename src/components/Schemas/{Schemas.js => Schemas.jsx} (99%) rename src/components/Schemas/{SchemasField.js => SchemasField.jsx} (100%) rename src/components/Select/{Select.js => Select.jsx} (100%) rename src/components/Select/{Select.test.js => Select.test.jsx} (100%) rename src/components/Select/{SelectField.js => SelectField.jsx} (100%) create mode 100644 src/components/Select/__snapshots__/Select.test.jsx.snap rename src/components/Sidebar/{ExportMenuSectionHeader.js => ExportMenuSectionHeader.jsx} (82%) rename src/components/Sidebar/{ImportMenuSectionHeader.js => ImportMenuSectionHeader.jsx} (82%) rename src/components/Sidebar/{MenuSectionHeader.js => MenuSectionHeader.jsx} (100%) rename src/components/Sidebar/{Sidebar.js => Sidebar.jsx} (99%) rename src/components/StyledField/{StyledField.js => StyledField.jsx} (100%) rename src/components/Switch/{Switch.js => Switch.jsx} (100%) rename src/components/Tooltip/{Tooltip.js => Tooltip.jsx} (100%) rename src/components/ValidationSummary/{ValidationSummary.js => ValidationSummary.jsx} (100%) rename src/components/WithAuthority/{WithAuthority.test.js => WithAuthority.test.jsx} (100%) rename src/pages/DataExport/{DataExport.js => DataExport.jsx} (100%) rename src/pages/DataImport/{DataImport.js => DataImport.jsx} (100%) rename src/pages/EarthEngineImport/{EarthEngineImport.js => EarthEngineImport.jsx} (98%) rename src/pages/EarthEngineImport/{EarthEngineImportForm.js => EarthEngineImportForm.jsx} (97%) rename src/pages/EarthEngineImport/components/{AssociatedGeometry.js => AssociatedGeometry.jsx} (99%) rename src/pages/EarthEngineImport/components/{BandCocMappingTable.js => BandCocMappingTable.jsx} (99%) rename src/pages/EarthEngineImport/components/{DataElements.js => DataElements.jsx} (99%) rename src/pages/EarthEngineImport/components/{DataPreview.js => DataPreview.jsx} (98%) rename src/pages/EarthEngineImport/components/{EarthEngineId.js => EarthEngineId.jsx} (100%) rename src/pages/EarthEngineImport/components/{OrgUnitDimension.js => OrgUnitDimension.jsx} (100%) rename src/pages/EarthEngineImport/components/{OrganisationUnits.js => OrganisationUnits.jsx} (97%) rename src/pages/EarthEngineImport/components/{Periods.js => Periods.jsx} (100%) rename src/pages/EarthEngineImport/components/{PopulationAgegroupsDataPreview.js => PopulationAgegroupsDataPreview.jsx} (99%) rename src/pages/EarthEngineImport/components/{PopulationDataPreview.js => PopulationDataPreview.jsx} (100%) rename src/pages/EarthEngineImport/components/{Rounding.js => Rounding.jsx} (100%) rename src/pages/EarthEngineImport/util/{CachedQueryProvider.js => CachedQueryProvider.jsx} (100%) rename src/pages/EventExport/{EventExport.js => EventExport.jsx} (100%) rename src/pages/EventImport/{EventImport.js => EventImport.jsx} (100%) rename src/pages/GeometryImport/{GMLImport.js => GMLImport.jsx} (99%) rename src/pages/GeometryImport/{GeometryImport.js => GeometryImport.jsx} (100%) rename src/pages/Home/{Home.js => Home.jsx} (97%) rename src/pages/Home/{HomeCard.js => HomeCard.jsx} (100%) rename src/pages/JobOverview/{JobOverview.js => JobOverview.jsx} (100%) rename src/pages/MetadataDependencyExport/{MetadataDependencyExport.js => MetadataDependencyExport.jsx} (100%) rename src/pages/MetadataExport/{MetadataExport.js => MetadataExport.jsx} (100%) rename src/pages/MetadataImport/{MetadataImport.js => MetadataImport.jsx} (100%) rename src/pages/TEIExport/{TEIExport.js => TEIExport.jsx} (100%) rename src/pages/TEIImport/{TEIImport.js => TEIImport.jsx} (100%) rename src/utils/{tasks.js => tasks.jsx} (96%) create mode 100644 yalc.lock diff --git a/.gitignore b/.gitignore index a4d94acca..dbb6b3d22 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ src/locales build coverage/ cypress.env.json +.yalc/ \ No newline at end of file diff --git a/d2.config.js b/d2.config.js index 7c3166c42..51d110ad9 100644 --- a/d2.config.js +++ b/d2.config.js @@ -7,7 +7,7 @@ const config = { coreApp: true, minDHIS2Version: '2.41', entryPoints: { - app: './src/App.js', + app: './src/App.jsx', }, } diff --git a/i18n/en.pot b/i18n/en.pot index 673b83104..0c41aa367 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-03-01T15:50:32.586Z\n" -"PO-Revision-Date: 2024-03-01T15:50:32.586Z\n" +"POT-Creation-Date: 2024-09-10T18:11:52.828Z\n" +"PO-Revision-Date: 2024-09-10T18:11:52.829Z\n" msgid "Something went wrong when loading the current user!" msgstr "Something went wrong when loading the current user!" @@ -688,6 +688,15 @@ msgstr "Updated" msgid "Total" msgstr "Total" +msgid "Reports" +msgstr "Reports" + +msgid "Error Code" +msgstr "Error Code" + +msgid "Tracker Type" +msgstr "Tracker Type" + msgid "Indexes" msgstr "Indexes" @@ -745,8 +754,8 @@ msgstr "Org unit geometry import" msgid "Metadata import" msgstr "Metadata import" -msgid "TEI import" -msgstr "TEI import" +msgid "Tracked entity import" +msgstr "Tracked entity import" msgid "Data export" msgstr "Data export" @@ -760,8 +769,8 @@ msgstr "Metadata dependency export" msgid "Metadata export" msgstr "Metadata export" -msgid "TEI export" -msgstr "TEI export" +msgid "Tracked entity export" +msgstr "Tracked entity export" msgid "Job overview" msgstr "Job overview" @@ -880,6 +889,16 @@ msgstr "Earth Engine data set" msgid "Select earth engine data set" msgstr "Select earth engine data set" +msgid "{{count}} org units" +msgid_plural "{{count}} org units" +msgstr[0] "{{count}} org unit" +msgstr[1] "{{count}} org units" + +msgid "{{count}} levels" +msgid_plural "{{count}} levels" +msgstr[0] "{{count}} level" +msgstr[1] "{{count}} levels" + msgid "Selected: {{commaSeparatedListOfOrganisationUnits}}" msgstr "Selected: {{commaSeparatedListOfOrganisationUnits}}" @@ -1117,24 +1136,24 @@ msgstr "" "geometry." msgid "" -"Export event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Export event data for programs, stages and tracked entities to JSON or CSV " +"format." msgstr "" -"Export event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Export event data for programs, stages and tracked entities to JSON or CSV " +"format." msgid "Export events" msgstr "Export events" msgid "" -"Import event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Import event data for programs, stages and tracked entities from JSON or " +"CSV format." msgstr "" -"Import event data for programs, stages and tracked entities to JSON, CSV, " -"or DXF2 format." +"Import event data for programs, stages and tracked entities from JSON or " +"CSV format." -msgid "Supported file types: JSON, CSV, and DXF2." -msgstr "Supported file types: JSON, CSV, and DXF2." +msgid "Supported file types: JSON and CSV." +msgstr "Supported file types: JSON and CSV." msgid "Organisation unit geometry import" msgstr "Organisation unit geometry import" @@ -1165,8 +1184,8 @@ msgstr "Export metadata dependencies" msgid "Export metadata" msgstr "Export metadata" -msgid "Export tracked entity instances" -msgstr "Export tracked entity instances" +msgid "Export tracked entities" +msgstr "Export tracked entities" msgid "Import data" msgstr "Import data" @@ -1183,8 +1202,8 @@ msgstr "Import GeoJSON" msgid "Import metadata" msgstr "Import metadata" -msgid "Import tracked entity instances" -msgstr "Import tracked entity instances" +msgid "Import tracked entities" +msgstr "Import tracked entities" msgid "An overview of all import jobs started this session." msgstr "An overview of all import jobs started this session." @@ -1210,17 +1229,14 @@ msgstr "" "Import metadata, such as data elements and organisation units, using JSON " "or CSV format." -msgid "Supported file types: JSON and CSV." -msgstr "Supported file types: JSON and CSV." - msgid "A class key must be selected" msgstr "A class key must be selected" -msgid "Tracked entity instances export" -msgstr "Tracked entity instances export" +msgid "Tracked entities export" +msgstr "Tracked entities export" -msgid "Export tracked entity instances in JSON, CSV, or DXF2 format." -msgstr "Export tracked entity instances in JSON, CSV, or DXF2 format." +msgid "Export tracked entities in JSON or CSV format." +msgstr "Export tracked entities in JSON or CSV format." msgid "Program to export from" msgstr "Program to export from" @@ -1231,14 +1247,14 @@ msgstr "Enrollment date range" msgid "At least one of the 'last updated' date fields must be specified" msgstr "At least one of the 'last updated' date fields must be specified" -msgid "Tracked entity instances import" -msgstr "Tracked entity instances import" +msgid "Tracked entities import" +msgstr "Tracked entities import" -msgid "Import tracked entity instances using JSON or DXF2 format." -msgstr "Import tracked entity instances using JSON or DXF2 format." +msgid "Import tracked entities using JSON format." +msgstr "Import tracked entities using JSON format." -msgid "Supported file types: JSON and DXF2." -msgstr "Supported file types: JSON and DXF2." +msgid "Supported file types: JSON." +msgstr "Supported file types: JSON." msgid "Job started." msgstr "Job started." @@ -1246,9 +1262,6 @@ msgstr "Job started." msgid "An unknown error occurred. Please try again later" msgstr "An unknown error occurred. Please try again later" -msgid "Loading exported data" -msgstr "Loading exported data" - msgid "Data" msgstr "Data" @@ -1264,5 +1277,5 @@ msgstr "GML" msgid "Metadata" msgstr "Metadata" -msgid "TEI" -msgstr "TEI" +msgid "Tracked entity" +msgstr "Tracked entity" diff --git a/src/App.js b/src/App.jsx similarity index 100% rename from src/App.js rename to src/App.jsx diff --git a/src/components/BasicOptions/BasicOptions.js b/src/components/BasicOptions/BasicOptions.jsx similarity index 100% rename from src/components/BasicOptions/BasicOptions.js rename to src/components/BasicOptions/BasicOptions.jsx diff --git a/src/components/DatePicker/DatePicker.js b/src/components/DatePicker/DatePicker.jsx similarity index 100% rename from src/components/DatePicker/DatePicker.js rename to src/components/DatePicker/DatePicker.jsx diff --git a/src/components/DatePicker/DatePicker.test.js b/src/components/DatePicker/DatePicker.test.jsx similarity index 100% rename from src/components/DatePicker/DatePicker.test.js rename to src/components/DatePicker/DatePicker.test.jsx diff --git a/src/components/DatePicker/DatePickerField.js b/src/components/DatePicker/DatePickerField.jsx similarity index 100% rename from src/components/DatePicker/DatePickerField.js rename to src/components/DatePicker/DatePickerField.jsx diff --git a/src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap b/src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap new file mode 100644 index 000000000..5ff9ec07f --- /dev/null +++ b/src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot 1`] = ` + +
+ +
+
+
+ +
+
+
+
+
+`; diff --git a/src/components/Duration/DurationField.js b/src/components/Duration/DurationField.jsx similarity index 100% rename from src/components/Duration/DurationField.js rename to src/components/Duration/DurationField.jsx diff --git a/src/components/ElementSchemes/DataElementIdScheme.js b/src/components/ElementSchemes/DataElementIdScheme.jsx similarity index 100% rename from src/components/ElementSchemes/DataElementIdScheme.js rename to src/components/ElementSchemes/DataElementIdScheme.jsx diff --git a/src/components/ElementSchemes/EventIdScheme.js b/src/components/ElementSchemes/EventIdScheme.jsx similarity index 100% rename from src/components/ElementSchemes/EventIdScheme.js rename to src/components/ElementSchemes/EventIdScheme.jsx diff --git a/src/components/ElementSchemes/IdScheme.js b/src/components/ElementSchemes/IdScheme.jsx similarity index 100% rename from src/components/ElementSchemes/IdScheme.js rename to src/components/ElementSchemes/IdScheme.jsx diff --git a/src/components/ElementSchemes/OrgUnitIdScheme.js b/src/components/ElementSchemes/OrgUnitIdScheme.jsx similarity index 100% rename from src/components/ElementSchemes/OrgUnitIdScheme.js rename to src/components/ElementSchemes/OrgUnitIdScheme.jsx diff --git a/src/components/ElementSchemes/SchemeContainer.js b/src/components/ElementSchemes/SchemeContainer.jsx similarity index 100% rename from src/components/ElementSchemes/SchemeContainer.js rename to src/components/ElementSchemes/SchemeContainer.jsx diff --git a/src/components/FileUpload/FileUpload.js b/src/components/FileUpload/FileUpload.jsx similarity index 100% rename from src/components/FileUpload/FileUpload.js rename to src/components/FileUpload/FileUpload.jsx diff --git a/src/components/FormAlerts/FormAlerts.js b/src/components/FormAlerts/FormAlerts.jsx similarity index 100% rename from src/components/FormAlerts/FormAlerts.js rename to src/components/FormAlerts/FormAlerts.jsx diff --git a/src/components/FormAlerts/FormAlerts.test.js b/src/components/FormAlerts/FormAlerts.test.jsx similarity index 100% rename from src/components/FormAlerts/FormAlerts.test.js rename to src/components/FormAlerts/FormAlerts.test.jsx diff --git a/src/components/FormAlerts/__snapshots__/FormAlerts.test.jsx.snap b/src/components/FormAlerts/__snapshots__/FormAlerts.test.jsx.snap new file mode 100644 index 000000000..1ca88c095 --- /dev/null +++ b/src/components/FormAlerts/__snapshots__/FormAlerts.test.jsx.snap @@ -0,0 +1,5 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot when multiple alerts 1`] = ``; + +exports[`matches snapshot when no alerts 1`] = ``; diff --git a/src/components/FormField/FormField.js b/src/components/FormField/FormField.jsx similarity index 100% rename from src/components/FormField/FormField.js rename to src/components/FormField/FormField.jsx diff --git a/src/components/FormField/FormField.test.js b/src/components/FormField/FormField.test.jsx similarity index 100% rename from src/components/FormField/FormField.test.js rename to src/components/FormField/FormField.test.jsx diff --git a/src/components/FormField/__snapshots__/FormField.test.jsx.snap b/src/components/FormField/__snapshots__/FormField.test.jsx.snap new file mode 100644 index 000000000..b6a22f5c4 --- /dev/null +++ b/src/components/FormField/__snapshots__/FormField.test.jsx.snap @@ -0,0 +1,16 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot 1`] = ` + +
+ + Format + +
+
+`; diff --git a/src/components/Geometry/GeometryAttributePicker.js b/src/components/Geometry/GeometryAttributePicker.jsx similarity index 100% rename from src/components/Geometry/GeometryAttributePicker.js rename to src/components/Geometry/GeometryAttributePicker.jsx diff --git a/src/components/Geometry/GeometryFormat.js b/src/components/Geometry/GeometryFormat.jsx similarity index 100% rename from src/components/Geometry/GeometryFormat.js rename to src/components/Geometry/GeometryFormat.jsx diff --git a/src/components/Geometry/GeometryPropertyMatch.js b/src/components/Geometry/GeometryPropertyMatch.jsx similarity index 100% rename from src/components/Geometry/GeometryPropertyMatch.js rename to src/components/Geometry/GeometryPropertyMatch.jsx diff --git a/src/components/Geometry/index.js b/src/components/Geometry/index.js index 0bf230f93..b050d38bb 100644 --- a/src/components/Geometry/index.js +++ b/src/components/Geometry/index.js @@ -1,3 +1,3 @@ -export { GeometryFormat } from './GeometryFormat.js' -export { GeometryPropertyMatch } from './GeometryPropertyMatch.js' -export { GeometryAttributePicker } from './GeometryAttributePicker.js' +export { GeometryFormat } from './GeometryFormat.jsx' +export { GeometryPropertyMatch } from './GeometryPropertyMatch.jsx' +export { GeometryAttributePicker } from './GeometryAttributePicker.jsx' diff --git a/src/components/Icon/Icon.js b/src/components/Icon/Icon.jsx similarity index 100% rename from src/components/Icon/Icon.js rename to src/components/Icon/Icon.jsx diff --git a/src/components/Icon/Icon.test.js b/src/components/Icon/Icon.test.jsx similarity index 100% rename from src/components/Icon/Icon.test.js rename to src/components/Icon/Icon.test.jsx diff --git a/src/components/Icon/__snapshots__/Icon.test.jsx.snap b/src/components/Icon/__snapshots__/Icon.test.jsx.snap new file mode 100644 index 000000000..f7ea9f20f --- /dev/null +++ b/src/components/Icon/__snapshots__/Icon.test.jsx.snap @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot 1`] = ` + + + + + +`; diff --git a/src/components/ImportButtonStrip/ImportButtonStrip.js b/src/components/ImportButtonStrip/ImportButtonStrip.jsx similarity index 100% rename from src/components/ImportButtonStrip/ImportButtonStrip.js rename to src/components/ImportButtonStrip/ImportButtonStrip.jsx diff --git a/src/components/ImportButtonStrip/ImportButtonStrip.test.js b/src/components/ImportButtonStrip/ImportButtonStrip.test.jsx similarity index 100% rename from src/components/ImportButtonStrip/ImportButtonStrip.test.js rename to src/components/ImportButtonStrip/ImportButtonStrip.test.jsx diff --git a/src/components/ImportButtonStrip/__snapshots__/ImportButtonStrip.test.jsx.snap b/src/components/ImportButtonStrip/__snapshots__/ImportButtonStrip.test.jsx.snap new file mode 100644 index 000000000..1acc6c7a9 --- /dev/null +++ b/src/components/ImportButtonStrip/__snapshots__/ImportButtonStrip.test.jsx.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot 1`] = ` + +
+
+
+ +
+
+ +
+
+

+ A dry run tests the import settings without importing any data +

+
+
+`; diff --git a/src/components/Inputs/AssignedUserMode.js b/src/components/Inputs/AssignedUserMode.jsx similarity index 100% rename from src/components/Inputs/AssignedUserMode.js rename to src/components/Inputs/AssignedUserMode.jsx diff --git a/src/components/Inputs/AtomicMode.js b/src/components/Inputs/AtomicMode.jsx similarity index 100% rename from src/components/Inputs/AtomicMode.js rename to src/components/Inputs/AtomicMode.jsx diff --git a/src/components/Inputs/ClassKey.js b/src/components/Inputs/ClassKey.jsx similarity index 100% rename from src/components/Inputs/ClassKey.js rename to src/components/Inputs/ClassKey.jsx diff --git a/src/components/Inputs/Compression.js b/src/components/Inputs/Compression.jsx similarity index 100% rename from src/components/Inputs/Compression.js rename to src/components/Inputs/Compression.jsx diff --git a/src/components/Inputs/DataElementIdScheme.js b/src/components/Inputs/DataElementIdScheme.jsx similarity index 100% rename from src/components/Inputs/DataElementIdScheme.js rename to src/components/Inputs/DataElementIdScheme.jsx diff --git a/src/components/Inputs/DataSetPicker.js b/src/components/Inputs/DataSetPicker.jsx similarity index 100% rename from src/components/Inputs/DataSetPicker.js rename to src/components/Inputs/DataSetPicker.jsx diff --git a/src/components/Inputs/Dates.js b/src/components/Inputs/Dates.jsx similarity index 100% rename from src/components/Inputs/Dates.js rename to src/components/Inputs/Dates.jsx diff --git a/src/components/Inputs/EndDate.js b/src/components/Inputs/EndDate.jsx similarity index 99% rename from src/components/Inputs/EndDate.js rename to src/components/Inputs/EndDate.jsx index 0ddd4656c..2b283276a 100644 --- a/src/components/Inputs/EndDate.js +++ b/src/components/Inputs/EndDate.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { hasValue, composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { DATE_VALIDATOR } from '../DatePicker/DatePickerField.js' +import { DATE_VALIDATOR } from '../DatePicker/DatePickerField.jsx' import { DatePickerField } from '../index.js' const NAME = 'endDate' diff --git a/src/components/Inputs/EventIdScheme.js b/src/components/Inputs/EventIdScheme.jsx similarity index 100% rename from src/components/Inputs/EventIdScheme.js rename to src/components/Inputs/EventIdScheme.jsx diff --git a/src/components/Inputs/ExportButton.js b/src/components/Inputs/ExportButton.jsx similarity index 100% rename from src/components/Inputs/ExportButton.js rename to src/components/Inputs/ExportButton.jsx diff --git a/src/components/Inputs/FileUpload.js b/src/components/Inputs/FileUpload.jsx similarity index 99% rename from src/components/Inputs/FileUpload.js rename to src/components/Inputs/FileUpload.jsx index 61fc6651e..c849b5b84 100644 --- a/src/components/Inputs/FileUpload.js +++ b/src/components/Inputs/FileUpload.jsx @@ -1,7 +1,7 @@ import i18n from '@dhis2/d2-i18n' import PropTypes from 'prop-types' import React from 'react' -import { SINGLE_FILE_VALIDATOR } from '../FileUpload/FileUpload.js' +import { SINGLE_FILE_VALIDATOR } from '../FileUpload/FileUpload.jsx' import { FileUpload as FileUploadGeneric } from '../index.js' const NAME = 'files' diff --git a/src/components/Inputs/FirstRowIsHeader.js b/src/components/Inputs/FirstRowIsHeader.jsx similarity index 100% rename from src/components/Inputs/FirstRowIsHeader.js rename to src/components/Inputs/FirstRowIsHeader.jsx diff --git a/src/components/Inputs/FlushMode.js b/src/components/Inputs/FlushMode.jsx similarity index 100% rename from src/components/Inputs/FlushMode.js rename to src/components/Inputs/FlushMode.jsx diff --git a/src/components/Inputs/FollowUpStatus.js b/src/components/Inputs/FollowUpStatus.jsx similarity index 100% rename from src/components/Inputs/FollowUpStatus.js rename to src/components/Inputs/FollowUpStatus.jsx diff --git a/src/components/Inputs/FormAlerts.js b/src/components/Inputs/FormAlerts.jsx similarity index 100% rename from src/components/Inputs/FormAlerts.js rename to src/components/Inputs/FormAlerts.jsx diff --git a/src/components/Inputs/Format.js b/src/components/Inputs/Format.jsx similarity index 100% rename from src/components/Inputs/Format.js rename to src/components/Inputs/Format.jsx diff --git a/src/components/Inputs/IdScheme.js b/src/components/Inputs/IdScheme.jsx similarity index 100% rename from src/components/Inputs/IdScheme.js rename to src/components/Inputs/IdScheme.jsx diff --git a/src/components/Inputs/Identifier.js b/src/components/Inputs/Identifier.jsx similarity index 100% rename from src/components/Inputs/Identifier.js rename to src/components/Inputs/Identifier.jsx diff --git a/src/components/Inputs/ImportButtonStrip.js b/src/components/Inputs/ImportButtonStrip.jsx similarity index 100% rename from src/components/Inputs/ImportButtonStrip.js rename to src/components/Inputs/ImportButtonStrip.jsx diff --git a/src/components/Inputs/ImportReportMode.js b/src/components/Inputs/ImportReportMode.jsx similarity index 100% rename from src/components/Inputs/ImportReportMode.js rename to src/components/Inputs/ImportReportMode.jsx diff --git a/src/components/Inputs/ImportStrategy.js b/src/components/Inputs/ImportStrategy.jsx similarity index 100% rename from src/components/Inputs/ImportStrategy.js rename to src/components/Inputs/ImportStrategy.jsx diff --git a/src/components/Inputs/IncludeAllAttributes.js b/src/components/Inputs/IncludeAllAttributes.jsx similarity index 100% rename from src/components/Inputs/IncludeAllAttributes.js rename to src/components/Inputs/IncludeAllAttributes.jsx diff --git a/src/components/Inputs/IncludeChildren.js b/src/components/Inputs/IncludeChildren.jsx similarity index 100% rename from src/components/Inputs/IncludeChildren.js rename to src/components/Inputs/IncludeChildren.jsx diff --git a/src/components/Inputs/IncludeDeleted.js b/src/components/Inputs/IncludeDeleted.jsx similarity index 100% rename from src/components/Inputs/IncludeDeleted.js rename to src/components/Inputs/IncludeDeleted.jsx diff --git a/src/components/Inputs/Inclusion.js b/src/components/Inputs/Inclusion.jsx similarity index 100% rename from src/components/Inputs/Inclusion.js rename to src/components/Inputs/Inclusion.jsx diff --git a/src/components/Inputs/InclusionStrategy.js b/src/components/Inputs/InclusionStrategy.jsx similarity index 100% rename from src/components/Inputs/InclusionStrategy.js rename to src/components/Inputs/InclusionStrategy.jsx diff --git a/src/components/Inputs/IsAsync.js b/src/components/Inputs/IsAsync.jsx similarity index 100% rename from src/components/Inputs/IsAsync.js rename to src/components/Inputs/IsAsync.jsx diff --git a/src/components/Inputs/LastUpdatedDuration.js b/src/components/Inputs/LastUpdatedDuration.jsx similarity index 99% rename from src/components/Inputs/LastUpdatedDuration.js rename to src/components/Inputs/LastUpdatedDuration.jsx index 21fc074c3..dc4b03810 100644 --- a/src/components/Inputs/LastUpdatedDuration.js +++ b/src/components/Inputs/LastUpdatedDuration.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { hasValue, composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { DURATION_VALIDATOR } from '../Duration/DurationField.js' +import { DURATION_VALIDATOR } from '../Duration/DurationField.jsx' import { DurationField } from '../index.js' const NAME = 'updatedWithin' diff --git a/src/components/Inputs/LastUpdatedEndDate.js b/src/components/Inputs/LastUpdatedEndDate.jsx similarity index 98% rename from src/components/Inputs/LastUpdatedEndDate.js rename to src/components/Inputs/LastUpdatedEndDate.jsx index 0bd558b66..64eb2c260 100644 --- a/src/components/Inputs/LastUpdatedEndDate.js +++ b/src/components/Inputs/LastUpdatedEndDate.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.js' +import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.jsx' import { DatePickerField } from '../index.js' const NAME = 'updatedBefore' diff --git a/src/components/Inputs/LastUpdatedFilter.js b/src/components/Inputs/LastUpdatedFilter.jsx similarity index 100% rename from src/components/Inputs/LastUpdatedFilter.js rename to src/components/Inputs/LastUpdatedFilter.jsx diff --git a/src/components/Inputs/LastUpdatedStartDate.js b/src/components/Inputs/LastUpdatedStartDate.jsx similarity index 98% rename from src/components/Inputs/LastUpdatedStartDate.js rename to src/components/Inputs/LastUpdatedStartDate.jsx index d38735480..eeed43ed2 100644 --- a/src/components/Inputs/LastUpdatedStartDate.js +++ b/src/components/Inputs/LastUpdatedStartDate.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.js' +import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.jsx' import { DatePickerField } from '../index.js' const NAME = 'updatedAfter' diff --git a/src/components/Inputs/MergeMode.js b/src/components/Inputs/MergeMode.jsx similarity index 100% rename from src/components/Inputs/MergeMode.js rename to src/components/Inputs/MergeMode.jsx diff --git a/src/components/Inputs/ObjectType.js b/src/components/Inputs/ObjectType.jsx similarity index 100% rename from src/components/Inputs/ObjectType.js rename to src/components/Inputs/ObjectType.jsx diff --git a/src/components/Inputs/Objects.js b/src/components/Inputs/Objects.jsx similarity index 100% rename from src/components/Inputs/Objects.js rename to src/components/Inputs/Objects.jsx diff --git a/src/components/Inputs/OrgUnitIdScheme.js b/src/components/Inputs/OrgUnitIdScheme.jsx similarity index 100% rename from src/components/Inputs/OrgUnitIdScheme.js rename to src/components/Inputs/OrgUnitIdScheme.jsx diff --git a/src/components/Inputs/OrgUnitIdSchemeCore.js b/src/components/Inputs/OrgUnitIdSchemeCore.jsx similarity index 100% rename from src/components/Inputs/OrgUnitIdSchemeCore.js rename to src/components/Inputs/OrgUnitIdSchemeCore.jsx diff --git a/src/components/Inputs/OrgUnitMode.js b/src/components/Inputs/OrgUnitMode.jsx similarity index 100% rename from src/components/Inputs/OrgUnitMode.js rename to src/components/Inputs/OrgUnitMode.jsx diff --git a/src/components/Inputs/OrgUnitTree.js b/src/components/Inputs/OrgUnitTree.jsx similarity index 96% rename from src/components/Inputs/OrgUnitTree.js rename to src/components/Inputs/OrgUnitTree.jsx index c9ccf870b..62b1ba0b1 100644 --- a/src/components/Inputs/OrgUnitTree.js +++ b/src/components/Inputs/OrgUnitTree.jsx @@ -6,7 +6,7 @@ import { OrgUnitTreeField, FormField } from '../index.js' import { SINGLE_ORG_VALIDATOR, SINGLE_EXACT_ORG_VALIDATOR, -} from '../OrgUnitTree/OrgUnitTreeField.js' +} from '../OrgUnitTree/OrgUnitTreeField.jsx' const NAME = 'selectedOrgUnits' const LABEL = i18n.t('Organisation unit(s) to export data from') diff --git a/src/components/Inputs/PreheatCache.js b/src/components/Inputs/PreheatCache.jsx similarity index 100% rename from src/components/Inputs/PreheatCache.js rename to src/components/Inputs/PreheatCache.jsx diff --git a/src/components/Inputs/PreheatMode.js b/src/components/Inputs/PreheatMode.jsx similarity index 100% rename from src/components/Inputs/PreheatMode.js rename to src/components/Inputs/PreheatMode.jsx diff --git a/src/components/Inputs/ProgramEndDate.js b/src/components/Inputs/ProgramEndDate.jsx similarity index 98% rename from src/components/Inputs/ProgramEndDate.js rename to src/components/Inputs/ProgramEndDate.jsx index f1dcd137a..8fd21aa42 100644 --- a/src/components/Inputs/ProgramEndDate.js +++ b/src/components/Inputs/ProgramEndDate.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.js' +import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.jsx' import { DatePickerField } from '../index.js' const NAME = 'enrollmentEnrolledBefore' diff --git a/src/components/Inputs/ProgramPicker.js b/src/components/Inputs/ProgramPicker.jsx similarity index 100% rename from src/components/Inputs/ProgramPicker.js rename to src/components/Inputs/ProgramPicker.jsx diff --git a/src/components/Inputs/ProgramStages.js b/src/components/Inputs/ProgramStages.jsx similarity index 96% rename from src/components/Inputs/ProgramStages.js rename to src/components/Inputs/ProgramStages.jsx index fa047d1ba..b49c051b3 100644 --- a/src/components/Inputs/ProgramStages.js +++ b/src/components/Inputs/ProgramStages.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { hasValue, composeValidators } from '@dhis2/ui' import React from 'react' import { ProgramStages as ProgramStagesGeneric } from '../index.js' -import { SINGLE_EXACT_PROGRAMSTAGE_VALIDATOR } from '../ProgramStages/ProgramStages.js' +import { SINGLE_EXACT_PROGRAMSTAGE_VALIDATOR } from '../ProgramStages/ProgramStages.jsx' const VALIDATOR = composeValidators( hasValue, diff --git a/src/components/Inputs/ProgramStartDate.js b/src/components/Inputs/ProgramStartDate.jsx similarity index 98% rename from src/components/Inputs/ProgramStartDate.js rename to src/components/Inputs/ProgramStartDate.jsx index 7757048c4..f126c3454 100644 --- a/src/components/Inputs/ProgramStartDate.js +++ b/src/components/Inputs/ProgramStartDate.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.js' +import { OPTIONAL_DATE_VALIDATOR } from '../DatePicker/DatePickerField.jsx' import { DatePickerField } from '../index.js' const NAME = 'enrollmentEnrolledAfter' diff --git a/src/components/Inputs/ProgramStatus.js b/src/components/Inputs/ProgramStatus.jsx similarity index 100% rename from src/components/Inputs/ProgramStatus.js rename to src/components/Inputs/ProgramStatus.jsx diff --git a/src/components/Inputs/Schemas.js b/src/components/Inputs/Schemas.jsx similarity index 99% rename from src/components/Inputs/Schemas.js rename to src/components/Inputs/Schemas.jsx index 0613d560c..b9b84f169 100644 --- a/src/components/Inputs/Schemas.js +++ b/src/components/Inputs/Schemas.jsx @@ -1,7 +1,7 @@ import { hasValue, composeValidators } from '@dhis2/ui' import React from 'react' import { SchemasField } from '../index.js' -import { SINGLE_SCHEMA_VALIDATOR } from '../Schemas/SchemasField.js' +import { SINGLE_SCHEMA_VALIDATOR } from '../Schemas/SchemasField.jsx' const NAME = 'checkedSchemas' const VALIDATOR = composeValidators(hasValue, SINGLE_SCHEMA_VALIDATOR) diff --git a/src/components/Inputs/SkipAudit.js b/src/components/Inputs/SkipAudit.jsx similarity index 100% rename from src/components/Inputs/SkipAudit.js rename to src/components/Inputs/SkipAudit.jsx diff --git a/src/components/Inputs/SkipExistingCheck.js b/src/components/Inputs/SkipExistingCheck.jsx similarity index 100% rename from src/components/Inputs/SkipExistingCheck.js rename to src/components/Inputs/SkipExistingCheck.jsx diff --git a/src/components/Inputs/SkipSharing.js b/src/components/Inputs/SkipSharing.jsx similarity index 100% rename from src/components/Inputs/SkipSharing.js rename to src/components/Inputs/SkipSharing.jsx diff --git a/src/components/Inputs/SkipValidation.js b/src/components/Inputs/SkipValidation.jsx similarity index 100% rename from src/components/Inputs/SkipValidation.js rename to src/components/Inputs/SkipValidation.jsx diff --git a/src/components/Inputs/StartDate.js b/src/components/Inputs/StartDate.jsx similarity index 99% rename from src/components/Inputs/StartDate.js rename to src/components/Inputs/StartDate.jsx index 23c41904e..7b3ca69ee 100644 --- a/src/components/Inputs/StartDate.js +++ b/src/components/Inputs/StartDate.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import { hasValue, composeValidators } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -import { DATE_VALIDATOR } from '../DatePicker/DatePickerField.js' +import { DATE_VALIDATOR } from '../DatePicker/DatePickerField.jsx' import { DatePickerField } from '../index.js' const NAME = 'startDate' diff --git a/src/components/Inputs/Strategy.js b/src/components/Inputs/Strategy.jsx similarity index 100% rename from src/components/Inputs/Strategy.js rename to src/components/Inputs/Strategy.jsx diff --git a/src/components/Inputs/TEITypeFilter.js b/src/components/Inputs/TEITypeFilter.jsx similarity index 100% rename from src/components/Inputs/TEITypeFilter.js rename to src/components/Inputs/TEITypeFilter.jsx diff --git a/src/components/Inputs/TETypePicker.js b/src/components/Inputs/TETypePicker.jsx similarity index 100% rename from src/components/Inputs/TETypePicker.js rename to src/components/Inputs/TETypePicker.jsx diff --git a/src/components/Inputs/UserPicker.js b/src/components/Inputs/UserPicker.jsx similarity index 100% rename from src/components/Inputs/UserPicker.js rename to src/components/Inputs/UserPicker.jsx diff --git a/src/components/Inputs/__tests__/ProgramPicker.test.js b/src/components/Inputs/__tests__/ProgramPicker.test.jsx similarity index 96% rename from src/components/Inputs/__tests__/ProgramPicker.test.js rename to src/components/Inputs/__tests__/ProgramPicker.test.jsx index 0478ee9d0..e7fefe4f5 100644 --- a/src/components/Inputs/__tests__/ProgramPicker.test.js +++ b/src/components/Inputs/__tests__/ProgramPicker.test.jsx @@ -3,7 +3,7 @@ import React from 'react' import { render } from '@testing-library/react' import '@testing-library/jest-dom/extend-expect.js' import { useDataQuery } from '@dhis2/app-runtime' -import { ProgramPicker } from '../ProgramPicker.js' +import { ProgramPicker } from '../ProgramPicker.jsx' import { programQuery, programWithEventsQuery, diff --git a/src/components/Inputs/index.js b/src/components/Inputs/index.js index 9d38cb6a7..2952d3bc1 100644 --- a/src/components/Inputs/index.js +++ b/src/components/Inputs/index.js @@ -1,6 +1,6 @@ -export { FileUpload } from './FileUpload.js' -export { ImportButtonStrip } from './ImportButtonStrip.js' -export { FormAlerts } from './FormAlerts.js' +export { FileUpload } from './FileUpload.jsx' +export { ImportButtonStrip } from './ImportButtonStrip.jsx' +export { FormAlerts } from './FormAlerts.jsx' export { Format, formatOptions, @@ -12,92 +12,92 @@ export { formatAdxPdfOptions, formatJsonpOptions, defaultFormatOption, -} from './Format.js' +} from './Format.jsx' export { FirstRowIsHeader, defaultFirstRowIsHeaderOption, -} from './FirstRowIsHeader.js' -export { ClassKey } from './ClassKey.js' -export { Strategy, defaultStrategyOption } from './Strategy.js' -export { PreheatCache, defaultPreheatCacheOption } from './PreheatCache.js' -export { SkipAudit, defaultSkipAuditOption } from './SkipAudit.js' +} from './FirstRowIsHeader.jsx' +export { ClassKey } from './ClassKey.jsx' +export { Strategy, defaultStrategyOption } from './Strategy.jsx' +export { PreheatCache, defaultPreheatCacheOption } from './PreheatCache.jsx' +export { SkipAudit, defaultSkipAuditOption } from './SkipAudit.jsx' export { SkipExistingCheck, defaultSkipExistingCheckOption, -} from './SkipExistingCheck.js' -export { Identifier, defaultIdentifierOption } from './Identifier.js' +} from './SkipExistingCheck.jsx' +export { Identifier, defaultIdentifierOption } from './Identifier.jsx' export { ImportReportMode, defaultImportReportModeOption, -} from './ImportReportMode.js' -export { PreheatMode, defaultPreheatModeOption } from './PreheatMode.js' +} from './ImportReportMode.jsx' +export { PreheatMode, defaultPreheatModeOption } from './PreheatMode.jsx' export { ImportStrategy, defaultImportStrategyOption, -} from './ImportStrategy.js' -export { AtomicMode, defaultAtomicModeOption } from './AtomicMode.js' -export { MergeMode, defaultMergeModeOption } from './MergeMode.js' -export { FlushMode, defaultFlushModeOption } from './FlushMode.js' +} from './ImportStrategy.jsx' +export { AtomicMode, defaultAtomicModeOption } from './AtomicMode.jsx' +export { MergeMode, defaultMergeModeOption } from './MergeMode.jsx' +export { FlushMode, defaultFlushModeOption } from './FlushMode.jsx' export { InclusionStrategy, defaultInclusionStrategyOption, -} from './InclusionStrategy.js' -export { SkipSharing, defaultSkipSharingOption } from './SkipSharing.js' +} from './InclusionStrategy.jsx' +export { SkipSharing, defaultSkipSharingOption } from './SkipSharing.jsx' export { SkipValidation, defaultSkipValidationOption, -} from './SkipValidation.js' -export { IsAsync, defaultIsAsyncOption } from './IsAsync.js' -export { OrgUnitTree } from './OrgUnitTree.js' -export { DataSetPicker } from './DataSetPicker.js' -export { ProgramPicker } from './ProgramPicker.js' -export { IncludeChildren } from './IncludeChildren.js' -export { IncludeDeleted } from './IncludeDeleted.js' -export { Compression, defaultCompressionOption } from './Compression.js' -export { Inclusion, defaultInclusionOption } from './Inclusion.js' -export { StartDate } from './StartDate.js' -export { EndDate } from './EndDate.js' -export { ExportButton } from './ExportButton.js' -export { ProgramStages } from './ProgramStages.js' -export { Schemas } from './Schemas.js' -export { ObjectType, defaultObjectTypeOption } from './ObjectType.js' -export { Objects } from './Objects.js' +} from './SkipValidation.jsx' +export { IsAsync, defaultIsAsyncOption } from './IsAsync.jsx' +export { OrgUnitTree } from './OrgUnitTree.jsx' +export { DataSetPicker } from './DataSetPicker.jsx' +export { ProgramPicker } from './ProgramPicker.jsx' +export { IncludeChildren } from './IncludeChildren.jsx' +export { IncludeDeleted } from './IncludeDeleted.jsx' +export { Compression, defaultCompressionOption } from './Compression.jsx' +export { Inclusion, defaultInclusionOption } from './Inclusion.jsx' +export { StartDate } from './StartDate.jsx' +export { EndDate } from './EndDate.jsx' +export { ExportButton } from './ExportButton.jsx' +export { ProgramStages } from './ProgramStages.jsx' +export { Schemas } from './Schemas.jsx' +export { ObjectType, defaultObjectTypeOption } from './ObjectType.jsx' +export { Objects } from './Objects.jsx' export { DataElementIdScheme, defaultDataElementIdSchemeOption, -} from './DataElementIdScheme.js' -export { EventIdScheme, defaultEventIdSchemeOption } from './EventIdScheme.js' -export { IdScheme, defaultIdSchemeOption } from './IdScheme.js' +} from './DataElementIdScheme.jsx' +export { EventIdScheme, defaultEventIdSchemeOption } from './EventIdScheme.jsx' +export { IdScheme, defaultIdSchemeOption } from './IdScheme.jsx' export { OrgUnitIdScheme, defaultOrgUnitIdSchemeOption, -} from './OrgUnitIdScheme.js' -export { OrgUnitIdSchemeCore } from './OrgUnitIdSchemeCore.js' +} from './OrgUnitIdScheme.jsx' +export { OrgUnitIdSchemeCore } from './OrgUnitIdSchemeCore.jsx' export { OrgUnitMode, defaultOrgUnitSelectionModeOption, OU_MODE_MANUAL_VALUE, -} from './OrgUnitMode.js' -export { TEITypeFilter, defaultTEITypeFilterOption } from './TEITypeFilter.js' -export { ProgramStatus, defaultProgramStatusOption } from './ProgramStatus.js' +} from './OrgUnitMode.jsx' +export { TEITypeFilter, defaultTEITypeFilterOption } from './TEITypeFilter.jsx' +export { ProgramStatus, defaultProgramStatusOption } from './ProgramStatus.jsx' export { FollowUpStatus, defaultFollowUpStatusOption, -} from './FollowUpStatus.js' -export { ProgramStartDate } from './ProgramStartDate.js' -export { ProgramEndDate } from './ProgramEndDate.js' -export { TETypePicker } from './TETypePicker.js' +} from './FollowUpStatus.jsx' +export { ProgramStartDate } from './ProgramStartDate.jsx' +export { ProgramEndDate } from './ProgramEndDate.jsx' +export { TETypePicker } from './TETypePicker.jsx' export { LastUpdatedFilter, defaultLastUpdatedFilterOption, -} from './LastUpdatedFilter.js' -export { LastUpdatedStartDate } from './LastUpdatedStartDate.js' -export { LastUpdatedEndDate } from './LastUpdatedEndDate.js' -export { LastUpdatedDuration } from './LastUpdatedDuration.js' +} from './LastUpdatedFilter.jsx' +export { LastUpdatedStartDate } from './LastUpdatedStartDate.jsx' +export { LastUpdatedEndDate } from './LastUpdatedEndDate.jsx' +export { LastUpdatedDuration } from './LastUpdatedDuration.jsx' export { AssignedUserMode, defaultAssignedUserModeOption, -} from './AssignedUserMode.js' -export { UserPicker } from './UserPicker.js' -export { IncludeAllAttributes } from './IncludeAllAttributes.js' -export { Dates } from './Dates.js' +} from './AssignedUserMode.jsx' +export { UserPicker } from './UserPicker.jsx' +export { IncludeAllAttributes } from './IncludeAllAttributes.jsx' +export { Dates } from './Dates.jsx' diff --git a/src/components/JobOverview/ChipContainer.js b/src/components/JobOverview/ChipContainer.jsx similarity index 100% rename from src/components/JobOverview/ChipContainer.js rename to src/components/JobOverview/ChipContainer.jsx diff --git a/src/components/JobOverview/JobOverview.js b/src/components/JobOverview/JobOverview.jsx similarity index 95% rename from src/components/JobOverview/JobOverview.js rename to src/components/JobOverview/JobOverview.jsx index 79bbdf1d5..e15b81588 100644 --- a/src/components/JobOverview/JobOverview.js +++ b/src/components/JobOverview/JobOverview.jsx @@ -4,12 +4,12 @@ import PropTypes from 'prop-types' import React, { useContext, useEffect } from 'react' import { Link } from 'react-router-dom' import { TaskContext } from '../../contexts/index.js' -import { categoryTypes } from '../../utils/tasks.js' +import { categoryTypes } from '../../utils/tasks.jsx' import { JobSummary } from '../index.js' -import { ChipContainer } from './ChipContainer.js' +import { ChipContainer } from './ChipContainer.jsx' import { jobToPath } from './helper.js' import styles from './JobOverview.module.css' -import { MenuLabel } from './MenuLabel/MenuLabel.js' +import { MenuLabel } from './MenuLabel/MenuLabel.jsx' const JobOverview = ({ activeTypes, diff --git a/src/components/JobOverview/MenuLabel/MenuLabel.js b/src/components/JobOverview/MenuLabel/MenuLabel.jsx similarity index 100% rename from src/components/JobOverview/MenuLabel/MenuLabel.js rename to src/components/JobOverview/MenuLabel/MenuLabel.jsx diff --git a/src/components/JobOverview/__test__/JobOverview.test.js b/src/components/JobOverview/__test__/JobOverview.test.jsx similarity index 98% rename from src/components/JobOverview/__test__/JobOverview.test.js rename to src/components/JobOverview/__test__/JobOverview.test.jsx index a8932a292..79dbd5fdf 100644 --- a/src/components/JobOverview/__test__/JobOverview.test.js +++ b/src/components/JobOverview/__test__/JobOverview.test.jsx @@ -7,7 +7,7 @@ import '@testing-library/jest-dom/extend-expect.js' import { TaskContext } from '../../../contexts/index.js' import { JobOverview } from '../../index.js' -import { MenuLabel } from '../MenuLabel/MenuLabel.js' +import { MenuLabel } from '../MenuLabel/MenuLabel.jsx' import { tasksState, allJobs } from './data.js' afterEach(() => { diff --git a/src/components/JobOverview/__test__/MenuLabel.test.js b/src/components/JobOverview/__test__/MenuLabel.test.jsx similarity index 84% rename from src/components/JobOverview/__test__/MenuLabel.test.js rename to src/components/JobOverview/__test__/MenuLabel.test.jsx index fe563dd36..464acff31 100644 --- a/src/components/JobOverview/__test__/MenuLabel.test.js +++ b/src/components/JobOverview/__test__/MenuLabel.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { MenuLabel } from '../MenuLabel/MenuLabel.js' +import { MenuLabel } from '../MenuLabel/MenuLabel.jsx' import { allJobs } from './data.js' it('matches snapshot', () => { diff --git a/src/components/JobOverview/__test__/__snapshots__/JobOverview.test.jsx.snap b/src/components/JobOverview/__test__/__snapshots__/JobOverview.test.jsx.snap new file mode 100644 index 000000000..7491f4cc9 --- /dev/null +++ b/src/components/JobOverview/__test__/__snapshots__/JobOverview.test.jsx.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`MenuLabel matches snapshot 1`] = ` + +
+
+ data1.json +
+
+
+ + Completed + +
+ +

+ 2020-02-12 13:00:23 + +

+
+
+
+`; diff --git a/src/components/JobOverview/__test__/__snapshots__/MenuLabel.test.jsx.snap b/src/components/JobOverview/__test__/__snapshots__/MenuLabel.test.jsx.snap new file mode 100644 index 000000000..e1d1d8554 --- /dev/null +++ b/src/components/JobOverview/__test__/__snapshots__/MenuLabel.test.jsx.snap @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot 1`] = ` + +
+
+ data1.json +
+
+
+ + Completed + +
+ +

+ 2020-02-12 13:00:23 + +

+
+
+
+`; diff --git a/src/components/JobOverview/helper.js b/src/components/JobOverview/helper.js index c2fa96b7d..677af1c84 100644 --- a/src/components/JobOverview/helper.js +++ b/src/components/JobOverview/helper.js @@ -1,4 +1,4 @@ -import { categoryTypes } from '../../utils/tasks.js' +import { categoryTypes } from '../../utils/tasks.jsx' const categoryTypesObj = categoryTypes.reduce((acc, cur) => { acc[cur.importType] = cur diff --git a/src/components/JobSummary/Details/Details.js b/src/components/JobSummary/Details/Details.jsx similarity index 100% rename from src/components/JobSummary/Details/Details.js rename to src/components/JobSummary/Details/Details.jsx diff --git a/src/components/JobSummary/JobSummary.js b/src/components/JobSummary/JobSummary.jsx similarity index 95% rename from src/components/JobSummary/JobSummary.js rename to src/components/JobSummary/JobSummary.jsx index a013b5747..94e863b0c 100644 --- a/src/components/JobSummary/JobSummary.js +++ b/src/components/JobSummary/JobSummary.jsx @@ -3,10 +3,10 @@ import { Divider, Tag } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' import { jsDateToString } from '../../utils/helper.js' -import { Details } from './Details/Details.js' +import { Details } from './Details/Details.jsx' import styles from './JobSummary.module.css' -import { Log } from './Log/Log.js' -import { Summary } from './Summary/Summary.js' +import { Log } from './Log/Log.jsx' +import { Summary } from './Summary/Summary.jsx' const Header = ({ jobDetails, task, showFileDetails }) => (
diff --git a/src/components/JobSummary/Log/Log.js b/src/components/JobSummary/Log/Log.jsx similarity index 100% rename from src/components/JobSummary/Log/Log.js rename to src/components/JobSummary/Log/Log.jsx diff --git a/src/components/JobSummary/Messages/Messages.js b/src/components/JobSummary/Messages/Messages.jsx similarity index 100% rename from src/components/JobSummary/Messages/Messages.js rename to src/components/JobSummary/Messages/Messages.jsx diff --git a/src/components/JobSummary/MiniJobSummary/MiniJobSummary.js b/src/components/JobSummary/MiniJobSummary/MiniJobSummary.jsx similarity index 94% rename from src/components/JobSummary/MiniJobSummary/MiniJobSummary.js rename to src/components/JobSummary/MiniJobSummary/MiniJobSummary.jsx index cf9e67ff3..6a7439c94 100644 --- a/src/components/JobSummary/MiniJobSummary/MiniJobSummary.js +++ b/src/components/JobSummary/MiniJobSummary/MiniJobSummary.jsx @@ -2,7 +2,7 @@ import i18n from '@dhis2/d2-i18n' import PropTypes from 'prop-types' import React from 'react' import { MoreOptions } from '../../index.js' -import { JobSummary } from '../JobSummary.js' +import { JobSummary } from '../JobSummary.jsx' const MiniJobSummary = ({ task, dataTest }) => { if (!task) { diff --git a/src/components/JobSummary/SingleStatusTable/SingleStatusTable.js b/src/components/JobSummary/SingleStatusTable/SingleStatusTable.jsx similarity index 100% rename from src/components/JobSummary/SingleStatusTable/SingleStatusTable.js rename to src/components/JobSummary/SingleStatusTable/SingleStatusTable.jsx diff --git a/src/components/JobSummary/SingleSummary/SingleSummary.js b/src/components/JobSummary/SingleSummary/SingleSummary.jsx similarity index 99% rename from src/components/JobSummary/SingleSummary/SingleSummary.js rename to src/components/JobSummary/SingleSummary/SingleSummary.jsx index 3a0e0f546..8591542cb 100644 --- a/src/components/JobSummary/SingleSummary/SingleSummary.js +++ b/src/components/JobSummary/SingleSummary/SingleSummary.jsx @@ -12,7 +12,7 @@ import PropTypes from 'prop-types' import React from 'react' import { FormField } from '../../index.js' import { statsPropType } from '../helper.js' -import { SingleStatusTable } from '../SingleStatusTable/SingleStatusTable.js' +import { SingleStatusTable } from '../SingleStatusTable/SingleStatusTable.jsx' const SingleSummary = ({ importType, diff --git a/src/components/JobSummary/Summary/Summary.js b/src/components/JobSummary/Summary/Summary.jsx similarity index 99% rename from src/components/JobSummary/Summary/Summary.js rename to src/components/JobSummary/Summary/Summary.jsx index 5fd1f48ca..d24ff58a8 100644 --- a/src/components/JobSummary/Summary/Summary.js +++ b/src/components/JobSummary/Summary/Summary.jsx @@ -1,8 +1,8 @@ import PropTypes from 'prop-types' import React from 'react' import { typeReportParse } from '../helper.js' -import { SingleSummary } from '../SingleSummary/SingleSummary.js' -import { TypeReportSummary } from '../TypeReportSummary/TypeReportSummary.js' +import { SingleSummary } from '../SingleSummary/SingleSummary.jsx' +import { TypeReportSummary } from '../TypeReportSummary/TypeReportSummary.jsx' import styles from './Summary.module.css' const extractStats = (summary) => { diff --git a/src/components/JobSummary/TypeCount/TypeCount.js b/src/components/JobSummary/TypeCount/TypeCount.jsx similarity index 100% rename from src/components/JobSummary/TypeCount/TypeCount.js rename to src/components/JobSummary/TypeCount/TypeCount.jsx diff --git a/src/components/JobSummary/TypeReportSummary/TypeReportSummary.js b/src/components/JobSummary/TypeReportSummary/TypeReportSummary.jsx similarity index 91% rename from src/components/JobSummary/TypeReportSummary/TypeReportSummary.js rename to src/components/JobSummary/TypeReportSummary/TypeReportSummary.jsx index 3bcbec388..e50acb0c1 100644 --- a/src/components/JobSummary/TypeReportSummary/TypeReportSummary.js +++ b/src/components/JobSummary/TypeReportSummary/TypeReportSummary.jsx @@ -1,9 +1,9 @@ import PropTypes from 'prop-types' import React from 'react' import { statsPropType, messagesPropType } from '../helper.js' -import { Messages } from '../Messages/Messages.js' -import { SingleSummary } from '../SingleSummary/SingleSummary.js' -import { TypeCount, typeCountStatsPropTypeObj } from '../TypeCount/TypeCount.js' +import { Messages } from '../Messages/Messages.jsx' +import { SingleSummary } from '../SingleSummary/SingleSummary.jsx' +import { TypeCount, typeCountStatsPropTypeObj } from '../TypeCount/TypeCount.jsx' const TypeReportSummary = ({ overviewStats, stats, messages }) => { return ( diff --git a/src/components/JobSummary/__test__/Details.test.js b/src/components/JobSummary/__test__/Details.test.jsx similarity index 88% rename from src/components/JobSummary/__test__/Details.test.js rename to src/components/JobSummary/__test__/Details.test.jsx index e612a4fd2..005a987f0 100644 --- a/src/components/JobSummary/__test__/Details.test.js +++ b/src/components/JobSummary/__test__/Details.test.jsx @@ -3,7 +3,7 @@ import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' import { allJobs } from '../../JobOverview/__test__/data.js' -import { Details } from '../Details/Details.js' +import { Details } from '../Details/Details.jsx' const props = { details: allJobs[0].jobDetails, diff --git a/src/components/JobSummary/__test__/JobSummary.test.js b/src/components/JobSummary/__test__/JobSummary.test.jsx similarity index 98% rename from src/components/JobSummary/__test__/JobSummary.test.js rename to src/components/JobSummary/__test__/JobSummary.test.jsx index 0bc7e20ad..e1a1be5a4 100644 --- a/src/components/JobSummary/__test__/JobSummary.test.js +++ b/src/components/JobSummary/__test__/JobSummary.test.jsx @@ -4,7 +4,7 @@ import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' import { allJobs } from '../../JobOverview/__test__/data.js' -import { JobSummary } from '../JobSummary.js' +import { JobSummary } from '../JobSummary.jsx' const props = { showFileDetails: true, diff --git a/src/components/JobSummary/__test__/Log.test.js b/src/components/JobSummary/__test__/Log.test.jsx similarity index 94% rename from src/components/JobSummary/__test__/Log.test.js rename to src/components/JobSummary/__test__/Log.test.jsx index f5ef227fe..b1efa9699 100644 --- a/src/components/JobSummary/__test__/Log.test.js +++ b/src/components/JobSummary/__test__/Log.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { Log } from '../Log/Log.js' +import { Log } from '../Log/Log.jsx' const props = { events: [ diff --git a/src/components/JobSummary/__test__/Messages.test.js b/src/components/JobSummary/__test__/Messages.test.jsx similarity index 92% rename from src/components/JobSummary/__test__/Messages.test.js rename to src/components/JobSummary/__test__/Messages.test.jsx index 6ac3078b8..b4015d0c1 100644 --- a/src/components/JobSummary/__test__/Messages.test.js +++ b/src/components/JobSummary/__test__/Messages.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { Messages } from '../Messages/Messages.js' +import { Messages } from '../Messages/Messages.jsx' const props = { messages: [ diff --git a/src/components/JobSummary/__test__/SingleStatusTable.test.js b/src/components/JobSummary/__test__/SingleStatusTable.test.jsx similarity index 96% rename from src/components/JobSummary/__test__/SingleStatusTable.test.js rename to src/components/JobSummary/__test__/SingleStatusTable.test.jsx index 8fe1bbeba..f7f0a5be9 100644 --- a/src/components/JobSummary/__test__/SingleStatusTable.test.js +++ b/src/components/JobSummary/__test__/SingleStatusTable.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { SingleStatusTable } from '../SingleStatusTable/SingleStatusTable.js' +import { SingleStatusTable } from '../SingleStatusTable/SingleStatusTable.jsx' const props = { status: 'WARNING', diff --git a/src/components/JobSummary/__test__/SingleSummary.test.js b/src/components/JobSummary/__test__/SingleSummary.test.jsx similarity index 99% rename from src/components/JobSummary/__test__/SingleSummary.test.js rename to src/components/JobSummary/__test__/SingleSummary.test.jsx index 487d543b4..5bb43691e 100644 --- a/src/components/JobSummary/__test__/SingleSummary.test.js +++ b/src/components/JobSummary/__test__/SingleSummary.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { SingleSummary } from '../SingleSummary/SingleSummary.js' +import { SingleSummary } from '../SingleSummary/SingleSummary.jsx' const props = { importCount: { imported: 1, deleted: 2, ignored: 3, updated: 4, total: 10 }, diff --git a/src/components/JobSummary/__test__/Summary.test.js b/src/components/JobSummary/__test__/Summary.test.jsx similarity index 93% rename from src/components/JobSummary/__test__/Summary.test.js rename to src/components/JobSummary/__test__/Summary.test.jsx index 0e57afdca..bb3695c9a 100644 --- a/src/components/JobSummary/__test__/Summary.test.js +++ b/src/components/JobSummary/__test__/Summary.test.jsx @@ -3,7 +3,7 @@ import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' import { allJobs } from '../../JobOverview/__test__/data.js' -import { Summary } from '../Summary/Summary.js' +import { Summary } from '../Summary/Summary.jsx' describe('different job type summaries', () => { const oneOfEach = [ diff --git a/src/components/JobSummary/__test__/TypeCount.test.js b/src/components/JobSummary/__test__/TypeCount.test.jsx similarity index 92% rename from src/components/JobSummary/__test__/TypeCount.test.js rename to src/components/JobSummary/__test__/TypeCount.test.jsx index c1df81af2..0631c1e19 100644 --- a/src/components/JobSummary/__test__/TypeCount.test.js +++ b/src/components/JobSummary/__test__/TypeCount.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { TypeCount } from '../TypeCount/TypeCount.js' +import { TypeCount } from '../TypeCount/TypeCount.jsx' const props = { stats: [ diff --git a/src/components/JobSummary/__test__/TypeReportSummary.test.js b/src/components/JobSummary/__test__/TypeReportSummary.test.jsx similarity index 98% rename from src/components/JobSummary/__test__/TypeReportSummary.test.js rename to src/components/JobSummary/__test__/TypeReportSummary.test.jsx index d5452f76e..17bd2f35d 100644 --- a/src/components/JobSummary/__test__/TypeReportSummary.test.js +++ b/src/components/JobSummary/__test__/TypeReportSummary.test.jsx @@ -2,7 +2,7 @@ import React from 'react' import { render } from 'test-utils' import '@testing-library/jest-dom/extend-expect.js' -import { TypeReportSummary } from '../TypeReportSummary/TypeReportSummary.js' +import { TypeReportSummary } from '../TypeReportSummary/TypeReportSummary.jsx' const props = { overviewStats: { diff --git a/src/components/JobSummary/__test__/__snapshots__/Details.test.jsx.snap b/src/components/JobSummary/__test__/__snapshots__/Details.test.jsx.snap new file mode 100644 index 000000000..a9a7a026c --- /dev/null +++ b/src/components/JobSummary/__test__/__snapshots__/Details.test.jsx.snap @@ -0,0 +1,233 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`matches snapshot 1`] = ` + +
+ + Job details + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Key + + Value +
+ files + + data1.json +
+ format + + JSON +
+ dryRun + + true +
+ strategy + + New and updates +
+ preheatCache + + true +
+ skipAudit + + false +
+ dataElementIdScheme + + Uid +
+ orgUnitIdScheme + + Uid +
+ idScheme + + Uid +
+ skipExistingCheck + + false +
+ firstRowIsHeader + + false +
+
+
+`; diff --git a/src/components/JobSummary/__test__/__snapshots__/JobSummary.test.jsx.snap b/src/components/JobSummary/__test__/__snapshots__/JobSummary.test.jsx.snap new file mode 100644 index 000000000..a48303eff --- /dev/null +++ b/src/components/JobSummary/__test__/__snapshots__/JobSummary.test.jsx.snap @@ -0,0 +1,1229 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`summary for a GML job matches snapshot 1`] = ` + +
+
+

+ Job summary +

+
+ + gml1.gml + + - + + 2020-02-12 13:00:32 + + +
+
+
+
+ + Completed + +
+
+ + Error + +
+
+ + Dry run + +
+
+ + +`; + +exports[`summary for a data import job with conflicts matches snapshot 1`] = ` + +
+
+

+ Job summary +

+
+ + data2.json + + - + + 2020-02-12 13:00:59 + + +
+
+
+
+ + Completed + +
+
+ + Conflicts + +
+
+ + Dry run + +
+
+