@dhis2/analytics 24.10.6 → 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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [24.10.6](https://github.com/dhis2/analytics/compare/v24.10.5...v24.10.6) (2024-04-19)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -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"
|
|
@@ -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"
|