@dhis2/analytics 23.6.5 → 23.7.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 +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/cs/translations.json +7 -7
- package/build/cjs/locales/en/translations.json +4 -0
- package/build/cjs/locales/es/translations.json +1 -1
- 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/cs/translations.json +7 -7
- package/build/es/locales/en/translations.json +4 -0
- package/build/es/locales/es/translations.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
# [23.7.0](https://github.com/dhis2/analytics/compare/v23.6.7...v23.7.0) (2022-03-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **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))
|
|
7
|
+
|
|
8
|
+
## [23.6.7](https://github.com/dhis2/analytics/compare/v23.6.6...v23.6.7) (2022-03-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* 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))
|
|
14
|
+
|
|
15
|
+
## [23.6.6](https://github.com/dhis2/analytics/compare/v23.6.5...v23.6.6) (2022-03-19)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **translations:** sync translations from transifex (master) ([5568e55](https://github.com/dhis2/analytics/commit/5568e55b1f8d6e2bd0ff0e1b748bbd3ef84d8b71))
|
|
21
|
+
|
|
1
22
|
## [23.6.5](https://github.com/dhis2/analytics/compare/v23.6.4...v23.6.5) (2022-03-18)
|
|
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
|
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
"No maps found. Click New map to get started.": "Nenalezeny žádné mapy. Začněte kliknutím na Nová mapa.",
|
|
113
113
|
"No maps found. Try adjusting your search or filter options to find what you're looking for.": "Nenalezeny žádné mapy. Zkuste upravit možnosti vyhledávání nebo filtrování, abyste našli to, co hledáte.",
|
|
114
114
|
"New map": "Nová mapa",
|
|
115
|
-
"Open a line list": "",
|
|
116
|
-
"Loading line lists": "",
|
|
117
|
-
"Couldn't load line lists": "",
|
|
118
|
-
"There was a problem loading line lists. Try again or contact your system administrator.": "",
|
|
119
|
-
"No line lists found. Click New line list to get started.": "",
|
|
120
|
-
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "",
|
|
121
|
-
"New line list": "",
|
|
115
|
+
"Open a line list": "Otevřít řádkový seznam",
|
|
116
|
+
"Loading line lists": "Načítání řádkových seznamů",
|
|
117
|
+
"Couldn't load line lists": "Řádkové seznamy se nepodařilo načíst",
|
|
118
|
+
"There was a problem loading line lists. Try again or contact your system administrator.": "Při načítání řádkových seznamů došlo k problému. Zkuste to znovu nebo se obraťte na správce systému.",
|
|
119
|
+
"No line lists found. Click New line list to get started.": "Nebyly nalezeny žádné řádkové seznamy. Začněte kliknutím na Nový řádkový seznam.",
|
|
120
|
+
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "Nebyly nalezeny žádné řádkové seznamy. Zkuste upravit možnosti vyhledávání nebo filtru, abyste našli to, co hledáte.",
|
|
121
|
+
"New line list": "Nový řádkový seznam",
|
|
122
122
|
"Options": "Možnosti",
|
|
123
123
|
"Hide": "Skrýt",
|
|
124
124
|
"Update": "Aktualizovat",
|
|
@@ -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",
|
|
@@ -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
|
};
|
|
@@ -112,13 +112,13 @@
|
|
|
112
112
|
"No maps found. Click New map to get started.": "Nenalezeny žádné mapy. Začněte kliknutím na Nová mapa.",
|
|
113
113
|
"No maps found. Try adjusting your search or filter options to find what you're looking for.": "Nenalezeny žádné mapy. Zkuste upravit možnosti vyhledávání nebo filtrování, abyste našli to, co hledáte.",
|
|
114
114
|
"New map": "Nová mapa",
|
|
115
|
-
"Open a line list": "",
|
|
116
|
-
"Loading line lists": "",
|
|
117
|
-
"Couldn't load line lists": "",
|
|
118
|
-
"There was a problem loading line lists. Try again or contact your system administrator.": "",
|
|
119
|
-
"No line lists found. Click New line list to get started.": "",
|
|
120
|
-
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "",
|
|
121
|
-
"New line list": "",
|
|
115
|
+
"Open a line list": "Otevřít řádkový seznam",
|
|
116
|
+
"Loading line lists": "Načítání řádkových seznamů",
|
|
117
|
+
"Couldn't load line lists": "Řádkové seznamy se nepodařilo načíst",
|
|
118
|
+
"There was a problem loading line lists. Try again or contact your system administrator.": "Při načítání řádkových seznamů došlo k problému. Zkuste to znovu nebo se obraťte na správce systému.",
|
|
119
|
+
"No line lists found. Click New line list to get started.": "Nebyly nalezeny žádné řádkové seznamy. Začněte kliknutím na Nový řádkový seznam.",
|
|
120
|
+
"No line lists found. Try adjusting your search or filter options to find what you're looking for.": "Nebyly nalezeny žádné řádkové seznamy. Zkuste upravit možnosti vyhledávání nebo filtru, abyste našli to, co hledáte.",
|
|
121
|
+
"New line list": "Nový řádkový seznam",
|
|
122
122
|
"Options": "Možnosti",
|
|
123
123
|
"Hide": "Skrýt",
|
|
124
124
|
"Update": "Aktualizovat",
|
|
@@ -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",
|