@dhis2/analytics 24.2.5 → 24.2.7
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 +14 -0
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +3 -1
- package/build/cjs/locales/cs/translations.json +8 -8
- package/build/cjs/modules/__tests__/renderValue.spec.js +44 -0
- package/build/cjs/modules/renderValue.js +0 -3
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +2 -1
- package/build/es/locales/cs/translations.json +8 -8
- package/build/es/modules/__tests__/renderValue.spec.js +45 -1
- package/build/es/modules/renderValue.js +0 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [24.2.7](https://github.com/dhis2/analytics/compare/v24.2.6...v24.2.7) (2022-10-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* parse markdown in description DHIS2-13911 ([#1358](https://github.com/dhis2/analytics/issues/1358)) ([1606319](https://github.com/dhis2/analytics/commit/16063192c747fbf67e6b5f9fadcd3b1d19f00ef0))
|
|
7
|
+
|
|
8
|
+
## [24.2.6](https://github.com/dhis2/analytics/compare/v24.2.5...v24.2.6) (2022-10-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **translations:** sync translations from transifex (master) ([244b7c0](https://github.com/dhis2/analytics/commit/244b7c0ff907f58f8145f5d9c24297d59d334841))
|
|
14
|
+
|
|
1
15
|
## [24.2.5](https://github.com/dhis2/analytics/compare/v24.2.4...v24.2.5) (2022-10-10)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -11,6 +11,8 @@ var _appRuntime = require("@dhis2/app-runtime");
|
|
|
11
11
|
|
|
12
12
|
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
13
13
|
|
|
14
|
+
var _d2UiRichText = require("@dhis2/d2-ui-rich-text");
|
|
15
|
+
|
|
14
16
|
var _ui = require("@dhis2/ui");
|
|
15
17
|
|
|
16
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -181,7 +183,7 @@ const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
181
183
|
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + ((0, _classnames.default)('detailLine', {
|
|
182
184
|
noDescription: !data.ao.displayDescription
|
|
183
185
|
}) || "")
|
|
184
|
-
}, data.ao.displayDescription ? data.ao.displayDescription : _d2I18n.default.t('No description')), /*#__PURE__*/_react.default.createElement("div", {
|
|
186
|
+
}, data.ao.displayDescription ? /*#__PURE__*/_react.default.createElement(_d2UiRichText.Parser, null, data.ao.displayDescription) : _d2I18n.default.t('No description')), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
187
|
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash)
|
|
186
188
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
187
189
|
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "detailLine"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"No description": "Bez popisu",
|
|
9
9
|
"Last updated {{time}}": "Poslední aktualizace {{time}}",
|
|
10
10
|
"Created {{time}} by {{author}}": "Vytvořeno {{time}} uživatelem {{author}}",
|
|
11
|
-
"Created {{time}}": "",
|
|
11
|
+
"Created {{time}}": "Vytvořeno {{time}}",
|
|
12
12
|
"Viewed {{count}} times_0": "Zobrazeno 1 krát",
|
|
13
13
|
"Viewed {{count}} times_1": "Zobrazeno {{count}}krát",
|
|
14
14
|
"Viewed {{count}} times_2": "Zobrazeno {{count}}krát",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"Unsubscribe": "Odhlásit odběr",
|
|
19
19
|
"Subscribe to get updates about new interpretations.": "Přihlaste se k odběru novinek o nových interpretacích.",
|
|
20
20
|
"Subscribe": "Odebírat",
|
|
21
|
-
"About this map": "",
|
|
22
|
-
"About this line list": "",
|
|
21
|
+
"About this map": "O této mapě",
|
|
22
|
+
"About this line list": "O seznamu řádků",
|
|
23
23
|
"About this visualization": "O této vizualizaci",
|
|
24
24
|
"This app could not retrieve required data.": "Tato aplikace nemohla načíst požadovaná data.",
|
|
25
25
|
"Network error": "Chyba sítě",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"Manually select items...": "Ručně vybrat položky ...",
|
|
63
63
|
"Nothing found in {{- dimensionTitle}}": "V {{- dimensionTitle}} nebylo nic nalezeno",
|
|
64
64
|
"Search": "Hledat",
|
|
65
|
-
"Nothing found for {{- searchTerm}}": "",
|
|
65
|
+
"Nothing found for {{- searchTerm}}": "Pro {{- searchTerm}} nebylo nic nalezeno.",
|
|
66
66
|
"Delete {{fileType}}": "Smazat {{fileType}}",
|
|
67
67
|
"This {{fileType}} and related interpretations will be deleted. Continue?": "Tento {{fileType}} a související interpretace budou smazány. Pokračovat?",
|
|
68
68
|
"Cancel": "Zrušit",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"Name": "Název",
|
|
84
84
|
"Description": "Popis",
|
|
85
85
|
"Rename": "Přejmenovat",
|
|
86
|
-
"{{objectName}} (copy)": "",
|
|
86
|
+
"{{objectName}} (copy)": "{{objectName}} (kopie)",
|
|
87
87
|
"Save {{fileType}} as": "Uložit {{fileType}} jako",
|
|
88
88
|
"event report": "zpráva o události",
|
|
89
89
|
"line list": "seznam řádků",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"Could not update comment": "Komentář se nepodařilo aktualizovat",
|
|
96
96
|
"Enter comment text": "Zadejte text komentáře",
|
|
97
97
|
"Update": "Aktualizovat",
|
|
98
|
-
"Viewing interpretation: {{- visualisationName}}": "",
|
|
98
|
+
"Viewing interpretation: {{- visualisationName}}": "Zobrazení interpretace: {{- visualisationName}}",
|
|
99
99
|
"Could not load interpretation": "Interpretaci nelze načíst",
|
|
100
100
|
"The interpretation couldn’t be displayed. Try again or contact your system administrator.": "Interpretaci se nepodařilo zobrazit. Zkuste to znovu nebo se obraťte na správce systému.",
|
|
101
101
|
"Hide interpretation": "Skrýt interpretaci",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"Back to write mode": "Zpět do režimu zápisu",
|
|
120
120
|
"Too many results. Try refining the search.": "Příliš mnoho výsledků. Zkuste upřesnit vyhledávání.",
|
|
121
121
|
"Search for a user": "Vyhledat uživatele",
|
|
122
|
-
"Searching for \"{{- searchText}}\"": "",
|
|
122
|
+
"Searching for \"{{- searchText}}\"": "Hledání \"{{- searchText}}\"",
|
|
123
123
|
"No results found": "Nenalezeny žádné výsledky",
|
|
124
124
|
"Not available offline": "Není k dispozici offline",
|
|
125
125
|
"Created by": "Vytvořil",
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"Choose a locale to translate from the menu above": "Z nabídky výše vyberte národní prostředí, které chcete přeložit",
|
|
279
279
|
"Translate: {{objectName}}": "Přeložit: {{objectName}}",
|
|
280
280
|
"Save translations": "Uložit překlady",
|
|
281
|
-
"Cannot save while offline": "",
|
|
281
|
+
"Cannot save while offline": "Nelze ukládat v režimu offline",
|
|
282
282
|
"Could not load translations": "Nelze načíst překlady",
|
|
283
283
|
"Retry": "Opakovat",
|
|
284
284
|
"Series": "Série",
|
|
@@ -211,6 +211,50 @@ const tests = [// Numbers
|
|
|
211
211
|
numberType: _pivotTableConstants.NUMBER_TYPE_COLUMN_PERCENTAGE,
|
|
212
212
|
round: true,
|
|
213
213
|
dgs: DGS_NONE
|
|
214
|
+
}, // Phone number
|
|
215
|
+
{
|
|
216
|
+
value: '99777888',
|
|
217
|
+
expected: '99777888',
|
|
218
|
+
valueType: _valueTypes.VALUE_TYPE_PHONE_NUMBER,
|
|
219
|
+
round: true,
|
|
220
|
+
dgs: DGS_SPACE
|
|
221
|
+
}, {
|
|
222
|
+
value: '(303)9977888',
|
|
223
|
+
expected: '(303)9977888',
|
|
224
|
+
valueType: _valueTypes.VALUE_TYPE_PHONE_NUMBER,
|
|
225
|
+
round: true,
|
|
226
|
+
dgs: DGS_NONE
|
|
227
|
+
}, {
|
|
228
|
+
value: '303-8485-9922',
|
|
229
|
+
expected: '303-8485-9922',
|
|
230
|
+
valueType: _valueTypes.VALUE_TYPE_PHONE_NUMBER,
|
|
231
|
+
round: true,
|
|
232
|
+
dgs: DGS_COMMA
|
|
233
|
+
}, {
|
|
234
|
+
value: '303 848 9922',
|
|
235
|
+
expected: '303 848 9922',
|
|
236
|
+
valueType: _valueTypes.VALUE_TYPE_PHONE_NUMBER,
|
|
237
|
+
round: false,
|
|
238
|
+
dgs: DGS_COMMA
|
|
239
|
+
}, // Date
|
|
240
|
+
{
|
|
241
|
+
value: '05/04/2022',
|
|
242
|
+
expected: '05/04/2022',
|
|
243
|
+
valueType: _valueTypes.VALUE_TYPE_DATE,
|
|
244
|
+
round: true,
|
|
245
|
+
dgs: DGS_SPACE
|
|
246
|
+
}, {
|
|
247
|
+
value: '2022-05-04 00:00:000',
|
|
248
|
+
expected: '2022-05-04 00:00:000',
|
|
249
|
+
valueType: _valueTypes.VALUE_TYPE_DATETIME,
|
|
250
|
+
round: true,
|
|
251
|
+
dgs: DGS_COMMA
|
|
252
|
+
}, {
|
|
253
|
+
value: '2022-05-04 00:00:000',
|
|
254
|
+
expected: '2022-05-04 00:00:000',
|
|
255
|
+
valueType: _valueTypes.VALUE_TYPE_DATETIME,
|
|
256
|
+
round: true,
|
|
257
|
+
dgs: DGS_NONE
|
|
214
258
|
}, // Percentage
|
|
215
259
|
{
|
|
216
260
|
value: 5,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
2
|
import { useDataQuery, useDataMutation } from '@dhis2/app-runtime';
|
|
3
3
|
import i18n from '@dhis2/d2-i18n';
|
|
4
|
+
import { Parser as RichTextParser } from '@dhis2/d2-ui-rich-text';
|
|
4
5
|
import { Button, CircularLoader, IconChevronDown24, IconChevronUp24, IconClock16, IconShare16, IconSubscribe24, IconSubscribeOff24, IconUser16, IconView16, colors } from '@dhis2/ui';
|
|
5
6
|
import cx from 'classnames';
|
|
6
7
|
import moment from 'moment';
|
|
@@ -157,7 +158,7 @@ const AboutAOUnit = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
157
158
|
className: "jsx-".concat(styles.__hash) + " " + (cx('detailLine', {
|
|
158
159
|
noDescription: !data.ao.displayDescription
|
|
159
160
|
}) || "")
|
|
160
|
-
}, data.ao.displayDescription ? data.ao.displayDescription : i18n.t('No description')), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
}, data.ao.displayDescription ? /*#__PURE__*/React.createElement(RichTextParser, null, data.ao.displayDescription) : i18n.t('No description')), /*#__PURE__*/React.createElement("div", {
|
|
161
162
|
className: "jsx-".concat(styles.__hash)
|
|
162
163
|
}, /*#__PURE__*/React.createElement("p", {
|
|
163
164
|
className: "jsx-".concat(styles.__hash) + " " + "detailLine"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"No description": "Bez popisu",
|
|
9
9
|
"Last updated {{time}}": "Poslední aktualizace {{time}}",
|
|
10
10
|
"Created {{time}} by {{author}}": "Vytvořeno {{time}} uživatelem {{author}}",
|
|
11
|
-
"Created {{time}}": "",
|
|
11
|
+
"Created {{time}}": "Vytvořeno {{time}}",
|
|
12
12
|
"Viewed {{count}} times_0": "Zobrazeno 1 krát",
|
|
13
13
|
"Viewed {{count}} times_1": "Zobrazeno {{count}}krát",
|
|
14
14
|
"Viewed {{count}} times_2": "Zobrazeno {{count}}krát",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"Unsubscribe": "Odhlásit odběr",
|
|
19
19
|
"Subscribe to get updates about new interpretations.": "Přihlaste se k odběru novinek o nových interpretacích.",
|
|
20
20
|
"Subscribe": "Odebírat",
|
|
21
|
-
"About this map": "",
|
|
22
|
-
"About this line list": "",
|
|
21
|
+
"About this map": "O této mapě",
|
|
22
|
+
"About this line list": "O seznamu řádků",
|
|
23
23
|
"About this visualization": "O této vizualizaci",
|
|
24
24
|
"This app could not retrieve required data.": "Tato aplikace nemohla načíst požadovaná data.",
|
|
25
25
|
"Network error": "Chyba sítě",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"Manually select items...": "Ručně vybrat položky ...",
|
|
63
63
|
"Nothing found in {{- dimensionTitle}}": "V {{- dimensionTitle}} nebylo nic nalezeno",
|
|
64
64
|
"Search": "Hledat",
|
|
65
|
-
"Nothing found for {{- searchTerm}}": "",
|
|
65
|
+
"Nothing found for {{- searchTerm}}": "Pro {{- searchTerm}} nebylo nic nalezeno.",
|
|
66
66
|
"Delete {{fileType}}": "Smazat {{fileType}}",
|
|
67
67
|
"This {{fileType}} and related interpretations will be deleted. Continue?": "Tento {{fileType}} a související interpretace budou smazány. Pokračovat?",
|
|
68
68
|
"Cancel": "Zrušit",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"Name": "Název",
|
|
84
84
|
"Description": "Popis",
|
|
85
85
|
"Rename": "Přejmenovat",
|
|
86
|
-
"{{objectName}} (copy)": "",
|
|
86
|
+
"{{objectName}} (copy)": "{{objectName}} (kopie)",
|
|
87
87
|
"Save {{fileType}} as": "Uložit {{fileType}} jako",
|
|
88
88
|
"event report": "zpráva o události",
|
|
89
89
|
"line list": "seznam řádků",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"Could not update comment": "Komentář se nepodařilo aktualizovat",
|
|
96
96
|
"Enter comment text": "Zadejte text komentáře",
|
|
97
97
|
"Update": "Aktualizovat",
|
|
98
|
-
"Viewing interpretation: {{- visualisationName}}": "",
|
|
98
|
+
"Viewing interpretation: {{- visualisationName}}": "Zobrazení interpretace: {{- visualisationName}}",
|
|
99
99
|
"Could not load interpretation": "Interpretaci nelze načíst",
|
|
100
100
|
"The interpretation couldn’t be displayed. Try again or contact your system administrator.": "Interpretaci se nepodařilo zobrazit. Zkuste to znovu nebo se obraťte na správce systému.",
|
|
101
101
|
"Hide interpretation": "Skrýt interpretaci",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"Back to write mode": "Zpět do režimu zápisu",
|
|
120
120
|
"Too many results. Try refining the search.": "Příliš mnoho výsledků. Zkuste upřesnit vyhledávání.",
|
|
121
121
|
"Search for a user": "Vyhledat uživatele",
|
|
122
|
-
"Searching for \"{{- searchText}}\"": "",
|
|
122
|
+
"Searching for \"{{- searchText}}\"": "Hledání \"{{- searchText}}\"",
|
|
123
123
|
"No results found": "Nenalezeny žádné výsledky",
|
|
124
124
|
"Not available offline": "Není k dispozici offline",
|
|
125
125
|
"Created by": "Vytvořil",
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"Choose a locale to translate from the menu above": "Z nabídky výše vyberte národní prostředí, které chcete přeložit",
|
|
279
279
|
"Translate: {{objectName}}": "Přeložit: {{objectName}}",
|
|
280
280
|
"Save translations": "Uložit překlady",
|
|
281
|
-
"Cannot save while offline": "",
|
|
281
|
+
"Cannot save while offline": "Nelze ukládat v režimu offline",
|
|
282
282
|
"Could not load translations": "Nelze načíst překlady",
|
|
283
283
|
"Retry": "Opakovat",
|
|
284
284
|
"Series": "Série",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NUMBER_TYPE_ROW_PERCENTAGE, NUMBER_TYPE_COLUMN_PERCENTAGE } from '../pivotTable/pivotTableConstants.js';
|
|
2
2
|
import { renderValue } from '../renderValue.js';
|
|
3
|
-
import { VALUE_TYPE_NUMBER, VALUE_TYPE_INTEGER, VALUE_TYPE_INTEGER_POSITIVE, VALUE_TYPE_INTEGER_NEGATIVE, VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE, VALUE_TYPE_PERCENTAGE, VALUE_TYPE_UNIT_INTERVAL, VALUE_TYPE_TEXT } from '../valueTypes.js';
|
|
3
|
+
import { VALUE_TYPE_NUMBER, VALUE_TYPE_INTEGER, VALUE_TYPE_INTEGER_POSITIVE, VALUE_TYPE_INTEGER_NEGATIVE, VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE, VALUE_TYPE_PERCENTAGE, VALUE_TYPE_UNIT_INTERVAL, VALUE_TYPE_PHONE_NUMBER, VALUE_TYPE_TEXT, VALUE_TYPE_DATE, VALUE_TYPE_DATETIME } from '../valueTypes.js';
|
|
4
4
|
const DGS_COMMA = 'COMMA';
|
|
5
5
|
const DGS_SPACE = 'SPACE';
|
|
6
6
|
const DGS_NONE = 'NONE';
|
|
@@ -206,6 +206,50 @@ const tests = [// Numbers
|
|
|
206
206
|
numberType: NUMBER_TYPE_COLUMN_PERCENTAGE,
|
|
207
207
|
round: true,
|
|
208
208
|
dgs: DGS_NONE
|
|
209
|
+
}, // Phone number
|
|
210
|
+
{
|
|
211
|
+
value: '99777888',
|
|
212
|
+
expected: '99777888',
|
|
213
|
+
valueType: VALUE_TYPE_PHONE_NUMBER,
|
|
214
|
+
round: true,
|
|
215
|
+
dgs: DGS_SPACE
|
|
216
|
+
}, {
|
|
217
|
+
value: '(303)9977888',
|
|
218
|
+
expected: '(303)9977888',
|
|
219
|
+
valueType: VALUE_TYPE_PHONE_NUMBER,
|
|
220
|
+
round: true,
|
|
221
|
+
dgs: DGS_NONE
|
|
222
|
+
}, {
|
|
223
|
+
value: '303-8485-9922',
|
|
224
|
+
expected: '303-8485-9922',
|
|
225
|
+
valueType: VALUE_TYPE_PHONE_NUMBER,
|
|
226
|
+
round: true,
|
|
227
|
+
dgs: DGS_COMMA
|
|
228
|
+
}, {
|
|
229
|
+
value: '303 848 9922',
|
|
230
|
+
expected: '303 848 9922',
|
|
231
|
+
valueType: VALUE_TYPE_PHONE_NUMBER,
|
|
232
|
+
round: false,
|
|
233
|
+
dgs: DGS_COMMA
|
|
234
|
+
}, // Date
|
|
235
|
+
{
|
|
236
|
+
value: '05/04/2022',
|
|
237
|
+
expected: '05/04/2022',
|
|
238
|
+
valueType: VALUE_TYPE_DATE,
|
|
239
|
+
round: true,
|
|
240
|
+
dgs: DGS_SPACE
|
|
241
|
+
}, {
|
|
242
|
+
value: '2022-05-04 00:00:000',
|
|
243
|
+
expected: '2022-05-04 00:00:000',
|
|
244
|
+
valueType: VALUE_TYPE_DATETIME,
|
|
245
|
+
round: true,
|
|
246
|
+
dgs: DGS_COMMA
|
|
247
|
+
}, {
|
|
248
|
+
value: '2022-05-04 00:00:000',
|
|
249
|
+
expected: '2022-05-04 00:00:000',
|
|
250
|
+
valueType: VALUE_TYPE_DATETIME,
|
|
251
|
+
round: true,
|
|
252
|
+
dgs: DGS_NONE
|
|
209
253
|
}, // Percentage
|
|
210
254
|
{
|
|
211
255
|
value: 5,
|