@dhis2/analytics 23.7.3 → 23.7.4
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 +8 -8
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.styles.js +2 -2
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +9 -9
- package/build/es/components/OpenFileDialog/OpenFileDialog.styles.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [23.7.4](https://github.com/dhis2/analytics/compare/v23.7.3...v23.7.4) (2022-04-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* avoid dialog jumping when searching/paging TECH-1064 ([#1193](https://github.com/dhis2/analytics/issues/1193)) ([f06faa0](https://github.com/dhis2/analytics/commit/f06faa0d1fd8a7284d2a70cc6e17801ca303f300))
|
|
7
|
+
|
|
1
8
|
## [23.7.3](https://github.com/dhis2/analytics/compare/v23.7.2...v23.7.3) (2022-03-31)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -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";
|
|
@@ -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';
|
|
@@ -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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2/analytics",
|
|
3
|
-
"version": "23.7.
|
|
3
|
+
"version": "23.7.4",
|
|
4
4
|
"main": "./build/cjs/index.js",
|
|
5
5
|
"module": "./build/es/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"styled-jsx": "^3.3.2"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@dhis2/d2-ui-translation-dialog": "^7.3.
|
|
61
|
+
"@dhis2/d2-ui-translation-dialog": "^7.3.3",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
63
63
|
"d2-utilizr": "^0.2.16",
|
|
64
64
|
"d3-color": "^1.2.3",
|