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/package.json b/package.json index a2af84d93..1bb3b0877 100644 --- a/package.json +++ b/package.json @@ -23,13 +23,13 @@ "postinstall": "patch-package" }, "devDependencies": { - "@dhis2/cli-app-scripts": "^10.0.0", + "@dhis2/cli-app-scripts": "file:.yalc/@dhis2/cli-app-scripts", "@dhis2/cli-style": "^10.4.1", "@dhis2/cli-utils-cypress": "^7.0.0", "@dhis2/cypress-commands": "^7.0.0", "@dhis2/cypress-plugins": "^7.0.0", - "@testing-library/jest-dom": "^5.8.0", - "@testing-library/react": "^9.4.0", + "@testing-library/jest-dom": "^6.5.0", + "@testing-library/react": "^16.0.1", "patch-package": "^6.4.7", "query-string": "^6.12.1" }, @@ -39,9 +39,12 @@ "@dhis2/d2-i18n": "^1.1.0", "@dhis2/maps-gl": "^3.5.1", "@dhis2/prop-types": "^3.1.2", - "@dhis2/ui": "^8.7.2", + "@dhis2/ui": "^9.11.4", + "@testing-library/react-hooks": "^8.0.1", "classnames": "^2.2.6", "final-form-arrays": "^3.0.2", + "identity-obj-proxy": "^3.0.0", + "jest-extended": "^4.0.2", "react-final-form-arrays": "^3.1.3", "react-router-dom": "^5.2.0" } 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 87% rename from src/components/DatePicker/DatePicker.test.js rename to src/components/DatePicker/DatePicker.test.jsx index 147ae54ee..dc86ecf13 100644 --- a/src/components/DatePicker/DatePicker.test.js +++ b/src/components/DatePicker/DatePicker.test.jsx @@ -1,6 +1,5 @@ import React from 'react' import { render } from 'test-utils' -import '@testing-library/jest-dom/extend-expect.js' import { DatePicker } from '../index.js' 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.js.snap b/src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap similarity index 88% rename from src/components/DatePicker/__snapshots__/DatePicker.test.js.snap rename to src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap index 7738ea07f..5ff9ec07f 100644 --- a/src/components/DatePicker/__snapshots__/DatePicker.test.js.snap +++ b/src/components/DatePicker/__snapshots__/DatePicker.test.jsx.snap @@ -26,11 +26,11 @@ exports[`matches snapshot 1`] = ` data-test="dhis2-uicore-box" >