Skip to content

Commit

Permalink
updated analytics repo (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Nov 5, 2019
1 parent 8c0ed13 commit dd8b563
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 49 deletions.
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"webpack-bundle-analyzer": "^3.0.3"
},
"dependencies": {
"@dhis2/analytics": "^2.4.5",
"@dhis2/analytics": "^2.5.0",
"@dhis2/d2-i18n": "^1.0.6",
"@dhis2/d2-ui-core": "^6.2.1",
"@dhis2/d2-ui-file-menu": "^6.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class DimensionOptions extends Component {
items = [
this.renderMenuItem({
key: `add-to-${this.props.id}`,
id: ADD_TO_LAYOUT_OPTIONS[FILTER].axisKey,
id: ADD_TO_LAYOUT_OPTIONS[FILTER].axisName,
onClick: this.addDimension,
displayName: ADD_TO_LAYOUT_OPTIONS[FILTER].name,
}),
Expand All @@ -47,8 +47,8 @@ export class DimensionOptions extends Component {
items = Object.values(
ADD_TO_LAYOUT_OPTIONS.map(axis =>
this.renderMenuItem({
key: `add-to-${axis.axisKey}`,
id: axis.axisKey,
key: `add-to-${axis.axisName}`,
id: axis.axisName,
onClick: this.addDimension,
displayName: axis.name,
})
Expand Down
3 changes: 1 addition & 2 deletions packages/app/src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { connect } from 'react-redux';
import DefaultLayout from './DefaultLayout/DefaultLayout';
import YearOverYearLayout from './YearOverYearLayout/YearOverYearLayout';
import PieLayout from './PieLayout/PieLayout';
import SingleValueLayout from './SingleValueLayout/SingleValueLayout';
import {
COLUMN,
STACKED_COLUMN,
Expand Down Expand Up @@ -33,7 +32,7 @@ const layoutMap = {
[GAUGE]: PieLayout,
[YEAR_OVER_YEAR_LINE]: YearOverYearLayout,
[YEAR_OVER_YEAR_COLUMN]: YearOverYearLayout,
[SINGLE_VALUE]: SingleValueLayout,
[SINGLE_VALUE]: PieLayout,
};

const getLayoutByType = (type, props) => {
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions packages/app/src/modules/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export const SOURCE_DIMENSIONS = 'dimensions';

// Keys and displayName for adding dimensions to layout
export const ADD_TO_LAYOUT_OPTIONS = [
{ axisKey: AXIS_NAME_COLUMNS, name: i18n.t('Add to series') },
{ axisKey: AXIS_NAME_ROWS, name: i18n.t('Add to category') },
{ axisKey: AXIS_NAME_FILTERS, name: i18n.t('Add to filter') },
{ axisName: AXIS_NAME_COLUMNS, name: i18n.t('Add to series') },
{ axisName: AXIS_NAME_ROWS, name: i18n.t('Add to category') },
{ axisName: AXIS_NAME_FILTERS, name: i18n.t('Add to filter') },
];

export const menuLabels = {
Expand Down
19 changes: 19 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,25 @@
react-beautiful-dnd "^10.1.1"
styled-jsx "^3.2.1"

"@dhis2/analytics@^2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-2.5.0.tgz#c245b8db8578b1a1217bb93c2bc387976e7af432"
integrity sha512-+2HU1C1wkLqqkLmNA0Bt1Iasi2Yo0bECeherr1CerIb69dOrd4vBmTQ3309593zjFfjU9PtvtKsBtCmLI0x/JQ==
dependencies:
"@dhis2/d2-i18n" "^1.0.4"
"@dhis2/d2-ui-org-unit-dialog" "^6.3.0"
"@dhis2/d2-ui-period-selector-dialog" "^6.3.0"
"@dhis2/ui-core" "^3.4.0"
"@material-ui/core" "^3.9.3"
"@material-ui/icons" "^3.0.2"
classnames "^2.2.6"
d2-utilizr "^0.2.16"
d3-color "^1.2.3"
highcharts "^7.1.2"
lodash "^4.17.13"
react-beautiful-dnd "^10.1.1"
styled-jsx "^3.2.1"

"@dhis2/d2-i18n-extract@^1.0.6", "@dhis2/d2-i18n-extract@^1.0.7":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@dhis2/d2-i18n-extract/-/d2-i18n-extract-1.0.8.tgz#9d98690d522a51895c8ef3fe7136f026b0f8dacd"
Expand Down

0 comments on commit dd8b563

Please sign in to comment.