@dhis2/analytics 23.6.6 → 23.7.1
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 +21 -0
- package/build/cjs/components/FileMenu/DeleteDialog.js +2 -2
- package/build/cjs/components/FileMenu/RenameDialog.js +1 -1
- package/build/cjs/components/FileMenu/SaveAsDialog.js +1 -1
- package/build/cjs/components/FileMenu/utils.js +38 -10
- package/build/cjs/locales/ar/translations.json +4 -0
- package/build/cjs/locales/ar_EG/translations.json +4 -0
- package/build/cjs/locales/ar_IQ/translations.json +4 -0
- package/build/cjs/locales/ckb/translations.json +4 -0
- package/build/cjs/locales/cs/translations.json +4 -0
- package/build/cjs/locales/da/translations.json +4 -0
- package/build/cjs/locales/en/translations.json +4 -0
- package/build/cjs/locales/es/translations.json +4 -0
- package/build/cjs/locales/fr/translations.json +4 -0
- package/build/cjs/locales/id/translations.json +4 -0
- package/build/cjs/locales/km/translations.json +4 -0
- package/build/cjs/locales/lo/translations.json +4 -0
- package/build/cjs/locales/my/translations.json +4 -0
- package/build/cjs/locales/nb/translations.json +4 -0
- package/build/cjs/locales/nl/translations.json +4 -0
- package/build/cjs/locales/prs/translations.json +4 -0
- package/build/cjs/locales/ps/translations.json +4 -0
- package/build/cjs/locales/pt/translations.json +4 -0
- package/build/cjs/locales/pt_BR/translations.json +4 -0
- package/build/cjs/locales/ru/translations.json +4 -0
- package/build/cjs/locales/sv/translations.json +4 -0
- package/build/cjs/locales/tet/translations.json +4 -0
- package/build/cjs/locales/tg/translations.json +4 -0
- package/build/cjs/locales/uk/translations.json +4 -0
- package/build/cjs/locales/ur/translations.json +4 -0
- package/build/cjs/locales/uz/translations.json +4 -0
- package/build/cjs/locales/uz_Latn/translations.json +4 -0
- package/build/cjs/locales/vi/translations.json +4 -0
- package/build/cjs/locales/zh/translations.json +4 -0
- package/build/cjs/locales/zh_CN/translations.json +4 -0
- package/build/es/components/FileMenu/DeleteDialog.js +3 -3
- package/build/es/components/FileMenu/RenameDialog.js +2 -2
- package/build/es/components/FileMenu/SaveAsDialog.js +2 -2
- package/build/es/components/FileMenu/utils.js +25 -8
- package/build/es/locales/ar/translations.json +4 -0
- package/build/es/locales/ar_EG/translations.json +4 -0
- package/build/es/locales/ar_IQ/translations.json +4 -0
- package/build/es/locales/ckb/translations.json +4 -0
- package/build/es/locales/cs/translations.json +4 -0
- package/build/es/locales/da/translations.json +4 -0
- package/build/es/locales/en/translations.json +4 -0
- package/build/es/locales/es/translations.json +4 -0
- package/build/es/locales/fr/translations.json +4 -0
- package/build/es/locales/id/translations.json +4 -0
- package/build/es/locales/km/translations.json +4 -0
- package/build/es/locales/lo/translations.json +4 -0
- package/build/es/locales/my/translations.json +4 -0
- package/build/es/locales/nb/translations.json +4 -0
- package/build/es/locales/nl/translations.json +4 -0
- package/build/es/locales/prs/translations.json +4 -0
- package/build/es/locales/ps/translations.json +4 -0
- package/build/es/locales/pt/translations.json +4 -0
- package/build/es/locales/pt_BR/translations.json +4 -0
- package/build/es/locales/ru/translations.json +4 -0
- package/build/es/locales/sv/translations.json +4 -0
- package/build/es/locales/tet/translations.json +4 -0
- package/build/es/locales/tg/translations.json +4 -0
- package/build/es/locales/uk/translations.json +4 -0
- package/build/es/locales/ur/translations.json +4 -0
- package/build/es/locales/uz/translations.json +4 -0
- package/build/es/locales/uz_Latn/translations.json +4 -0
- package/build/es/locales/vi/translations.json +4 -0
- package/build/es/locales/zh/translations.json +4 -0
- package/build/es/locales/zh_CN/translations.json +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [23.7.1](https://github.com/dhis2/analytics/compare/v23.7.0...v23.7.1) (2022-03-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **translations:** sync translations from transifex (master) ([0e19350](https://github.com/dhis2/analytics/commit/0e19350932d76ae76e2c1c7d06931786ae8d6bbe))
|
|
7
|
+
|
|
8
|
+
# [23.7.0](https://github.com/dhis2/analytics/compare/v23.6.7...v23.7.0) (2022-03-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **FileMenu:** use custom labels in dialog titles TECH-1035 ([#1173](https://github.com/dhis2/analytics/issues/1173)) ([4f02fdf](https://github.com/dhis2/analytics/commit/4f02fdf9d314f0705416442d39f50324d10552e4))
|
|
14
|
+
|
|
15
|
+
## [23.6.7](https://github.com/dhis2/analytics/compare/v23.6.6...v23.6.7) (2022-03-24)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* return the URL portion after origin as default TECH-1036 ([#1175](https://github.com/dhis2/analytics/issues/1175)) ([38607d9](https://github.com/dhis2/analytics/commit/38607d9716f45a8f47ae6003a2e9f90dd4d170a2))
|
|
21
|
+
|
|
1
22
|
## [23.6.6](https://github.com/dhis2/analytics/compare/v23.6.5...v23.6.6) (2022-03-19)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -55,9 +55,9 @@ const DeleteDialog = ({
|
|
|
55
55
|
onClose: onClose,
|
|
56
56
|
dataTest: "file-menu-delete-modal"
|
|
57
57
|
}, /*#__PURE__*/_react.default.createElement(_ui.ModalTitle, null, _index.default.t('Delete {{fileType}}', {
|
|
58
|
-
fileType: type
|
|
58
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
59
59
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, null, _index.default.t('This {{fileType}} and related interpretations will be deleted. Continue?', {
|
|
60
|
-
fileType: type
|
|
60
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
61
61
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalActions, null, /*#__PURE__*/_react.default.createElement(_ui.ButtonStrip, null, /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
62
62
|
onClick: onClose,
|
|
63
63
|
secondary: true,
|
|
@@ -76,7 +76,7 @@ const RenameDialog = ({
|
|
|
76
76
|
return /*#__PURE__*/_react.default.createElement(_ui.Modal, {
|
|
77
77
|
onClose: onClose
|
|
78
78
|
}, /*#__PURE__*/_react.default.createElement(_ui.ModalTitle, null, _index.default.t('Rename {{fileType}}', {
|
|
79
|
-
fileType: type
|
|
79
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
80
80
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, null, /*#__PURE__*/_react.default.createElement(_ui.InputField, {
|
|
81
81
|
label: _index.default.t('Name'),
|
|
82
82
|
disabled: loading,
|
|
@@ -42,7 +42,7 @@ const SaveAsDialog = ({
|
|
|
42
42
|
onClose: onClose,
|
|
43
43
|
dataTest: "file-menu-saveas-modal"
|
|
44
44
|
}, /*#__PURE__*/_react.default.createElement(_ui.ModalTitle, null, _index.default.t('Save {{fileType}} as', {
|
|
45
|
-
fileType: type
|
|
45
|
+
fileType: (0, _utils.labelForFileType)(type)
|
|
46
46
|
})), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, null, /*#__PURE__*/_react.default.createElement(_ui.InputField, {
|
|
47
47
|
label: _index.default.t('Name'),
|
|
48
48
|
required: true,
|
|
@@ -3,31 +3,59 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.appPathFor = exports.endpointFromFileType = exports.supportedFileTypes = void 0;
|
|
7
|
-
|
|
6
|
+
exports.appPathFor = exports.labelForFileType = exports.endpointFromFileType = exports.supportedFileTypes = exports.FILE_TYPE_EVENT_VISUALIZATION = exports.FILE_TYPE_MAP = exports.FILE_TYPE_VISUALIZATION = exports.FILE_TYPE_EVENT_REPORT = void 0;
|
|
7
|
+
|
|
8
|
+
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const FILE_TYPE_EVENT_REPORT = 'eventReport';
|
|
13
|
+
exports.FILE_TYPE_EVENT_REPORT = FILE_TYPE_EVENT_REPORT;
|
|
14
|
+
const FILE_TYPE_VISUALIZATION = 'visualization';
|
|
15
|
+
exports.FILE_TYPE_VISUALIZATION = FILE_TYPE_VISUALIZATION;
|
|
16
|
+
const FILE_TYPE_MAP = 'map';
|
|
17
|
+
exports.FILE_TYPE_MAP = FILE_TYPE_MAP;
|
|
18
|
+
const FILE_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
19
|
+
exports.FILE_TYPE_EVENT_VISUALIZATION = FILE_TYPE_EVENT_VISUALIZATION;
|
|
20
|
+
const supportedFileTypes = [FILE_TYPE_EVENT_REPORT, FILE_TYPE_VISUALIZATION, FILE_TYPE_MAP, FILE_TYPE_EVENT_VISUALIZATION];
|
|
8
21
|
exports.supportedFileTypes = supportedFileTypes;
|
|
9
22
|
|
|
10
|
-
const endpointFromFileType = fileType =>
|
|
23
|
+
const endpointFromFileType = fileType => "".concat(fileType, "s");
|
|
24
|
+
|
|
25
|
+
exports.endpointFromFileType = endpointFromFileType;
|
|
26
|
+
|
|
27
|
+
const labelForFileType = fileType => {
|
|
11
28
|
switch (fileType) {
|
|
12
|
-
case
|
|
13
|
-
|
|
29
|
+
case FILE_TYPE_EVENT_REPORT:
|
|
30
|
+
return _d2I18n.default.t('event report');
|
|
31
|
+
|
|
32
|
+
case FILE_TYPE_EVENT_VISUALIZATION:
|
|
33
|
+
return _d2I18n.default.t('line list');
|
|
34
|
+
|
|
35
|
+
case FILE_TYPE_MAP:
|
|
36
|
+
return _d2I18n.default.t('map');
|
|
37
|
+
|
|
38
|
+
case FILE_TYPE_VISUALIZATION:
|
|
39
|
+
return _d2I18n.default.t('visualization');
|
|
40
|
+
|
|
14
41
|
default:
|
|
15
|
-
return
|
|
42
|
+
return fileType;
|
|
16
43
|
}
|
|
17
44
|
};
|
|
18
45
|
|
|
19
|
-
exports.
|
|
46
|
+
exports.labelForFileType = labelForFileType;
|
|
20
47
|
|
|
21
48
|
const appPathFor = (fileType, id) => {
|
|
22
49
|
switch (fileType) {
|
|
23
|
-
case
|
|
50
|
+
case FILE_TYPE_VISUALIZATION:
|
|
24
51
|
return "dhis-web-data-visualizer/#/".concat(id);
|
|
25
52
|
|
|
26
|
-
case
|
|
53
|
+
case FILE_TYPE_MAP:
|
|
27
54
|
return "dhis-web-maps/index.html?id=".concat(id);
|
|
28
55
|
|
|
29
56
|
default:
|
|
30
|
-
|
|
57
|
+
// strip origin and the first /
|
|
58
|
+
return "".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash).substring(1);
|
|
31
59
|
}
|
|
32
60
|
};
|
|
33
61
|
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
"Description": "الوصف",
|
|
84
84
|
"Rename": "إعادة التسمية",
|
|
85
85
|
"Save {{fileType}} as": "",
|
|
86
|
+
"event report": "تقارير عن الأحداث",
|
|
87
|
+
"line list": "",
|
|
88
|
+
"map": "خريطة",
|
|
89
|
+
"visualization": "",
|
|
86
90
|
"Created by": "تم الإنشاء بواسطة",
|
|
87
91
|
"Anyone": "أي شخص",
|
|
88
92
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Popis",
|
|
82
82
|
"Rename": "Přejmenovat",
|
|
83
83
|
"Save {{fileType}} as": "Uložit {{fileType}} jako",
|
|
84
|
+
"event report": "zpráva o události",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "mapa",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Vytvořil",
|
|
85
89
|
"Anyone": "Kdokoliv",
|
|
86
90
|
"Only you": "Jen vy",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Rename",
|
|
81
81
|
"Save {{fileType}} as": "Save {{fileType}} as",
|
|
82
|
+
"event report": "event report",
|
|
83
|
+
"line list": "line list",
|
|
84
|
+
"map": "map",
|
|
85
|
+
"visualization": "visualization",
|
|
82
86
|
"Created by": "Created by",
|
|
83
87
|
"Anyone": "Anyone",
|
|
84
88
|
"Only you": "Only you",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descripción",
|
|
80
80
|
"Rename": "Renombrar",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "informe de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Creado por",
|
|
83
87
|
"Anyone": "Alguien",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Renommer",
|
|
81
81
|
"Save {{fileType}} as": "Enregistrer {{fileType}} comme",
|
|
82
|
+
"event report": "Rapport d'évènements",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "carte",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Créé par",
|
|
83
87
|
"Anyone": "Toute personne",
|
|
84
88
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Deskripsi",
|
|
79
79
|
"Rename": "Ganti nama",
|
|
80
80
|
"Save {{fileType}} as": "Simpan {{fileType}} sebagai",
|
|
81
|
+
"event report": "",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Dibuat oleh",
|
|
82
86
|
"Anyone": "Siapa saja",
|
|
83
87
|
"Only you": "Hanya kamu",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Beskrivelse",
|
|
80
80
|
"Rename": "Gi nytt navn",
|
|
81
81
|
"Save {{fileType}} as": "Lagre {{fileType}} som",
|
|
82
|
+
"event report": "hendelsesrapport",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "kart",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Opprettet av",
|
|
83
87
|
"Anyone": "Hvem som helst",
|
|
84
88
|
"Only you": "Bare deg",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "تشریح [ ژباړه ـ نښه ـ تشریح ]",
|
|
80
80
|
"Rename": "بیا نومول",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "لخوا ایجاد یا رامنځ ته شوی",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descrição",
|
|
80
80
|
"Rename": "Renomear",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "relatório de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Criado por",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Описание",
|
|
82
82
|
"Rename": "Переименовать",
|
|
83
83
|
"Save {{fileType}} as": "",
|
|
84
|
+
"event report": "Отчет случаев",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "Карта",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Создано",
|
|
85
89
|
"Anyone": "Любой",
|
|
86
90
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Тавсиф",
|
|
79
79
|
"Rename": "Қайта номлашч",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "ҳодиса/тадбир ҳисоботи",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "харита",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Кимдир",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Tavsif",
|
|
79
79
|
"Rename": "Қайта номлаш",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "hodisa/tadbir hisoboti",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "xarita",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Kimdir",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Miêu tả",
|
|
79
79
|
"Rename": "Đổi tên",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "báo cáo sự kiện",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "bản đồ",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Được tạo bởi",
|
|
82
86
|
"Anyone": "Bất kỳ ai",
|
|
83
87
|
"Only you": "",
|
|
@@ -3,7 +3,7 @@ import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button } fr
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import i18n from '../../locales/index.js';
|
|
6
|
-
import { supportedFileTypes, endpointFromFileType } from './utils.js';
|
|
6
|
+
import { supportedFileTypes, endpointFromFileType, labelForFileType } from './utils.js';
|
|
7
7
|
|
|
8
8
|
const getMutation = type => ({
|
|
9
9
|
resource: endpointFromFileType(type),
|
|
@@ -37,9 +37,9 @@ export const DeleteDialog = ({
|
|
|
37
37
|
onClose: onClose,
|
|
38
38
|
dataTest: "file-menu-delete-modal"
|
|
39
39
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, i18n.t('Delete {{fileType}}', {
|
|
40
|
-
fileType: type
|
|
40
|
+
fileType: labelForFileType(type)
|
|
41
41
|
})), /*#__PURE__*/React.createElement(ModalContent, null, i18n.t('This {{fileType}} and related interpretations will be deleted. Continue?', {
|
|
42
|
-
fileType: type
|
|
42
|
+
fileType: labelForFileType(type)
|
|
43
43
|
})), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
44
44
|
onClick: onClose,
|
|
45
45
|
secondary: true,
|
|
@@ -3,7 +3,7 @@ import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button, Inp
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useMemo, useState } from 'react';
|
|
5
5
|
import i18n from '../../locales/index.js';
|
|
6
|
-
import { supportedFileTypes, endpointFromFileType } from './utils.js';
|
|
6
|
+
import { supportedFileTypes, endpointFromFileType, labelForFileType } from './utils.js';
|
|
7
7
|
|
|
8
8
|
const getMutation = type => ({
|
|
9
9
|
resource: endpointFromFileType(type),
|
|
@@ -58,7 +58,7 @@ export const RenameDialog = ({
|
|
|
58
58
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
59
59
|
onClose: onClose
|
|
60
60
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, i18n.t('Rename {{fileType}}', {
|
|
61
|
-
fileType: type
|
|
61
|
+
fileType: labelForFileType(type)
|
|
62
62
|
})), /*#__PURE__*/React.createElement(ModalContent, null, /*#__PURE__*/React.createElement(InputField, {
|
|
63
63
|
label: i18n.t('Name'),
|
|
64
64
|
disabled: loading,
|
|
@@ -2,7 +2,7 @@ import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button, Inp
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import i18n from '../../locales/index.js';
|
|
5
|
-
import { supportedFileTypes } from './utils.js';
|
|
5
|
+
import { supportedFileTypes, labelForFileType } from './utils.js';
|
|
6
6
|
export const SaveAsDialog = ({
|
|
7
7
|
type,
|
|
8
8
|
object,
|
|
@@ -24,7 +24,7 @@ export const SaveAsDialog = ({
|
|
|
24
24
|
onClose: onClose,
|
|
25
25
|
dataTest: "file-menu-saveas-modal"
|
|
26
26
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, i18n.t('Save {{fileType}} as', {
|
|
27
|
-
fileType: type
|
|
27
|
+
fileType: labelForFileType(type)
|
|
28
28
|
})), /*#__PURE__*/React.createElement(ModalContent, null, /*#__PURE__*/React.createElement(InputField, {
|
|
29
29
|
label: i18n.t('Name'),
|
|
30
30
|
required: true,
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
export const
|
|
1
|
+
import i18n from '@dhis2/d2-i18n';
|
|
2
|
+
export const FILE_TYPE_EVENT_REPORT = 'eventReport';
|
|
3
|
+
export const FILE_TYPE_VISUALIZATION = 'visualization';
|
|
4
|
+
export const FILE_TYPE_MAP = 'map';
|
|
5
|
+
export const FILE_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
6
|
+
export const supportedFileTypes = [FILE_TYPE_EVENT_REPORT, FILE_TYPE_VISUALIZATION, FILE_TYPE_MAP, FILE_TYPE_EVENT_VISUALIZATION];
|
|
7
|
+
export const endpointFromFileType = fileType => "".concat(fileType, "s");
|
|
8
|
+
export const labelForFileType = fileType => {
|
|
3
9
|
switch (fileType) {
|
|
4
|
-
case
|
|
5
|
-
|
|
10
|
+
case FILE_TYPE_EVENT_REPORT:
|
|
11
|
+
return i18n.t('event report');
|
|
12
|
+
|
|
13
|
+
case FILE_TYPE_EVENT_VISUALIZATION:
|
|
14
|
+
return i18n.t('line list');
|
|
15
|
+
|
|
16
|
+
case FILE_TYPE_MAP:
|
|
17
|
+
return i18n.t('map');
|
|
18
|
+
|
|
19
|
+
case FILE_TYPE_VISUALIZATION:
|
|
20
|
+
return i18n.t('visualization');
|
|
21
|
+
|
|
6
22
|
default:
|
|
7
|
-
return
|
|
23
|
+
return fileType;
|
|
8
24
|
}
|
|
9
25
|
};
|
|
10
26
|
export const appPathFor = (fileType, id) => {
|
|
11
27
|
switch (fileType) {
|
|
12
|
-
case
|
|
28
|
+
case FILE_TYPE_VISUALIZATION:
|
|
13
29
|
return "dhis-web-data-visualizer/#/".concat(id);
|
|
14
30
|
|
|
15
|
-
case
|
|
31
|
+
case FILE_TYPE_MAP:
|
|
16
32
|
return "dhis-web-maps/index.html?id=".concat(id);
|
|
17
33
|
|
|
18
34
|
default:
|
|
19
|
-
|
|
35
|
+
// strip origin and the first /
|
|
36
|
+
return "".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash).substring(1);
|
|
20
37
|
}
|
|
21
38
|
};
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
"Description": "الوصف",
|
|
84
84
|
"Rename": "إعادة التسمية",
|
|
85
85
|
"Save {{fileType}} as": "",
|
|
86
|
+
"event report": "تقارير عن الأحداث",
|
|
87
|
+
"line list": "",
|
|
88
|
+
"map": "خريطة",
|
|
89
|
+
"visualization": "",
|
|
86
90
|
"Created by": "تم الإنشاء بواسطة",
|
|
87
91
|
"Anyone": "أي شخص",
|
|
88
92
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Popis",
|
|
82
82
|
"Rename": "Přejmenovat",
|
|
83
83
|
"Save {{fileType}} as": "Uložit {{fileType}} jako",
|
|
84
|
+
"event report": "zpráva o události",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "mapa",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Vytvořil",
|
|
85
89
|
"Anyone": "Kdokoliv",
|
|
86
90
|
"Only you": "Jen vy",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Rename",
|
|
81
81
|
"Save {{fileType}} as": "Save {{fileType}} as",
|
|
82
|
+
"event report": "event report",
|
|
83
|
+
"line list": "line list",
|
|
84
|
+
"map": "map",
|
|
85
|
+
"visualization": "visualization",
|
|
82
86
|
"Created by": "Created by",
|
|
83
87
|
"Anyone": "Anyone",
|
|
84
88
|
"Only you": "Only you",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descripción",
|
|
80
80
|
"Rename": "Renombrar",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "informe de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Creado por",
|
|
83
87
|
"Anyone": "Alguien",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Description",
|
|
80
80
|
"Rename": "Renommer",
|
|
81
81
|
"Save {{fileType}} as": "Enregistrer {{fileType}} comme",
|
|
82
|
+
"event report": "Rapport d'évènements",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "carte",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Créé par",
|
|
83
87
|
"Anyone": "Toute personne",
|
|
84
88
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Deskripsi",
|
|
79
79
|
"Rename": "Ganti nama",
|
|
80
80
|
"Save {{fileType}} as": "Simpan {{fileType}} sebagai",
|
|
81
|
+
"event report": "",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Dibuat oleh",
|
|
82
86
|
"Anyone": "Siapa saja",
|
|
83
87
|
"Only you": "Hanya kamu",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Beskrivelse",
|
|
80
80
|
"Rename": "Gi nytt navn",
|
|
81
81
|
"Save {{fileType}} as": "Lagre {{fileType}} som",
|
|
82
|
+
"event report": "hendelsesrapport",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "kart",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Opprettet av",
|
|
83
87
|
"Anyone": "Hvem som helst",
|
|
84
88
|
"Only you": "Bare deg",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "تشریح [ ژباړه ـ نښه ـ تشریح ]",
|
|
80
80
|
"Rename": "بیا نومول",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "لخوا ایجاد یا رامنځ ته شوی",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -79,6 +79,10 @@
|
|
|
79
79
|
"Description": "Descrição",
|
|
80
80
|
"Rename": "Renomear",
|
|
81
81
|
"Save {{fileType}} as": "",
|
|
82
|
+
"event report": "relatório de evento",
|
|
83
|
+
"line list": "",
|
|
84
|
+
"map": "mapa",
|
|
85
|
+
"visualization": "",
|
|
82
86
|
"Created by": "Criado por",
|
|
83
87
|
"Anyone": "",
|
|
84
88
|
"Only you": "",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"Description": "Описание",
|
|
82
82
|
"Rename": "Переименовать",
|
|
83
83
|
"Save {{fileType}} as": "",
|
|
84
|
+
"event report": "Отчет случаев",
|
|
85
|
+
"line list": "",
|
|
86
|
+
"map": "Карта",
|
|
87
|
+
"visualization": "",
|
|
84
88
|
"Created by": "Создано",
|
|
85
89
|
"Anyone": "Любой",
|
|
86
90
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Тавсиф",
|
|
79
79
|
"Rename": "Қайта номлашч",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "ҳодиса/тадбир ҳисоботи",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "харита",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Кимдир",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Tavsif",
|
|
79
79
|
"Rename": "Қайта номлаш",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "hodisa/tadbir hisoboti",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "xarita",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Томонидан яратилган",
|
|
82
86
|
"Anyone": "Kimdir",
|
|
83
87
|
"Only you": "",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"Description": "Miêu tả",
|
|
79
79
|
"Rename": "Đổi tên",
|
|
80
80
|
"Save {{fileType}} as": "",
|
|
81
|
+
"event report": "báo cáo sự kiện",
|
|
82
|
+
"line list": "",
|
|
83
|
+
"map": "bản đồ",
|
|
84
|
+
"visualization": "",
|
|
81
85
|
"Created by": "Được tạo bởi",
|
|
82
86
|
"Anyone": "Bất kỳ ai",
|
|
83
87
|
"Only you": "",
|