diff --git a/i18n/en.pot b/i18n/en.pot index c5f2aef0b..8659cb511 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-03-19T12:31:03.302Z\n" -"PO-Revision-Date: 2024-03-19T12:31:03.302Z\n" +"POT-Creation-Date: 2024-09-02T10:19:20.774Z\n" +"PO-Revision-Date: 2024-09-02T10:19:20.774Z\n" msgid "Untitled dashboard" msgstr "Untitled dashboard" @@ -126,20 +126,38 @@ msgid "No data to display" msgstr "No data to display" msgid "" -"Install Line Listing app version ${minLLVersion.join(\n" -" '.'\n" -" )} or higher in order to display this item." +"Install Data Visualizer app ${minDVVersion.join(\n" +" '.'\n" +" )} or higher in order to display this item." msgstr "" -"Install Line Listing app version ${minLLVersion.join(\n" -" '.'\n" -" )} or higher in order to display this item." +"Install Data Visualizer app ${minDVVersion.join(\n" +" '.'\n" +" )} or higher in order to display this item." msgid "Show without filters" msgstr "Show without filters" +msgid "" +"Install Line Listing app ${minLLVersion.join(\n" +" '.'\n" +" )} or higher in order to display this item." +msgstr "" +"Install Line Listing app ${minLLVersion.join(\n" +" '.'\n" +" )} or higher in order to display this item." + msgid "Maps with Earth Engine layers cannot be displayed when offline" msgstr "Maps with Earth Engine layers cannot be displayed when offline" +msgid "" +"Install Maps app ${minMapsVersion.join(\n" +" '.'\n" +" )} or higher in order to display this item." +msgstr "" +"Install Maps app ${minMapsVersion.join(\n" +" '.'\n" +" )} or higher in order to display this item." + msgid "Unable to load the plugin for this item" msgstr "Unable to load the plugin for this item" diff --git a/package.json b/package.json index 0e58a846a..c131a61d0 100644 --- a/package.json +++ b/package.json @@ -5,16 +5,12 @@ "private": true, "license": "BSD-3-Clause", "dependencies": { + "@dhis2/app-runtime": "^3.10.6", "@dhis2/analytics": "^26.8.2", - "@dhis2/app-runtime": "^3.10.2", "@dhis2/app-runtime-adapter-d2": "^1.1.0", - "@dhis2/d2-i18n": "^1.1.3", - "@dhis2/ui": "^9.2.0", - "@krakenjs/post-robot": "^11.0.0", "classnames": "^2.3.2", "d2": "^31.10.0", "d2-utilizr": "^0.2.16", - "i18next": "^20.3.5", "lodash": "^4.17.21", "moment": "^2.30.1", "react": "^16.14.0", @@ -46,8 +42,8 @@ "@badeball/cypress-cucumber-preprocessor": "^20.1.0", "@bahmutov/cypress-esbuild-preprocessor": "^2.2.1", "@cypress/webpack-preprocessor": "^6.0.2", - "@dhis2/cli-app-scripts": "^10.3.10", - "@dhis2/cli-style": "^10.5.1", + "@dhis2/cli-app-scripts": "^11.7.0", + "@dhis2/cli-style": "^10.7.3", "@dhis2/cypress-commands": "^10.0.6", "@dhis2/cypress-plugins": "^10.0.6", "@semantic-release/changelog": "^6", @@ -70,8 +66,5 @@ "moduleNameMapper": { "^.+\\.(css|sass|scss)$": "identity-obj-proxy" } - }, - "resolutions": { - "@dhis2/ui": "^9.2.0" } } diff --git a/src/AppWrapper.js b/src/AppWrapper.js index a0258eeaf..c094cb6b3 100644 --- a/src/AppWrapper.js +++ b/src/AppWrapper.js @@ -43,10 +43,16 @@ const query = { } const providerDataTransformation = ({ rootOrgUnits, apps, currentUser }) => { + const dataVisualizerApp = + apps.find((app) => app.key === 'data-visualizer') || {} const lineListingApp = apps.find((app) => app.key === 'line-listing') || {} + const mapsApp = apps.find((app) => app.key === 'maps') || {} + return { - rootOrgUnits: rootOrgUnits.organisationUnits, + dataVisualizerAppVersion: dataVisualizerApp.version || '0.0.0', lineListingAppVersion: lineListingApp.version || '0.0.0', + mapsAppVersion: mapsApp.version || '0.0.0', + rootOrgUnits: rootOrgUnits.organisationUnits, currentUser, apps, } diff --git a/src/components/DropdownButton/DropdownButton.js b/src/components/DropdownButton/DropdownButton.js index ea4162c37..7be0ab47e 100644 --- a/src/components/DropdownButton/DropdownButton.js +++ b/src/components/DropdownButton/DropdownButton.js @@ -25,7 +25,7 @@ const DropdownButton = ({ {open && ( - + {component} diff --git a/src/components/Item/VisualizationItem/Item.js b/src/components/Item/VisualizationItem/Item.js index 93b09b14b..722c4b1f6 100644 --- a/src/components/Item/VisualizationItem/Item.js +++ b/src/components/Item/VisualizationItem/Item.js @@ -88,15 +88,15 @@ class Item extends Component { } async componentDidMount() { - // Avoid refetching the visualization already in the Redux store - // when the same dashboard item is added again. - // This also solves a flashing of all the "duplicated" dashboard items. - !this.props.visualization.id && - this.props.setVisualization( - await apiFetchVisualization(this.props.item) - ) - try { + // Avoid refetching the visualization already in the Redux store + // when the same dashboard item is added again. + // This also solves a flashing of all the "duplicated" dashboard items. + !this.props.visualization.id && + this.props.setVisualization( + await apiFetchVisualization(this.props.item) + ) + if ( this.props.settings .keyGatherAnalyticalObjectStatisticsInDashboardViews && diff --git a/src/components/Item/VisualizationItem/ItemContextMenu/__tests__/__snapshots__/ViewAsMenuItems.spec.js.snap b/src/components/Item/VisualizationItem/ItemContextMenu/__tests__/__snapshots__/ViewAsMenuItems.spec.js.snap index da22ae3d1..8ef318cd7 100644 --- a/src/components/Item/VisualizationItem/ItemContextMenu/__tests__/__snapshots__/ViewAsMenuItems.spec.js.snap +++ b/src/components/Item/VisualizationItem/ItemContextMenu/__tests__/__snapshots__/ViewAsMenuItems.spec.js.snap @@ -3,14 +3,18 @@ exports[`renders disabled menu items when offline 1`] = `