@dhis2/analytics 23.7.3 → 23.7.6
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/SaveAsDialog.js +3 -1
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +9 -9
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.styles.js +2 -2
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +6 -4
- package/build/es/components/FileMenu/SaveAsDialog.js +2 -1
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +10 -10
- package/build/es/components/OpenFileDialog/OpenFileDialog.styles.js +2 -2
- package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +7 -5
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [23.7.6](https://github.com/dhis2/analytics/compare/v23.7.5...v23.7.6) (2022-04-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **FileMenu:** max size on name field TECH-1079 ([#1202](https://github.com/dhis2/analytics/issues/1202)) ([0fb535f](https://github.com/dhis2/analytics/commit/0fb535f5da3bc5d63394d5c877dcda6117b20284))
|
|
7
|
+
|
|
8
|
+
## [23.7.5](https://github.com/dhis2/analytics/compare/v23.7.4...v23.7.5) (2022-04-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* filter on displayName to get objects in current language DHIS2-13015 ([#1199](https://github.com/dhis2/analytics/issues/1199)) ([00c9d77](https://github.com/dhis2/analytics/commit/00c9d77793e6c92b84c0859873b599153b2a17cc))
|
|
14
|
+
|
|
15
|
+
## [23.7.4](https://github.com/dhis2/analytics/compare/v23.7.3...v23.7.4) (2022-04-06)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* avoid dialog jumping when searching/paging TECH-1064 ([#1193](https://github.com/dhis2/analytics/issues/1193)) ([f06faa0](https://github.com/dhis2/analytics/commit/f06faa0d1fd8a7284d2a70cc6e17801ca303f300))
|
|
21
|
+
|
|
1
22
|
## [23.7.3](https://github.com/dhis2/analytics/compare/v23.7.2...v23.7.3) (2022-03-31)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -21,6 +21,8 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
+
const NAME_MAXLENGTH = 230;
|
|
25
|
+
|
|
24
26
|
const SaveAsDialog = ({
|
|
25
27
|
type,
|
|
26
28
|
object,
|
|
@@ -49,7 +51,7 @@ const SaveAsDialog = ({
|
|
|
49
51
|
value: name,
|
|
50
52
|
onChange: ({
|
|
51
53
|
value
|
|
52
|
-
}) => setName(value),
|
|
54
|
+
}) => setName(value.substring(0, NAME_MAXLENGTH)),
|
|
53
55
|
dataTest: "file-menu-saveas-modal-name"
|
|
54
56
|
}), /*#__PURE__*/_react.default.createElement(_ui.TextAreaField, {
|
|
55
57
|
label: _index.default.t('Description'),
|
|
@@ -128,7 +128,7 @@ const OpenFileDialog = ({
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
if (filters.searchTerm) {
|
|
131
|
-
queryFilters.push("
|
|
131
|
+
queryFilters.push("displayName:ilike:".concat(filters.searchTerm));
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
return queryFilters;
|
|
@@ -198,7 +198,7 @@ const OpenFileDialog = ({
|
|
|
198
198
|
const cypressSelector = 'open-file-dialog-modal';
|
|
199
199
|
return /*#__PURE__*/_react.default.createElement(_ui.Modal, {
|
|
200
200
|
large: true,
|
|
201
|
-
position: "
|
|
201
|
+
position: "top",
|
|
202
202
|
hide: !open,
|
|
203
203
|
onClose: onClose,
|
|
204
204
|
dataTest: cypressSelector
|
|
@@ -240,7 +240,9 @@ const OpenFileDialog = ({
|
|
|
240
240
|
}, _d2I18n.default.t('Clear filters'))), error ? /*#__PURE__*/_react.default.createElement(_ui.NoticeBox, {
|
|
241
241
|
title: (0, _utils.getTranslatedString)(type, 'errorTitle'),
|
|
242
242
|
warning: true
|
|
243
|
-
}, (0, _utils.getTranslatedString)(type, 'errorText')) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
243
|
+
}, (0, _utils.getTranslatedString)(type, 'errorText')) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
244
|
+
className: "jsx-".concat(_OpenFileDialogStyles.styles.__hash) + " " + "data-table-wrapper"
|
|
245
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.DataTable, {
|
|
244
246
|
layout: "fixed"
|
|
245
247
|
}, /*#__PURE__*/_react.default.createElement(_ui.DataTableHead, null, /*#__PURE__*/_react.default.createElement(_ui.DataTableRow, null, data !== null && data !== void 0 && data.files[_utils.AOTypeMap[type].apiEndpoint].length ? headers.map(({
|
|
246
248
|
field,
|
|
@@ -263,7 +265,7 @@ const OpenFileDialog = ({
|
|
|
263
265
|
}, loading && /*#__PURE__*/_react.default.createElement(_ui.DataTableRow, null, /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, {
|
|
264
266
|
large: true
|
|
265
267
|
}, /*#__PURE__*/_react.default.createElement(_ui.Box, {
|
|
266
|
-
height: "
|
|
268
|
+
height: "342px"
|
|
267
269
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
268
270
|
className: "jsx-".concat(_OpenFileDialogStyles.styles.__hash) + " " + "info-cell"
|
|
269
271
|
}, /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, {
|
|
@@ -273,7 +275,7 @@ const OpenFileDialog = ({
|
|
|
273
275
|
}, (0, _utils.getTranslatedString)(type, 'loadingText')))))), !loading && !(data !== null && data !== void 0 && data.files[_utils.AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/_react.default.createElement(_ui.DataTableRow, null, /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, {
|
|
274
276
|
large: true
|
|
275
277
|
}, /*#__PURE__*/_react.default.createElement(_ui.Box, {
|
|
276
|
-
minHeight: "
|
|
278
|
+
minHeight: "342px"
|
|
277
279
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
278
280
|
className: "jsx-".concat(_OpenFileDialogStyles.styles.__hash) + " " + "info-cell"
|
|
279
281
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -293,15 +295,13 @@ const OpenFileDialog = ({
|
|
|
293
295
|
data: data.files[_utils.AOTypeMap[type].apiEndpoint],
|
|
294
296
|
onSelect: onFileSelect,
|
|
295
297
|
showVisTypeColumn: Boolean(filterVisTypes === null || filterVisTypes === void 0 ? void 0 : filterVisTypes.length)
|
|
296
|
-
}))), (data === null || data === void 0 ? void 0 : data.files[_utils.AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/_react.default.createElement(
|
|
297
|
-
position: "bottom"
|
|
298
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
298
|
+
})))), (data === null || data === void 0 ? void 0 : data.files[_utils.AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
299
299
|
className: "jsx-".concat(_OpenFileDialogStyles.styles.__hash) + " " + "pagination-controls"
|
|
300
300
|
}, /*#__PURE__*/_react.default.createElement(_PaginationControls.PaginationControls, {
|
|
301
301
|
page: page,
|
|
302
302
|
pager: data.files.pager,
|
|
303
303
|
onPageChange: setPage
|
|
304
|
-
})))
|
|
304
|
+
}))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
305
305
|
id: _OpenFileDialogStyles.styles.__hash
|
|
306
306
|
}, _OpenFileDialogStyles.styles))));
|
|
307
307
|
};
|
|
@@ -7,6 +7,6 @@ exports.styles = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
10
|
-
const styles = [".data-table-body.jsx-
|
|
10
|
+
const styles = [".data-table-wrapper.jsx-3416632651{min-height:405px;}", ".data-table-body.jsx-3416632651{min-height:465px;}", ".pagination-controls.jsx-3416632651{width:100%;margin-top:".concat(_ui.spacers.dp12, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}"), ".search-and-filter-bar.jsx-3416632651{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(_ui.spacers.dp4, ";-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:").concat(_ui.spacers.dp8, ";}"), ".search-field-container.jsx-3416632651{min-width:220px;}", ".type-field-container.jsx-3416632651,.created-by-field-container.jsx-3416632651{min-width:180px;}", ".info-cell.jsx-3416632651{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;gap:".concat(_ui.spacers.dp8, ";margin:").concat(_ui.spacers.dp32, " 0;}"), ".info-container.jsx-3416632651{max-width:400px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".info-text.jsx-3416632651{text-align:center;font-size:14px;line-height:19px;color:".concat(_ui.colors.grey700, ";}"), ".info-button.jsx-3416632651{margin-top:".concat(_ui.spacers.dp12, ";}")];
|
|
11
11
|
exports.styles = styles;
|
|
12
|
-
styles.__hash = "
|
|
12
|
+
styles.__hash = "3416632651";
|
|
@@ -122,16 +122,18 @@ const TranslationForm = ({
|
|
|
122
122
|
onChange: onLocaleChange
|
|
123
123
|
})))), /*#__PURE__*/_react.default.createElement(_ui.DataTableBody, null, fieldsToTranslate.map((field, index) => /*#__PURE__*/_react.default.createElement(_ui.DataTableRow, {
|
|
124
124
|
key: field
|
|
125
|
-
}, /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, null, /*#__PURE__*/_react.default.createElement(_ui.
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, null, /*#__PURE__*/_react.default.createElement(_ui.TextAreaField, {
|
|
126
126
|
label: fieldsTranslations[field],
|
|
127
127
|
value: objectToTranslate[field],
|
|
128
|
-
readOnly: true
|
|
129
|
-
|
|
128
|
+
readOnly: true,
|
|
129
|
+
rows: 3
|
|
130
|
+
})), translationLocale && /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, null, /*#__PURE__*/_react.default.createElement(_ui.TextAreaField, {
|
|
130
131
|
label: fieldsTranslations[field],
|
|
131
132
|
value: getTranslationForField(field),
|
|
132
133
|
onChange: ({
|
|
133
134
|
value
|
|
134
|
-
}) => setTranslationForField(field, value)
|
|
135
|
+
}) => setTranslationForField(field, value),
|
|
136
|
+
rows: 3
|
|
135
137
|
})), !translationLocale && index === 0 && /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, {
|
|
136
138
|
rowSpan: String(fieldsToTranslate.length)
|
|
137
139
|
}, /*#__PURE__*/_react.default.createElement(_ui.CenteredContent, null, _d2I18n.default.t('Choose a locale to translate from the menu above')))))))), /*#__PURE__*/_react.default.createElement(_TranslationModalActions.TranslationModalActions, {
|
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import i18n from '../../locales/index.js';
|
|
5
5
|
import { supportedFileTypes, labelForFileType } from './utils.js';
|
|
6
|
+
const NAME_MAXLENGTH = 230;
|
|
6
7
|
export const SaveAsDialog = ({
|
|
7
8
|
type,
|
|
8
9
|
object,
|
|
@@ -31,7 +32,7 @@ export const SaveAsDialog = ({
|
|
|
31
32
|
value: name,
|
|
32
33
|
onChange: ({
|
|
33
34
|
value
|
|
34
|
-
}) => setName(value),
|
|
35
|
+
}) => setName(value.substring(0, NAME_MAXLENGTH)),
|
|
35
36
|
dataTest: "file-menu-saveas-modal-name"
|
|
36
37
|
}), /*#__PURE__*/React.createElement(TextAreaField, {
|
|
37
38
|
label: i18n.t('Description'),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
2
|
import { useDataQuery } from '@dhis2/app-runtime';
|
|
3
3
|
import i18n from '@dhis2/d2-i18n';
|
|
4
|
-
import { Box, Modal, ModalTitle, ModalContent, DataTable, DataTableHead, DataTableBody, DataTableRow, DataTableCell, DataTableColumnHeader,
|
|
4
|
+
import { Box, Modal, ModalTitle, ModalContent, DataTable, DataTableHead, DataTableBody, DataTableRow, DataTableCell, DataTableColumnHeader, NoticeBox, CircularLoader, Button } from '@dhis2/ui';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
@@ -101,7 +101,7 @@ export const OpenFileDialog = ({
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
if (filters.searchTerm) {
|
|
104
|
-
queryFilters.push("
|
|
104
|
+
queryFilters.push("displayName:ilike:".concat(filters.searchTerm));
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
return queryFilters;
|
|
@@ -171,7 +171,7 @@ export const OpenFileDialog = ({
|
|
|
171
171
|
const cypressSelector = 'open-file-dialog-modal';
|
|
172
172
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
173
173
|
large: true,
|
|
174
|
-
position: "
|
|
174
|
+
position: "top",
|
|
175
175
|
hide: !open,
|
|
176
176
|
onClose: onClose,
|
|
177
177
|
dataTest: cypressSelector
|
|
@@ -213,7 +213,9 @@ export const OpenFileDialog = ({
|
|
|
213
213
|
}, i18n.t('Clear filters'))), error ? /*#__PURE__*/React.createElement(NoticeBox, {
|
|
214
214
|
title: getTranslatedString(type, 'errorTitle'),
|
|
215
215
|
warning: true
|
|
216
|
-
}, getTranslatedString(type, 'errorText')) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
216
|
+
}, getTranslatedString(type, 'errorText')) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
className: "jsx-".concat(styles.__hash) + " " + "data-table-wrapper"
|
|
218
|
+
}, /*#__PURE__*/React.createElement(DataTable, {
|
|
217
219
|
layout: "fixed"
|
|
218
220
|
}, /*#__PURE__*/React.createElement(DataTableHead, null, /*#__PURE__*/React.createElement(DataTableRow, null, data !== null && data !== void 0 && data.files[AOTypeMap[type].apiEndpoint].length ? headers.map(({
|
|
219
221
|
field,
|
|
@@ -236,7 +238,7 @@ export const OpenFileDialog = ({
|
|
|
236
238
|
}, loading && /*#__PURE__*/React.createElement(DataTableRow, null, /*#__PURE__*/React.createElement(DataTableCell, {
|
|
237
239
|
large: true
|
|
238
240
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
239
|
-
height: "
|
|
241
|
+
height: "342px"
|
|
240
242
|
}, /*#__PURE__*/React.createElement("div", {
|
|
241
243
|
className: "jsx-".concat(styles.__hash) + " " + "info-cell"
|
|
242
244
|
}, /*#__PURE__*/React.createElement(CircularLoader, {
|
|
@@ -246,7 +248,7 @@ export const OpenFileDialog = ({
|
|
|
246
248
|
}, getTranslatedString(type, 'loadingText')))))), !loading && !(data !== null && data !== void 0 && data.files[AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/React.createElement(DataTableRow, null, /*#__PURE__*/React.createElement(DataTableCell, {
|
|
247
249
|
large: true
|
|
248
250
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
249
|
-
minHeight: "
|
|
251
|
+
minHeight: "342px"
|
|
250
252
|
}, /*#__PURE__*/React.createElement("div", {
|
|
251
253
|
className: "jsx-".concat(styles.__hash) + " " + "info-cell"
|
|
252
254
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -266,15 +268,13 @@ export const OpenFileDialog = ({
|
|
|
266
268
|
data: data.files[AOTypeMap[type].apiEndpoint],
|
|
267
269
|
onSelect: onFileSelect,
|
|
268
270
|
showVisTypeColumn: Boolean(filterVisTypes === null || filterVisTypes === void 0 ? void 0 : filterVisTypes.length)
|
|
269
|
-
}))), (data === null || data === void 0 ? void 0 : data.files[AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/React.createElement(
|
|
270
|
-
position: "bottom"
|
|
271
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
271
|
+
})))), (data === null || data === void 0 ? void 0 : data.files[AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
272
272
|
className: "jsx-".concat(styles.__hash) + " " + "pagination-controls"
|
|
273
273
|
}, /*#__PURE__*/React.createElement(PaginationControls, {
|
|
274
274
|
page: page,
|
|
275
275
|
pager: data.files.pager,
|
|
276
276
|
onPageChange: setPage
|
|
277
|
-
})))
|
|
277
|
+
}))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
278
278
|
id: styles.__hash
|
|
279
279
|
}, styles))));
|
|
280
280
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { colors, spacers } from '@dhis2/ui';
|
|
2
|
-
export const styles = [".data-table-body.jsx-
|
|
3
|
-
styles.__hash = "
|
|
2
|
+
export const styles = [".data-table-wrapper.jsx-3416632651{min-height:405px;}", ".data-table-body.jsx-3416632651{min-height:465px;}", ".pagination-controls.jsx-3416632651{width:100%;margin-top:".concat(spacers.dp12, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}"), ".search-and-filter-bar.jsx-3416632651{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(spacers.dp4, ";-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:").concat(spacers.dp8, ";}"), ".search-field-container.jsx-3416632651{min-width:220px;}", ".type-field-container.jsx-3416632651,.created-by-field-container.jsx-3416632651{min-width:180px;}", ".info-cell.jsx-3416632651{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;gap:".concat(spacers.dp8, ";margin:").concat(spacers.dp32, " 0;}"), ".info-container.jsx-3416632651{max-width:400px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".info-text.jsx-3416632651{text-align:center;font-size:14px;line-height:19px;color:".concat(colors.grey700, ";}"), ".info-button.jsx-3416632651{margin-top:".concat(spacers.dp12, ";}")];
|
|
3
|
+
styles.__hash = "3416632651";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAlert, useDataMutation } from '@dhis2/app-runtime';
|
|
2
2
|
import i18n from '@dhis2/d2-i18n';
|
|
3
|
-
import { CenteredContent, DataTable, DataTableBody, DataTableCell, DataTableColumnHeader, DataTableHead, DataTableRow,
|
|
3
|
+
import { CenteredContent, DataTable, DataTableBody, DataTableCell, DataTableColumnHeader, DataTableHead, DataTableRow, ModalContent, TextAreaField } from '@dhis2/ui';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React, { useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { LocalesSelect } from './LocalesSelect.js';
|
|
@@ -102,16 +102,18 @@ export const TranslationForm = ({
|
|
|
102
102
|
onChange: onLocaleChange
|
|
103
103
|
})))), /*#__PURE__*/React.createElement(DataTableBody, null, fieldsToTranslate.map((field, index) => /*#__PURE__*/React.createElement(DataTableRow, {
|
|
104
104
|
key: field
|
|
105
|
-
}, /*#__PURE__*/React.createElement(DataTableCell, null, /*#__PURE__*/React.createElement(
|
|
105
|
+
}, /*#__PURE__*/React.createElement(DataTableCell, null, /*#__PURE__*/React.createElement(TextAreaField, {
|
|
106
106
|
label: fieldsTranslations[field],
|
|
107
107
|
value: objectToTranslate[field],
|
|
108
|
-
readOnly: true
|
|
109
|
-
|
|
108
|
+
readOnly: true,
|
|
109
|
+
rows: 3
|
|
110
|
+
})), translationLocale && /*#__PURE__*/React.createElement(DataTableCell, null, /*#__PURE__*/React.createElement(TextAreaField, {
|
|
110
111
|
label: fieldsTranslations[field],
|
|
111
112
|
value: getTranslationForField(field),
|
|
112
113
|
onChange: ({
|
|
113
114
|
value
|
|
114
|
-
}) => setTranslationForField(field, value)
|
|
115
|
+
}) => setTranslationForField(field, value),
|
|
116
|
+
rows: 3
|
|
115
117
|
})), !translationLocale && index === 0 && /*#__PURE__*/React.createElement(DataTableCell, {
|
|
116
118
|
rowSpan: String(fieldsToTranslate.length)
|
|
117
119
|
}, /*#__PURE__*/React.createElement(CenteredContent, null, i18n.t('Choose a locale to translate from the menu above')))))))), /*#__PURE__*/React.createElement(TranslationModalActions, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2/analytics",
|
|
3
|
-
"version": "23.7.
|
|
3
|
+
"version": "23.7.6",
|
|
4
4
|
"main": "./build/cjs/index.js",
|
|
5
5
|
"module": "./build/es/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"styled-jsx": "^3.3.2"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@dhis2/d2-ui-translation-dialog": "^7.3.1",
|
|
62
61
|
"classnames": "^2.3.1",
|
|
63
62
|
"d2-utilizr": "^0.2.16",
|
|
64
63
|
"d3-color": "^1.2.3",
|