From cfc3e55231fd84d0bd5b4eff8c8b9e5bc3e05480 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Sun, 5 May 2024 03:37:35 +0200 Subject: [PATCH 1/8] fix(translations): sync translations from transifex (master) Automatically merged. --- i18n/lo.po | 118 +++++++++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/i18n/lo.po b/i18n/lo.po index 42249273c..9aa92e528 100644 --- a/i18n/lo.po +++ b/i18n/lo.po @@ -21,22 +21,22 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" msgid "view only" -msgstr "" +msgstr "ເບິ່ງຢ່າງດຽວ" msgid "view and edit" -msgstr "" +msgstr "ເບິ່ງ ແລະ ແກ້ໄຂ" msgid "all users ({{accessLevel}})" -msgstr "" +msgstr "ຜູ້ໃຊ້ທັງໝົດ {{accessLevel}}" msgid "{{userOrGroup}} ({{accessLevel}})" -msgstr "" +msgstr " {{userOrGroup}} ({{accessLevel}} )" msgid "Shared with {{commaSeparatedListOfUsersAndGroups}}" -msgstr "" +msgstr "ແບ່ງປັນໃຫ້ກັບ {{commaSeparatedListOfUsersAndGroups}}" msgid "Not shared with any users or groups" -msgstr "" +msgstr "ບໍ່ໃຫ້ແບ່ງປັນກັບຜູ້ໃຊ້ ແລະ ກຸ່ມອື່ນ" msgid "No description" msgstr "ບໍ່ມີລາຍລະອຽດ" @@ -45,91 +45,93 @@ msgid "Last updated {{time}}" msgstr "ແກ້ໄຂລ່າສຸດ {{time}}" msgid "Created {{time}} by {{author}}" -msgstr "" +msgstr "ສ້າງ {{time}} ໂດຍ {{author}}" msgid "Created {{time}}" -msgstr "" +msgstr "ສ້າງ {{time}}" msgid "Viewed {{count}} times" msgid_plural "Viewed {{count}} times" -msgstr[0] "" +msgstr[0] "ກວດເບິ່ງ {{count}} ຄັ້ງ" msgid "Notifications" -msgstr "" +msgstr "ການແຈ້ງເຕືອນ" msgid "You're subscribed and getting updates about new interpretations." -msgstr "" +msgstr "ທ່ານກົດປູ່ມສະໜັກ ເພື່ອຈະໄດ້ອັບເດດ ແລະ ຮັບຂໍ້ມູນໃໝ່" msgid "Unsubscribe" -msgstr "" +msgstr "ຍົກເລີກການສະໝັກ" msgid "Subscribe to get updates about new interpretations." -msgstr "" +msgstr "ສະໝັກເພື່ອທີ່ຈະຮັບຮູ້ຂໍ້ມູນໃໝ່" msgid "Subscribe" -msgstr "" +msgstr "ສະໝັກ" msgid "About this map" -msgstr "" +msgstr "ກ່ຽວກັບແຜນທີ່" msgid "About this line list" -msgstr "" +msgstr "ກ່ຽວກັບບັນຊີລາຍຊື່" msgid "About this visualization" -msgstr "" +msgstr "ກ່ຽວກັບການສ້າງພາບຂໍ້ມູນ" msgid "This app could not retrieve required data." -msgstr "" +msgstr "ແອັບນີ້ບໍ່ສາມາດດຶງຂໍ້ມູນທີ່ຕ້ອງການໄດ້" msgid "Network error" msgstr "ຂໍ້ຜິດພາດທາງເຄື່ອຂ່າຍ" msgid "Data / Edit calculation" -msgstr "" +msgstr "ຂໍ້ມູນ / ແກ້ໄຂການຄິດໄລ່" msgid "Data / New calculation" -msgstr "" +msgstr "ຂໍ້ມູນ / ຄິດໄລ່ໃໝ່" msgid "Remove item" msgstr "ລົບລາຍການ" msgid "Check formula" -msgstr "" +msgstr "ກວດເບິ່ງສູດ" msgid "Calculation name" -msgstr "" +msgstr "ຊື່ການຄິດໄລ່" msgid "Shown in table headers and chart axes/legends" -msgstr "" +msgstr "ສະ​ແດງ​​ຢູ່​ເທິງຕາ​ຕະ​ລາງ​ ແລະ​ ແກນ​ແຜນ​ວາດ" msgid "Delete calculation" -msgstr "" +msgstr "ລົບການຄິດໄລ່" msgid "Cancel" -msgstr "Cancel" +msgstr "ຍົກເລີກ" msgid "The calculation can only be saved with a valid formula" -msgstr "" +msgstr "ການຄິດໄລ່ແມ່ນຖືກບັນທຶກດ້ວຍສູດທີ່ຖືກຕ້ອງເທົ່ານັ້ນ" msgid "Add a name to save this calculation" -msgstr "" +msgstr "ເພີ່ມຊື່ເພື່ບັນທຶກການຄິດໄລ່" msgid "Save calculation" -msgstr "" +msgstr "ບັນທຶກການຄິດໄລ່" msgid "" "Are you sure you want to delete this calculation? It may be used by other " "visualizations." msgstr "" +"ເຈົ້າແນ່ໃຈບໍ່ສິລືບຂໍ້ມູນການຄິດໄລ່ນີ້? " +"ຂໍ້ມູນດັ້ງກ່າວອາດຈະຖືກນໍາໃຊ້ໃນການສ້າງພາບຂໍ້ມູນໃໝ່ກໍ່ເປັນໄດ້" msgid "Yes, delete" -msgstr "" +msgstr "ຢືນຢັນ, ລົບ" msgid "Totals only" -msgstr "" +msgstr "ທັງໝົດເທົ່ານັ້ນ" msgid "Details only" -msgstr "" +msgstr "ລາຍລະອຽດເທົ່ານັ້ນ" msgid "Loading" msgstr "ກໍາລັງໂຫຼດ" @@ -138,30 +140,30 @@ msgid "Data elements" msgstr "ອົງປະກອບຂໍ້ມູນ" msgid "Search by data element name" -msgstr "" +msgstr "ຄົ້ນຫາໂດຍຊື່ອົງປະກອບຂໍ້ມູນ" msgid "No data elements found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບອົງປະກອບຂໍ້ມູນຂອງ \"{{- searchTerm}}\"" msgid "No data elements found" -msgstr "" +msgstr "ບໍ່ພົບອົງປະກອບຂໍ໊ມູນ" msgid "" "Drag items here, or double click in the list, to start building a " "calculation formula" -msgstr "" +msgstr "ລາກລາຍການມາບ່ອນນີ້, ຫຼືຄລິກສອງເທື່ອໃນລາຍການເພື່ອສ້າງສູດການຄິດໄລ່" msgid "Math operators" msgstr "" msgid "Data Type" -msgstr "" +msgstr "ຊະນິດຂໍ້ມູນ" msgid "Only {{dataType}} can be used in {{visType}}" -msgstr "" +msgstr "ມີພຽງ {{dataType}} ທີສາມາດໃຊ້ໃນ {{visType}}" msgid "All types" -msgstr "" +msgstr "ທຸກຊະນິດ" msgid "Disaggregation" msgstr "Disaggregation" @@ -170,49 +172,49 @@ msgid "No data" msgstr "ບໍ່ມີຂໍ້ມູນ" msgid "Search by data item name" -msgstr "" +msgstr "ຄົ້ນຫາໂດຍຊື່ລາຍການຂໍ້ມູນ" msgid "No items selected" -msgstr "" +msgstr "ບໍ່ມີລາຍການທີ່ຖືກເລືອກ" msgid "Selected Items" -msgstr "" +msgstr "ລາຍການທີ່ເລືອກ" msgid "No indicators found" -msgstr "" +msgstr "ບໍ່ພົບຕົວຊີ້ວັດ" msgid "No data sets found" -msgstr "" +msgstr "ບໍ່ພົບຊຸດຂໍ້ມູນ" msgid "No event data items found" -msgstr "" +msgstr "ບໍ່ພົບຂໍ້ມູນເຫດການ" msgid "No program indicators found" -msgstr "" +msgstr "ບໍ່ພົບໂປຼແກຼມຕົວຊີ້ວັດ" msgid "No calculations found" -msgstr "" +msgstr "ບໍ່ພົບການຄິດໄລ່" msgid "No indicators found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບຕົວຊີ້ວັດສຳລັບ \"{{- searchTerm}}\"" msgid "No data sets found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບຊຸດຂໍ້ມູນສຳລັບ \"{{- searchTerm}}\"" msgid "No event data items found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບຂໍ້ມູນເຫດການສຳລັບ \"{{- searchTerm}}\"" msgid "No program indicators found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບໂປຼແກຼມຕົວຊີ້ວັດສຳລັບ \"{{- searchTerm}}\"" msgid "No calculations found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບການຄິດໄລ່ສຳລັບ \"{{- serachTerm}}\"" msgid "Nothing found for \"{{- searchTerm}}\"" -msgstr "" +msgstr "ບໍ່ພົບຫຍັງສຳລັບ \"{{- searchTerm}}\"" msgid "Calculation" -msgstr "" +msgstr "ການຄິດໄລ່" msgid "Metric type" msgstr "" @@ -221,19 +223,19 @@ msgid "All metrics" msgstr "ທຸກການປັບປຸງ" msgid "Move to {{axisName}}" -msgstr "" +msgstr "ຍ້າຍໄປ {{axisName}}" msgid "Add to {{axisName}}" -msgstr "" +msgstr "ເພີ່ມໃສ່ {{axisName}}" msgid "Not available for {{visualizationType}}" -msgstr "" +msgstr "ບໍ່ມີສໍາລັບ {{visualizationType}}" msgid "Remove Assigned Categories" -msgstr "" +msgstr "ລົບກຸ່ມທີ່ຖືກມອບໝາຍ" msgid "Add Assigned Categories" -msgstr "" +msgstr "ເພີ່ມກຸ່ມທີ່ຖືກມອບໝາຍ" msgid "Remove" msgstr "ລົບອອກ" From eef1caf98ff4ff35435fa25c06a64a697810dca2 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Sun, 5 May 2024 01:41:19 +0000 Subject: [PATCH 2/8] chore(release): cut 26.6.7 [skip ci] ## [26.6.7](https://github.com/dhis2/analytics/compare/v26.6.6...v26.6.7) (2024-05-05) ### Bug Fixes * **translations:** sync translations from transifex (master) ([cfc3e55](https://github.com/dhis2/analytics/commit/cfc3e55231fd84d0bd5b4eff8c8b9e5bc3e05480)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a5058d3..474e2a1d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [26.6.7](https://github.com/dhis2/analytics/compare/v26.6.6...v26.6.7) (2024-05-05) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([cfc3e55](https://github.com/dhis2/analytics/commit/cfc3e55231fd84d0bd5b4eff8c8b9e5bc3e05480)) + ## [26.6.6](https://github.com/dhis2/analytics/compare/v26.6.5...v26.6.6) (2024-04-28) diff --git a/package.json b/package.json index c42d758ed..987cb91fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "26.6.6", + "version": "26.6.7", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": { From be6ea56d1c733aba497d669184668f96e8ae344b Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Mon, 6 May 2024 13:21:16 +0200 Subject: [PATCH 3/8] fix: fix a crash when row totals is enabled (DHIS2-17297) (#1660) --- src/modules/pivotTable/PivotTableEngine.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/modules/pivotTable/PivotTableEngine.js b/src/modules/pivotTable/PivotTableEngine.js index b5788fee1..7b90e0935 100644 --- a/src/modules/pivotTable/PivotTableEngine.js +++ b/src/modules/pivotTable/PivotTableEngine.js @@ -515,9 +515,19 @@ export class PivotTableEngine { if (!this.data[row]) { return undefined } + const cellValue = this.data[row][column] - if (cellValue && !Array.isArray(cellValue)) { + if (!cellValue) { + // Empty cell + // The cell still needs to get the valueType to render correctly 0 and cumulative values + return { + valueType: VALUE_TYPE_NUMBER, + totalAggregationType: AGGREGATE_TYPE_SUM, + } + } + + if (!Array.isArray(cellValue)) { // This is a total cell return { valueType: cellValue.valueType, @@ -532,6 +542,7 @@ export class PivotTableEngine { const dxRowIndex = this.dimensionLookup.rows.findIndex( (dim) => dim.isDxDimension ) + if (rowHeaders.length && dxRowIndex !== -1) { return { valueType: rowHeaders[dxRowIndex].valueType, @@ -553,11 +564,6 @@ export class PivotTableEngine { } } - // Empty cell - // The cell still needs to get the valueType to render correctly 0 and cumulative values - // - // OR - // // Data is in Filter // TODO : This assumes the server ignores text types, we should confirm this is the case return { From 743d7ff33bafe7cfab90499852cc131817739451 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Mon, 6 May 2024 11:29:04 +0000 Subject: [PATCH 4/8] chore(release): cut 26.6.8 [skip ci] ## [26.6.8](https://github.com/dhis2/analytics/compare/v26.6.7...v26.6.8) (2024-05-06) ### Bug Fixes * fix a crash when row totals is enabled (DHIS2-17297) ([#1660](https://github.com/dhis2/analytics/issues/1660)) ([be6ea56](https://github.com/dhis2/analytics/commit/be6ea56d1c733aba497d669184668f96e8ae344b)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 474e2a1d1..0caea741d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [26.6.8](https://github.com/dhis2/analytics/compare/v26.6.7...v26.6.8) (2024-05-06) + + +### Bug Fixes + +* fix a crash when row totals is enabled (DHIS2-17297) ([#1660](https://github.com/dhis2/analytics/issues/1660)) ([be6ea56](https://github.com/dhis2/analytics/commit/be6ea56d1c733aba497d669184668f96e8ae344b)) + ## [26.6.7](https://github.com/dhis2/analytics/compare/v26.6.6...v26.6.7) (2024-05-05) diff --git a/package.json b/package.json index 987cb91fb..6ca9354f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "26.6.7", + "version": "26.6.8", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": { From 899358d5ea5a486f299ab54ded7b3184608e4bf7 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 8 May 2024 11:28:50 +0300 Subject: [PATCH 5/8] fix: system / user setting for display name not respected in Org Unit tree (DHIS2-15000) (#1664) --- src/components/OrgUnitDimension/OrgUnitDimension.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/OrgUnitDimension/OrgUnitDimension.js b/src/components/OrgUnitDimension/OrgUnitDimension.js index 3516daf46..5d2d7115a 100644 --- a/src/components/OrgUnitDimension/OrgUnitDimension.js +++ b/src/components/OrgUnitDimension/OrgUnitDimension.js @@ -40,6 +40,7 @@ const OrgUnitDimension = ({ hideLevelSelect, hideUserOrgUnits, warning, + displayNameProp, }) => { const [ouLevels, setOuLevels] = useState([]) const [ouGroups, setOuGroups] = useState([]) @@ -79,13 +80,16 @@ const OrgUnitDimension = ({ setOuLevels(result) } const doFetchOuGroups = async () => { - const result = await apiFetchOrganisationUnitGroups(dataEngine) + const result = await apiFetchOrganisationUnitGroups( + dataEngine, + displayNameProp + ) setOuGroups(result) } !hideLevelSelect && doFetchOuLevels() !hideGroupSelect && doFetchOuGroups() - }, [dataEngine, hideLevelSelect, hideGroupSelect]) + }, [dataEngine, hideLevelSelect, hideGroupSelect, displayNameProp]) const onLevelChange = (ids) => { const items = ids.map((id) => ({ @@ -369,6 +373,7 @@ OrgUnitDimension.defaultProps = { } OrgUnitDimension.propTypes = { + displayNameProp: PropTypes.string, hideGroupSelect: PropTypes.bool, hideLevelSelect: PropTypes.bool, hideUserOrgUnits: PropTypes.bool, From 8b97385b5fddee7cc5bf43ebe48e786bcddcdaab Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Wed, 8 May 2024 08:32:26 +0000 Subject: [PATCH 6/8] chore(release): cut 26.6.9 [skip ci] ## [26.6.9](https://github.com/dhis2/analytics/compare/v26.6.8...v26.6.9) (2024-05-08) ### Bug Fixes * system / user setting for display name not respected in Org Unit tree (DHIS2-15000) ([#1664](https://github.com/dhis2/analytics/issues/1664)) ([899358d](https://github.com/dhis2/analytics/commit/899358d5ea5a486f299ab54ded7b3184608e4bf7)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0caea741d..994a346cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [26.6.9](https://github.com/dhis2/analytics/compare/v26.6.8...v26.6.9) (2024-05-08) + + +### Bug Fixes + +* system / user setting for display name not respected in Org Unit tree (DHIS2-15000) ([#1664](https://github.com/dhis2/analytics/issues/1664)) ([899358d](https://github.com/dhis2/analytics/commit/899358d5ea5a486f299ab54ded7b3184608e4bf7)) + ## [26.6.8](https://github.com/dhis2/analytics/compare/v26.6.7...v26.6.8) (2024-05-06) diff --git a/package.json b/package.json index 6ca9354f5..059a404a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "26.6.8", + "version": "26.6.9", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": { From e3931e68a1694b81640d0584a585746132ee74de Mon Sep 17 00:00:00 2001 From: Joe Cooper <33054985+cooper-joe@users.noreply.github.com> Date: Tue, 14 May 2024 11:37:48 +0200 Subject: [PATCH 7/8] fix: dimension list design (DHIS2-16270) (#1530) --- package.json | 4 +- src/__demo__/DimensionsPanel.stories.js | 1 + src/assets/DynamicDimensionIcon.js | 57 +- .../DimensionsPanel/List/DimensionItem.js | 143 +-- .../DimensionsPanel/List/OptionsButton.js | 32 +- .../DimensionsPanel/List/RecommendedIcon.js | 1 - .../__snapshots__/DimensionItem.spec.js.snap | 600 +++++------- .../List/styles/DimensionItem.style.js | 153 +-- .../List/styles/DimensionList.style.js | 10 +- .../List/styles/RecommendedIcon.style.js | 8 +- .../styles/DimensionsPanel.style.js | 2 +- yarn.lock | 871 +++++++++--------- 12 files changed, 897 insertions(+), 985 deletions(-) diff --git a/package.json b/package.json index 059a404a5..59f3b866d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "26.6.9", + "version": "999.9.9-chip-alpha.5", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": { @@ -35,7 +35,7 @@ "@dhis2/cli-app-scripts": "^9.0.1", "@dhis2/cli-style": "^10.4.1", "@dhis2/d2-i18n": "^1.1.0", - "@dhis2/ui": "^9.2.0", + "@dhis2/ui": "^9.4.4", "@sambego/storybook-state": "^2.0.1", "@storybook/addons": "^6.5.16", "@storybook/preset-create-react-app": "^3.1.7", diff --git a/src/__demo__/DimensionsPanel.stories.js b/src/__demo__/DimensionsPanel.stories.js index 6a3fbc6de..71cc1abc6 100644 --- a/src/__demo__/DimensionsPanel.stories.js +++ b/src/__demo__/DimensionsPanel.stories.js @@ -94,6 +94,7 @@ storiesOf('DimensionsPanel', module).add('locked dimension', () => { dimension === DIMENSION_ID_DATA} /> ) diff --git a/src/assets/DynamicDimensionIcon.js b/src/assets/DynamicDimensionIcon.js index 83d6c678d..8fbeb84ab 100644 --- a/src/assets/DynamicDimensionIcon.js +++ b/src/assets/DynamicDimensionIcon.js @@ -3,49 +3,24 @@ import React from 'react' const DynamicDimensionIcon = () => { return ( - - - - - - - - - - - - - + + ) } diff --git a/src/components/DimensionsPanel/List/DimensionItem.js b/src/components/DimensionsPanel/List/DimensionItem.js index 7b3bd648b..8f9e09933 100644 --- a/src/components/DimensionsPanel/List/DimensionItem.js +++ b/src/components/DimensionsPanel/List/DimensionItem.js @@ -1,4 +1,5 @@ -import { IconLock16 } from '@dhis2/ui' +import { CssVariables } from '@dhis2/ui' +import cx from 'classnames' import PropTypes from 'prop-types' import React, { Component, createRef } from 'react' import DynamicDimensionIcon from '../../../assets/DynamicDimensionIcon.js' @@ -8,7 +9,7 @@ import { } from '../../../modules/predefinedDimensions.js' import OptionsButton from './OptionsButton.js' import RecommendedIcon from './RecommendedIcon.js' -import { styles } from './styles/DimensionItem.style.js' +import styles from './styles/DimensionItem.style.js' class DimensionItem extends Component { state = { mouseOver: false } @@ -27,26 +28,16 @@ class DimensionItem extends Component { getDimensionIcon = () => { const Icon = getPredefinedDimensionProp(this.props.id, 'icon') return Icon ? ( - + ) : ( - + ) } getDimensionType = () => { - const { id, name, isDeactivated } = this.props + const { id, name } = this.props - return ( - - {name} - - ) + return {name} } render() { @@ -59,20 +50,37 @@ class DimensionItem extends Component { onClick, onOptionsClick, innerRef, - style, dataTest, + className, ...rest } = this.props const Icon = this.getDimensionIcon() const Label = this.getDimensionType() - const itemStyle = - isSelected && !isDeactivated - ? { ...styles.item, ...styles.selected } - : styles.item const optionsRef = createRef() + const LockIcon = ( + <> +
+ + + +
+ + + ) + const onLabelClick = () => { if ( !isDeactivated && @@ -83,55 +91,58 @@ class DimensionItem extends Component { } return ( -
  • -
    -
    {Icon}
    -
    - {Label} - -
    - {isLocked && ( -
    - -
    + <> + +
  • - {onOptionsClick ? ( + data-test={dataTest} + onClick={onLabelClick} + {...rest} + >
    - {this.state.mouseOver && !isDeactivated && !isLocked ? ( - {Icon}
    +
    + {Label} + - ) : null} +
    - ) : null} -
  • + {onOptionsClick && !isDeactivated && !isLocked ? ( +
    + {this.state.mouseOver ? ( + + ) : null} +
    + ) : null} + {isLocked && LockIcon} + + + ) } } @@ -140,12 +151,12 @@ DimensionItem.propTypes = { id: PropTypes.string.isRequired, isSelected: PropTypes.bool.isRequired, // XXX name: PropTypes.string.isRequired, + className: PropTypes.string, dataTest: PropTypes.string, innerRef: PropTypes.func, isDeactivated: PropTypes.bool, isLocked: PropTypes.bool, isRecommended: PropTypes.bool, - style: PropTypes.object, onClick: PropTypes.func, onOptionsClick: PropTypes.func, } diff --git a/src/components/DimensionsPanel/List/OptionsButton.js b/src/components/DimensionsPanel/List/OptionsButton.js index 0686000a2..b7200ddcf 100644 --- a/src/components/DimensionsPanel/List/OptionsButton.js +++ b/src/components/DimensionsPanel/List/OptionsButton.js @@ -2,14 +2,36 @@ import { IconMore16 } from '@dhis2/ui' import PropTypes from 'prop-types' import React from 'react' -const OptionsButton = ({ style, onClick }) => ( - +const OptionsButton = ({ onClick }) => ( + <> + + + ) OptionsButton.propTypes = { - style: PropTypes.object, onClick: PropTypes.func, } diff --git a/src/components/DimensionsPanel/List/RecommendedIcon.js b/src/components/DimensionsPanel/List/RecommendedIcon.js index 3a8b75dc9..12609d3a7 100644 --- a/src/components/DimensionsPanel/List/RecommendedIcon.js +++ b/src/components/DimensionsPanel/List/RecommendedIcon.js @@ -9,7 +9,6 @@ const RecommendedIcon = ({ isRecommended, dataTest }) =>
    diff --git a/src/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap b/src/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap index 1c33a04bf..f58b07faa 100644 --- a/src/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +++ b/src/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap @@ -1,405 +1,283 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DimensionItem matches the snapshot 1`] = ` -
  • -
    + +
  • - -
    -
    - - Period - - + +
    +
    + + + Period + + + +
  • - - + +