@dhis2/analytics 21.2.5 → 21.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +1 -1
- package/build/cjs/components/OpenFileDialog/utils.js +20 -1
- package/build/cjs/locales/en/translations.json +7 -0
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +2 -2
- package/build/es/components/OpenFileDialog/utils.js +18 -0
- package/build/es/locales/en/translations.json +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [21.3.0](https://github.com/dhis2/analytics/compare/v21.2.5...v21.3.0) (2022-01-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add event visualization ao type ([#1130](https://github.com/dhis2/analytics/issues/1130)) ([61ea5b2](https://github.com/dhis2/analytics/commit/61ea5b275dba604a8479b8c9ca1cc71677aa13aa))
|
|
7
|
+
|
|
1
8
|
## [21.2.5](https://github.com/dhis2/analytics/compare/v21.2.4...v21.2.5) (2022-01-07)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -126,7 +126,7 @@ const OpenFileDialog = ({
|
|
|
126
126
|
} // for ER 2.38 only show line list ER types
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
if (type === _utils.AO_TYPE_EVENT_REPORT) {
|
|
129
|
+
if (type === _utils.AO_TYPE_EVENT_REPORT || type === _utils.AO_TYPE_EVENT_VISUALIZATION) {
|
|
130
130
|
queryFilters.push('dataType:eq:EVENTS');
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getTranslatedString = exports.AOTypeMap = exports.AO_TYPE_EVENT_REPORT = exports.AO_TYPE_EVENT_CHART = exports.AO_TYPE_MAP = exports.AO_TYPE_VISUALIZATION = void 0;
|
|
6
|
+
exports.getTranslatedString = exports.AOTypeMap = exports.AO_TYPE_EVENT_VISUALIZATION = exports.AO_TYPE_EVENT_REPORT = exports.AO_TYPE_EVENT_CHART = exports.AO_TYPE_MAP = exports.AO_TYPE_VISUALIZATION = void 0;
|
|
7
7
|
|
|
8
8
|
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
9
9
|
|
|
@@ -17,6 +17,8 @@ const AO_TYPE_EVENT_CHART = 'eventChart';
|
|
|
17
17
|
exports.AO_TYPE_EVENT_CHART = AO_TYPE_EVENT_CHART;
|
|
18
18
|
const AO_TYPE_EVENT_REPORT = 'eventReport';
|
|
19
19
|
exports.AO_TYPE_EVENT_REPORT = AO_TYPE_EVENT_REPORT;
|
|
20
|
+
const AO_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
21
|
+
exports.AO_TYPE_EVENT_VISUALIZATION = AO_TYPE_EVENT_VISUALIZATION;
|
|
20
22
|
const AOTypeMap = {
|
|
21
23
|
[AO_TYPE_VISUALIZATION]: {
|
|
22
24
|
apiEndpoint: 'visualizations'
|
|
@@ -29,6 +31,9 @@ const AOTypeMap = {
|
|
|
29
31
|
},
|
|
30
32
|
[AO_TYPE_EVENT_REPORT]: {
|
|
31
33
|
apiEndpoint: 'eventReports'
|
|
34
|
+
},
|
|
35
|
+
[AO_TYPE_EVENT_VISUALIZATION]: {
|
|
36
|
+
apiEndpoint: 'eventVisualization'
|
|
32
37
|
}
|
|
33
38
|
};
|
|
34
39
|
exports.AOTypeMap = AOTypeMap;
|
|
@@ -86,6 +91,20 @@ const getTranslatedString = (type, key) => {
|
|
|
86
91
|
};
|
|
87
92
|
break;
|
|
88
93
|
}
|
|
94
|
+
|
|
95
|
+
case 'eventVisualization':
|
|
96
|
+
{
|
|
97
|
+
texts = {
|
|
98
|
+
modalTitle: _d2I18n.default.t('Open an event visualization'),
|
|
99
|
+
loadingText: _d2I18n.default.t('Loading event visualizations'),
|
|
100
|
+
errorTitle: _d2I18n.default.t("Couldn't load event visualizations"),
|
|
101
|
+
errorText: _d2I18n.default.t('There was a problem loading event visualizations. Try again or contact your system administrator.'),
|
|
102
|
+
noDataText: _d2I18n.default.t('No event visualizations found. Click New event visualization to get started.'),
|
|
103
|
+
noFilteredDataText: _d2I18n.default.t("No event visualizations found. Try adjusting your search or filter options to find what you're looking for."),
|
|
104
|
+
newButtonLabel: _d2I18n.default.t('New event visualization')
|
|
105
|
+
};
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
89
108
|
}
|
|
90
109
|
|
|
91
110
|
return texts[key];
|
|
@@ -115,6 +115,13 @@
|
|
|
115
115
|
"No event reports found. Click New event report to get started.": "No event reports found. Click New event report to get started.",
|
|
116
116
|
"No event reports found. Try adjusting your search or filter options to find what you're looking for.": "No event reports found. Try adjusting your search or filter options to find what you're looking for.",
|
|
117
117
|
"New event report": "New event report",
|
|
118
|
+
"Open an event visualization": "Open an event visualization",
|
|
119
|
+
"Loading event visualizations": "Loading event visualizations",
|
|
120
|
+
"Couldn't load event visualizations": "Couldn't load event visualizations",
|
|
121
|
+
"There was a problem loading event visualizations. Try again or contact your system administrator.": "There was a problem loading event visualizations. Try again or contact your system administrator.",
|
|
122
|
+
"No event visualizations found. Click New event visualization to get started.": "No event visualizations found. Click New event visualization to get started.",
|
|
123
|
+
"No event visualizations found. Try adjusting your search or filter options to find what you're looking for.": "No event visualizations found. Try adjusting your search or filter options to find what you're looking for.",
|
|
124
|
+
"New event visualization": "New event visualization",
|
|
118
125
|
"Options": "Options",
|
|
119
126
|
"Hide": "Hide",
|
|
120
127
|
"Update": "Update",
|
|
@@ -10,7 +10,7 @@ import { FileList } from './FileList.js';
|
|
|
10
10
|
import { NameFilter } from './NameFilter.js';
|
|
11
11
|
import { styles } from './OpenFileDialog.styles.js';
|
|
12
12
|
import { PaginationControls } from './PaginationControls.js';
|
|
13
|
-
import { getTranslatedString, AO_TYPE_VISUALIZATION, AO_TYPE_EVENT_REPORT, AOTypeMap } from './utils.js';
|
|
13
|
+
import { getTranslatedString, AO_TYPE_VISUALIZATION, AO_TYPE_EVENT_REPORT, AO_TYPE_EVENT_VISUALIZATION, AOTypeMap } from './utils.js';
|
|
14
14
|
import { VisTypeFilter, VIS_TYPE_ALL, VIS_TYPE_CHARTS } from './VisTypeFilter.js';
|
|
15
15
|
|
|
16
16
|
const getQuery = type => ({
|
|
@@ -100,7 +100,7 @@ export const OpenFileDialog = ({
|
|
|
100
100
|
} // for ER 2.38 only show line list ER types
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
if (type === AO_TYPE_EVENT_REPORT) {
|
|
103
|
+
if (type === AO_TYPE_EVENT_REPORT || type === AO_TYPE_EVENT_VISUALIZATION) {
|
|
104
104
|
queryFilters.push('dataType:eq:EVENTS');
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -3,6 +3,7 @@ export const AO_TYPE_VISUALIZATION = 'visualization';
|
|
|
3
3
|
export const AO_TYPE_MAP = 'map';
|
|
4
4
|
export const AO_TYPE_EVENT_CHART = 'eventChart';
|
|
5
5
|
export const AO_TYPE_EVENT_REPORT = 'eventReport';
|
|
6
|
+
export const AO_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
6
7
|
export const AOTypeMap = {
|
|
7
8
|
[AO_TYPE_VISUALIZATION]: {
|
|
8
9
|
apiEndpoint: 'visualizations'
|
|
@@ -15,6 +16,9 @@ export const AOTypeMap = {
|
|
|
15
16
|
},
|
|
16
17
|
[AO_TYPE_EVENT_REPORT]: {
|
|
17
18
|
apiEndpoint: 'eventReports'
|
|
19
|
+
},
|
|
20
|
+
[AO_TYPE_EVENT_VISUALIZATION]: {
|
|
21
|
+
apiEndpoint: 'eventVisualization'
|
|
18
22
|
}
|
|
19
23
|
};
|
|
20
24
|
export const getTranslatedString = (type, key) => {
|
|
@@ -70,6 +74,20 @@ export const getTranslatedString = (type, key) => {
|
|
|
70
74
|
};
|
|
71
75
|
break;
|
|
72
76
|
}
|
|
77
|
+
|
|
78
|
+
case 'eventVisualization':
|
|
79
|
+
{
|
|
80
|
+
texts = {
|
|
81
|
+
modalTitle: i18n.t('Open an event visualization'),
|
|
82
|
+
loadingText: i18n.t('Loading event visualizations'),
|
|
83
|
+
errorTitle: i18n.t("Couldn't load event visualizations"),
|
|
84
|
+
errorText: i18n.t('There was a problem loading event visualizations. Try again or contact your system administrator.'),
|
|
85
|
+
noDataText: i18n.t('No event visualizations found. Click New event visualization to get started.'),
|
|
86
|
+
noFilteredDataText: i18n.t("No event visualizations found. Try adjusting your search or filter options to find what you're looking for."),
|
|
87
|
+
newButtonLabel: i18n.t('New event visualization')
|
|
88
|
+
};
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
73
91
|
}
|
|
74
92
|
|
|
75
93
|
return texts[key];
|
|
@@ -115,6 +115,13 @@
|
|
|
115
115
|
"No event reports found. Click New event report to get started.": "No event reports found. Click New event report to get started.",
|
|
116
116
|
"No event reports found. Try adjusting your search or filter options to find what you're looking for.": "No event reports found. Try adjusting your search or filter options to find what you're looking for.",
|
|
117
117
|
"New event report": "New event report",
|
|
118
|
+
"Open an event visualization": "Open an event visualization",
|
|
119
|
+
"Loading event visualizations": "Loading event visualizations",
|
|
120
|
+
"Couldn't load event visualizations": "Couldn't load event visualizations",
|
|
121
|
+
"There was a problem loading event visualizations. Try again or contact your system administrator.": "There was a problem loading event visualizations. Try again or contact your system administrator.",
|
|
122
|
+
"No event visualizations found. Click New event visualization to get started.": "No event visualizations found. Click New event visualization to get started.",
|
|
123
|
+
"No event visualizations found. Try adjusting your search or filter options to find what you're looking for.": "No event visualizations found. Try adjusting your search or filter options to find what you're looking for.",
|
|
124
|
+
"New event visualization": "New event visualization",
|
|
118
125
|
"Options": "Options",
|
|
119
126
|
"Hide": "Hide",
|
|
120
127
|
"Update": "Update",
|