diff --git a/CHANGELOG.md b/CHANGELOG.md index 74d9402de0..a2fd286dc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,80 @@ +## [100.50.6](https://github.com/dhis2/capture-app/compare/v100.50.5...v100.50.6) (2024-01-21) + + +### Bug Fixes + +* [DHIS2-16352] Add spacing between event overview cards ([#3500](https://github.com/dhis2/capture-app/issues/3500)) ([2041d60](https://github.com/dhis2/capture-app/commit/2041d605454529b3bcd77fa3b53a4655ae1495cf)) + +## [100.50.5](https://github.com/dhis2/capture-app/compare/v100.50.4...v100.50.5) (2024-01-21) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([eca1ba4](https://github.com/dhis2/capture-app/commit/eca1ba418e672a58df08785b74430c60e8eb9bcb)) + +## [100.50.4](https://github.com/dhis2/capture-app/compare/v100.50.3...v100.50.4) (2024-01-14) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([ad60c3a](https://github.com/dhis2/capture-app/commit/ad60c3a4500176c8db08ceb05e074eedfcf5e2b3)) + +## [100.50.3](https://github.com/dhis2/capture-app/compare/v100.50.2...v100.50.3) (2023-12-24) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([c92b38e](https://github.com/dhis2/capture-app/commit/c92b38e8f775d20476fc0e2619f95ba48377ec5a)) + +## [100.50.2](https://github.com/dhis2/capture-app/compare/v100.50.1...v100.50.2) (2023-12-20) + + +### Bug Fixes + +* [TECH-1676] cypress test deleting wrong working list template ([#3489](https://github.com/dhis2/capture-app/issues/3489)) ([b5e038b](https://github.com/dhis2/capture-app/commit/b5e038b823128386f7106da46025a2a38a00db1b)) + +## [100.50.1](https://github.com/dhis2/capture-app/compare/v100.50.0...v100.50.1) (2023-12-20) + + +### Bug Fixes + +* [DHIS2-16317] Incorrect error message on orgUnit type data element ([#3484](https://github.com/dhis2/capture-app/issues/3484)) ([ef30449](https://github.com/dhis2/capture-app/commit/ef304499fda3296320ca71fae72d33f2dfad88fa)) + +# [100.50.0](https://github.com/dhis2/capture-app/compare/v100.49.0...v100.50.0) (2023-12-18) + + +### Features + +* [DHIS-11419] display assigned users on events in enrollment overview page ([#3453](https://github.com/dhis2/capture-app/issues/3453)) ([44fb2be](https://github.com/dhis2/capture-app/commit/44fb2bedf0e2f9d394c58d5a588087cff2c8fa3c)) + +# [100.49.0](https://github.com/dhis2/capture-app/compare/v100.48.0...v100.49.0) (2023-12-18) + + +### Features + +* [DHIS2-12544] Add verbose logging to rules engine ([#3480](https://github.com/dhis2/capture-app/issues/3480)) ([2a6d4a8](https://github.com/dhis2/capture-app/commit/2a6d4a839ae0daed7b2ddbf09a401c29dbb3cfd7)) + +# [100.48.0](https://github.com/dhis2/capture-app/compare/v100.47.3...v100.48.0) (2023-12-15) + + +### Features + +* [DHIS2-15783] Tooltip on long working list names ([#3474](https://github.com/dhis2/capture-app/issues/3474)) ([6263aa8](https://github.com/dhis2/capture-app/commit/6263aa8a2114b028afff3b78c39f699c0946e682)) + +## [100.47.3](https://github.com/dhis2/capture-app/compare/v100.47.2...v100.47.3) (2023-12-14) + + +### Bug Fixes + +* [DHIS2-16084] Filter unidirectional relationship types ([#3477](https://github.com/dhis2/capture-app/issues/3477)) ([3579fc0](https://github.com/dhis2/capture-app/commit/3579fc05d02f6210f381f93414d07b60a0cfea53)) + +## [100.47.2](https://github.com/dhis2/capture-app/compare/v100.47.1...v100.47.2) (2023-12-10) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([1a4e748](https://github.com/dhis2/capture-app/commit/1a4e7482467656e19ce58f34862a306e6ae008cc)) + ## [100.47.1](https://github.com/dhis2/capture-app/compare/v100.47.0...v100.47.1) (2023-12-05) diff --git a/cypress/e2e/SearchPage/index.js b/cypress/e2e/SearchPage/index.js index b322ef00bc..644ff73111 100644 --- a/cypress/e2e/SearchPage/index.js +++ b/cypress/e2e/SearchPage/index.js @@ -81,7 +81,6 @@ When('you can close the modal', () => { .contains('Back to search') .click(); cy.get('[data-test="dhis2-uicore-modal"]') - .contains('No results found') .should('not.exist'); }); diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule.feature b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule.feature index 277fcb0191..6f021d0886 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule.feature +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule.feature @@ -1,8 +1,10 @@ Feature: The user interacts with the widgets Schedule tab + # Blocked by DHIS2-16229 + @skip Scenario: User cancel after choose a schedule date in schedule tab Given you land on the enrollment add event page by having typed #/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8&teiId=EaOyKGOIGRp&enrollmentId=wBU0RAsYjKE&stageId=A03MvHHogjR&tab=SCHEDULE Then you should see Schedule tab Then you choose a schedule date When you click cancel in Schedule tab - Then you should see confirm dialog \ No newline at end of file + Then you should see confirm dialog diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule/index.js b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule/index.js index 1b606aa3c0..3896685c41 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule/index.js +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEventSchedule/index.js @@ -18,7 +18,7 @@ When('you click cancel in Schedule tab', () => { }); Then('you should see confirm dialog', () => { - cy.get('[role="dialog"]') + cy.get('aside[role="dialog"]') .find('[data-test="dhis2-uicore-modaltitle"]') .contains('Discard unsaved changes?') .should('exist'); diff --git a/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/index.js b/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/index.js index d16c2a84d7..79dd1acad6 100644 --- a/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/index.js +++ b/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/index.js @@ -148,12 +148,12 @@ When('you open the column selector', () => { }); When('you select Household location and save from the column selector', () => { - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Household location') .find('input') .click(); - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Save') .click(); }); diff --git a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature index b0bdfef1e0..73b30f7668 100644 --- a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature +++ b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser.feature @@ -1,5 +1,13 @@ Feature: User interacts with tei working lists + Scenario: The TEI custom working can be shared + Given you open the main page with Ngelehun and Malaria focus investigation context + And you see the custom TEI working lists + And you can load the view with the name Events assigned to me + And you create a copy of the working list + When you change the sharing settings + Then you see the new sharing settings + Scenario: User opens the default working list for a tracker program Given you open the main page with Ngelehun and child programme context Then the default working list should be displayed @@ -81,7 +89,7 @@ When you change rows per page to 10 Then the list should display 10 rows of data And for a tracker program the page navigation should show that you are on the first page -Scenario: Show teis ordered ascendingly by first name +Scenario: Show teis ordered ascendingly by first name Given you open the main page with Ngelehun and child programme context When you click the first name column header Then the sort arrow should indicate ascending order @@ -93,13 +101,7 @@ Given you open the main page with Ngelehun and Malaria focus investigation conte Then you see the custom TEI working lists And you can load the view with the name Events assigned to me -Scenario: The TEI custom working can be shared -Given you open the main page with Ngelehun and Malaria focus investigation context -And you see the custom TEI working lists -And you can load the view with the name Events assigned to me -And you create a copy of the working list -When you change the sharing settings -Then you see the new sharing settings + Scenario: The user creates, updates and deletes a TEI custom working list Given you open the main page with Ngelehun and Malaria case diagnosis context @@ -139,7 +141,7 @@ And you select a data element columns and save from the column selector Then you see data elements specific filters and columns @v>=39 -Scenario: While in a program stage working list, the user can filter by both TEA and data elements +Scenario: While in a program stage working list, the user can filter by both TEA and data elements Given you open the main page with Ngelehun, WHO RMNCH Tracker and First antenatal care visit context When you set the enrollment status filter to active And you apply the current filter @@ -152,7 +154,7 @@ And you apply the current filter Then the list should display 1 row of data @v>=39 -Scenario: While in a program stage working list, the user can sort by both TEA and data elements +Scenario: While in a program stage working list, the user can sort by both TEA and data elements Given you open the main page with Ngelehun, WHO RMNCH Tracker and First antenatal care visit context And you set the first name filter to u And you apply the current filter diff --git a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js index 1c1574e25d..aaf5c97c93 100644 --- a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js +++ b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/index.js @@ -246,12 +246,12 @@ When('you open the column selector', () => { }); When('you select the registering unit and save from the column selector', () => { - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Registering unit') .find('input') .click(); - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Save') .click(); }); @@ -544,27 +544,33 @@ Then('you see the new sharing settings', () => { .click(); }); -When('you create a copy of the working list', () => { - cy.get('[data-test="list-view-menu-button"]') - .click(); +When('you create a copy of the working list', + () => { + cy.get('[data-test="list-view-menu-button"]') + .click(); - cy.contains('Save current view as') - .click(); + cy.contains('Save current view as') + .click(); - const id = uuid(); - cy.get('[data-test="view-name-content"]') - .type(id); + const id = uuid(); + cy.get('[data-test="view-name-content"]') + .type(id); - cy.intercept('POST', '**/trackedEntityInstanceFilters**').as('newTrackerFilter'); + cy.intercept('POST', '**/trackedEntityInstanceFilters**') + .as('newTrackerFilter'); - cy.get('button') - .contains('Save') - .click(); + cy.get('[data-test="new-template-dialog"]') + .within(() => { + cy.get('[data-test="dhis2-uicore-button"]') + .contains('Save') + .click(); + }); - cy.wait('@newTrackerFilter', { timeout: 30000 }); + cy.wait('@newTrackerFilter', { timeout: 30000 }); + cy.url({ timeout: 30000 }).should('not.include', 'selectedTemplateId=PpGINOT00UX'); - cy.reload(); -}); + cy.reload(); + }); When('you open the program stage filters from the more filters dropdown menu', () => { cy.get('[data-test="tei-working-lists"]') @@ -602,12 +608,12 @@ When('you select the Foci response program stage', () => { }); When('you select a data element columns and save from the column selector', () => { - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('People included') .find('input') .click(); - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Save') .click(); }); @@ -663,12 +669,12 @@ Then('you see scheduledAt filter', () => { }); When('you select a scheduledAt column and save from the column selector', () => { - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Appointment date') .find('input') .click(); - cy.get('div[role="dialog"]') + cy.get('aside[role="dialog"]') .contains('Save') .click(); }); diff --git a/flow-typed/npm/@dhis2/ui_vx.x.x.js b/flow-typed/npm/@dhis2/ui_vx.x.x.js index 118657154a..0ee51f1dfc 100644 --- a/flow-typed/npm/@dhis2/ui_vx.x.x.js +++ b/flow-typed/npm/@dhis2/ui_vx.x.x.js @@ -1,56 +1,67 @@ -// flow-typed signature: c6feccb0af432a25a3ab1270f8309035 -// flow-typed version: <>/@dhis2/ui_v^6.1/flow_v0.132.0 - -/** - * This is an autogenerated libdef stub for: - * - * '@dhis2/ui' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module '@dhis2/ui' { - declare module.exports: any; -} - /** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. + * Flowtype definitions for index + * Generated by Flowgen from a Typescript Definition + * Flowgen v1.21.0 */ -declare module '@dhis2/ui/build/cjs/lib' { - declare module.exports: any; -} - -declare module '@dhis2/ui/build/es/lib' { - declare module.exports: any; -} - -declare module '@dhis2/ui/d2.config' { - declare module.exports: any; -} - -declare module '@dhis2/ui/src' { - declare module.exports: any; -} -// Filename aliases -declare module '@dhis2/ui/build/cjs/lib.js' { - declare module.exports: $Exports<'@dhis2/ui/build/cjs/lib'>; -} -declare module '@dhis2/ui/build/es/lib.js' { - declare module.exports: $Exports<'@dhis2/ui/build/es/lib'>; -} -declare module '@dhis2/ui/d2.config.js' { - declare module.exports: $Exports<'@dhis2/ui/d2.config'>; -} -declare module '@dhis2/ui/src/index' { - declare module.exports: $Exports<'@dhis2/ui/src'>; -} -declare module '@dhis2/ui/src/index.js' { - declare module.exports: $Exports<'@dhis2/ui/src'>; -} + declare export * from "@dhis2/ui-constants"; + declare export * from "@dhis2/ui-icons"; + declare export * from "@dhis2/ui-forms"; + declare export * from "@dhis2-ui/alert"; + declare export * from "@dhis2-ui/button"; + declare export * from "@dhis2-ui/box"; + declare export * from "@dhis2-ui/calendar"; + declare export * from "@dhis2-ui/card"; + declare export * from "@dhis2-ui/center"; + declare export * from "@dhis2-ui/checkbox"; + declare export * from "@dhis2-ui/chip"; + declare export * from "@dhis2-ui/cover"; + declare export * from "@dhis2-ui/css"; + declare export * from "@dhis2-ui/divider"; + declare export * from "@dhis2-ui/field"; + declare export * from "@dhis2-ui/file-input"; + declare export * from "@dhis2-ui/header-bar"; + declare export * from "@dhis2-ui/help"; + declare export * from "@dhis2-ui/input"; + declare export * from "@dhis2-ui/intersection-detector"; + declare export * from "@dhis2-ui/label"; + declare export * from "@dhis2-ui/layer"; + declare export * from "@dhis2-ui/legend"; + declare export * from "@dhis2-ui/loader"; + declare export * from "@dhis2-ui/logo"; + declare export * from "@dhis2-ui/menu"; + declare export * from "@dhis2-ui/modal"; + declare export * from "@dhis2-ui/node"; + declare export * from "@dhis2-ui/notice-box"; + declare export * from "@dhis2-ui/organisation-unit-tree"; + declare export * from "@dhis2-ui/popover"; + declare export { Popper, PopperProps } from "@dhis2-ui/popper"; + declare export * from "@dhis2-ui/portal"; + declare export * from "@dhis2-ui/radio"; + declare export * from "@dhis2-ui/required"; + declare export { Pagination, PaginationProps } from "@dhis2-ui/pagination"; + declare export * from "@dhis2-ui/sharing-dialog"; + declare export { + SingleSelect, + SingleSelectField, + SingleSelectOption, + MultiSelect, + MultiSelectField, + MultiSelectOption, + SingleSelectProps, + SingleSelectFieldProps, + SingleSelectOptionProps, + MultiSelectProps, + MultiSelectFieldProps, + MultiSelectOptionProps, +} from "@dhis2-ui/select"; + declare export * from "@dhis2-ui/selector-bar"; + declare export * from "@dhis2-ui/switch"; + declare export * from "@dhis2-ui/table"; + declare export * from "@dhis2-ui/tab"; + declare export * from "@dhis2-ui/tag"; + declare export * from "@dhis2-ui/text-area"; + declare export * from "@dhis2-ui/tooltip"; + declare export * from "@dhis2-ui/transfer"; + declare export * from "@dhis2-ui/user-avatar"; + declare export * from "@dhis2-ui/segmented-control"; diff --git a/i18n/en.pot b/i18n/en.pot index bf699066c9..5abcb9b946 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: 2023-12-15T14:56:37.592Z\n" -"PO-Revision-Date: 2023-12-15T14:56:37.592Z\n" +"POT-Creation-Date: 2024-01-05T14:09:35.742Z\n" +"PO-Revision-Date: 2024-01-05T14:09:35.742Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1365,6 +1365,9 @@ msgstr "This stage can only have one event" msgid "Events could not be retrieved. Please try again later." msgstr "Events could not be retrieved. Please try again later." +msgid "Assigned to" +msgstr "Assigned to" + msgid "{{ totalEvents }} events" msgstr "{{ totalEvents }} events" @@ -1431,9 +1434,6 @@ msgstr "Download data..." msgid "an error occurred loading working lists" msgstr "an error occurred loading working lists" -msgid "Assigned to" -msgstr "Assigned to" - msgid "Registration Date" msgstr "Registration Date" diff --git a/i18n/es.po b/i18n/es.po index 67b54c1201..bdbd09c1ac 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -10,16 +10,16 @@ # Janeth Cruz, 2023 # Prabhjot Singh, 2023 # Christian Atavillos, 2023 -# Enzo Nicolas Rossi , 2023 # Gabriela Rodriguez , 2023 # Viktor Varland , 2023 +# Enzo Nicolas Rossi , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Viktor Varland , 2023\n" +"Last-Translator: Enzo Nicolas Rossi , 2024\n" "Language-Team: Spanish (https://app.transifex.com/hisp-uio/teams/100509/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -176,7 +176,7 @@ msgid "Complete event" msgstr "Completar el evento" msgid "{{ stageName }} - Basic info" -msgstr "" +msgstr "{{ stageName }} - Información básica" msgid "{{ stageName }} - Status" msgstr "" diff --git a/i18n/es_419.po b/i18n/es_419.po index 9e781ff26a..b9754779c5 100644 --- a/i18n/es_419.po +++ b/i18n/es_419.po @@ -1,14 +1,14 @@ # # Translators: -# Enzo Nicolas Rossi , 2023 # Jaime Bosque , 2023 +# Enzo Nicolas Rossi , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Jaime Bosque , 2023\n" +"Last-Translator: Enzo Nicolas Rossi , 2024\n" "Language-Team: Spanish (Latin America) (https://app.transifex.com/hisp-uio/teams/100509/es_419/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1281,7 +1281,7 @@ msgid "Scheduled date cannot be changed for {{ eventStatus }} events" msgstr "" msgid "Event completed" -msgstr "" +msgstr "Evento completado" msgid "Back to all stages and events" msgstr "Volver a todas las etapas y eventos" @@ -1431,7 +1431,7 @@ msgid "Working list could not be loaded" msgstr "" msgid "Download as JSON" -msgstr "" +msgstr "Descargar como JSON" msgid "Download as CSV" msgstr "" @@ -1512,7 +1512,7 @@ msgid "Show All" msgstr "" msgid "An error has occured. See log for details" -msgstr "" +msgstr " Ha ocurrido un error. Ver el registro para más detalles." msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/lo.po b/i18n/lo.po index 21bbeecd37..4016b96aca 100644 --- a/i18n/lo.po +++ b/i18n/lo.po @@ -1,16 +1,16 @@ # # Translators: -# Saysamone Sibounma, 2023 # Philip Larsen Donnelly, 2023 # Viktor Varland , 2023 # Thuy Nguyen , 2023 +# Saysamone Sibounma, 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Thuy Nguyen , 2023\n" +"Last-Translator: Saysamone Sibounma, 2023\n" "Language-Team: Lao (https://app.transifex.com/hisp-uio/teams/100509/lo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -587,7 +587,7 @@ msgid "Offline" msgstr "ບໍ່ມີການເຊື່ອມຕໍ່" msgid "Syncing" -msgstr "" +msgstr "ກຳລັງອັບເດດຂໍ້ມູນໃຫ້ຄືກັນ" msgid "Add comment" msgstr "" @@ -1248,7 +1248,7 @@ msgid "Scheduled date cannot be changed for {{ eventStatus }} events" msgstr "" msgid "Event completed" -msgstr "" +msgstr "ກິດຈະກຳສຳເລັດແລ້ວ" msgid "Back to all stages and events" msgstr "" diff --git a/i18n/nb.po b/i18n/nb.po index 00e615f61b..16e7fc4490 100644 --- a/i18n/nb.po +++ b/i18n/nb.po @@ -1,14 +1,14 @@ # # Translators: # Caroline Hesthagen Holen , 2023 -# Karoline Tufte Lien , 2023 +# Karoline Tufte Lien , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Karoline Tufte Lien , 2023\n" +"Last-Translator: Karoline Tufte Lien , 2024\n" "Language-Team: Norwegian Bokmål (https://app.transifex.com/hisp-uio/teams/100509/nb/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -756,7 +756,7 @@ msgstr "" "{{tetName}}." msgid "Enroll a new {{selectedTetName}} in this program." -msgstr "Registrer en ny {{teiDisplayName}} i dette programmet" +msgstr "Registrer en ny {{selectedTetName}} i dette programmet" msgid "{{programName}} is an event program and does not have enrollments." msgstr "{{programName}} er et hendelsesprogram og har ikke registreringer." @@ -837,7 +837,7 @@ msgid "Registered events" msgstr "Registrerte hendelser" msgid "Please select {{category}}." -msgstr "Velg {{kategori}}." +msgstr "Velg {{category}}." msgid "Or see all records accessible to you in {{program}} " msgstr "Eller se alle opptegnelser som er tilgjengelige for deg i {{program}}" diff --git a/i18n/zh.po b/i18n/zh.po index 5723afede3..16ff6d9de3 100644 --- a/i18n/zh.po +++ b/i18n/zh.po @@ -1,16 +1,16 @@ # # Translators: # Philip Larsen Donnelly, 2022 -# easylin , 2023 # 晓东 林 <13981924470@126.com>, 2023 # Viktor Varland , 2023 +# easylin , 2023 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" "POT-Creation-Date: 2023-09-12T06:24:49.265Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Viktor Varland , 2023\n" +"Last-Translator: easylin , 2023\n" "Language-Team: Chinese (https://app.transifex.com/hisp-uio/teams/100509/zh/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -1159,7 +1159,7 @@ msgid "Edit" msgstr "编辑" msgid "Set coordinates" -msgstr "" +msgstr "设置坐标" msgid "Coordinates" msgstr "坐标" @@ -1168,10 +1168,10 @@ msgid "Delete polygon" msgstr "删除多边形" msgid "Close without saving" -msgstr "" +msgstr "关闭而不保存" msgid "Finish drawing before saving" -msgstr "" +msgstr "保存前完成绘制" msgid "Set area" msgstr "设置区域" @@ -1201,10 +1201,10 @@ msgid "Cancelled" msgstr "已取消" msgid "Add coordinates" -msgstr "" +msgstr "添加坐标" msgid "Add area" -msgstr "" +msgstr "添加区域" msgid "Comments about this enrollment" msgstr "关于本次报名的评论" diff --git a/package.json b/package.json index b980c2de4a..bfe4c80cbf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "capture-app", "homepage": ".", - "version": "100.47.1", + "version": "100.50.6", "cacheVersion": "7", "serverVersion": "38", "license": "BSD-3-Clause", @@ -10,7 +10,7 @@ "packages/rules-engine" ], "dependencies": { - "@dhis2/rules-engine-javascript": "100.47.1", + "@dhis2/rules-engine-javascript": "100.50.6", "@dhis2/app-runtime": "^3.9.3", "@dhis2/d2-i18n": "^1.1.0", "@dhis2/d2-icons": "^1.0.1", @@ -18,7 +18,7 @@ "@dhis2/d2-ui-org-unit-tree": "^7.3.3", "@dhis2/d2-ui-rich-text": "^7.4.0", "@dhis2/d2-ui-sharing-dialog": "^7.3.3", - "@dhis2/ui": "^8.13.8", + "@dhis2/ui": "^9.1.1", "@joakim_sm/react-infinite-calendar": "^2.4.2", "@material-ui/core": "3.9.4", "@material-ui/icons": "3", @@ -133,6 +133,7 @@ }, "resolutions": { "@babel/preset-react": "7.16.7", + "@dhis2/ui": "^9.1.1", "@js-temporal/polyfill": "0.4.3", "core-js": "2.5.7" }, diff --git a/packages/rules-engine/package.json b/packages/rules-engine/package.json index 84175439f4..095f43a095 100644 --- a/packages/rules-engine/package.json +++ b/packages/rules-engine/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/rules-engine-javascript", - "version": "100.47.1", + "version": "100.50.6", "license": "BSD-3-Clause", "main": "./build/cjs/index.js", "scripts": { diff --git a/packages/rules-engine/src/RulesEngine.js b/packages/rules-engine/src/RulesEngine.js index d634f5d558..7b70025632 100644 --- a/packages/rules-engine/src/RulesEngine.js +++ b/packages/rules-engine/src/RulesEngine.js @@ -10,6 +10,7 @@ import type { IConvertInputRulesValue, IConvertOutputRulesEffectsValue, IDateUtils, + Flag, } from './rulesEngine.types'; import { getRulesEffectsProcessor } from './processors/rulesEffectsProcessor/rulesEffectsProcessor'; import { effectActions, typeof environmentTypes } from './constants'; @@ -21,18 +22,21 @@ export class RulesEngine { variableService: VariableService; dateUtils: IDateUtils; userRoles: Array; + flags: Flag; constructor( inputConverter: IConvertInputRulesValue, outputConverter: IConvertOutputRulesEffectsValue, dateUtils: IDateUtils, environment: $Values, + flags?: Flag, ) { this.inputConverter = inputConverter; this.outputConverter = outputConverter; this.valueProcessor = new ValueProcessor(inputConverter); this.variableService = new VariableService(this.valueProcessor.processValue, dateUtils, environment); this.dateUtils = dateUtils; + this.flags = flags ?? {}; } /** @@ -114,10 +118,15 @@ export class RulesEngine { expression, dhisFunctions, variablesHash, + flags: this.flags, onError: (error, injectedExpression) => log.warn( `Expression with id rule:${rule.id} could not be run. ` + `Original condition was: ${expression} - ` + `Evaluation ended up as:${injectedExpression} - error message:${error}`), + onVerboseLog: injectedExpression => console.log( + `Expression with id rule:${rule.id} was run. ` + + `Original condition was: ${expression} - ` + + `Evaluation ended up as:${injectedExpression}`), }); } else { log.warn(`Rule id:'${rule.id}' and name:'${rule.displayName}' ` + @@ -149,10 +158,15 @@ export class RulesEngine { expression: actionExpression, dhisFunctions, variablesHash, + flags: this.flags, onError: (error, injectedExpression) => log.warn( `Expression with id rule: action:${id} could not be run. ` + `Original condition was: ${actionExpression} - ` + `Evaluation ended up as:${injectedExpression} - error message:${error}`), + onVerboseLog: injectedExpression => log.info( + `Expression with id rule: action:${id} was run. ` + + `Original condition was: ${actionExpression} - ` + + `Evaluation ended up as: ${injectedExpression}`), }); } @@ -196,4 +210,12 @@ export class RulesEngine { setSelectedUserRoles(userRoles: Array) { this.userRoles = userRoles; } + + setFlags(flags: Flag) { + this.flags = flags; + } + + getFlags(): Flag { + return this.flags; + } } diff --git a/packages/rules-engine/src/rulesEngine.types.js b/packages/rules-engine/src/rulesEngine.types.js index 3f1d422303..59b2fc9b62 100644 --- a/packages/rules-engine/src/rulesEngine.types.js +++ b/packages/rules-engine/src/rulesEngine.types.js @@ -230,5 +230,5 @@ export type IConvertOutputRulesEffectsValue = {| |}; export type Flag = { - debug: boolean + verbose: boolean, } diff --git a/packages/rules-engine/src/services/expressionService/executeExpression.js b/packages/rules-engine/src/services/expressionService/executeExpression.js index 3e7c9c3256..470105f032 100644 --- a/packages/rules-engine/src/services/expressionService/executeExpression.js +++ b/packages/rules-engine/src/services/expressionService/executeExpression.js @@ -177,7 +177,9 @@ export const executeExpression = ({ expression, dhisFunctions, variablesHash, + flags = {}, onError, + onVerboseLog, }: ExecuteExpressionInput) => { const expressionWithInjectedVariableValues = injectVariableValues(expression, variablesHash); @@ -191,6 +193,10 @@ export const executeExpression = ({ removeNewLinesFromNonStrings(expressionWithInjectedVariableValues, expressionModuloStrings), onError, ); + + if (flags.verbose) { + onVerboseLog(expressionWithInjectedVariableValues); + } } catch (error) { onError(error.message, expressionWithInjectedVariableValues); } diff --git a/packages/rules-engine/src/services/expressionService/executeExpression.types.js b/packages/rules-engine/src/services/expressionService/executeExpression.types.js index ba88c7ed53..d680758864 100644 --- a/packages/rules-engine/src/services/expressionService/executeExpression.types.js +++ b/packages/rules-engine/src/services/expressionService/executeExpression.types.js @@ -1,5 +1,5 @@ // @flow -import type { RuleVariables } from '../../rulesEngine.types'; +import type { Flag, RuleVariables } from '../../rulesEngine.types'; import type { D2Functions, D2FunctionConfig } from '../../d2Functions'; export type ExpressionSet = $ReadOnly<{| @@ -23,5 +23,7 @@ export type ExecuteExpressionInput = $ReadOnly<{| expression: string, dhisFunctions: D2Functions, variablesHash: RuleVariables, + flags?: Flag, onError: ErrorHandler, + onVerboseLog: (expressionWithInjectedVariableValues: string) => void, |}>; diff --git a/src/components/App/App.component.js b/src/components/App/App.component.js index 694e2b1379..949eb69f6c 100644 --- a/src/components/App/App.component.js +++ b/src/components/App/App.component.js @@ -1,10 +1,14 @@ // @flow /* eslint-disable import/first */ import './app.css'; -import * as React from 'react'; +import React from 'react'; import { Provider } from 'react-redux'; import D2UIApp from '@dhis2/d2-ui-app'; import { AppContents } from './AppContents.component'; +import { + RulesEngineVerboseInitializer, +} from '../../core_modules/capture-core/components/RulesEngineVerboseInitializer'; + type Props = { store: ReduxStore, @@ -16,7 +20,9 @@ export const App = ({ store }: Props) => ( store={store} > - + + + diff --git a/src/components/App/AppContents.component.js b/src/components/App/AppContents.component.js index 6839da4d41..b476d02f5a 100644 --- a/src/components/App/AppContents.component.js +++ b/src/components/App/AppContents.component.js @@ -1,6 +1,6 @@ // @flow -import React from 'react'; +import React, { memo } from 'react'; import { withStyles } from '@material-ui/core/styles'; import { systemSettingsStore } from 'capture-core/metaDataMemoryStores'; import { FeedbackBar } from 'capture-core/components/FeedbackBar'; @@ -30,4 +30,4 @@ const Index = ({ classes }: Props) => ( ); Index.displayName = 'AppContents'; -export const AppContents = withStyles(getStyles)(Index); +export const AppContents = withStyles(getStyles)(memo(Index)); diff --git a/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/withMainButton.js b/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/withMainButton.js index 8b18d2f201..66f2be3f12 100644 --- a/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/withMainButton.js +++ b/src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/withMainButton.js @@ -3,7 +3,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import i18n from '@dhis2/d2-i18n'; import { Button } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { newEventSaveTypes } from './newEventSaveTypes'; import { getDataEntryKey } from '../../../../DataEntry/common/getDataEntryKey'; import { type RenderFoundation } from '../../../../../metaData'; diff --git a/src/core_modules/capture-core/components/DataEntries/withErrorMessagePostProcessor/UniqueTEADuplicate/ExistingTEIContents.component.js b/src/core_modules/capture-core/components/DataEntries/withErrorMessagePostProcessor/UniqueTEADuplicate/ExistingTEIContents.component.js index 8d919e73e2..7bfed86fa6 100644 --- a/src/core_modules/capture-core/components/DataEntries/withErrorMessagePostProcessor/UniqueTEADuplicate/ExistingTEIContents.component.js +++ b/src/core_modules/capture-core/components/DataEntries/withErrorMessagePostProcessor/UniqueTEADuplicate/ExistingTEIContents.component.js @@ -2,10 +2,7 @@ import React, { type ComponentType } from 'react'; import { withStyles } from '@material-ui/core/styles'; import i18n from '@dhis2/d2-i18n'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogTitle from '@material-ui/core/DialogTitle'; -import DialogActions from '@material-ui/core/DialogActions'; -import { Button } from '@dhis2/ui'; +import { Button, ModalContent, ModalTitle, ModalActions } from '@dhis2/ui'; import { CardList } from '../../../CardList'; import type { Props } from './existingTeiContents.types'; @@ -35,18 +32,18 @@ const ExistingTEIContentsComponentPlain = ({ return ( - - + + {i18n.t('Registered person')} - + - - + + - - - - - ) + renderAskToCreateNewModal = () => { + if (!this.state.isOpen) { + return null; + } + + return ( + + + {i18n.t('Generate new event')} + + + {i18n.t('Do you want to create another event?')} + + + + + + + + + ); + } render() { const { onSave, ...passOnProps } = this.props; diff --git a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorAndWarningDialog.component.js b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorAndWarningDialog.component.js index 203faee0b5..0b92900d0b 100644 --- a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorAndWarningDialog.component.js +++ b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorAndWarningDialog.component.js @@ -1,12 +1,8 @@ // @flow import * as React from 'react'; import { withStyles } from '@material-ui/core'; -import DialogActions from '@material-ui/core/DialogActions'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogContentText from '@material-ui/core/DialogContentText'; -import DialogTitle from '@material-ui/core/DialogTitle'; import i18n from '@dhis2/d2-i18n'; -import { Button } from '@dhis2/ui'; +import { Button, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; const getStyles = (theme: Theme) => ({ errors: { @@ -134,17 +130,15 @@ class ErrorAndWarningDialogPlain extends React.Component { render() { return ( - + {i18n.t('Validation errors and warnings')} - - - - {this.getContents()} - - - + + + {this.getContents()} + + {this.getButtons()} - + ); } diff --git a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorDialog.component.js b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorDialog.component.js index 8d17307161..25d60ad5f2 100644 --- a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorDialog.component.js +++ b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/ErrorDialog.component.js @@ -1,11 +1,7 @@ // @flow import * as React from 'react'; -import DialogActions from '@material-ui/core/DialogActions'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogContentText from '@material-ui/core/DialogContentText'; -import DialogTitle from '@material-ui/core/DialogTitle'; import i18n from '@dhis2/d2-i18n'; -import { Button } from '@dhis2/ui'; +import { Button, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; type Props = { @@ -52,7 +48,7 @@ class ErrorDialogPlain extends React.Component { const { onAbort, onSave, saveEnabled, classes } = this.props; return ( -
+
@@ -73,17 +69,15 @@ class ErrorDialogPlain extends React.Component { render() { return ( - + {i18n.t('Validation errors')} - - - - {this.getContents()} - - - + + + {this.getContents()} + + {this.getButtons()} - + ); } diff --git a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/WarningDialog.component.js b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/WarningDialog.component.js index 4510553cca..ff95f00ee1 100644 --- a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/WarningDialog.component.js +++ b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/MessagesDialogContents/WarningDialog.component.js @@ -1,11 +1,7 @@ // @flow import * as React from 'react'; -import DialogActions from '@material-ui/core/DialogActions'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogContentText from '@material-ui/core/DialogContentText'; -import DialogTitle from '@material-ui/core/DialogTitle'; import i18n from '@dhis2/d2-i18n'; -import { Button } from '@dhis2/ui'; +import { Button, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; type Props = { @@ -51,15 +47,13 @@ class WarningDialogPlain extends React.Component { const { onAbort, onSave, classes } = this.props; return ( - + {i18n.t('Validation warnings')} - - - - {this.getContents()} - - - + + + {this.getContents()} + +
-
+
); } diff --git a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/withSaveHandler.js b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/withSaveHandler.js index d8e90bfc3c..a58549fd2b 100644 --- a/src/core_modules/capture-core/components/DataEntry/withSaveHandler/withSaveHandler.js +++ b/src/core_modules/capture-core/components/DataEntry/withSaveHandler/withSaveHandler.js @@ -1,10 +1,7 @@ // @flow import * as React from 'react'; import log from 'loglevel'; -import Dialog from '@material-ui/core/Dialog'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogContentText from '@material-ui/core/DialogContentText'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import { Modal, ModalContent, ModalTitle } from '@dhis2/ui'; import { connect } from 'react-redux'; import i18n from '@dhis2/d2-i18n'; import { errorCreator } from 'capture-core-utils'; @@ -248,32 +245,34 @@ const getSaveHandler = ( onSave={this.handleSaveAttempt} {...filteredProps} /> - - - - - - {i18n.t('Operations running')} - - - + {this.state.messagesDialogOpen && ( + + + + )} + {this.state.waitForPromisesDialogOpen && ( + + + {i18n.t('Operations running')} + + {this.getDialogWaitForUploadContents()} - - - + + + )}
); } diff --git a/src/core_modules/capture-core/components/Dialogs/DiscardDialog.component.js b/src/core_modules/capture-core/components/Dialogs/DiscardDialog.component.js index 257852c7d8..926637ec0a 100644 --- a/src/core_modules/capture-core/components/Dialogs/DiscardDialog.component.js +++ b/src/core_modules/capture-core/components/Dialogs/DiscardDialog.component.js @@ -5,24 +5,32 @@ import type { Props } from './discardDialog.types'; export const DiscardDialog = ({ open, header, text, cancelText, onCancel, destructiveText, onDestroy, -}: Props) => ( - - - {header} - - - {text} - - - - - - - - -); +}: Props) => { + if (!open) { + return null; + } + + return ( + + + {header} + + +
+ {text} +
+
+ + + + + + +
+ ); +}; diff --git a/src/core_modules/capture-core/components/FeedbackBar/FeedbackBar.component.js b/src/core_modules/capture-core/components/FeedbackBar/FeedbackBar.component.js index c6b1fe0a49..f4406742cc 100644 --- a/src/core_modules/capture-core/components/FeedbackBar/FeedbackBar.component.js +++ b/src/core_modules/capture-core/components/FeedbackBar/FeedbackBar.component.js @@ -1,13 +1,9 @@ // @flow import * as React from 'react'; import SnackBar from '@material-ui/core/Snackbar'; -import Dialog from '@material-ui/core/Dialog'; -import DialogActions from '@material-ui/core/DialogActions'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogTitle from '@material-ui/core/DialogTitle'; import { withStyles } from '@material-ui/core/styles'; import { IconButton } from 'capture-ui'; -import { IconCross24, Button } from '@dhis2/ui'; +import { IconCross24, Button, Modal, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; import i18n from '@dhis2/d2-i18n'; import isDefined from 'd2-utilizr/lib/isDefined'; @@ -100,25 +96,27 @@ class Index extends React.Component { message={{message}} action={this.getAction()} /> - - - { + {isDialogOpen && ( + + + { // $FlowFixMe[prop-missing] automated comment - isDialogOpen ? message && message.title : ''} - - - { + isDialogOpen ? message && message.title : ''} + + + { // $FlowFixMe[prop-missing] automated comment - isDialogOpen ? message && message.content : ''} - - - - - + isDialogOpen ? message && message.content : ''} + + + + + + )} ); } diff --git a/src/core_modules/capture-core/components/FormFields/New/Fields/CoordinateField/CoordinateField.component.js b/src/core_modules/capture-core/components/FormFields/New/Fields/CoordinateField/CoordinateField.component.js index 9ac8d6931c..992b6b069d 100644 --- a/src/core_modules/capture-core/components/FormFields/New/Fields/CoordinateField/CoordinateField.component.js +++ b/src/core_modules/capture-core/components/FormFields/New/Fields/CoordinateField/CoordinateField.component.js @@ -2,8 +2,7 @@ import * as React from 'react'; import withStyles from '@material-ui/core/styles/withStyles'; import { CoordinateField as UICoordinateField } from 'capture-ui'; -import Dialog from '@material-ui/core/Dialog'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import { Modal, ModalTitle } from '@dhis2/ui'; import { typeof orientations } from '../../../New'; const getStyles = (theme: Theme) => ({ @@ -80,11 +79,12 @@ class CoordinateFieldPlain extends React.Component { // $FlowFixMe[cannot-spread-inexact] automated comment - {dialogLabel} - + {dialogLabel} + } {...passOnProps} classes={this.passOnClasses} diff --git a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js index 7946993a79..6c252f087b 100644 --- a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js +++ b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js @@ -13,7 +13,7 @@ const getStyles = () => ({ type OrgUnitValue = { id: string, - displayName: string, + name: string, path: string, } @@ -44,7 +44,7 @@ class SingleOrgUnitSelectFieldPlain extends React.Component { const { classes } = this.props; return (
- {selectedOrgUnit.displayName} + {selectedOrgUnit.name}
); } @@ -52,7 +52,7 @@ class SingleOrgUnitSelectFieldPlain extends React.Component { onSelectOrgUnit = (orgUnit: Object) => { this.props.onBlur({ id: orgUnit.id, - displayName: orgUnit.displayName, + name: orgUnit.displayName, path: orgUnit.path, }); } diff --git a/src/core_modules/capture-core/components/FormFields/New/Fields/PolygonField/PolygonField.component.js b/src/core_modules/capture-core/components/FormFields/New/Fields/PolygonField/PolygonField.component.js index 058d82c9c9..47831a9a47 100644 --- a/src/core_modules/capture-core/components/FormFields/New/Fields/PolygonField/PolygonField.component.js +++ b/src/core_modules/capture-core/components/FormFields/New/Fields/PolygonField/PolygonField.component.js @@ -2,7 +2,7 @@ import * as React from 'react'; import withStyles from '@material-ui/core/styles/withStyles'; import { PolygonField as UIPolygonField } from 'capture-ui'; -import { Dialog, DialogTitle } from '@material-ui/core'; +import { Modal, ModalTitle } from '@dhis2/ui'; import { typeof orientations } from '../../../New'; const getStyles = () => ({ @@ -44,11 +44,12 @@ class PolygonFieldPlain extends React.Component { // $FlowFixMe[cannot-spread-inexact] automated comment - {dialogLabel} - + {dialogLabel} + } {...passOnProps} /> diff --git a/src/core_modules/capture-core/components/ListView/ColumnSelector/ColumnSelectorDialog.component.js b/src/core_modules/capture-core/components/ListView/ColumnSelector/ColumnSelectorDialog.component.js index 6cbe5aa034..ff0bad9c19 100644 --- a/src/core_modules/capture-core/components/ListView/ColumnSelector/ColumnSelectorDialog.component.js +++ b/src/core_modules/capture-core/components/ListView/ColumnSelector/ColumnSelectorDialog.component.js @@ -1,11 +1,7 @@ // @flow import React, { useState, useEffect } from 'react'; import { isEqual } from 'lodash'; -import { Button } from '@dhis2/ui'; -import Dialog from '@material-ui/core/Dialog'; -import DialogActions from '@material-ui/core/DialogActions'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogTitle from '@material-ui/core/DialogTitle'; +import { Modal, ModalTitle, ModalContent, ModalActions, Button } from '@dhis2/ui'; import i18n from '@dhis2/d2-i18n'; import { DragDropList } from './DragDropList'; @@ -40,23 +36,31 @@ export const ColumnSelectorDialog = ({ columns, open, onClose, onSave }: Props) setColumnList(sortedList); }; + if (!open) { + return null; + } + return ( - - {i18n.t('Columns to show in table')} - + + {i18n.t('Columns to show in table')} + - - + + - - + + ); }; diff --git a/src/core_modules/capture-core/components/ListView/Filters/FilterButton/FilterButtonMain.component.js b/src/core_modules/capture-core/components/ListView/Filters/FilterButton/FilterButtonMain.component.js index 6541747f96..8a1c83ddd1 100644 --- a/src/core_modules/capture-core/components/ListView/Filters/FilterButton/FilterButtonMain.component.js +++ b/src/core_modules/capture-core/components/ListView/Filters/FilterButton/FilterButtonMain.component.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import { withStyles } from '@material-ui/core/styles'; import Popover from '@material-ui/core/Popover'; import { IconChevronDown16, IconChevronUp16, Button } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { ActiveFilterButton } from './ActiveFilterButton.component'; import { FilterSelectorContents } from '../Contents'; import type { UpdateFilter, ClearFilter, RemoveFilter } from '../../types'; diff --git a/src/core_modules/capture-core/components/LoadingMasks/DialogLoadingMask.component.js b/src/core_modules/capture-core/components/LoadingMasks/DialogLoadingMask.component.js index 0366b2b095..1acc9e6a1c 100644 --- a/src/core_modules/capture-core/components/LoadingMasks/DialogLoadingMask.component.js +++ b/src/core_modules/capture-core/components/LoadingMasks/DialogLoadingMask.component.js @@ -1,8 +1,6 @@ // @flow import React, { Component } from 'react'; -import { CircularLoader } from '@dhis2/ui'; -import Dialog from '@material-ui/core/Dialog'; -import DialogContent from '@material-ui/core/DialogContent'; +import { CircularLoader, Modal, ModalContent } from '@dhis2/ui'; type Props = { }; @@ -10,13 +8,13 @@ type Props = { export class DialogLoadingMask extends Component { render() { return ( - - + - - + + ); } } diff --git a/src/core_modules/capture-core/components/Notes/Notes.component.js b/src/core_modules/capture-core/components/Notes/Notes.component.js index bb1fc61c8d..1a7626bfd7 100644 --- a/src/core_modules/capture-core/components/Notes/Notes.component.js +++ b/src/core_modules/capture-core/components/Notes/Notes.component.js @@ -6,7 +6,7 @@ import { withStyles } from '@material-ui/core'; import { colors, spacersNum, Menu, MenuItem, Button } from '@dhis2/ui'; import i18n from '@dhis2/d2-i18n'; import { withFocusSaver } from 'capture-ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { TextField } from '../FormFields/New'; import type { Note } from './notes.types'; diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentQuickActions/QuickActionButton/QuickActionButton.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentQuickActions/QuickActionButton/QuickActionButton.js index 7727a05019..ae60c51371 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentQuickActions/QuickActionButton/QuickActionButton.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentQuickActions/QuickActionButton/QuickActionButton.js @@ -3,7 +3,7 @@ import React from 'react'; import i18n from '@dhis2/d2-i18n'; import { Button, spacers } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import type { QuickActionButtonTypes } from './QuickActionButton.types'; const styles = { diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js index d319df06d1..542e07dfe6 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramMetadata.js @@ -1,28 +1,99 @@ // @flow -import { useEffect } from 'react'; -import { useDataQuery } from '@dhis2/app-runtime'; - -const query = { - programData: { - resource: 'programs', - id: ({ id }) => id, - params: { - fields: - ['programStages[id,repeatable,hideDueDate,programStageDataElements[displayInReports,dataElement[id,valueType,displayName,displayFormName,optionSet[options[code,name]]]'], - }, - }, -}; +import { useMemo } from 'react'; +import { useProgramFromIndexedDB } from '../../../../../utils/cachedDataHooks/useProgramFromIndexedDB'; +import { useDataElementsFromIndexedDB } from '../../../../../utils/cachedDataHooks/useDataElementsFromIndexedDB'; +import { useOptionSetsFromIndexedDB } from '../../../../../utils/cachedDataHooks/useOptionSetsFromIndexedDB'; + +const queryKey = 'useProgramMetadata'; export const useProgramMetadata = (programId: string) => { - const { data, error, loading, refetch } = useDataQuery(query, { - lazy: true, - }); + const { program, isLoading, isError } = useProgramFromIndexedDB(programId, { enabled: !!programId }); + + const dataElementIds = useMemo(() => + (program ? program.programStages.reduce( + (acc, stage) => stage.programStageDataElements.reduce( + (accIds, dataElement) => { + accIds.add(dataElement.dataElementId); + return accIds; + }, acc), + new Set) : undefined), [program]); + + const { + isLoading: loadingDataElements, + dataElements, + isError: dataElementsError, + } = useDataElementsFromIndexedDB([queryKey, programId], dataElementIds); + + const derivedDataElementValues = useMemo(() => + (dataElements ? ({ + optionSetIds: dataElements.reduce((acc, dataElement) => { + if (dataElement.optionSetValue) { + acc.add(dataElement.optionSet.id); + } + return acc; + }, new Set), + dataElementDictionary: dataElements.reduce((acc, dataElement) => { + acc[dataElement.id] = dataElement; + return acc; + }, {}), + }) : undefined), [dataElements]); - useEffect(() => { - if (programId) { - refetch({ id: programId }); + const { + isLoading: loadingOptionSets, + optionSets, + isError: optionSetsError, + } = useOptionSetsFromIndexedDB([queryKey, programId], derivedDataElementValues && derivedDataElementValues.optionSetIds); + + const optionSetDictionary = useMemo( + () => (optionSets ? optionSets.reduce( + (acc, optionSet) => { + acc[optionSet.id] = { + optionSet: { + options: optionSet.options.map(option => ({ + name: option.displayName, + code: option.code, + })), + }, + }; + return acc; + }, {}) : undefined), + [optionSets], + ); + + const programMetadata = useMemo(() => { + if (!program || !derivedDataElementValues || !optionSetDictionary) { + return undefined; } - }, [refetch, programId]); - return { error, programMetadata: !loading && data?.programData ? data.programData : undefined }; + const dataElementDictionary = derivedDataElementValues.dataElementDictionary; + + return { + programStages: program.programStages.map(stage => ({ + id: stage.id, + repeatable: stage.repeatable, + hideDueDate: stage.hideDueDate, + enableUserAssignment: stage.enableUserAssignment, + programStageDataElements: stage.programStageDataElements + .map((programStageDataElement) => { + const dataElement = dataElementDictionary[programStageDataElement.dataElementId]; + return { + displayInReports: programStageDataElement.displayInReports, + dataElement: { + id: dataElement.id, + valueType: dataElement.valueType, + displayName: dataElement.displayName, + displayFormName: dataElement.displayFormName, + optionSet: dataElement.optionSetValue ? optionSetDictionary[dataElement.optionSet.id] : {}, + }, + }; + }), + })), + }; + }, [program, derivedDataElementValues, optionSetDictionary]); + + + return { + error: (isError || dataElementsError || optionSetsError) && { programId }, + programMetadata: (isLoading || loadingDataElements || loadingOptionSets) ? undefined : programMetadata, + }; }; diff --git a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js index 7d692e9867..a746dfe9e6 100644 --- a/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js +++ b/src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/hooks/useProgramStages.js @@ -11,7 +11,7 @@ export const useProgramStages = (program: Program, programStages?: Array { const { id, name, icon, stageForm } = item; - const { hideDueDate, programStageDataElements, repeatable } = programStages.find(p => p.id === id) || {}; + const { hideDueDate, programStageDataElements, repeatable, enableUserAssignment } = programStages.find(p => p.id === id) || {}; if (!programStageDataElements) { log.error(errorCreator(i18n.t('Program stage not found'))(id)); } else { @@ -21,6 +21,7 @@ export const useProgramStages = (program: Program, programStages?: Array { const { displayInReports, dataElement } = currentStageData; diff --git a/src/core_modules/capture-core/components/Pages/EnrollmentAddEvent/ProgramStageSelector/ProgramStageSelector.component.js b/src/core_modules/capture-core/components/Pages/EnrollmentAddEvent/ProgramStageSelector/ProgramStageSelector.component.js index 092ddf13f6..01967b1f21 100644 --- a/src/core_modules/capture-core/components/Pages/EnrollmentAddEvent/ProgramStageSelector/ProgramStageSelector.component.js +++ b/src/core_modules/capture-core/components/Pages/EnrollmentAddEvent/ProgramStageSelector/ProgramStageSelector.component.js @@ -2,7 +2,7 @@ import React from 'react'; import i18n from '@dhis2/d2-i18n'; import { Button, spacers, spacersNum } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { withStyles } from '@material-ui/core'; import { NonBundledDhis2Icon } from '../../../NonBundledDhis2Icon'; diff --git a/src/core_modules/capture-core/components/Pages/ViewEvent/EventDetailsSection/EventDetailsSection.component.js b/src/core_modules/capture-core/components/Pages/ViewEvent/EventDetailsSection/EventDetailsSection.component.js index 31da7bdbd4..7f6a2a440f 100644 --- a/src/core_modules/capture-core/components/Pages/ViewEvent/EventDetailsSection/EventDetailsSection.component.js +++ b/src/core_modules/capture-core/components/Pages/ViewEvent/EventDetailsSection/EventDetailsSection.component.js @@ -5,7 +5,7 @@ import { dataEntryIds, dataEntryKeys } from 'capture-core/constants'; import { withStyles } from '@material-ui/core/'; import { spacers, IconFileDocument24, Button } from '@dhis2/ui'; import i18n from '@dhis2/d2-i18n'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { ViewEventSection } from '../Section/ViewEventSection.component'; import { ViewEventSectionHeader } from '../Section/ViewEventSectionHeader.component'; import { EditEventDataEntry } from '../../../WidgetEventEdit/EditEventDataEntry/EditEventDataEntry.container'; diff --git a/src/core_modules/capture-core/components/Pages/ViewEvent/RightColumn/RightColumnWrapper.component.js b/src/core_modules/capture-core/components/Pages/ViewEvent/RightColumn/RightColumnWrapper.component.js index 344c6b4698..307d8ccd30 100644 --- a/src/core_modules/capture-core/components/Pages/ViewEvent/RightColumn/RightColumnWrapper.component.js +++ b/src/core_modules/capture-core/components/Pages/ViewEvent/RightColumn/RightColumnWrapper.component.js @@ -1,6 +1,7 @@ // @flow import * as React from 'react'; +import { spacers } from '@dhis2/ui'; import { withStyles } from '@material-ui/core/styles'; import { ErrorsSection } from './ErrorsSection/ErrorsSection.container'; import { WarningsSection } from './WarningsSection/WarningsSection.container'; @@ -18,9 +19,12 @@ type Props = { const getStyles = (theme: Theme) => ({ container: { + display: 'flex', + flexDirection: 'column', flexBasis: theme.typography.pxToRem(0), flexGrow: 1, minWidth: theme.typography.pxToRem(300), + gap: spacers.dp16, }, }); diff --git a/src/core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/TrackedEntityRelationshipsWrapper/TrackedEntityRelationshipsWrapper.component.js b/src/core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/TrackedEntityRelationshipsWrapper/TrackedEntityRelationshipsWrapper.component.js index b246f5a485..28b3f0b25d 100644 --- a/src/core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/TrackedEntityRelationshipsWrapper/TrackedEntityRelationshipsWrapper.component.js +++ b/src/core_modules/capture-core/components/Pages/common/TEIRelationshipsWidget/TrackedEntityRelationshipsWrapper/TrackedEntityRelationshipsWrapper.component.js @@ -15,7 +15,7 @@ import { } from '../../../NewRelationship/TeiRelationship/SearchResults/TeiRelationshipSearchResults.component'; import { ResultsPageSizeContext } from '../../../shared-contexts'; import { RegisterTei } from '../RegisterTei'; -import { useOrganisationUnit } from '../../../../../dataQueries'; +import { useCoreOrgUnit } from '../../../../../metadataRetrieval/coreOrgUnit'; export const TrackedEntityRelationshipsWrapper = ({ trackedEntityTypeId, @@ -29,7 +29,8 @@ export const TrackedEntityRelationshipsWrapper = ({ }: Props) => { const dispatch = useDispatch(); const { relationshipTypes, isError } = useTEIRelationshipsWidgetMetadata(); - const { orgUnit: initialOrgUnit } = useOrganisationUnit(orgUnitId, 'id,displayName,code'); + const { orgUnit } = useCoreOrgUnit(orgUnitId); + const initialOrgUnit = orgUnit ? { id: orgUnitId, name: orgUnit.name, path: orgUnit.path } : null; const onSelectFindMode = ({ findMode, relationshipConstraint }: OnSelectFindModeProps) => { dispatch(selectFindMode({ @@ -47,7 +48,7 @@ export const TrackedEntityRelationshipsWrapper = ({ ); } - if (!relationshipTypes || !addRelationshipRenderElement) { + if (!relationshipTypes?.length || !addRelationshipRenderElement) { return null; } diff --git a/src/core_modules/capture-core/components/PossibleDuplicatesDialog/PossibleDuplicatesDialog.component.js b/src/core_modules/capture-core/components/PossibleDuplicatesDialog/PossibleDuplicatesDialog.component.js index 5a35b3ff34..85a1fccc19 100644 --- a/src/core_modules/capture-core/components/PossibleDuplicatesDialog/PossibleDuplicatesDialog.component.js +++ b/src/core_modules/capture-core/components/PossibleDuplicatesDialog/PossibleDuplicatesDialog.component.js @@ -1,8 +1,6 @@ // @flow import * as React from 'react'; -import { withStyles } from '@material-ui/core'; -import Dialog from '@material-ui/core/Dialog'; -import DialogActions from '@material-ui/core/DialogActions'; +import { Modal, ModalActions } from '@dhis2/ui'; import { ReviewDialogContents } from './ReviewDialogContents/ReviewDialogContents.container'; import type { RenderCustomCardActions } from '../CardList/CardList.types'; @@ -15,37 +13,29 @@ type Props = {| selectedScopeId: string |}; -const StyledDialogActions = withStyles({ - root: { margin: 24 }, -})(DialogActions); - class ReviewDialogClass extends React.Component { - static paperProps = { - style: { - maxHeight: 'calc(100% - 100px)', - }, - }; - render() { const { open, onCancel, extraActions, selectedScopeId, dataEntryId, renderCardActions } = this.props; + if (!open) { + return null; + } + return ( - - + {extraActions} - - + + ); } } diff --git a/src/core_modules/capture-core/components/PossibleDuplicatesDialog/ReviewDialogContents/ReviewDialogContents.component.js b/src/core_modules/capture-core/components/PossibleDuplicatesDialog/ReviewDialogContents/ReviewDialogContents.component.js index 99c01c200c..d5146481cb 100644 --- a/src/core_modules/capture-core/components/PossibleDuplicatesDialog/ReviewDialogContents/ReviewDialogContents.component.js +++ b/src/core_modules/capture-core/components/PossibleDuplicatesDialog/ReviewDialogContents/ReviewDialogContents.component.js @@ -1,8 +1,7 @@ // @flow import React, { type ComponentType, useContext } from 'react'; -import DialogContent from '@material-ui/core/DialogContent'; -import DialogTitle from '@material-ui/core/DialogTitle'; import { withStyles } from '@material-ui/core/styles'; +import { ModalTitle, ModalContent } from '@dhis2/ui'; import i18n from '@dhis2/d2-i18n'; import { CardList } from '../../CardList'; import { ReviewDialogContentsPager } from './ReviewDialogContentsPager.container'; @@ -30,10 +29,10 @@ const ReviewDialogContentsPlain = ({ const { resultsPageSize } = useContext(ResultsPageSizeContext); return ( - - + + {i18n.t('Possible duplicates found')} - + - + ); }; diff --git a/src/core_modules/capture-core/components/Relationships/Relationships.component.js b/src/core_modules/capture-core/components/Relationships/Relationships.component.js index 1ee7f8af6c..be9fb6c569 100644 --- a/src/core_modules/capture-core/components/Relationships/Relationships.component.js +++ b/src/core_modules/capture-core/components/Relationships/Relationships.component.js @@ -5,7 +5,7 @@ import classNames from 'classnames'; import i18n from '@dhis2/d2-i18n'; import { IconButton, withStyles } from '@material-ui/core'; import { IconArrowRight16, IconCross24, Button } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import type { RelationshipType } from '../../metaData'; import type { Relationship, Entity } from './relationships.types'; diff --git a/src/core_modules/capture-core/components/RulesEngineVerboseInitializer/RulesEngineVerboseInitializer.js b/src/core_modules/capture-core/components/RulesEngineVerboseInitializer/RulesEngineVerboseInitializer.js new file mode 100644 index 0000000000..6ed402f545 --- /dev/null +++ b/src/core_modules/capture-core/components/RulesEngineVerboseInitializer/RulesEngineVerboseInitializer.js @@ -0,0 +1,11 @@ +// @flow +import { useRuleEngineFlags } from '../../rules/useRuleEngineFlags'; + +type Props = {| + children: React$Node, +|}; +export const RulesEngineVerboseInitializer = ({ children }: Props) => { + useRuleEngineFlags(); + + return children; +}; diff --git a/src/core_modules/capture-core/components/RulesEngineVerboseInitializer/index.js b/src/core_modules/capture-core/components/RulesEngineVerboseInitializer/index.js new file mode 100644 index 0000000000..5043a09470 --- /dev/null +++ b/src/core_modules/capture-core/components/RulesEngineVerboseInitializer/index.js @@ -0,0 +1,2 @@ +// @flow +export { RulesEngineVerboseInitializer } from './RulesEngineVerboseInitializer'; diff --git a/src/core_modules/capture-core/components/TemplateSelector/TemplateSelector.component.js b/src/core_modules/capture-core/components/TemplateSelector/TemplateSelector.component.js index 5ffa6dd1a8..43a48240be 100644 --- a/src/core_modules/capture-core/components/TemplateSelector/TemplateSelector.component.js +++ b/src/core_modules/capture-core/components/TemplateSelector/TemplateSelector.component.js @@ -18,7 +18,6 @@ const getStyles = () => ({ padding: 0, gap: '4px', marginBottom: spacers.dp8, - overflow: 'hidden', }, chipContainer: { padding: 0, @@ -80,7 +79,10 @@ const TemplateSelectorPlain = (props: Props) => { const { id } = customTemplate; return (
- +
); }); diff --git a/src/core_modules/capture-core/components/TemplateSelector/TemplateSelectorChip.component.js b/src/core_modules/capture-core/components/TemplateSelector/TemplateSelectorChip.component.js index 24e3ddc79f..5b9b05cfb0 100644 --- a/src/core_modules/capture-core/components/TemplateSelector/TemplateSelectorChip.component.js +++ b/src/core_modules/capture-core/components/TemplateSelector/TemplateSelectorChip.component.js @@ -2,6 +2,7 @@ import React, { useCallback } from 'react'; import { Chip } from '@dhis2/ui'; import type { WorkingListTemplate } from './workingListsBase.types'; +import { TooltipForChip } from '../Tooltips/TooltipForChip'; type Props = { template: WorkingListTemplate, @@ -19,8 +20,23 @@ export const TemplateSelectorChip = (props: Props) => { const text = displayName.length > 30 ? `${displayName.substring(0, 27)}...` : displayName; return ( - - {text} - + 30} + onClick={selectTemplateHandler} + > + + {text} + + + ); }; diff --git a/src/core_modules/capture-core/components/ConditionalTooltip/ConditionalTooltip.component.js b/src/core_modules/capture-core/components/Tooltips/ConditionalTooltip/ConditionalTooltip.component.js similarity index 100% rename from src/core_modules/capture-core/components/ConditionalTooltip/ConditionalTooltip.component.js rename to src/core_modules/capture-core/components/Tooltips/ConditionalTooltip/ConditionalTooltip.component.js diff --git a/src/core_modules/capture-core/components/ConditionalTooltip/index.js b/src/core_modules/capture-core/components/Tooltips/ConditionalTooltip/index.js similarity index 100% rename from src/core_modules/capture-core/components/ConditionalTooltip/index.js rename to src/core_modules/capture-core/components/Tooltips/ConditionalTooltip/index.js diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipForChip/TooltipForChip.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipForChip/TooltipForChip.component.js new file mode 100644 index 0000000000..01c539b3af --- /dev/null +++ b/src/core_modules/capture-core/components/Tooltips/TooltipForChip/TooltipForChip.component.js @@ -0,0 +1,60 @@ +// @flow +import React from 'react'; +import { Tooltip } from '@dhis2/ui'; +import { withStyles } from '@material-ui/core/'; + +type Props = { + enabled: boolean, + onClick: Function, + children: any, + ...CssClasses, +}; + +const styles = { + // button style reset + button: { + border: 'none', + backgroundColor: 'transparent', + borderRadius: '16px', + padding: 0, + margin: 0, + minWidth: 0, + minHeight: 0, + '&:hover': { + backgroundColor: 'transparent', + }, + }, +}; +const TooltipForChipPlain = (props: Props) => { + const { enabled, children, classes, onClick, ...passOnProps } = props; + + return enabled ? + ( + + {({ ref, onMouseOver, onMouseOut }) => ( + + )} + + ) : ( + + ); +}; + +export const TooltipForChip = withStyles(styles)(TooltipForChipPlain); diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipForChip/index.js b/src/core_modules/capture-core/components/Tooltips/TooltipForChip/index.js new file mode 100644 index 0000000000..8894bd8888 --- /dev/null +++ b/src/core_modules/capture-core/components/Tooltips/TooltipForChip/index.js @@ -0,0 +1,2 @@ +// @flow +export { TooltipForChip } from './TooltipForChip.component'; diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/Actions/AddNew/AddNew.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/Actions/AddNew/AddNew.component.js index e4ec61be1b..ce6e30b06b 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/Actions/AddNew/AddNew.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/Actions/AddNew/AddNew.component.js @@ -2,7 +2,7 @@ import { IconAdd16, MenuItem } from '@dhis2/ui'; import React from 'react'; import i18n from '@dhis2/d2-i18n'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import type { Props } from './addNew.types'; export const AddNew = ({ canAddNew, onlyEnrollOnce, tetName, onAddNew }: Props) => { diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withDeleteButton.js b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withDeleteButton.js index 14efa04273..1c55b9ed1b 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withDeleteButton.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withDeleteButton.js @@ -39,33 +39,40 @@ const getDeleteButton = (InnerComponent: React.ComponentType) => {i18n.t('Delete')} - - - {i18n.t('Delete event')} - - - {i18n.t('Deleting an event is permanent and cannot be undone.' + ' ' + - 'Are you sure you want to delete this event? ')} - - - - - - - - + {this.state.isOpen && ( + + + {i18n.t('Delete event')} + + + {i18n.t('Deleting an event is permanent and cannot be undone.' + ' ' + + 'Are you sure you want to delete this event? ')} + + + + + + + + + )}
) : null ) diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withMainButton.js b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withMainButton.js index 42491ef4ab..ba6088af20 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withMainButton.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/DataEntry/withMainButton.js @@ -3,7 +3,7 @@ import * as React from 'react'; import { connect } from 'react-redux'; import i18n from '@dhis2/d2-i18n'; import { Button } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { type RenderFoundation } from '../../../metaData'; type Props = { diff --git a/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js b/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js index 48423c87a3..fb8bd883db 100644 --- a/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js +++ b/src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js @@ -5,7 +5,7 @@ import { useDispatch, useSelector } from 'react-redux'; import { spacersNum, Button, colors, IconEdit24, IconArrowLeft24 } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; import i18n from '@dhis2/d2-i18n'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { useEnrollmentEditEventPageMode, useAvailableProgramStages } from 'capture-core/hooks'; import { useCoreOrgUnit } from 'capture-core/metadataRetrieval/coreOrgUnit'; import type { PlainProps, Props } from './widgetEventEdit.types'; diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js index f8a8908b20..87815c565c 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js @@ -4,7 +4,7 @@ import cx from 'classnames'; import i18n from '@dhis2/d2-i18n'; import { withStyles } from '@material-ui/core'; import { spacersNum, colors, IconAdd16, Button } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { StageOverview } from './StageOverview'; import type { Props } from './stage.types'; import { Widget } from '../../../Widget'; @@ -30,7 +30,7 @@ const hideProgramStage = (ruleEffects, stageId) => ( export const StagePlain = ({ stage, events, classes, className, onCreateNew, ruleEffects, ...passOnProps }: Props) => { const [open, setOpenStatus] = useState(true); - const { id, name, icon, description, dataElements, hideDueDate, repeatable } = stage; + const { id, name, icon, description, dataElements, hideDueDate, repeatable, enableUserAssignment } = stage; const hiddenProgramStage = hideProgramStage(ruleEffects, id); return ( @@ -57,6 +57,7 @@ export const StagePlain = ({ stage, events, classes, className, onCreateNew, rul dataElements={dataElements} hideDueDate={hideDueDate} repeatable={repeatable} + enableUserAssignment={enableUserAssignment} onCreateNew={onCreateNew} hiddenProgramStage={hiddenProgramStage} {...passOnProps} diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js index 0cc28bc98c..055befd20d 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/StageDetail.component.js @@ -16,7 +16,7 @@ import { colors, IconAdd16, Tooltip, } from '@dhis2/ui'; -import { ConditionalTooltip } from 'capture-core/components/ConditionalTooltip'; +import { ConditionalTooltip } from 'capture-core/components/Tooltips/ConditionalTooltip'; import { sortDataFromEvent } from './hooks/sortFuntions'; import { useComputeDataFromEvent, useComputeHeaderColumn, formatRowForView } from './hooks/useEventList'; import { DEFAULT_NUMBER_OF_ROW, SORT_DIRECTION } from './hooks/constants'; @@ -66,6 +66,7 @@ const StageDetailPlain = (props: Props) => { dataElements, hideDueDate = false, repeatable = false, + enableUserAssignment = false, onEventClick, onViewAll, onCreateNew, @@ -76,7 +77,7 @@ const StageDetailPlain = (props: Props) => { sortDirection: SORT_DIRECTION.DESC, }; const { stage } = getProgramAndStageForProgram(programId, stageId); - const headerColumns = useComputeHeaderColumn(dataElements, hideDueDate, stage?.stageForm); + const headerColumns = useComputeHeaderColumn(dataElements, hideDueDate, enableUserAssignment, stage?.stageForm); const { loading, value: dataSource, error } = useComputeDataFromEvent(dataElements, events); diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/useEventList.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/useEventList.js index 25e9033688..ee914f4e0f 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/useEventList.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/hooks/useEventList.js @@ -20,10 +20,11 @@ import { SORT_DIRECTION, MULIT_TEXT_WITH_NO_OPTIONS_SET } from './constants'; import { isNotValidOptionSet } from '../../../../../../utils/isNotValidOptionSet'; import { useOrgUnitNames } from '../../../../../../metadataRetrieval/orgUnitName'; -const baseKeys = [{ id: 'status' }, { id: 'occurredAt' }, { id: 'orgUnitName' }, { id: 'scheduledAt' }, { id: 'comments' }]; +const baseKeys = [{ id: 'status' }, { id: 'occurredAt' }, { id: 'assignedUser' }, { id: 'orgUnitName' }, { id: 'scheduledAt' }, { id: 'comments' }]; const basedFieldTypes = [ { type: dataElementTypes.STATUS, resolveValue: convertStatusForView }, { type: dataElementTypes.DATE }, + { type: 'ASSIGNEE' }, { type: dataElementTypes.TEXT, resolveValue: convertOrgUnitForView }, { type: dataElementTypes.DATE }, { type: dataElementTypes.UNKNOWN, resolveValue: convertCommentForView }, @@ -31,6 +32,7 @@ const basedFieldTypes = [ const getBaseColumnHeaders = props => [ { header: i18n.t('Status'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true }, { header: props.formFoundation.getLabel('occurredAt'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true }, + { header: i18n.t('Assigned to'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true }, { header: i18n.t('Registering unit'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true }, { header: props.formFoundation.getLabel('scheduledAt'), sortDirection: SORT_DIRECTION.DEFAULT, isPredefined: true }, { header: '', sortDirection: null, isPredefined: true }, @@ -118,7 +120,7 @@ const useComputeDataFromEvent = (dataElements: Array, events: }; -const useComputeHeaderColumn = (dataElements: Array, hideDueDate: boolean, formFoundation: Object) => { +const useComputeHeaderColumn = (dataElements: Array, hideDueDate: boolean, enableUserAssignment: boolean, formFoundation: Object) => { const headerColumns = useMemo(() => { const dataElementHeaders = dataElements.reduce((acc, currDataElement) => { const { id, name, formName, type, optionSet } = currDataElement; @@ -132,9 +134,10 @@ const useComputeHeaderColumn = (dataElements: Array, hideDueDa return acc; }, []); return [ - ...getBaseColumns({ formFoundation }).filter(col => (hideDueDate ? col.id !== 'scheduledAt' : true)), + ...getBaseColumns({ formFoundation }) + .filter(col => (enableUserAssignment || col.id !== 'assignedUser') && (!hideDueDate || col.id !== 'scheduledAt')), ...dataElementHeaders]; - }, [dataElements, hideDueDate, formFoundation]); + }, [dataElements, hideDueDate, enableUserAssignment, formFoundation]); return headerColumns; }; diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/stageDetail.types.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/stageDetail.types.js index a5edeeab75..31d8c79dea 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/stageDetail.types.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageDetail/stageDetail.types.js @@ -7,6 +7,7 @@ import type { StageDataElement, StageCommonProps } from '../../../types/common.t eventName: string, hideDueDate?: boolean, repeatable?: boolean, + enableUserAssignment?: boolean, stageId: string, hiddenProgramStage?: boolean, ...CssClasses, diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js index 1dc3709200..ef1a90c811 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/types/common.types.js @@ -21,6 +21,7 @@ export type Stage = { description?: ?string, icon?: Icon, dataElements: Array, + enableUserAssignment: boolean, hideDueDate?: boolean, repeatable?: boolean } diff --git a/src/core_modules/capture-core/components/WidgetsRelationship/WidgetTrackedEntityRelationship/WidgetTrackedEntityRelationship.component.js b/src/core_modules/capture-core/components/WidgetsRelationship/WidgetTrackedEntityRelationship/WidgetTrackedEntityRelationship.component.js index 6037269107..8af24e2195 100644 --- a/src/core_modules/capture-core/components/WidgetsRelationship/WidgetTrackedEntityRelationship/WidgetTrackedEntityRelationship.component.js +++ b/src/core_modules/capture-core/components/WidgetsRelationship/WidgetTrackedEntityRelationship/WidgetTrackedEntityRelationship.component.js @@ -6,6 +6,7 @@ import { RelationshipsWidget } from '../common/RelationshipsWidget'; import { RelationshipSearchEntities, useRelationships } from '../common/useRelationships'; import { NewTrackedEntityRelationship } from './NewTrackedEntityRelationship'; import { useTrackedEntityTypeName } from './hooks/useTrackedEntityTypeName'; +import { useRelationshipTypes } from '../common/RelationshipsWidget/useRelationshipTypes'; export const WidgetTrackedEntityRelationship = ({ relationshipTypes: cachedRelationshipTypes, @@ -21,8 +22,17 @@ export const WidgetTrackedEntityRelationship = ({ renderTrackedEntitySearch, renderTrackedEntityRegistration, }: WidgetTrackedEntityRelationshipProps) => { - const { data: relationships, isError, isLoading: isLoadingRelationships } = useRelationships(teiId, RelationshipSearchEntities.TRACKED_ENTITY); + const { data: relationshipTypes } = useRelationshipTypes(cachedRelationshipTypes); const { data: trackedEntityTypeName, isLoading: isLoadingTEType } = useTrackedEntityTypeName(trackedEntityTypeId); + const { + data: relationships, + isError, + isLoading: isLoadingRelationships, + } = useRelationships({ + entityId: teiId, + searchMode: RelationshipSearchEntities.TRACKED_ENTITY, + relationshipTypes, + }); const isLoading = useMemo(() => isLoadingRelationships || isLoadingTEType, [isLoadingRelationships, isLoadingTEType], @@ -36,6 +46,10 @@ export const WidgetTrackedEntityRelationship = ({ ); } + if (!relationshipTypes?.length) { + return null; + } + return ( - { - relationshipTypes => ( - - ) - } + ); }; diff --git a/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/RelationshipsWidget.component.js b/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/RelationshipsWidget.component.js index c0ee94c29d..0eb6b9a6d2 100644 --- a/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/RelationshipsWidget.component.js +++ b/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/RelationshipsWidget.component.js @@ -4,7 +4,6 @@ import { Chip, IconLink24, spacers } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; import { Widget } from '../../../Widget'; import { useGroupedLinkedEntities } from './useGroupedLinkedEntities'; -import { useRelationshipTypes } from './useRelationshipTypes'; import { LinkedEntitiesViewer } from './LinkedEntitiesViewer.component'; import type { Props, StyledProps } from './relationshipsWidget.types'; import { LoadingMaskElementCenter } from '../../../LoadingMasks'; @@ -23,14 +22,13 @@ const RelationshipsWidgetPlain = ({ title, relationships, isLoading, - cachedRelationshipTypes, sourceId, + relationshipTypes, onLinkedRecordClick, children, classes, }: StyledProps) => { const [open, setOpenStatus] = useState(true); - const { data: relationshipTypes } = useRelationshipTypes(cachedRelationshipTypes); const groupedLinkedEntities = useGroupedLinkedEntities(sourceId, relationshipTypes, relationships); if (isLoading) { @@ -83,9 +81,8 @@ const RelationshipsWidgetPlain = ({ onLinkedRecordClick={onLinkedRecordClick} /> ) - }{ - relationshipTypes && children(relationshipTypes) } + {children} ); diff --git a/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/relationshipsWidget.types.js b/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/relationshipsWidget.types.js index e7e8d306c3..7dce149334 100644 --- a/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/relationshipsWidget.types.js +++ b/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/relationshipsWidget.types.js @@ -6,11 +6,11 @@ import type { LinkedRecordClick } from './types'; export type Props = $ReadOnly<{| title: string, relationships?: Array, - cachedRelationshipTypes?: RelationshipTypes, + relationshipTypes: RelationshipTypes, isLoading: boolean, sourceId: string, onLinkedRecordClick: LinkedRecordClick, - children: (relationshipTypes: RelationshipTypes) => Node, + children: Node, |}>; export type StyledProps = $ReadOnly<{| diff --git a/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/useGroupedLinkedEntities.js b/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/useGroupedLinkedEntities.js index d339202c7b..095f8e5c8a 100644 --- a/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/useGroupedLinkedEntities.js +++ b/src/core_modules/capture-core/components/WidgetsRelationship/common/RelationshipsWidget/useGroupedLinkedEntities.js @@ -8,7 +8,7 @@ import { dataElementTypes } from '../../../../metaData'; import { RELATIONSHIP_ENTITIES } from '../constants'; import { convertClientToList, convertServerToClient } from '../../../../converters'; import type { GroupedLinkedEntities, LinkedEntityData } from './types'; -import type { InputRelationshipData, RelationshipTypes } from '../Types'; +import type { ApiLinkedEntity, InputRelationshipData, RelationshipTypes } from '../Types'; const getFallbackFieldsByRelationshipEntity = { @@ -137,18 +137,19 @@ const getLinkedEntityData = (apiLinkedEntity, relationshipCreatedAt, pendingApiR return null; }; -const determineLinkedEntity = (fromEntity, toEntity, sourceId) => { - if (fromEntity.trackedEntity?.trackedEntity === sourceId || fromEntity.event?.event === sourceId) { - return toEntity; - } +export const determineLinkedEntity = + (fromEntity: ApiLinkedEntity, toEntity: ApiLinkedEntity, sourceId: string): ApiLinkedEntity | null => { + if (fromEntity.trackedEntity?.trackedEntity === sourceId || fromEntity.event?.event === sourceId) { + return toEntity; + } - if (toEntity.trackedEntity?.trackedEntity === sourceId || toEntity.event?.event === sourceId) { - return fromEntity; - } + if (toEntity.trackedEntity?.trackedEntity === sourceId || toEntity.event?.event === sourceId) { + return fromEntity; + } - log.error(errorCreator('Could not determine linked entity')({ fromEntity, toEntity, sourceId })); - return null; -}; + log.error(errorCreator('Could not determine linked entity')({ fromEntity, toEntity, sourceId })); + return null; + }; export const useGroupedLinkedEntities = ( sourceId: string, @@ -184,6 +185,10 @@ export const useGroupedLinkedEntities = ( return accGroupedLinkedEntities; } + if (!relationshipType.bidirectional && apiLinkedEntity === fromEntity) { + return accGroupedLinkedEntities; + } + const linkedEntityData = getLinkedEntityData(apiLinkedEntity, relationshipCreatedAt, pendingApiResponse); if (!linkedEntityData) { return accGroupedLinkedEntities; diff --git a/src/core_modules/capture-core/components/WidgetsRelationship/common/useRelationships/useRelationships.js b/src/core_modules/capture-core/components/WidgetsRelationship/common/useRelationships/useRelationships.js index 9c5b323232..7f626a84c1 100644 --- a/src/core_modules/capture-core/components/WidgetsRelationship/common/useRelationships/useRelationships.js +++ b/src/core_modules/capture-core/components/WidgetsRelationship/common/useRelationships/useRelationships.js @@ -1,7 +1,8 @@ // @flow import { useMemo } from 'react'; import { useApiDataQuery } from '../../../../utils/reactQueryHelpers'; -import type { InputRelationshipData } from '../Types'; +import type { InputRelationshipData, RelationshipTypes } from '../Types'; +import { determineLinkedEntity } from '../RelationshipsWidget/useGroupedLinkedEntities'; export const RelationshipSearchEntities = Object.freeze({ TRACKED_ENTITY: 'trackedEntity', @@ -9,12 +10,19 @@ export const RelationshipSearchEntities = Object.freeze({ EVENT: 'event', }); +type Props = {| + entityId: string, + searchMode: $Values, + relationshipTypes: ?RelationshipTypes, +|} + type ReturnData = Array; -export const useRelationships = (entityId: string, searchMode: string) => { +export const useRelationships = ({ entityId, searchMode, relationshipTypes }: Props) => { const query = useMemo(() => ({ resource: 'tracker/relationships', params: { + // $FlowFixMe - searchMode should be a valid key of RelationshipSearchEntities [searchMode]: entityId, fields: 'relationshipType,createdAt,from[trackedEntity[trackedEntity,attributes,program,orgUnit,trackedEntityType],event[event,dataValues,program,orgUnit,orgUnitName,status,createdAt]],to[trackedEntity[trackedEntity,attributes,program,orgUnit,trackedEntityType],event[event,dataValues,program,orgUnit,orgUnitName,status,createdAt]]', }, @@ -25,7 +33,32 @@ export const useRelationships = (entityId: string, searchMode: string) => { query, { enabled: !!entityId, - select: ({ instances }: any) => instances, + select: ({ instances }: any) => { + if (!relationshipTypes?.length || !instances?.length) { + return []; + } + + return instances.reduce((acc, relationship) => { + const relationshipType = relationshipTypes + .find(relType => relType.id === relationship.relationshipType); + if (!relationshipType) { + return acc; + } + const { from, to } = relationship; + const apiLinkedEntity = determineLinkedEntity(from, to, entityId); + + if (!apiLinkedEntity) { + return acc; + } + + if (!relationshipType.bidirectional && apiLinkedEntity === from) { + return acc; + } + + acc.push(relationship); + return acc; + }, []); + }, }, ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/EventWorkingLists/ViewMenuSetup/DownloadDialog/DownloadDialog.component.js b/src/core_modules/capture-core/components/WorkingLists/EventWorkingLists/ViewMenuSetup/DownloadDialog/DownloadDialog.component.js index fc79445ce2..0ed117534b 100644 --- a/src/core_modules/capture-core/components/WorkingLists/EventWorkingLists/ViewMenuSetup/DownloadDialog/DownloadDialog.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/EventWorkingLists/ViewMenuSetup/DownloadDialog/DownloadDialog.component.js @@ -3,8 +3,7 @@ import React, { PureComponent, type ComponentType } from 'react'; import i18n from '@dhis2/d2-i18n'; import { withStyles } from '@material-ui/core/styles'; -import { Dialog, DialogTitle, DialogContent, DialogActions } from '@material-ui/core'; -import { Button } from '@dhis2/ui'; +import { Button, Modal, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; import type { Props } from './downloadDialog.types'; const getStyles = () => ({ @@ -80,23 +79,28 @@ class DownloadDialogPlain extends PureComponent { } render() { const { open, onClose } = this.props; + + if (!open) { + return null; + } + return ( - - {i18n.t('Download with current filters')} - + {i18n.t('Download with current filters')} + {this.renderButtons()} - - + + - - + + ); } diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/DeleteConfirmationDialog.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/DeleteConfirmationDialog.component.js index 137dab9b63..635bac6d3e 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/DeleteConfirmationDialog.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/DeleteConfirmationDialog.component.js @@ -2,8 +2,7 @@ import * as React from 'react'; import { withStyles } from '@material-ui/core/styles'; import i18n from '@dhis2/d2-i18n'; -import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@material-ui/core'; -import { Button } from '@dhis2/ui'; +import { Button, Modal, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; const getStyles = () => ({ buttonContainer: { @@ -29,18 +28,20 @@ const DeleteConfirmationDialogPlain = (props: Props) => { classes, } = props; + if (!open) { + return null; + } + return ( - - {i18n.t('Delete view')} - - - {i18n.t('Do you really want to delete the \'{{templateName}}\' view?', { templateName })} - - - {i18n.t('Delete view')} + + {i18n.t('Do you really want to delete the \'{{templateName}}\' view?', { templateName })} + + - - + + ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateContents.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateContents.component.js index 28b526c2cb..0efef529f0 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateContents.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateContents.component.js @@ -2,8 +2,7 @@ import * as React from 'react'; import { withStyles } from '@material-ui/core/styles'; import i18n from '@dhis2/d2-i18n'; -import { DialogTitle, DialogContent, DialogActions } from '@material-ui/core'; -import { Button } from '@dhis2/ui'; +import { Button, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; const getStyles = () => ({ buttonContainer: { @@ -22,9 +21,9 @@ const ExistingTemplateContentsPlain = (props: Props) => { const { onSaveTemplate, onClose, classes } = props; return ( - {i18n.t('Save')} - - {i18n.t('Save')} + + - + ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateDialog.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateDialog.component.js index e8e1af626e..da394131b6 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateDialog.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/ExistingTemplateDialog.component.js @@ -1,6 +1,6 @@ // @flow import * as React from 'react'; -import { Dialog } from '@material-ui/core'; +import { Modal } from '@dhis2/ui'; import { ExistingTemplateContents } from './ExistingTemplateContents.component'; type Props = { @@ -16,16 +16,21 @@ export const ExistingTemplateDialog = (props: Props) => { onSaveTemplate, } = props; + if (!open) { + return null; + } + return ( - - + ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateContents.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateContents.component.js index 460069e359..c064f74893 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateContents.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateContents.component.js @@ -1,9 +1,8 @@ // @flow import * as React from 'react'; -import { colors, Button } from '@dhis2/ui'; +import { colors, Button, ModalTitle, ModalContent, ModalActions } from '@dhis2/ui'; import { withStyles } from '@material-ui/core/styles'; import i18n from '@dhis2/d2-i18n'; -import { DialogTitle, DialogContent, DialogActions } from '@material-ui/core'; import { NewTemplateTextField } from './NewTemplateTextField.component'; const getStyles = (theme: Theme) => ({ @@ -46,8 +45,8 @@ const NewTemplateContentsPlain = (props: Props) => { return ( - {i18n.t('Save As view')} - + {i18n.t('Save As view')} + { > {error} - - + - + ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateDialog.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateDialog.component.js index d10a394168..60859c6f5a 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateDialog.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/NewTemplateDialog.component.js @@ -1,6 +1,6 @@ // @flow import * as React from 'react'; -import { Dialog } from '@material-ui/core'; +import { Modal } from '@dhis2/ui'; import { NewTemplateContents } from './NewTemplateContents.component'; type Props = { @@ -16,16 +16,21 @@ export const NewTemplateDialog = (props: Props) => { onSaveTemplate, } = props; + if (!open) { + return null; + } + return ( - - + ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/SharingDialog.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/SharingDialog.component.js index 173f3ebfd2..9434601bea 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/SharingDialog.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/SharingDialog.component.js @@ -12,7 +12,7 @@ const styles = { }, }; -const SharingDialogPlain = ({ onClose, open, templateId, classes, templateSharingType }: Props) => { +const SharingDialogPlain = ({ onClose, open, templateId, classes, templateSharingType, dataTest }: Props) => { const { refetch } = useDataQuery( useMemo( () => ({ @@ -61,6 +61,7 @@ const SharingDialogPlain = ({ onClose, open, templateId, classes, templateSharin id={templateId} onClose={handleClose} className={classes.dialog} + dataTest={dataTest} /> : null ); }; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/TemplateMaintenance.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/TemplateMaintenance.component.js index 6167966094..714ff7177a 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/TemplateMaintenance.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/TemplateMaintenance.component.js @@ -65,6 +65,7 @@ const TemplateMaintenancePlain = (props: Props, ref) => { templateId={currentTemplate.id} onClose={handleSetSharingSettings} templateSharingType={templateSharingType} + dataTest={'sharing-dialog'} /> ); diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/sharingDialog.types.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/sharingDialog.types.js index d2abcf26b2..9eed85d346 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/sharingDialog.types.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateMaintenance/sharingDialog.types.js @@ -6,5 +6,6 @@ export type Props = {| open: boolean, templateId: string, templateSharingType: string, + dataTest: string, ...CssClasses, |}; diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChip.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChip.component.js index 5ce7331edf..238423ef2c 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChip.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChip.component.js @@ -3,6 +3,7 @@ import * as React from 'react'; import { Chip } from '@dhis2/ui'; import { TemplateSelectorChipContent } from './TemplateSelectorChipContent.component'; import type { WorkingListTemplate } from './workingListsBase.types'; +import { TooltipForChip } from '../../Tooltips/TooltipForChip'; type PassOnProps = { currentListIsModified: boolean, @@ -13,10 +14,17 @@ type Props = { template: WorkingListTemplate, currentTemplateId: string, onSelectTemplate: Function, + maxCharacters?: number, }; export const TemplateSelectorChip = (props: Props) => { - const { template, currentTemplateId, onSelectTemplate, ...passOnProps } = props; + const { + template, + currentTemplateId, + onSelectTemplate, + maxCharacters = 30, + ...passOnProps + } = props; const { name, id } = template; const selectTemplateHandler = React.useCallback(() => { @@ -27,16 +35,29 @@ export const TemplateSelectorChip = (props: Props) => { ]); return ( - maxCharacters} onClick={selectTemplateHandler} > - - + + + + ); }; + diff --git a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChipContent.component.js b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChipContent.component.js index 57d0c53205..d9efe28079 100644 --- a/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChipContent.component.js +++ b/src/core_modules/capture-core/components/WorkingLists/WorkingListsBase/TemplateSelectorChipContent.component.js @@ -2,6 +2,7 @@ type Props = { currentListIsModified: boolean, + maxCharacters: number, text: string, isSelectedTemplate: boolean, }; @@ -10,10 +11,11 @@ export const TemplateSelectorChipContent = (props: Props) => { const { currentListIsModified, text, + maxCharacters, isSelectedTemplate, } = props; - const truncatedText = text.length > 30 ? `${text.substring(0, 27)}...` : text; + const truncatedText = text.length > maxCharacters ? `${text.substring(0, maxCharacters - 3)}...` : text; const content = isSelectedTemplate && currentListIsModified ? `${truncatedText} *` : truncatedText; return content; diff --git a/src/core_modules/capture-core/converters/serverToClient.js b/src/core_modules/capture-core/converters/serverToClient.js index 897a4cc13e..288948461e 100644 --- a/src/core_modules/capture-core/converters/serverToClient.js +++ b/src/core_modules/capture-core/converters/serverToClient.js @@ -11,6 +11,15 @@ function convertTime(d2Value: string) { return parseData.momentTime; } +const convertAssignedUserToClient = (assignedUser?: ApiAssignedUser) => + ((assignedUser && assignedUser.uid) ? { + id: assignedUser.uid, + name: assignedUser.displayName, + username: assignedUser.username, + firstName: assignedUser.firstName, + surname: assignedUser.surname, + } : null); + const optionSetConvertersForType = { [dataElementTypes.NUMBER]: parseNumber, [dataElementTypes.INTEGER]: parseNumber, @@ -51,6 +60,7 @@ const valueConvertersForType = { return { latitude: arr[1], longitude: arr[0] }; }, [dataElementTypes.POLYGON]: () => 'Polygon', + [dataElementTypes.ASSIGNEE]: convertAssignedUserToClient, }; export function convertValue(value: any, type: $Keys) { diff --git a/src/core_modules/capture-core/events/mainConverters/mainEventClientToServerConverter.js b/src/core_modules/capture-core/events/mainConverters/mainEventClientToServerConverter.js index 1e3f62f036..207918b8cb 100644 --- a/src/core_modules/capture-core/events/mainConverters/mainEventClientToServerConverter.js +++ b/src/core_modules/capture-core/events/mainConverters/mainEventClientToServerConverter.js @@ -1,5 +1,5 @@ // @flow -import { convertClientToServer } from '../../converters'; +import { convertClientToServer, convertAssigneeToServer } from '../../converters'; import { convertMainEvent } from './mainEventConverter'; import { dataElementTypes } from '../../metaData'; import { convertEventAttributeOptions } from '../convertEventAttributeOptions'; @@ -26,7 +26,7 @@ export function convertMainEventClientToServer(event: Object) { convertedValue = convertClientToServer(value, dataElementTypes.DATE); break; case 'assignee': - convertedValue = value && ({ uid: value.id }); + convertedValue = value && convertAssigneeToServer(value); break; default: convertedValue = value; diff --git a/src/core_modules/capture-core/rules/__tests__/rulesEngine.test.js b/src/core_modules/capture-core/rules/__tests__/rulesEngine.test.js index 4a0f04e813..9aebeadd75 100644 --- a/src/core_modules/capture-core/rules/__tests__/rulesEngine.test.js +++ b/src/core_modules/capture-core/rules/__tests__/rulesEngine.test.js @@ -225,6 +225,56 @@ describe('Rules engine', () => { // then expect(rulesEffects).toEqual([]); }); + + test('The rules engine can enable verbose logging', () => { + // When + rulesEngine.setFlags({ verbose: true }); + + // Then + expect(rulesEngine.getFlags()).toEqual({ verbose: true }); + }); + + test('Rules are calculated when verbose is set', () => { + const programRules = [ + { + id: 'GC4gpdoSD4r', + condition: 'true', + description: 'Show error if hemoglobin is dangerously low', + displayName: 'Hemoglobin error', + programId: 'lxAQ7Zs9VYR', + programRuleActions: [ + { + id: 'SWfdB5lX0fk', + content: 'Hemoglobin value lower than normal', + displayContent: 'Hemoglobin value lower than normal', + programRuleActionType: 'SHOWERROR', + }, + ], + }, + ]; + + // When + rulesEngine.setFlags({ verbose: true }); + const rulesEffects = rulesEngine.getProgramRuleEffects({ + programRulesContainer: { programRuleVariables, programRules, constants }, + currentEvent, + dataElements: dataElementsInProgram, + selectedOrgUnit: orgUnit, + optionSets, + }); + + // then + expect(rulesEffects).toEqual([ + { + id: 'general', + type: 'SHOWERROR', + error: { + id: 'SWfdB5lX0fk', + message: 'Hemoglobin value lower than normal ', + }, + }, + ]); + }); }); describe('Program Rule Variables corner cases', () => { diff --git a/src/core_modules/capture-core/rules/rulesEngine.js b/src/core_modules/capture-core/rules/rulesEngine.js index 06983888c3..dc91f9f957 100644 --- a/src/core_modules/capture-core/rules/rulesEngine.js +++ b/src/core_modules/capture-core/rules/rulesEngine.js @@ -6,4 +6,9 @@ import { dateUtils, } from './converters'; -export const rulesEngine = new RulesEngine(inputConverter, outputConverter, dateUtils, environmentTypes.WebClient); +export const rulesEngine = new RulesEngine( + inputConverter, + outputConverter, + dateUtils, + environmentTypes.WebClient, +); diff --git a/src/core_modules/capture-core/rules/useRuleEngineFlags.js b/src/core_modules/capture-core/rules/useRuleEngineFlags.js new file mode 100644 index 0000000000..ee6cd84c40 --- /dev/null +++ b/src/core_modules/capture-core/rules/useRuleEngineFlags.js @@ -0,0 +1,23 @@ +// @flow +import { useLayoutEffect } from 'react'; +import { useLocationQuery } from '../utils/routing'; +import { rulesEngine } from './rulesEngine'; + +export const useRuleEngineFlags = () => { + // This hook is used to set the verbose flag on the rules engine + // based on the verbose query param in the URL + + const { verbose } = useLocationQuery(); + + const updateFlags = (flags) => { + rulesEngine.setFlags({ ...rulesEngine.getFlags(), ...flags }); + }; + + useLayoutEffect(() => { + if (verbose === 'true') { + updateFlags({ verbose: true }); + } else { + updateFlags({ verbose: false }); + } + }, [verbose]); +}; diff --git a/src/core_modules/capture-core/utils/cachedDataHooks/useDataElementsFromIndexedDB.js b/src/core_modules/capture-core/utils/cachedDataHooks/useDataElementsFromIndexedDB.js new file mode 100644 index 0000000000..dbbf4f83c3 --- /dev/null +++ b/src/core_modules/capture-core/utils/cachedDataHooks/useDataElementsFromIndexedDB.js @@ -0,0 +1,32 @@ +// @flow +import type { UseQueryOptions } from 'react-query'; +import { userStores, getUserStorageController } from '../../storageControllers'; +import { useIndexedDBQuery } from '../reactQueryHelpers'; +import type { CachedDataElement } from '../../storageControllers/'; + +export const useDataElementsFromIndexedDB = (queryKey: Array, dataElementIds: ?Set, queryOptions?: UseQueryOptions<>): { + dataElements: ?Array, + isLoading: boolean, + isError: boolean, +} => { + const storageController = getUserStorageController(); + const { enabled = !!dataElementIds } = queryOptions ?? {}; + + const { data, isLoading, isError } = useIndexedDBQuery( + ['dataElements', ...queryKey], + () => storageController.getAll( + userStores.DATA_ELEMENTS, { + // $FlowIgnore - the enabled prop guarantees that dataElementIds will be defined + predicate: dataElement => dataElementIds.has(dataElement.id), + }, + ), { + enabled, + }, + ); + + return { + dataElements: data, + isLoading, + isError, + }; +}; diff --git a/src/core_modules/capture-core/utils/cachedDataHooks/useOptionSetsFromIndexedDB.js b/src/core_modules/capture-core/utils/cachedDataHooks/useOptionSetsFromIndexedDB.js new file mode 100644 index 0000000000..f0480779ee --- /dev/null +++ b/src/core_modules/capture-core/utils/cachedDataHooks/useOptionSetsFromIndexedDB.js @@ -0,0 +1,32 @@ +// @flow +import type { UseQueryOptions } from 'react-query'; +import { userStores, getUserStorageController } from '../../storageControllers'; +import { useIndexedDBQuery } from '../reactQueryHelpers'; +import type { CachedOptionSet } from '../../storageControllers/'; + +export const useOptionSetsFromIndexedDB = (queryKey: Array, optionSetIds: ?Set, queryOptions?: UseQueryOptions<>): { + optionSets: ?Array, + isLoading: boolean, + isError: boolean, +} => { + const storageController = getUserStorageController(); + const { enabled = !!optionSetIds } = queryOptions ?? {}; + + const { data, isLoading, isError } = useIndexedDBQuery( + ['optionSets', ...queryKey], + () => storageController.getAll( + userStores.OPTION_SETS, { + // $FlowIgnore - the enabled prop guarantees that optionSetIds will be defined + predicate: optionSet => optionSetIds.has(optionSet.id), + }, + ), { + enabled, + }, + ); + + return { + optionSets: data, + isLoading, + isError, + }; +}; diff --git a/src/core_modules/capture-core/utils/cachedDataHooks/useProgramFromIndexedDB.js b/src/core_modules/capture-core/utils/cachedDataHooks/useProgramFromIndexedDB.js index c8a73f7838..d5a1c8a02e 100644 --- a/src/core_modules/capture-core/utils/cachedDataHooks/useProgramFromIndexedDB.js +++ b/src/core_modules/capture-core/utils/cachedDataHooks/useProgramFromIndexedDB.js @@ -4,9 +4,9 @@ import { userStores, getUserStorageController } from '../../storageControllers'; import { useIndexedDBQuery } from '../reactQueryHelpers'; -export const useProgramFromIndexedDB = (programId: ?string, QueryOptions?: UseQueryOptions<>) => { +export const useProgramFromIndexedDB = (programId: ?string, queryOptions?: UseQueryOptions<>) => { const storageController = getUserStorageController(); - const { enabled = true } = QueryOptions ?? {}; + const { enabled = true } = queryOptions ?? {}; const { data, isLoading, isError } = useIndexedDBQuery( // $FlowFixMe - only gets called when programId is defined because of enabled diff --git a/src/core_modules/capture-core/utils/reactQueryHelpers/query/useMetadataQuery.js b/src/core_modules/capture-core/utils/reactQueryHelpers/query/useMetadataQuery.js index ee31061b8c..2452405547 100644 --- a/src/core_modules/capture-core/utils/reactQueryHelpers/query/useMetadataQuery.js +++ b/src/core_modules/capture-core/utils/reactQueryHelpers/query/useMetadataQuery.js @@ -5,7 +5,7 @@ import { useDataEngine, type ResourceQuery } from '@dhis2/app-runtime'; import type { QueryFunction, UseQueryOptions } from 'react-query'; import { IndexedDBError } from '../../../../capture-core-utils/storage/IndexedDBError/IndexedDBError'; import type { Result } from './useMetadataQuery.types'; -import { ReactQueryAppNamespace } from '../reactQueryHelpers.const'; +import { ReactQueryAppNamespace, IndexedDBNamespace } from '../reactQueryHelpers.const'; const throwErrorForIndexedDB = (error) => { if (error instanceof IndexedDBError) { @@ -43,7 +43,7 @@ export const useIndexedDBQuery = ( queryFn: QueryFunction, queryOptions?: UseQueryOptions, ): Result => - useAsyncMetadata(queryKey, queryFn, { + useAsyncMetadata([IndexedDBNamespace, ...queryKey], queryFn, { cacheTime: 0, ...queryOptions, onError: (error) => { diff --git a/src/core_modules/capture-core/utils/reactQueryHelpers/reactQueryHelpers.const.js b/src/core_modules/capture-core/utils/reactQueryHelpers/reactQueryHelpers.const.js index 2659b304ba..5256c91b69 100644 --- a/src/core_modules/capture-core/utils/reactQueryHelpers/reactQueryHelpers.const.js +++ b/src/core_modules/capture-core/utils/reactQueryHelpers/reactQueryHelpers.const.js @@ -1,4 +1,4 @@ - // @flow export const ReactQueryAppNamespace = 'capture'; +export const IndexedDBNamespace = 'indexedDB'; diff --git a/src/core_modules/capture-ui/CoordinateField/CoordinateField.component.js b/src/core_modules/capture-ui/CoordinateField/CoordinateField.component.js index 48eecdaca7..568cb0cedc 100644 --- a/src/core_modules/capture-ui/CoordinateField/CoordinateField.component.js +++ b/src/core_modules/capture-ui/CoordinateField/CoordinateField.component.js @@ -4,7 +4,7 @@ import classNames from 'classnames'; import i18n from '@dhis2/d2-i18n'; import { Map, TileLayer, Marker, withLeaflet } from 'react-leaflet'; import { ReactLeafletSearch } from 'react-leaflet-search-unpolyfilled'; -import { IconCross24, Button } from '@dhis2/ui'; +import { IconCross24, Button, ModalActions, ModalContent } from '@dhis2/ui'; import { IconButton } from 'capture-ui'; import { AddLocationIcon } from '../Icons'; import { CoordinateInput } from '../internal/CoordinateInput/CoordinateInput.component'; @@ -56,6 +56,13 @@ export class CoordinateField extends React.Component { }; } + componentDidUpdate() { + // Invalidate map size to fix rendering bug + if (this.mapInstance && this.state.showMap) { + this.mapInstance.leafletElement.invalidateSize(); + } + } + toSixDecimal = (value: string) => (parseFloat(value) ? parseFloat(value).toFixed(6) : null) handleBlur = (key: string, value: any) => { @@ -139,13 +146,15 @@ export class CoordinateField extends React.Component { const clonedDialog = React.cloneElement( this.props.mapDialog, - { open: this.state.showMap, onClose: this.closeMap }, + { hide: !this.state.showMap, onClose: this.closeMap }, [...React.Children.toArray(this.props.mapDialog.props.children), ( -
- {this.renderMap()} + <> + + {this.renderMap()} + {this.renderDialogActions()} -
+ )], ); return clonedDialog; @@ -185,7 +194,7 @@ export class CoordinateField extends React.Component { } renderDialogActions = () => ( -
+
{/* $FlowFixMe[prop-missing] automated comment */}
-
+ ); renderLatitude = () => { diff --git a/src/core_modules/capture-ui/CoordinateField/coordinateField.module.css b/src/core_modules/capture-ui/CoordinateField/coordinateField.module.css index d73c64bcf2..9f5709617c 100644 --- a/src/core_modules/capture-ui/CoordinateField/coordinateField.module.css +++ b/src/core_modules/capture-ui/CoordinateField/coordinateField.module.css @@ -3,7 +3,7 @@ display: flex; flex-direction: column; } - + .coordinateFieldsHorizontal { position: relative; display: flex; @@ -64,6 +64,8 @@ .mapContainer { flex-grow: 1; position: relative; + height: 100%; + width: 100%; } .leafletContainer { @@ -73,13 +75,11 @@ } .dialogContent { - flex-grow: 1; display: flex; + height: 600px; flex-direction: column; - padding: 0px 24px 24px 24px; } .buttonsContainerVertical { display: flex; } - \ No newline at end of file diff --git a/src/core_modules/capture-ui/PolygonField/PolygonField.component.js b/src/core_modules/capture-ui/PolygonField/PolygonField.component.js index fd2bfe043a..7ef585a16c 100644 --- a/src/core_modules/capture-ui/PolygonField/PolygonField.component.js +++ b/src/core_modules/capture-ui/PolygonField/PolygonField.component.js @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; import i18n from '@dhis2/d2-i18n'; -import { IconCheckmark16, IconLocation16, colors, Button } from '@dhis2/ui'; +import { IconCheckmark16, IconLocation16, colors, Button, ModalContent, ModalActions } from '@dhis2/ui'; import L from 'leaflet'; import { Map, TileLayer, FeatureGroup, withLeaflet } from 'react-leaflet'; import { ReactLeafletSearch } from 'react-leaflet-search-unpolyfilled'; @@ -62,6 +62,8 @@ function coordsToFeatureCollection(coordinates): ?FeatureCollection { } export class PolygonField extends React.Component { + mapInstance: ?any; + static defaultProps = { mapCenter: [51.505, -0.09], } @@ -75,6 +77,13 @@ export class PolygonField extends React.Component { }; } + componentDidUpdate() { + // Invalidate map size to fix rendering bug + if (this.mapInstance && this.state.showMap) { + this.mapInstance.leafletElement.invalidateSize(); + } + } + onFeatureGroupReady = (reactFGref: any, featureCollection: ?FeatureCollection) => { if (featureCollection) { const leafletGeoJSON = new L.GeoJSON(featureCollection); @@ -134,19 +143,25 @@ export class PolygonField extends React.Component { this.closeMap(); } + setMapInstance = (mapInstance: any) => { + this.mapInstance = mapInstance; + } + renderMapDialog = () => { const clonedDialog = React.cloneElement( // $FlowFixMe[incompatible-type] automated comment this.props.mapDialog, - { open: this.state.showMap, onClose: this.closeMap }, + { hide: !this.state.showMap, onClose: this.closeMap }, // $FlowFixMe[incompatible-use] automated comment [...React.Children.toArray(this.props.mapDialog.props.children), ( -
- {this.renderMap()} + <> + + {this.renderMap()} + {this.renderDialogActions()} -
+ )], ); return clonedDialog; @@ -159,7 +174,13 @@ export class PolygonField extends React.Component { const center = this.getCenter(featureCollection); return (
- + { this.setMapInstance(mapInstance); }} + > { } renderDialogActions = () => ( -
+
{/* $FlowFixMe[prop-missing] automated comment */}
-
+ ); render() { diff --git a/src/core_modules/capture-ui/PolygonField/polygonField.module.css b/src/core_modules/capture-ui/PolygonField/polygonField.module.css index 3aa0c0454f..f4fa6c640e 100644 --- a/src/core_modules/capture-ui/PolygonField/polygonField.module.css +++ b/src/core_modules/capture-ui/PolygonField/polygonField.module.css @@ -21,6 +21,8 @@ .mapContainer { flex-grow: 1; position: relative; + width: 100%; + height: 100%; } .map { @@ -30,9 +32,8 @@ } .dialogContent { - flex-grow: 1; display: flex; flex-direction: column; - padding: 0px 24px 24px 24px; + height: 600px; } diff --git a/yarn.lock b/yarn.lock index 8be06b9e02..3b28056f40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1673,583 +1673,583 @@ debug "^3.1.0" lodash.once "^4.1.1" -"@dhis2-ui/alert@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/alert/-/alert-8.13.15.tgz#5f9a9665e751bc94d96b1d2993683731ac63c019" - integrity sha512-6KiE4TGaJC3FdChyc5FvghInSlPl4hZNDjukq5lYy0XXgnaKBSz9yUPmod5+NLHFsEr0DCISBKFhVeKAexz/hg== +"@dhis2-ui/alert@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/alert/-/alert-9.1.1.tgz#5d410eefab57d21cdaf93e86c68c1060bed78903" + integrity sha512-0EsHICo+zwuauLyf8LkGoVDHEgO7XpDUf39NbaayrQXOreP9mVhuTBgw2gsjdFbOfnN2XW8jHMqjzzK9pE/o+w== dependencies: - "@dhis2-ui/portal" "8.13.15" + "@dhis2-ui/portal" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/box@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/box/-/box-8.13.15.tgz#fb8fce7ee20e27b9e25e7a294c1109a881b123a4" - integrity sha512-SwzPGXbySpU/e0lJyxOfxXipFAc3C9GKKsSQYKVOo2/kxwZDui9zaUcw1hCv4rK4vy2hB1b2GLEvJLnQAE3VIQ== +"@dhis2-ui/box@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/box/-/box-9.1.1.tgz#93dc15a94c1ff3cce662bc93f8f4e4fb0e1c3fdc" + integrity sha512-ghVbkPNzm1eZwWdegqMCj8C49SU3PQOrOSYKTA5n/YvGk2ZcaHoBwJnuwCVamDRr7/KyIWid40nhJ6i4RHzXWw== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/button@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/button/-/button-8.13.15.tgz#0bcb2365a9dd200c303b4bea003a5b403382c981" - integrity sha512-rzHPLBAbG6Q0k8JZU21eWABa/+GqOvl9WV6ay8ODahJmvauOpKKNOYn2AfUZEjbwrWgVbiuGhPOvnC+bVI+jDw== +"@dhis2-ui/button@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/button/-/button-9.1.1.tgz#1d9b232d1522997630044b9ba79e1677d31f63ca" + integrity sha512-RpI9DrVnjRQwpIOaoFT0QDVrSeruX5QSy/HsYzsf3lRrk/I53KNAmYyGDClzkGIPUWU+Gd7i/Sx7gWsBbJgv1w== dependencies: - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/popper" "8.13.15" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/popper" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/calendar@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/calendar/-/calendar-8.13.15.tgz#d37395674df24565258d76aa6f771f76801c8adb" - integrity sha512-/2FVtXI6vGQlFvPul3I/EdWJfpo3QXx5aF/YKZVEEQaM5nhVmdLMVqNoIvNGzh1PJsAyrc6JhqdqqbK5AO2u0w== +"@dhis2-ui/calendar@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/calendar/-/calendar-9.1.1.tgz#7153ead2a63b9bf612e400574ce549e69a4b1b96" + integrity sha512-G1E/uD3LfiX23xedRbutjoDwXVsE2pECYCHWCOIlpoBmJSm3wwxxBa2OvrYz7F79KEsFBU3BbGZOusLIAU/FIw== dependencies: - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/popper" "8.13.15" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/popper" "9.1.1" "@dhis2/multi-calendar-dates" "1.0.2" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/card@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/card/-/card-8.13.15.tgz#87e67ebc2c92512fb729016571d0be40cbf079ca" - integrity sha512-70VZHAuHGBqw4AKBJd1HgcsMyTfQ++yzip5c8ykLU7AZQi7WS8W/fMDvV9DGFE5Lc3JyIZdr15Uh31d/v+EBUA== +"@dhis2-ui/card@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/card/-/card-9.1.1.tgz#ff193ad830694839c7686bcc013d6f396768fb03" + integrity sha512-SqoOLKzZqhKj2EmLPOuzrrDrw669hM3ZzjbhQoAC69kFxbhNqclz3L9naGnR5dIPIBY1jlZalwsqt3gyBLp1yQ== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/center@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/center/-/center-8.13.15.tgz#fd434cd37e6d5eb4a01b4830c2c316fbb814c188" - integrity sha512-+YQFxzNrwYQWsZZYEHM4ywzaGbrjfQWcK4WIPAHifVYau2efPDXAMGQ8cpDrRUivpxCYi3Rpvpp965Dp5+KOYQ== +"@dhis2-ui/center@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/center/-/center-9.1.1.tgz#eacbdc240f8a731aba55100a8eb57ab0efd1f071" + integrity sha512-CY94fOkh6CbZVvuYSMt0sQsi6eO4nPZNf8EkdjUEz3KGRek+J4nMPUn8MDZt6VtyddnhPkmOGruoEQJrqGbuqQ== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/checkbox@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/checkbox/-/checkbox-8.13.15.tgz#ed8beaf55fe32c222f35e2ee2497191dee2ddefe" - integrity sha512-fhi50vBK8v5fXzkNOcZlZR8pxO72GwwVKuTmDkrDeAIKIiNQuNZoxkAkU3vwEGv/rdO3TREbAfzTbtjRui3XHQ== +"@dhis2-ui/checkbox@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/checkbox/-/checkbox-9.1.1.tgz#8655d023c867b1987bf2583c7d2c62aadb09ede3" + integrity sha512-kdbbsikei7AlftFF/DdEdxqAhI3iZ5gxnBTOdpEgRwGP0PKETINUVmKdUFb6SOMOv5Jpq+1bwBeY+lKIxVMSdA== dependencies: - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/required" "8.13.15" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/required" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/chip@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/chip/-/chip-8.13.15.tgz#efd576e7556b241c852b7176762e70e22f84b2e0" - integrity sha512-MJSKIX/KIZBKjQPhIUTwMasmvY4M2ftlYQ61d9Px1YAuivuE+VTvGCsFF0q5EAKMx5ETd6SD1X3PrwzdtHru4Q== +"@dhis2-ui/chip@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/chip/-/chip-9.1.1.tgz#d75c236a96bdb21eb1e2e2e48ed44c8b860e407f" + integrity sha512-2UVI3XfOAk7M0hWCCtCUYMNCtTpIIuurCu6HpU8qCPy8yM5tf8g3nzECL1KrzonOY98q96ll5KBycAd+ZCXRKg== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/cover@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/cover/-/cover-8.13.15.tgz#28ac0f54a39f217518a0df501665829188d5945d" - integrity sha512-3e4XwsnhaVNSNTF2wNk6V+3CzsKCZuLsqMq049ScdaCCrv83qro1cRfRTNqNUJiXnmTubrgU8yxV0kXrFIKZJg== +"@dhis2-ui/cover@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/cover/-/cover-9.1.1.tgz#816b1465f04156f8f429f6443c73c79161d76139" + integrity sha512-hcn288XwYbIEAuu31atyYUG1//sqirndIbQJQy+wN9JfZuXxcYFGETP/2JjAzSYEHZFOlnDFnuCN6wMiM5s0Ew== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/css@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/css/-/css-8.13.15.tgz#8e8073a0c69070f598c27abdef52c36981d77421" - integrity sha512-9aAWUpE36SVS17AQXz3x9KkoRpIkvruat+tk2eabw0vfTB6xVRPzC1oO28mltYhpWNOLLS+k1USwfhDSiiqASw== +"@dhis2-ui/css@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/css/-/css-9.1.1.tgz#0d331dc3ec23103a2f00f566420e7372e81274a3" + integrity sha512-rjNzPgeSOY3z/PlOD/8l5+L85tU8DqYia1jbj4F4yF3qi8oEYp9CkvU9YEK9iufAnt+xmlZiCo6J6RvwOBFiBg== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/divider@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/divider/-/divider-8.13.15.tgz#c4ef063b31aa80735c2288dd9f5cbaa2c79b123e" - integrity sha512-bIQKnaCddH2Pr9e3j3CFFWMvGR51gvw71G4NTHsNGZTWNbVL54tZo4ifhkmkfNvf3cLuF/V6IlpQzrf/X8Iu9g== +"@dhis2-ui/divider@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/divider/-/divider-9.1.1.tgz#11d0567413dc551dfbad271d0a54b85f128dfeb4" + integrity sha512-Yu37IeUlCne+rHvLQMHfN7w8l+e44EqtFrxZ91DoQ8JF2ASV/dOm3RTZe1sBpoBQxtEKwTsEvPOOg4tFzWdrbg== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/field@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/field/-/field-8.13.15.tgz#f91ca25936ea926e82ac17c62b28faa2eae2898b" - integrity sha512-2aBumqc77kBC0gl0A+zGOv+en/pu2YUNYwEEpvq5TE2NOvSktWgUOR6Pk/5NDGtB8ugkxgdjAbgcOk/SRuxQJA== +"@dhis2-ui/field@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/field/-/field-9.1.1.tgz#b665bd79c56e891572601fcfdc61ead14cd53eda" + integrity sha512-jZlgzPJI+fnvG/DoMngyZd5nI+L6a7QfAmOkmYAt6YwAQhhKzfbx8T8lLFWpggzYsTahsov3mBCWXKGPXTsP1w== dependencies: - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/help" "8.13.15" - "@dhis2-ui/label" "8.13.15" + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/help" "9.1.1" + "@dhis2-ui/label" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/file-input@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/file-input/-/file-input-8.13.15.tgz#df974db2ea5cf072b63b4336c84eaa5f989dbcaa" - integrity sha512-il5j+6s+874XX/uS4teXQCrFjnmJgVg5RTViZ5toDUZRUpjx86zLKUcTDANfrxG3eUR+F4dkdsvccXFTkA1dTg== +"@dhis2-ui/file-input@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/file-input/-/file-input-9.1.1.tgz#cf748a2cea1a8a6a50011ea7e138e6dd4116cf7e" + integrity sha512-uM5S+E+lzB0eQjxlQns/xY8dzi4d3mZZuTSs2yZ+waZBP786kESKWuHV5J20FwYAFcyfeokScypvuRnPi5WBjw== dependencies: - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/label" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/status-icon" "8.13.15" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/label" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/status-icon" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/header-bar@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/header-bar/-/header-bar-8.13.15.tgz#40d5c5fb0ba3ff5dce2870125ededa83cd3f1cc6" - integrity sha512-OjGKPU0ia+q53NM0hZMfnNkb8Sh/Ty4q/WcDw9qr0Yzow29G30Z4TH+B8le9SSvUBXBiZ8Q/Rv170JMON0Zygg== - dependencies: - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/center" "8.13.15" - "@dhis2-ui/divider" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/logo" "8.13.15" - "@dhis2-ui/menu" "8.13.15" - "@dhis2-ui/modal" "8.13.15" - "@dhis2-ui/user-avatar" "8.13.15" +"@dhis2-ui/header-bar@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/header-bar/-/header-bar-9.1.1.tgz#d3ab8905b43e5d7f081f91d73cc0005449ba090e" + integrity sha512-FjunQuANrbMBANvyFCLTIxqpOrzFYWb+hz5uI//U6YKxI+9L4yoCjHkg9nJfW2CAiJeyHD1uV8qK0UeKL+/LFQ== + dependencies: + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/center" "9.1.1" + "@dhis2-ui/divider" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/logo" "9.1.1" + "@dhis2-ui/menu" "9.1.1" + "@dhis2-ui/modal" "9.1.1" + "@dhis2-ui/user-avatar" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" moment "^2.29.1" prop-types "^15.7.2" -"@dhis2-ui/help@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/help/-/help-8.13.15.tgz#a3c1adcc655afcc9f24cf13aa9f0597b24593810" - integrity sha512-7obQDeD0dZOyf+Sm808EZeTeCLIFndd0fdPD1vTmTOnevv+W2grT7dCwsFwZ2AsX+GLbzzd+10ikXE8da6OPPQ== +"@dhis2-ui/help@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/help/-/help-9.1.1.tgz#cb4431df213219b59f26dd9a3f824c87bce956bf" + integrity sha512-GzAmyBAcVwG+m4gyiu4JYGzrfEB/bDHIRTdMmH3v6ZTXPyxu93VDKoPP3/NT0yXSl+KsKX6qmkIF1Y1YnErHNA== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/input@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/input/-/input-8.13.15.tgz#cdeb7bf5b63814b4a571b843e580527868f57f32" - integrity sha512-8K4yqeZmYQpvNA+TRWtFwWWC4HbzgotxJ6FoXdUJ34LVHQZJNCaRC0L0B1lHLCnP41WHnY0uYcFovY0kl0G/vA== +"@dhis2-ui/input@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/input/-/input-9.1.1.tgz#87b4f7ec4cb855203f0a446f8c250ebe30845fb2" + integrity sha512-1ZYjQLtzS2cZvvmjwFO2cvv4oG9EvXEp5qRBLOydho7iIzhdWPZF7hcGX5hsqJ8Qg+IMgRpDRKmkDrmLTjLX8w== dependencies: - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/status-icon" "8.13.15" + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/status-icon" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/intersection-detector@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/intersection-detector/-/intersection-detector-8.13.15.tgz#460389648c7cd95a45b881db7a4f997ca7fce045" - integrity sha512-M7gaWb50eu3LPoU6vd5CAz9uLDsyFmacr7RCUQO5FlBQ/cGU6Xvfd8+oaH5R7PqP/YSyNsPi4yP9cpXSlzU1Gw== +"@dhis2-ui/intersection-detector@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/intersection-detector/-/intersection-detector-9.1.1.tgz#584e82ab00b87d430fdcce1e57f782401e11fdb4" + integrity sha512-w+Y0zMC1BA4ePJ0lkFtskcMiiqjTvzcb3ANxLSUigJrSZNArnB/U0X09HDrAre2coUXC1CLvpbRpeGGVsDmzSg== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/label@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/label/-/label-8.13.15.tgz#6a5a42fce24f2d11507f58c3a4782d50ac2fe764" - integrity sha512-+lC8gJTxB81n0/83Nfs1KrgkR7SitdHb40nZh3/VgfRzWJzxESL/VMpA/dz1Y+7eZ8To/exRYvrfoHGI6qpvog== +"@dhis2-ui/label@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/label/-/label-9.1.1.tgz#aabfad4eb311522a8c1380b979ce59b2e3b6e921" + integrity sha512-YbMDOINd0kt1+Rr3cvJh1o5Oyz0iXkZk8DWxHcAI3CFkZPYnu49W+d6rTAgblnDNbsKs7uH1wJ+EUI31e2DZ5g== dependencies: - "@dhis2-ui/required" "8.13.15" + "@dhis2-ui/required" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/layer@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/layer/-/layer-8.13.15.tgz#ab0f15ea5dea3666718faf08f0e812830ec536c4" - integrity sha512-OWlwvW1a4/SKdYCy+Dc7OkGT2Cc+6GHIHRDTQwNQdBGUAtosx/AmsmBv+sCPKl2CMaZQTwL7dRbN/80YOWdklA== +"@dhis2-ui/layer@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/layer/-/layer-9.1.1.tgz#70ef79f4aafe445875cdc27b17f94823642adbff" + integrity sha512-uhOG2avXmLLlGXuzg0VeGm21O3ANljn+NP14CVpP8V0xyWyH3caGIMzX0KeIU9xoMVpMLcTCYXVn+j6AyOXIhg== dependencies: - "@dhis2-ui/portal" "8.13.15" + "@dhis2-ui/portal" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/legend@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/legend/-/legend-8.13.15.tgz#0ba933eac4839d31b37083b4291e637c99a9188e" - integrity sha512-KE5+YBs+YUHmUB1EKfWa/yWc5WcICP3+RH1g9zqK+L6FmO+iH+pFHzF+grtaeOM7ZbrqvXGSamK+UbUYlcn5TA== +"@dhis2-ui/legend@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/legend/-/legend-9.1.1.tgz#6e09a2a3d4f57d493c5359c0e1e34a8f5b5a206c" + integrity sha512-mG5FL/DQ2hG5MqkFXpBE9R1JZv4TvXiR3iIIap0PlAjBWmnvKYndNSzu96uuWXoLmJSxyjipQnBJX4z9bgi8ow== dependencies: - "@dhis2-ui/required" "8.13.15" + "@dhis2-ui/required" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/loader@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/loader/-/loader-8.13.15.tgz#726a3f7c43ec268d1ba4fa115e2ff45f4d983017" - integrity sha512-P/uMn84ME4NVlVNnHcCjbf6Gi042tuRHxAWoYf/R35rYoKnVCJTul4dKf1JCBNRJUpQtEuaT/EGk0G11iZIBog== +"@dhis2-ui/loader@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/loader/-/loader-9.1.1.tgz#d031f85131a78ff135dd57284995f6c76b5f0f09" + integrity sha512-+DwcwmMTxfjyn1H/Jh71zvEucEEQYDHigdtoYxGdeJNHeroI8XVmbbAJk0Qod/dQaXS2BgcKVoxjJMnrBV4V/Q== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/logo@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/logo/-/logo-8.13.15.tgz#c1c9fe8a6e0ed3055027202790d19e6234b01eee" - integrity sha512-dRW5doMz57kjn+CeHtRXy5eVjkHj2xFzU0CA4A+pfTb6mXlwDrC8C7ixpbwIcYky51AS02zKaygoGmODRZt9Ow== +"@dhis2-ui/logo@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/logo/-/logo-9.1.1.tgz#600126eae284ecb572170194c4a15705d9e6574e" + integrity sha512-UQCtbUoR7xQmyQgt6gUXiWebetoRdflm4BrL7CwHGiZFvqPNjPi/zC+tcb4zY6nyUgvr8XvBRjeNqg1NBcaPdQ== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/menu@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/menu/-/menu-8.13.15.tgz#9193a0fc5cc2610ad5b9a68b97acd0f1f218be70" - integrity sha512-dzkRRRk2eogzHlJuR6JONd7NeVU1Ct1zmhlsHDqTHc8p1vO3/FYIF6SWBJErFTXmWSs9kYA4WnZHk/xiyKWFQA== +"@dhis2-ui/menu@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/menu/-/menu-9.1.1.tgz#daa9a30922343cef9cc414f2e283cade4a2f9006" + integrity sha512-wLdpt9uYs4g5/aVueZjjSoR9WOMBOqWd375P5fbd7SxtJ+XiWvkhV6XG4HA/a/meAPTOzdLUJuI84WMuq7g6Rw== dependencies: - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/divider" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/popper" "8.13.15" - "@dhis2-ui/portal" "8.13.15" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/divider" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/popper" "9.1.1" + "@dhis2-ui/portal" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/modal@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/modal/-/modal-8.13.15.tgz#d0865e7b60bc4baf2865133007d730f959592713" - integrity sha512-ptCxzIXnHv9AOcwW33XgmMqb072Z8ZishfjLzlZVhNdiFbwBmCvr+yu5zpTj0I0fISotz7fpAF38tWIsp9CPOA== +"@dhis2-ui/modal@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/modal/-/modal-9.1.1.tgz#657452973a596f38bb31146ebfd34f0edfb89094" + integrity sha512-plE74GAn2f3ZYtpW47cXi6Y3TS1Vrky3H7fk0v6F69IbpS5wgozlRBKsanc8JrGrwz8pcI2+99NtBpJQ29svuw== dependencies: - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/center" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/portal" "8.13.15" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/center" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/portal" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/node@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/node/-/node-8.13.15.tgz#c0221389511bf571fc08f9b3c55963b37d65aac3" - integrity sha512-yG39zK1UEBnABqfrVL9dnoZWaqUY4WTnkfHOwxBI8k7DhTDmoFA/Otqlfu1ILgdnz/W1SLpxGhqRqa1pg4m4Gg== +"@dhis2-ui/node@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/node/-/node-9.1.1.tgz#ba8333e7dfe2c488b4e5109480d21379802d6458" + integrity sha512-ts3pnJSgFWa4kaZUfN79f5ubNA/RbSinJvzsJdAhowAD84DiA1u1+jGHQjOdnIVVeZWkc8qrNJhf0wTVIG1Teg== dependencies: - "@dhis2-ui/loader" "8.13.15" + "@dhis2-ui/loader" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/notice-box@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/notice-box/-/notice-box-8.13.15.tgz#e53a8f4db842bae0966b8a562bafc685cf17af83" - integrity sha512-vY7vAwlRQMYZvNvByVRQqGTjTnMHbKPWWcNlAx23otZDIPJG4z+hxBV0dX+e6hKpZFjtW+5zAOMe4JgS8McrmA== +"@dhis2-ui/notice-box@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/notice-box/-/notice-box-9.1.1.tgz#72f7e185ecf8f09805756b0823252a3a473f4219" + integrity sha512-/Dt8cAzSkkVRF3Va5Koscnbk4DNQvt+Fa7S9VVDt2v382KrchIwkYdqjuPo6GkC+uBNjwZRnExONftiOvHZAWg== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/organisation-unit-tree@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/organisation-unit-tree/-/organisation-unit-tree-8.13.15.tgz#b9750f10d945baca95b8cfb43684d3e1858f7b8a" - integrity sha512-jGPiSBqo9vtvIzKpRVMUeDpmqxmjz6vwEcMqLwyWTh8YxC5nGw20wwj33z6SW/5BoSIgbgQZxxH3B6NBUbO8fA== +"@dhis2-ui/organisation-unit-tree@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/organisation-unit-tree/-/organisation-unit-tree-9.1.1.tgz#8a37dc039b1c3da6250771ba82fd704266710a54" + integrity sha512-N2dyAOoRR6RH4AMIaJSISpOmJcAuATye8yl/xH9JVrnszPbZc31m8siHg0Ng8sudvp+Sr64vSaIoBE4VRQSODQ== dependencies: - "@dhis2-ui/checkbox" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/node" "8.13.15" + "@dhis2-ui/checkbox" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/node" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/pagination@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/pagination/-/pagination-8.13.15.tgz#ec73473380339ab646db0a5e336e5571e024f9ff" - integrity sha512-Kbixe3HFW168EiLkPu8hNe2CqnI+B6n0maVOeZJv90l0bW5FSXLHs669Fr6y2sTl0YVgwK94IoLOCJSWFldvIA== +"@dhis2-ui/pagination@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/pagination/-/pagination-9.1.1.tgz#3f280720f79f5281a036af646c4cc6aba50ada3c" + integrity sha512-TtGl3KTh4QuEYzwcXGm099Ye60wi8HuraZ4WWIsnrIa1OX3DMCO2QItBzIe2bCLBWBfKcG7leWby5iQPhbIl9g== dependencies: - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/select" "8.13.15" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/select" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/popover@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/popover/-/popover-8.13.15.tgz#41bb965b8fddd8b88349c9174ff7c63a392fab25" - integrity sha512-i32u23IAKkCi26Adcom8P8kMEP+EIw/rBcTYNHmPc1wrfVPnMfkVf+fFsVcoY7t1gcNFO88SiyJNffso7S1BPg== +"@dhis2-ui/popover@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/popover/-/popover-9.1.1.tgz#5616186b6779cd31bc362deba8185e86d235833e" + integrity sha512-1fMbPL5uSExp8klxfWyTO9tDAcvlBLfMgeawokNV8mQAUz9ZPrjNpJ6RRRVifvuIrppZIruZV7+UsXs7sSY0Pw== dependencies: - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/popper" "8.13.15" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/popper" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/popper@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/popper/-/popper-8.13.15.tgz#c4c29c16c92221716a8806791bc383b6209acee6" - integrity sha512-gOIDZzvfH8oA0Hf7V0HEi3Y99KRcDdmog/BqnsiqEV/EAV/VRHq5qk239bIqKATM1Ei7Xv7G0lEBXJIZqOeNVA== +"@dhis2-ui/popper@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/popper/-/popper-9.1.1.tgz#dc295585dda157bae49471a7b8c8281cf0a4cd45" + integrity sha512-p3MnI0YbrGT5LOKv6JEnTFs/c6cjsgK8ii6TlggT0acg2fe9U1rdBNDuZeRF1P78D6JUzDwo783P21KxsOSiHQ== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" "@popperjs/core" "^2.10.1" classnames "^2.3.1" prop-types "^15.7.2" react-popper "^2.2.5" resize-observer-polyfill "^1.5.1" -"@dhis2-ui/portal@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/portal/-/portal-8.13.15.tgz#701b0294d069239c7afefd1e1e211b9b80f72dc1" - integrity sha512-oqSbsOyznJwpdpAUiur5v24SOlThcWEbhnvniXSZzZy4thSJpcdF6OLMhgvVcjfO8kyAGgMbQjEx+hZ6cVpCFQ== +"@dhis2-ui/portal@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/portal/-/portal-9.1.1.tgz#aa043490161f993c8ca5f37405033b871198795d" + integrity sha512-yekW6f7Ck1VSKY3V0plHi0N8kwYvJkYlZt5XCuwmi9rA+It5nsICxqNa2AKqwuHX5sc6Z4actEuTdBzk9dizkA== dependencies: classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/radio@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/radio/-/radio-8.13.15.tgz#4475abe33148bef6cd532888ee6077864674ebeb" - integrity sha512-k+ahM17CLIwquuN6XD9LCzkjPR+Zkvpcl8Cb8GzJNpovkhqdDJMvFezmBu7oxyABzVzNYILnuouqGsQwF6G4UQ== +"@dhis2-ui/radio@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/radio/-/radio-9.1.1.tgz#5f7fbb4c5880c566ab7e420bf7ea0acd36c8c28c" + integrity sha512-QaAD0C9fAtaRTs8saluzH8oX8Vv1r4eBJ3hT30YG+CjeAIUrTuGsNpWW8CQDF+tmobAn+pc4O0s3rjhb6rYT0Q== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/required@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/required/-/required-8.13.15.tgz#bba0fda4f693ab9d53f0822b3ad0375ee6c217e7" - integrity sha512-Qlt84rdcsP4i0faaOvOcedP2dFbZp08ASh3ylNwSbLcP2R+aNv9mXQCR6U2mW2WjCMsgAfGzApdMFgYZJfI9QQ== +"@dhis2-ui/required@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/required/-/required-9.1.1.tgz#ea84495f765ca4f42f78a1a91f9fd1cfd47eb00e" + integrity sha512-763tATiCKSGl3PO8jn6ocQQRmKZmNfhC70GMeo7ziqXXypF8PXtY/09SWczn+7W/5fkWdMumK3HNmuyFRRs3yg== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/segmented-control@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/segmented-control/-/segmented-control-8.13.15.tgz#2ecbd81075ea81b974912bab05d9d23f15c12382" - integrity sha512-+oulCoUVDHkxV5WPjGwzpgN9qmIwVW1/9TbW6JvC87gbiywAWaN59dhIIRoBRqeBOy0Ll9DW2L3siBYfMY43vg== +"@dhis2-ui/segmented-control@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/segmented-control/-/segmented-control-9.1.1.tgz#b2d76fa1ff7598f1832566c6ac4b884609a8c4c1" + integrity sha512-0pgq6ixq0c4f9GKc86AMttN6cKuJQPKumUz0YJmnB5WVs3KztEz+B3sHb4ANKchGqdjdSTc0ST+majGSPwConQ== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/select@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/select/-/select-8.13.15.tgz#3125ddb871da60bb1cbdf663ec4109c579fba0fb" - integrity sha512-yVNCws1GUmbXCOBKx2ZdwC5OEVt3wLPOSUOswVrJA3/ZjE0/ji5Or193/u9dhvLgDBzTt/ZIhKVksa4sT/pGCg== - dependencies: - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/checkbox" "8.13.15" - "@dhis2-ui/chip" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/popper" "8.13.15" - "@dhis2-ui/status-icon" "8.13.15" +"@dhis2-ui/select@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/select/-/select-9.1.1.tgz#acef2ff207080a55e79fd152e4dab02d5fec090a" + integrity sha512-g0MbAcmDtnYZf245oUkEH0rV6rUOhXGNS0N098BxaCjR53C5OAgo0Xgw9CkRhiXfjk1kXxhczotICA46RIjmtQ== + dependencies: + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/checkbox" "9.1.1" + "@dhis2-ui/chip" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/popper" "9.1.1" + "@dhis2-ui/status-icon" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/selector-bar@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/selector-bar/-/selector-bar-8.13.15.tgz#96239ca8025b55999c6823c1a16ccfd95913ca46" - integrity sha512-QSNuy3nx3bh8LRvLnx+1ygovyB9kEcS965Gdfm4l3no2wVcD2GMBsQlhKGtoIgxEWSJKKQ15oGrybEsWWuMAAw== - dependencies: - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/popper" "8.13.15" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" +"@dhis2-ui/selector-bar@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/selector-bar/-/selector-bar-9.1.1.tgz#69672d87e07eff924bbe5979796ae39b597cc773" + integrity sha512-Q3H0iYbTNF5DSaa8Mgj6OlL43gxeMNw+Z62gT4n83Ico+lETSwmsX0jeaXkh0BUGOyViEgMDqTH0qzJ3OtuUVQ== + dependencies: + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/popper" "9.1.1" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" "@testing-library/react" "^12.1.2" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/sharing-dialog@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/sharing-dialog/-/sharing-dialog-8.13.15.tgz#0dd96295d200e22f937e9bfab21b444a7680f3bd" - integrity sha512-IRA5xD3vNwASnEoNV10+j/YXy5s9LqxolDWI/GlCHPGnuYxdlCb4NdbwWSFdyuzBtB3XrrGN4/h3BVMRtCKXBA== - dependencies: - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/divider" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/menu" "8.13.15" - "@dhis2-ui/modal" "8.13.15" - "@dhis2-ui/notice-box" "8.13.15" - "@dhis2-ui/popper" "8.13.15" - "@dhis2-ui/select" "8.13.15" - "@dhis2-ui/tab" "8.13.15" - "@dhis2-ui/tooltip" "8.13.15" - "@dhis2-ui/user-avatar" "8.13.15" +"@dhis2-ui/sharing-dialog@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/sharing-dialog/-/sharing-dialog-9.1.1.tgz#623d0a8af6cc8429275939cf1ad548c3ebeaa2e6" + integrity sha512-QtQSbGgthqMoVKlnlLC/P99DNFRFi8wSgCntpzcKq5RqHaLBNj2BEw9VBcIMBQvWoYHYiek8bFqkZDl72g/SlQ== + dependencies: + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/divider" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/menu" "9.1.1" + "@dhis2-ui/modal" "9.1.1" + "@dhis2-ui/notice-box" "9.1.1" + "@dhis2-ui/popper" "9.1.1" + "@dhis2-ui/select" "9.1.1" + "@dhis2-ui/tab" "9.1.1" + "@dhis2-ui/tooltip" "9.1.1" + "@dhis2-ui/user-avatar" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" "@react-hook/size" "^2.1.2" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/status-icon@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/status-icon/-/status-icon-8.13.15.tgz#b97326cb30fab4f6c8913eabc06b9a1f19c7e670" - integrity sha512-+MBRhmaLA9b0bkXEr5eCwN8FFdGq5u3RWXanvAGXlZ0WT7xYUfnqFellJ7qkM/tQQEoBzwuK1nrMLt4YWCrEuw== +"@dhis2-ui/status-icon@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/status-icon/-/status-icon-9.1.1.tgz#7bd7766220278e722d75ca06e5f015766c0faf6f" + integrity sha512-OfPRfwYGs+68q+zglEM2Q05v1Zu5Q8exEggJHCeP43135cJ+7WqohVSYJ+7EjWkqizaQK1kdS/t7E7Qg2mdZfQ== dependencies: - "@dhis2-ui/loader" "8.13.15" + "@dhis2-ui/loader" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/switch@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/switch/-/switch-8.13.15.tgz#b064e8b1af0666756282da7ae59b40218e454ffb" - integrity sha512-E7o3SsNAN6OAt6zmizIfq1Uh4o0GPnwkK4l65JR32/4aMu6oC8omZFBtigmx26bo2P3AS0iIzar0gXwz4LIdyA== +"@dhis2-ui/switch@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/switch/-/switch-9.1.1.tgz#d5ef60a1275a860327fb8111c8a0c8576376d2fa" + integrity sha512-EhZXiIVmZ4vbIV+/MTTRlrNxxHnbGG5I2toEqTDxAXJLFyUb8+EVK1pvxIEJduOwbuRICIhPaAdAZeHnlng33A== dependencies: - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/required" "8.13.15" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/required" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/tab@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/tab/-/tab-8.13.15.tgz#a076b19761d327d481a25fc33d13be8996889b93" - integrity sha512-ak/OVhhHjnBAGPNuEl8Bekh/i7zroeP6BvkHMljpdDpbUN5Ex6+bgnwMpCEZ4qtwwTlZykbIsYelXDlRIGn7rQ== +"@dhis2-ui/tab@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tab/-/tab-9.1.1.tgz#f4b370edfeb6848a26ec488fe56412fcadfb74c7" + integrity sha512-25fy8VVkfBak89fBMr2zKIlB2s0Zkg3O521Q6UffxosdiuvDu2iM08Tycm48wcGkyc11IkMiSutgCKgLupSkpA== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/table@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/table/-/table-8.13.15.tgz#b71680bef5209a4d30c47edb07edcb4a1e9def15" - integrity sha512-tJVQAA1pwji9AjyFr6oKWRzU01Vp/Lbk/5CQnrCqU9kh+uLIoyAfeyjF0kWGCB2uE37WrR5gC6/zOlSow3QqXw== +"@dhis2-ui/table@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/table/-/table-9.1.1.tgz#9745e99aabd089b8f02ffd5915a39b4487f14bf0" + integrity sha512-Y4sJ4i2Er2+R9ORbXYlwkHYej91o/6cptClorLuqJ8dkGeHr79qniZQumsSdgIs90jlTz0QxYFatHJGHGZVZxA== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/tag@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/tag/-/tag-8.13.15.tgz#cd6ccdb55bfba2ff102ae0cca0ae4fb1a9aea0b9" - integrity sha512-KzQYvRWEwOt2jkiv98tdyIH4Ibv2iUtoGo2Dik9Y0LAWRrPW5N8+x+/7Lr6G0ggBL10AhVrKOqA0PVxLYbFjMw== +"@dhis2-ui/tag@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tag/-/tag-9.1.1.tgz#377ae808a869d398ca30fe9b95856b16b958e497" + integrity sha512-I4LIISV2VCYe0cCQZt5Th86uxdLCLJ+OD3tZXM8rGo5v5k1nTTd3A2tk2c4LyNBLEZ1NovGjb7UJDhCeH+kBAw== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/text-area@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/text-area/-/text-area-8.13.15.tgz#48d21eb7093fae2a2a6667f28c996ddd83251d54" - integrity sha512-djZt2OQH1CBaTPOg4iAgllNLYfbcvMuSQ9AR/hr1mf3/85e9ZLc12enXN0AaVkSQopemHvH/KcgNhA8ogEGWhQ== +"@dhis2-ui/text-area@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/text-area/-/text-area-9.1.1.tgz#cd64a86dec87cd0758f3b16fa4383adbf1403d37" + integrity sha512-BPH9218PB2MnxFisslQga6xiMUZnFIbw+U7xEDcW5h+elWBq5Tw42VFakEfRu/ZIpaxeLw8NEpotW7Ho/75mBg== dependencies: - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/status-icon" "8.13.15" + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/status-icon" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-icons" "8.13.15" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-icons" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/tooltip@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/tooltip/-/tooltip-8.13.15.tgz#22acbbf785c51fd9a924621ae9c50f7a58fa88a5" - integrity sha512-6igahGDmonAJJIqmQsm93UCb/mn2Qvivk8NWk6SFDTRVFj6g2I/5ugK5oEn0BQcbIC98bddIj+rBKO2Gzj7oPA== +"@dhis2-ui/tooltip@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/tooltip/-/tooltip-9.1.1.tgz#7562eaa47ccc84a582a52e7dd7f94b8a83d85b87" + integrity sha512-TuufeQvQVwiHkOJi+WYvkXQ9jv+jIqhtIQeWdoz/p7LrfuMX99IKDdPfMefbdm9oVV+C03hgMOn4gFwiOn9NFg== dependencies: - "@dhis2-ui/popper" "8.13.15" - "@dhis2-ui/portal" "8.13.15" + "@dhis2-ui/popper" "9.1.1" + "@dhis2-ui/portal" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/transfer@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/transfer/-/transfer-8.13.15.tgz#de7199c68664821c3653a0e123e9bc9cd22ec745" - integrity sha512-blcrk8S3YXwVwlPS7UUkdVq6eg48j4Uqi/nir3t2HbfcnJDl3EjQW22xv/nSHcvDi5rzZ6cflVHWLzp4lJdObg== +"@dhis2-ui/transfer@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/transfer/-/transfer-9.1.1.tgz#6bb71a5480a080ef51fb3b58173a0c00ab113d7e" + integrity sha512-9Aui540Ek4IqmMm97fR5Kex/75Me+YilDA5LBFrvKGA32lkbnCeN8H3zIIXqNlH72YQXlgkp4y0+E5FuCEDsZA== dependencies: - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/intersection-detector" "8.13.15" - "@dhis2-ui/loader" "8.13.15" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/intersection-detector" "9.1.1" + "@dhis2-ui/loader" "9.1.1" "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2-ui/user-avatar@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2-ui/user-avatar/-/user-avatar-8.13.15.tgz#619150face6561ecd679385a9fdd099d53a6b86e" - integrity sha512-wo6hYzTYY3rTtwiR1iSGunk02h5rvMfWok5HfCrvV4Dy+aSiegygS1ZQ806Dttmq4s03sVvMuZUX15v7GIfE4w== +"@dhis2-ui/user-avatar@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2-ui/user-avatar/-/user-avatar-9.1.1.tgz#abf8f9ad6df7dd3a9852454633027f76e1b83e68" + integrity sha512-YnI6Iw8btX+lLyTQMDZHtc2VMFQXajZ2k06k/kQ4VFczF1utjmmtVMgzrggMAjpTQcCXJ3FT5m4YORlYbPuPRA== dependencies: "@dhis2/prop-types" "^3.1.2" - "@dhis2/ui-constants" "8.13.15" + "@dhis2/ui-constants" "9.1.1" classnames "^2.3.1" prop-types "^15.7.2" @@ -2532,91 +2532,91 @@ workbox-routing "^6.1.5" workbox-strategies "^6.1.5" -"@dhis2/ui-constants@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-8.13.15.tgz#e1124e79f077aed6b3a9703b8a257701ec68717b" - integrity sha512-XrwKXNM0Xiv7O3E9vAukOJv8sD1QD9ruLOUS66+fs4pBLd0L+W6Gjr7LYG1B19rANXAShmfR+dqgD/pLVLAqsw== +"@dhis2/ui-constants@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2/ui-constants/-/ui-constants-9.1.1.tgz#50590863494c27b632bba01a11a950794c7421c7" + integrity sha512-REc8+uwtyeHX/BTrkyMkujGnZ0DsNoB3rcnmlqChQo3+QTvFDiNmD8yHTVmRfXXDA8Z6OL+72ZmjdFUQ36rm0g== dependencies: prop-types "^15.7.2" -"@dhis2/ui-forms@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-8.13.15.tgz#5098893acada5fb06d263ce271f556fc1bae1acf" - integrity sha512-+skh3quuARmzVlVJUYnN8EM5Dz9OLOsnh/GpCMXyiO4yjhajpbQ0QtMh/dFyQhCB3LzywDVaoge+kwJyrIS82Q== - dependencies: - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/checkbox" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/file-input" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/radio" "8.13.15" - "@dhis2-ui/select" "8.13.15" - "@dhis2-ui/switch" "8.13.15" - "@dhis2-ui/text-area" "8.13.15" +"@dhis2/ui-forms@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2/ui-forms/-/ui-forms-9.1.1.tgz#f4b710cdf9608e34ccf202d35567f5fea59214f7" + integrity sha512-lXiNVMK5KJ9LzXKnq3QNGawnKTUoEYuxBSnlBz2Y55HBh91a5bUsUz6qBvPbnhkn134h187Bw/SXLL8OUU3+fA== + dependencies: + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/checkbox" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/file-input" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/radio" "9.1.1" + "@dhis2-ui/select" "9.1.1" + "@dhis2-ui/switch" "9.1.1" + "@dhis2-ui/text-area" "9.1.1" "@dhis2/prop-types" "^3.1.2" classnames "^2.3.1" final-form "^4.20.2" prop-types "^15.7.2" react-final-form "^6.5.3" -"@dhis2/ui-icons@8.13.15": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-8.13.15.tgz#eb83784975d9686058ce71377928a0d4f726b517" - integrity sha512-d4A7oPgT6HKZgQDGaY8mX04EvQrnDmOv/L9n52JtnmEcPrPTqqhmCqdr/CQ8B/NP91nhFACDFBQ4ez4/YJVYKw== - -"@dhis2/ui@^8.0.0", "@dhis2/ui@^8.13.8": - version "8.13.15" - resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-8.13.15.tgz#d270dd9d1fcbc76f015adea97b033d4ca0fe95f4" - integrity sha512-bHg2CtXq8IRE86sDwlty3I5v8SrYmi2z469ugbEgrvNoVfgXxKeQZXzLMKxednt/sGDnSbveAduiq/QUMuKyQA== - dependencies: - "@dhis2-ui/alert" "8.13.15" - "@dhis2-ui/box" "8.13.15" - "@dhis2-ui/button" "8.13.15" - "@dhis2-ui/calendar" "8.13.15" - "@dhis2-ui/card" "8.13.15" - "@dhis2-ui/center" "8.13.15" - "@dhis2-ui/checkbox" "8.13.15" - "@dhis2-ui/chip" "8.13.15" - "@dhis2-ui/cover" "8.13.15" - "@dhis2-ui/css" "8.13.15" - "@dhis2-ui/divider" "8.13.15" - "@dhis2-ui/field" "8.13.15" - "@dhis2-ui/file-input" "8.13.15" - "@dhis2-ui/header-bar" "8.13.15" - "@dhis2-ui/help" "8.13.15" - "@dhis2-ui/input" "8.13.15" - "@dhis2-ui/intersection-detector" "8.13.15" - "@dhis2-ui/label" "8.13.15" - "@dhis2-ui/layer" "8.13.15" - "@dhis2-ui/legend" "8.13.15" - "@dhis2-ui/loader" "8.13.15" - "@dhis2-ui/logo" "8.13.15" - "@dhis2-ui/menu" "8.13.15" - "@dhis2-ui/modal" "8.13.15" - "@dhis2-ui/node" "8.13.15" - "@dhis2-ui/notice-box" "8.13.15" - "@dhis2-ui/organisation-unit-tree" "8.13.15" - "@dhis2-ui/pagination" "8.13.15" - "@dhis2-ui/popover" "8.13.15" - "@dhis2-ui/popper" "8.13.15" - "@dhis2-ui/portal" "8.13.15" - "@dhis2-ui/radio" "8.13.15" - "@dhis2-ui/required" "8.13.15" - "@dhis2-ui/segmented-control" "8.13.15" - "@dhis2-ui/select" "8.13.15" - "@dhis2-ui/selector-bar" "8.13.15" - "@dhis2-ui/sharing-dialog" "8.13.15" - "@dhis2-ui/switch" "8.13.15" - "@dhis2-ui/tab" "8.13.15" - "@dhis2-ui/table" "8.13.15" - "@dhis2-ui/tag" "8.13.15" - "@dhis2-ui/text-area" "8.13.15" - "@dhis2-ui/tooltip" "8.13.15" - "@dhis2-ui/transfer" "8.13.15" - "@dhis2-ui/user-avatar" "8.13.15" - "@dhis2/ui-constants" "8.13.15" - "@dhis2/ui-forms" "8.13.15" - "@dhis2/ui-icons" "8.13.15" +"@dhis2/ui-icons@9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2/ui-icons/-/ui-icons-9.1.1.tgz#49380ba3d161969e329a060209869e0cad4592a8" + integrity sha512-gUPnf80oWw2XoZx5sIVzisYqJ9H0VKZ+pP3gNTuVflspkOvi7t8gQ2f1VCdX4L8t0Itqd1pQA5gCUBv9nkdUCQ== + +"@dhis2/ui@^8.0.0", "@dhis2/ui@^9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@dhis2/ui/-/ui-9.1.1.tgz#4968efa2f7b44c0e9779aeb53250728e07eae54f" + integrity sha512-1o/pPnsqhw4bVRzxHjfYZpBiSy/Jf7uKr6R18IiwLEMtyuSlsht/ngRfeftstSrIYBnOP025er4JhxBhY5f41w== + dependencies: + "@dhis2-ui/alert" "9.1.1" + "@dhis2-ui/box" "9.1.1" + "@dhis2-ui/button" "9.1.1" + "@dhis2-ui/calendar" "9.1.1" + "@dhis2-ui/card" "9.1.1" + "@dhis2-ui/center" "9.1.1" + "@dhis2-ui/checkbox" "9.1.1" + "@dhis2-ui/chip" "9.1.1" + "@dhis2-ui/cover" "9.1.1" + "@dhis2-ui/css" "9.1.1" + "@dhis2-ui/divider" "9.1.1" + "@dhis2-ui/field" "9.1.1" + "@dhis2-ui/file-input" "9.1.1" + "@dhis2-ui/header-bar" "9.1.1" + "@dhis2-ui/help" "9.1.1" + "@dhis2-ui/input" "9.1.1" + "@dhis2-ui/intersection-detector" "9.1.1" + "@dhis2-ui/label" "9.1.1" + "@dhis2-ui/layer" "9.1.1" + "@dhis2-ui/legend" "9.1.1" + "@dhis2-ui/loader" "9.1.1" + "@dhis2-ui/logo" "9.1.1" + "@dhis2-ui/menu" "9.1.1" + "@dhis2-ui/modal" "9.1.1" + "@dhis2-ui/node" "9.1.1" + "@dhis2-ui/notice-box" "9.1.1" + "@dhis2-ui/organisation-unit-tree" "9.1.1" + "@dhis2-ui/pagination" "9.1.1" + "@dhis2-ui/popover" "9.1.1" + "@dhis2-ui/popper" "9.1.1" + "@dhis2-ui/portal" "9.1.1" + "@dhis2-ui/radio" "9.1.1" + "@dhis2-ui/required" "9.1.1" + "@dhis2-ui/segmented-control" "9.1.1" + "@dhis2-ui/select" "9.1.1" + "@dhis2-ui/selector-bar" "9.1.1" + "@dhis2-ui/sharing-dialog" "9.1.1" + "@dhis2-ui/switch" "9.1.1" + "@dhis2-ui/tab" "9.1.1" + "@dhis2-ui/table" "9.1.1" + "@dhis2-ui/tag" "9.1.1" + "@dhis2-ui/text-area" "9.1.1" + "@dhis2-ui/tooltip" "9.1.1" + "@dhis2-ui/transfer" "9.1.1" + "@dhis2-ui/user-avatar" "9.1.1" + "@dhis2/ui-constants" "9.1.1" + "@dhis2/ui-forms" "9.1.1" + "@dhis2/ui-icons" "9.1.1" prop-types "^15.7.2" "@emotion/is-prop-valid@^0.7.3": @@ -9481,9 +9481,9 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: readable-stream "^2.3.6" follow-redirects@^1.0.0, follow-redirects@^1.14.7: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + version "1.15.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" + integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== for-each@^0.3.3: version "0.3.3"