@dhis2/analytics 24.10.5 → 24.10.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 +1 -0
- package/build/cjs/components/AboutAOUnit/styles/AboutAOUnit.style.js +2 -2
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationModal.js +7 -3
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +1 -0
- package/build/es/components/AboutAOUnit/styles/AboutAOUnit.style.js +2 -2
- package/build/es/components/Interpretations/InterpretationModal/InterpretationModal.js +8 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [24.10.7](https://github.com/dhis2/analytics/compare/v24.10.6...v24.10.7) (2024-04-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **interpretations:** plugin flashes when interacting with Interpretations modal ([#1653](https://github.com/dhis2/analytics/issues/1653)) ([17d8e12](https://github.com/dhis2/analytics/commit/17d8e12da54def840b9f329ffe93b635342c2d2c))
|
|
7
|
+
|
|
8
|
+
## [24.10.6](https://github.com/dhis2/analytics/compare/v24.10.5...v24.10.6) (2024-04-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **aboutAOUnit:** newlines missing in AO description ([#1656](https://github.com/dhis2/analytics/issues/1656)) ([8fe3a14](https://github.com/dhis2/analytics/commit/8fe3a14ec256f6eb2990fffcc092b1eea8911885)), closes [#1655](https://github.com/dhis2/analytics/issues/1655)
|
|
14
|
+
|
|
1
15
|
## [24.10.5](https://github.com/dhis2/analytics/compare/v24.10.4...v24.10.5) (2024-04-03)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -184,6 +184,7 @@ const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
184
184
|
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "content"
|
|
185
185
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
186
186
|
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + ((0, _classnames.default)('detailLine', {
|
|
187
|
+
description: true,
|
|
187
188
|
noDescription: !data.ao.displayDescription
|
|
188
189
|
}) || "")
|
|
189
190
|
}, data.ao.displayDescription ? /*#__PURE__*/_react.default.createElement(_d2UiRichText.Parser, null, data.ao.displayDescription) : _d2I18n.default.t('No description')), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
10
|
-
const _defaultExport = [".container.jsx-
|
|
11
|
-
_defaultExport.__hash = "
|
|
10
|
+
const _defaultExport = [".container.jsx-3095370592{position:relative;padding:".concat(_ui.spacers.dp16, ";border-bottom:1px solid ").concat(_ui.colors.grey400, ";background-color:").concat(_ui.colors.white, ";}"), ".expanded.jsx-3095370592{padding-bottom:".concat(_ui.spacers.dp32, ";}"), ".loader.jsx-3095370592{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".header.jsx-3095370592{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;}", ".title.jsx-3095370592{font-size:16px;font-weight:500;line-height:21px;color:".concat(_ui.colors.grey900, ";}"), ".content.jsx-3095370592{font-size:14px;line-height:18px;color:".concat(_ui.colors.grey900, ";}"), ".detailLine.jsx-3095370592{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:0;padding:".concat(_ui.spacers.dp12, " 0 0 0;gap:").concat(_ui.spacers.dp8, ";}"), ".detailLine.jsx-3095370592 svg.jsx-3095370592{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".description.jsx-3095370592{white-space:pre-line;}", ".noDescription.jsx-3095370592{color:".concat(_ui.colors.grey600, ";}"), ".subsection.jsx-3095370592{margin-top:".concat(_ui.spacers.dp24, ";}"), ".subsectionTitle.jsx-3095370592{color:".concat(_ui.colors.grey700, ";font-weight:500;}"), ".subscriptionLabel.jsx-3095370592{margin:".concat(_ui.spacers.dp12, " 0 ").concat(_ui.spacers.dp8, " 0;}"), ".subsection.jsx-3095370592 button.jsx-3095370592{margin-top:".concat(_ui.spacers.dp8, ";}")];
|
|
11
|
+
_defaultExport.__hash = "3095370592";
|
|
12
12
|
var _default = _defaultExport;
|
|
13
13
|
exports.default = _default;
|
|
@@ -133,6 +133,11 @@ const InterpretationModal = _ref2 => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
}, [interpretationId, refetch]);
|
|
136
|
+
const filters = (0, _react.useMemo)(() => {
|
|
137
|
+
return {
|
|
138
|
+
relativePeriodDate: interpretation === null || interpretation === void 0 ? void 0 : interpretation.created
|
|
139
|
+
};
|
|
140
|
+
}, [interpretation === null || interpretation === void 0 ? void 0 : interpretation.created]);
|
|
136
141
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loadingInProgress && /*#__PURE__*/_react.default.createElement(_ui.Layer, null, /*#__PURE__*/_react.default.createElement(_ui.CenteredContent, null, /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, null))), /*#__PURE__*/_react.default.createElement(_ui.Modal, {
|
|
137
142
|
fluid: true,
|
|
138
143
|
onClose: handleClose,
|
|
@@ -159,12 +164,11 @@ const InterpretationModal = _ref2 => {
|
|
|
159
164
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
160
165
|
className: _style.default.dynamic([["3175860552", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]]) + " " + "visualisation-wrap"
|
|
161
166
|
}, /*#__PURE__*/_react.default.createElement(VisualizationPlugin, {
|
|
162
|
-
filters:
|
|
163
|
-
relativePeriodDate: interpretation.created
|
|
164
|
-
},
|
|
167
|
+
filters: filters,
|
|
165
168
|
visualization: visualization,
|
|
166
169
|
onResponsesReceived: onResponsesReceived,
|
|
167
170
|
displayProperty: (_currentUser$settings = currentUser.settings) === null || _currentUser$settings === void 0 ? void 0 : _currentUser$settings.keyAnalysisDisplayProperty,
|
|
171
|
+
isInModal: true,
|
|
168
172
|
className: _style.default.dynamic([["3175860552", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]])
|
|
169
173
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
170
174
|
className: _style.default.dynamic([["3175860552", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]]) + " " + "thread-wrap"
|
|
@@ -159,6 +159,7 @@ const AboutAOUnit = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
159
159
|
className: "jsx-".concat(styles.__hash) + " " + "content"
|
|
160
160
|
}, /*#__PURE__*/React.createElement("p", {
|
|
161
161
|
className: "jsx-".concat(styles.__hash) + " " + (cx('detailLine', {
|
|
162
|
+
description: true,
|
|
162
163
|
noDescription: !data.ao.displayDescription
|
|
163
164
|
}) || "")
|
|
164
165
|
}, data.ao.displayDescription ? /*#__PURE__*/React.createElement(RichTextParser, null, data.ao.displayDescription) : i18n.t('No description')), /*#__PURE__*/React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { colors, spacers } from '@dhis2/ui';
|
|
2
|
-
const _defaultExport = [".container.jsx-
|
|
3
|
-
_defaultExport.__hash = "
|
|
2
|
+
const _defaultExport = [".container.jsx-3095370592{position:relative;padding:".concat(spacers.dp16, ";border-bottom:1px solid ").concat(colors.grey400, ";background-color:").concat(colors.white, ";}"), ".expanded.jsx-3095370592{padding-bottom:".concat(spacers.dp32, ";}"), ".loader.jsx-3095370592{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".header.jsx-3095370592{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;}", ".title.jsx-3095370592{font-size:16px;font-weight:500;line-height:21px;color:".concat(colors.grey900, ";}"), ".content.jsx-3095370592{font-size:14px;line-height:18px;color:".concat(colors.grey900, ";}"), ".detailLine.jsx-3095370592{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:0;padding:".concat(spacers.dp12, " 0 0 0;gap:").concat(spacers.dp8, ";}"), ".detailLine.jsx-3095370592 svg.jsx-3095370592{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".description.jsx-3095370592{white-space:pre-line;}", ".noDescription.jsx-3095370592{color:".concat(colors.grey600, ";}"), ".subsection.jsx-3095370592{margin-top:".concat(spacers.dp24, ";}"), ".subsectionTitle.jsx-3095370592{color:".concat(colors.grey700, ";font-weight:500;}"), ".subscriptionLabel.jsx-3095370592{margin:".concat(spacers.dp12, " 0 ").concat(spacers.dp8, " 0;}"), ".subsection.jsx-3095370592 button.jsx-3095370592{margin-top:".concat(spacers.dp8, ";}")];
|
|
3
|
+
_defaultExport.__hash = "3095370592";
|
|
4
4
|
export default _defaultExport;
|
|
@@ -4,7 +4,7 @@ import i18n from '@dhis2/d2-i18n';
|
|
|
4
4
|
import { Modal, ModalActions, ModalContent, NoticeBox, Button, spacers, colors, Layer, CenteredContent, CircularLoader } from '@dhis2/ui';
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
7
|
+
import React, { useEffect, useState, useMemo } from 'react';
|
|
8
8
|
import { InterpretationThread } from './InterpretationThread.js';
|
|
9
9
|
import { useModalContentWidth } from './useModalContentWidth.js';
|
|
10
10
|
const modalCSS = {
|
|
@@ -111,6 +111,11 @@ const InterpretationModal = _ref2 => {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
}, [interpretationId, refetch]);
|
|
114
|
+
const filters = useMemo(() => {
|
|
115
|
+
return {
|
|
116
|
+
relativePeriodDate: interpretation === null || interpretation === void 0 ? void 0 : interpretation.created
|
|
117
|
+
};
|
|
118
|
+
}, [interpretation === null || interpretation === void 0 ? void 0 : interpretation.created]);
|
|
114
119
|
return /*#__PURE__*/React.createElement(React.Fragment, null, loadingInProgress && /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(CenteredContent, null, /*#__PURE__*/React.createElement(CircularLoader, null))), /*#__PURE__*/React.createElement(Modal, {
|
|
115
120
|
fluid: true,
|
|
116
121
|
onClose: handleClose,
|
|
@@ -137,12 +142,11 @@ const InterpretationModal = _ref2 => {
|
|
|
137
142
|
}, /*#__PURE__*/React.createElement("div", {
|
|
138
143
|
className: _JSXStyle.dynamic([["3175860552", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]]) + " " + "visualisation-wrap"
|
|
139
144
|
}, /*#__PURE__*/React.createElement(VisualizationPlugin, {
|
|
140
|
-
filters:
|
|
141
|
-
relativePeriodDate: interpretation.created
|
|
142
|
-
},
|
|
145
|
+
filters: filters,
|
|
143
146
|
visualization: visualization,
|
|
144
147
|
onResponsesReceived: onResponsesReceived,
|
|
145
148
|
displayProperty: (_currentUser$settings = currentUser.settings) === null || _currentUser$settings === void 0 ? void 0 : _currentUser$settings.keyAnalysisDisplayProperty,
|
|
149
|
+
isInModal: true,
|
|
146
150
|
className: _JSXStyle.dynamic([["3175860552", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]])
|
|
147
151
|
})), /*#__PURE__*/React.createElement("div", {
|
|
148
152
|
className: _JSXStyle.dynamic([["3175860552", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]]) + " " + "thread-wrap"
|