@dhis2/analytics 24.0.1 → 24.0.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 CHANGED
@@ -1,3 +1,24 @@
1
+ ## [24.0.4](https://github.com/dhis2/analytics/compare/v24.0.3...v24.0.4) (2022-08-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump ui to latest ([#1327](https://github.com/dhis2/analytics/issues/1327)) ([ae41b8e](https://github.com/dhis2/analytics/commit/ae41b8e38426e5cd6399bb2c2eab72cfd22dbab5))
7
+
8
+ ## [24.0.3](https://github.com/dhis2/analytics/compare/v24.0.2...v24.0.3) (2022-08-24)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **translations:** sync translations from transifex (master) ([ed55dcc](https://github.com/dhis2/analytics/commit/ed55dccf8332d3e9400b766719233a8345a19548))
14
+
15
+ ## [24.0.2](https://github.com/dhis2/analytics/compare/v24.0.1...v24.0.2) (2022-08-23)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * various fixes in InterpretationModal for maps LIBS-341 ([#1324](https://github.com/dhis2/analytics/issues/1324)) ([be1f462](https://github.com/dhis2/analytics/commit/be1f46297f055978de6cf3d7acae21c8f1fe1491))
21
+
1
22
  ## [24.0.1](https://github.com/dhis2/analytics/compare/v24.0.0...v24.0.1) (2022-08-23)
2
23
 
3
24
 
@@ -121,7 +121,7 @@ const InterpretationModal = _ref2 => {
121
121
  id: interpretationId
122
122
  });
123
123
  }
124
- }, [interpretationId]);
124
+ }, [interpretationId, refetch]);
125
125
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, shouldCssHideModal && /*#__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, {
126
126
  fluid: true,
127
127
  onClose: handleClose,
@@ -134,7 +134,7 @@ const InterpretationModal = _ref2 => {
134
134
  }, /*#__PURE__*/_react.default.createElement("span", {
135
135
  className: _style.default.dynamic([["3175860552", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]]) + " " + "ellipsis"
136
136
  }, _d2I18n.default.t('Viewing interpretation: {{- visualisationName}}', {
137
- visualisationName: visualization.displayName,
137
+ visualisationName: visualization.displayName || visualization.name,
138
138
  nsSeparator: '^^'
139
139
  }))), /*#__PURE__*/_react.default.createElement(_ui.ModalContent, {
140
140
  className: modalContentCSS.className
@@ -176,13 +176,13 @@ const InterpretationModal = _ref2 => {
176
176
  exports.InterpretationModal = InterpretationModal;
177
177
  InterpretationModal.propTypes = {
178
178
  currentUser: _propTypes.default.object.isRequired,
179
- downloadMenuComponent: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]).isRequired,
180
179
  interpretationId: _propTypes.default.string.isRequired,
181
180
  isVisualizationLoading: _propTypes.default.bool.isRequired,
182
181
  pluginComponent: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]).isRequired,
183
182
  visualization: _propTypes.default.object.isRequired,
184
183
  onClose: _propTypes.default.func.isRequired,
185
184
  onResponsesReceived: _propTypes.default.func.isRequired,
185
+ downloadMenuComponent: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]),
186
186
  initialFocus: _propTypes.default.bool,
187
187
  onInterpretationUpdate: _propTypes.default.func
188
188
  };
@@ -46,21 +46,23 @@ const InterpretationThread = _ref => {
46
46
  focusRef.current.focus();
47
47
  });
48
48
  }
49
- }, [initialFocus, focusRef.current]);
49
+ }, [initialFocus]);
50
50
  return /*#__PURE__*/_react.default.createElement("div", {
51
- className: "jsx-2924001448" + " " + ((0, _classnames.default)('container', {
51
+ className: "jsx-615306698" + " " + ((0, _classnames.default)('container', {
52
52
  fetching
53
53
  }) || "")
54
54
  }, /*#__PURE__*/_react.default.createElement("div", {
55
- className: "jsx-2924001448" + " " + 'scrollbox'
55
+ className: "jsx-615306698" + " " + 'scrollbox'
56
56
  }, /*#__PURE__*/_react.default.createElement("div", {
57
- className: "jsx-2924001448" + " " + 'title'
57
+ className: "jsx-615306698" + " " + 'title'
58
58
  }, /*#__PURE__*/_react.default.createElement(_ui.IconClock16, {
59
59
  color: _ui.colors.grey700
60
- }), (0, _moment.default)(interpretation.created).format('LLL')), /*#__PURE__*/_react.default.createElement(DownloadMenu, {
60
+ }), (0, _moment.default)(interpretation.created).format('LLL')), DownloadMenu && /*#__PURE__*/_react.default.createElement(DownloadMenu, {
61
61
  relativePeriodDate: interpretation.created,
62
- className: "jsx-2924001448"
63
- }), /*#__PURE__*/_react.default.createElement(_index.Interpretation, {
62
+ className: "jsx-615306698"
63
+ }), /*#__PURE__*/_react.default.createElement("div", {
64
+ className: "jsx-615306698" + " " + 'thread'
65
+ }, /*#__PURE__*/_react.default.createElement(_index.Interpretation, {
64
66
  currentUser: currentUser,
65
67
  interpretation: interpretation,
66
68
  onReplyIconClick: () => {
@@ -71,7 +73,7 @@ const InterpretationThread = _ref => {
71
73
  onUpdated: () => onThreadUpdated(true),
72
74
  onDeleted: onInterpretationDeleted
73
75
  }), /*#__PURE__*/_react.default.createElement("div", {
74
- className: "jsx-2924001448" + " " + 'comments'
76
+ className: "jsx-615306698" + " " + 'comments'
75
77
  }, interpretation.comments.map(comment => /*#__PURE__*/_react.default.createElement(_Comment.Comment, {
76
78
  key: comment.id,
77
79
  comment: comment,
@@ -83,18 +85,18 @@ const InterpretationThread = _ref => {
83
85
  interpretationId: interpretation.id,
84
86
  onSave: () => onThreadUpdated(true),
85
87
  focusRef: focusRef
86
- })), /*#__PURE__*/_react.default.createElement(_style.default, {
87
- id: "2924001448"
88
- }, [".container.jsx-2924001448{position:relative;overflow:hidden;max-height:calc(100vh - 285px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".container.fetching.jsx-2924001448::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-2924001448::after{content:'';position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);width:24px;height:24px;border-width:4px;border-style:solid;border-color:rgba(110,122,138,0.15) rgba(110,122,138,0.15) rgb(20,124,215);border-image:initial;border-radius:50%;-webkit-animation:1s linear 0s infinite normal none running rotation-jsx-2924001448;animation:1s linear 0s infinite normal none running rotation-jsx-2924001448;}", ".scrollbox.jsx-2924001448{overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".title.jsx-2924001448{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;gap:var(--spacers-dp8);color:var(--colors-grey900);font-size:14px;line-height:18px;}", ".comments.jsx-2924001448{padding-left:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-top:var(--spacers-dp4);gap:var(--spacers-dp4);}", "@-webkit-keyframes rotation-jsx-2924001448{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-jsx-2924001448{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
88
+ }))), /*#__PURE__*/_react.default.createElement(_style.default, {
89
+ id: "615306698"
90
+ }, [".thread.jsx-615306698{margin-top:var(--spacers-dp16);}", ".container.jsx-615306698{position:relative;overflow:hidden;max-height:calc(100vh - 285px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".container.fetching.jsx-615306698::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-615306698::after{content:'';position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);width:24px;height:24px;border-width:4px;border-style:solid;border-color:rgba(110,122,138,0.15) rgba(110,122,138,0.15) rgb(20,124,215);border-image:initial;border-radius:50%;-webkit-animation:1s linear 0s infinite normal none running rotation-jsx-615306698;animation:1s linear 0s infinite normal none running rotation-jsx-615306698;}", ".scrollbox.jsx-615306698{overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".title.jsx-615306698{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;gap:var(--spacers-dp8);color:var(--colors-grey900);font-size:14px;line-height:18px;}", ".comments.jsx-615306698{padding-left:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-top:var(--spacers-dp4);gap:var(--spacers-dp4);}", "@-webkit-keyframes rotation-jsx-615306698{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-jsx-615306698{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
89
91
  };
90
92
 
91
93
  exports.InterpretationThread = InterpretationThread;
92
94
  InterpretationThread.propTypes = {
93
95
  currentUser: _propTypes.default.object.isRequired,
94
- downloadMenuComponent: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]).isRequired,
95
96
  fetching: _propTypes.default.bool.isRequired,
96
97
  interpretation: _propTypes.default.object.isRequired,
97
98
  onInterpretationDeleted: _propTypes.default.func.isRequired,
99
+ downloadMenuComponent: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]),
98
100
  initialFocus: _propTypes.default.bool,
99
101
  onThreadUpdated: _propTypes.default.func
100
102
  };
@@ -62,17 +62,15 @@ const InterpretationsUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =>
62
62
  } = (0, _appRuntime.useDataQuery)(interpretationsQuery, {
63
63
  lazy: true
64
64
  });
65
-
66
- const onCompleteAction = () => {
65
+ const onCompleteAction = (0, _react.useCallback)(() => {
67
66
  refetch({
68
67
  type,
69
68
  id
70
69
  });
71
- };
72
-
70
+ }, [type, id, refetch]);
73
71
  (0, _react.useImperativeHandle)(ref, () => ({
74
72
  refresh: onCompleteAction
75
- }), []);
73
+ }), [onCompleteAction]);
76
74
  (0, _react.useEffect)(() => {
77
75
  if (id) {
78
76
  refetch({
@@ -80,7 +78,7 @@ const InterpretationsUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =>
80
78
  id
81
79
  });
82
80
  }
83
- }, [type, id]);
81
+ }, [type, id, refetch]);
84
82
  return /*#__PURE__*/_react.default.createElement("div", {
85
83
  className: _style.default.dynamic([["4120713286", [_ui.spacers.dp16, _ui.colors.grey400, _ui.colors.white, _ui.spacers.dp32, _ui.colors.grey900]]]) + " " + ((0, _classnames.default)('container', {
86
84
  expanded: isExpanded
@@ -209,7 +209,7 @@ const RichTextEditor = /*#__PURE__*/(0, _react.forwardRef)((_ref5, externalRef)
209
209
  var _textareaRef$current;
210
210
 
211
211
  return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.focus();
212
- }, [textareaRef.current]);
212
+ }, [textareaRef]);
213
213
  return /*#__PURE__*/_react.default.createElement("div", {
214
214
  className: "jsx-".concat(_RichTextEditorStyle.mainClasses.__hash) + " " + "container"
215
215
  }, /*#__PURE__*/_react.default.createElement(Toolbar, {
@@ -10,9 +10,9 @@ var _ui = require("@dhis2/ui");
10
10
  const mainClasses = [".container.jsx-2278350860{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;}", ".preview.jsx-2278350860{font-size:14px;line-height:19px;color:".concat(_ui.colors.grey900, ";}"), ".textarea.jsx-2278350860{width:100%;box-sizing:border-box;padding:".concat(_ui.spacers.dp8, " ").concat(_ui.spacers.dp12, ";color:").concat(_ui.colors.grey900, ";background-color:").concat(_ui.colors.white, ";border:1px solid ").concat(_ui.colors.grey500, ";border-radius:3px;box-shadow:inset 0 0 0 1px rgba(102,113,123,0.15), inset 0 1px 2px 0 rgba(102,113,123,0.1);outline:0;font-size:14px;line-height:").concat(_ui.spacers.dp16, ";-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}"), ".textarea.jsx-2278350860:focus{outline:none;box-shadow:0 0 0 3px ".concat(_ui.theme.focus, ";}"), ".textarea.jsx-2278350860:disabled{background-color:".concat(_ui.colors.grey100, ";border-color:").concat(_ui.colors.grey500, ";color:").concat(_ui.theme.disabled, ";cursor:not-allowed;}")];
11
11
  exports.mainClasses = mainClasses;
12
12
  mainClasses.__hash = "2278350860";
13
- const toolbarClasses = [".toolbar.jsx-1189800463{background:".concat(_ui.colors.grey050, ";border-radius:3px;border:1px solid ").concat(_ui.colors.grey300, ";margin-bottom:").concat(_ui.spacers.dp4, ";}"), ".actionsWrapper.jsx-1189800463{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;padding:").concat(_ui.spacers.dp4, ";}"), ".mainActions.jsx-1189800463{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(_ui.spacers.dp4, ";margin-top:").concat(_ui.spacers.dp2, ";}"), ".sideActions.jsx-1189800463{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:auto;}", ".previewWrapper.jsx-1189800463{margin:".concat(_ui.spacers.dp4, ";text-align:right;}")];
13
+ const toolbarClasses = [".toolbar.jsx-2267496677{background:".concat(_ui.colors.grey050, ";border-radius:3px;border:1px solid ").concat(_ui.colors.grey300, ";margin-bottom:").concat(_ui.spacers.dp4, ";}"), ".actionsWrapper.jsx-2267496677{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:".concat(_ui.spacers.dp4, ";-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:").concat(_ui.spacers.dp4, ";}"), ".mainActions.jsx-2267496677{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(_ui.spacers.dp4, ";margin-top:").concat(_ui.spacers.dp2, ";}"), ".sideActions.jsx-2267496677{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".previewWrapper.jsx-2267496677{margin:".concat(_ui.spacers.dp4, ";text-align:right;}")];
14
14
  exports.toolbarClasses = toolbarClasses;
15
- toolbarClasses.__hash = "1189800463";
15
+ toolbarClasses.__hash = "2267496677";
16
16
  const tooltipAnchorClasses = [".tooltip.jsx-2182400256{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"];
17
17
  exports.tooltipAnchorClasses = tooltipAnchorClasses;
18
18
  tooltipAnchorClasses.__hash = "2182400256";
@@ -58,7 +58,7 @@ const useUserSearchResults = _ref2 => {
58
58
  }
59
59
 
60
60
  return () => debouncedRefetch.cancel();
61
- }, [searchText]);
61
+ }, [searchText, debouncedRefetch]);
62
62
  (0, _react.useEffect)(() => {
63
63
  if (data) {
64
64
  setData(data.users);
@@ -260,7 +260,7 @@
260
260
  "This year": "Поточний рік",
261
261
  "Last year": "Минулий рік",
262
262
  "Last 5 years": "Останні 5 років",
263
- "Last 10 years": "",
263
+ "Last 10 years": "Останні 10 років",
264
264
  "Days": "Дні",
265
265
  "Weeks": "Тижні",
266
266
  "Bi-weeks": "Двотижневі проміжки",
@@ -99,7 +99,7 @@ const InterpretationModal = _ref2 => {
99
99
  id: interpretationId
100
100
  });
101
101
  }
102
- }, [interpretationId]);
102
+ }, [interpretationId, refetch]);
103
103
  return /*#__PURE__*/React.createElement(React.Fragment, null, shouldCssHideModal && /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(CenteredContent, null, /*#__PURE__*/React.createElement(CircularLoader, null))), /*#__PURE__*/React.createElement(Modal, {
104
104
  fluid: true,
105
105
  onClose: handleClose,
@@ -112,7 +112,7 @@ const InterpretationModal = _ref2 => {
112
112
  }, /*#__PURE__*/React.createElement("span", {
113
113
  className: _JSXStyle.dynamic([["3175860552", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]]) + " " + "ellipsis"
114
114
  }, i18n.t('Viewing interpretation: {{- visualisationName}}', {
115
- visualisationName: visualization.displayName,
115
+ visualisationName: visualization.displayName || visualization.name,
116
116
  nsSeparator: '^^'
117
117
  }))), /*#__PURE__*/React.createElement(ModalContent, {
118
118
  className: modalContentCSS.className
@@ -153,13 +153,13 @@ const InterpretationModal = _ref2 => {
153
153
 
154
154
  InterpretationModal.propTypes = {
155
155
  currentUser: PropTypes.object.isRequired,
156
- downloadMenuComponent: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,
157
156
  interpretationId: PropTypes.string.isRequired,
158
157
  isVisualizationLoading: PropTypes.bool.isRequired,
159
158
  pluginComponent: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,
160
159
  visualization: PropTypes.object.isRequired,
161
160
  onClose: PropTypes.func.isRequired,
162
161
  onResponsesReceived: PropTypes.func.isRequired,
162
+ downloadMenuComponent: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
163
163
  initialFocus: PropTypes.bool,
164
164
  onInterpretationUpdate: PropTypes.func
165
165
  };
@@ -25,21 +25,23 @@ const InterpretationThread = _ref => {
25
25
  focusRef.current.focus();
26
26
  });
27
27
  }
28
- }, [initialFocus, focusRef.current]);
28
+ }, [initialFocus]);
29
29
  return /*#__PURE__*/React.createElement("div", {
30
- className: "jsx-2924001448" + " " + (cx('container', {
30
+ className: "jsx-615306698" + " " + (cx('container', {
31
31
  fetching
32
32
  }) || "")
33
33
  }, /*#__PURE__*/React.createElement("div", {
34
- className: "jsx-2924001448" + " " + 'scrollbox'
34
+ className: "jsx-615306698" + " " + 'scrollbox'
35
35
  }, /*#__PURE__*/React.createElement("div", {
36
- className: "jsx-2924001448" + " " + 'title'
36
+ className: "jsx-615306698" + " " + 'title'
37
37
  }, /*#__PURE__*/React.createElement(IconClock16, {
38
38
  color: colors.grey700
39
- }), moment(interpretation.created).format('LLL')), /*#__PURE__*/React.createElement(DownloadMenu, {
39
+ }), moment(interpretation.created).format('LLL')), DownloadMenu && /*#__PURE__*/React.createElement(DownloadMenu, {
40
40
  relativePeriodDate: interpretation.created,
41
- className: "jsx-2924001448"
42
- }), /*#__PURE__*/React.createElement(Interpretation, {
41
+ className: "jsx-615306698"
42
+ }), /*#__PURE__*/React.createElement("div", {
43
+ className: "jsx-615306698" + " " + 'thread'
44
+ }, /*#__PURE__*/React.createElement(Interpretation, {
43
45
  currentUser: currentUser,
44
46
  interpretation: interpretation,
45
47
  onReplyIconClick: () => {
@@ -50,7 +52,7 @@ const InterpretationThread = _ref => {
50
52
  onUpdated: () => onThreadUpdated(true),
51
53
  onDeleted: onInterpretationDeleted
52
54
  }), /*#__PURE__*/React.createElement("div", {
53
- className: "jsx-2924001448" + " " + 'comments'
55
+ className: "jsx-615306698" + " " + 'comments'
54
56
  }, interpretation.comments.map(comment => /*#__PURE__*/React.createElement(Comment, {
55
57
  key: comment.id,
56
58
  comment: comment,
@@ -62,17 +64,17 @@ const InterpretationThread = _ref => {
62
64
  interpretationId: interpretation.id,
63
65
  onSave: () => onThreadUpdated(true),
64
66
  focusRef: focusRef
65
- })), /*#__PURE__*/React.createElement(_JSXStyle, {
66
- id: "2924001448"
67
- }, [".container.jsx-2924001448{position:relative;overflow:hidden;max-height:calc(100vh - 285px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".container.fetching.jsx-2924001448::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-2924001448::after{content:'';position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);width:24px;height:24px;border-width:4px;border-style:solid;border-color:rgba(110,122,138,0.15) rgba(110,122,138,0.15) rgb(20,124,215);border-image:initial;border-radius:50%;-webkit-animation:1s linear 0s infinite normal none running rotation-jsx-2924001448;animation:1s linear 0s infinite normal none running rotation-jsx-2924001448;}", ".scrollbox.jsx-2924001448{overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".title.jsx-2924001448{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;gap:var(--spacers-dp8);color:var(--colors-grey900);font-size:14px;line-height:18px;}", ".comments.jsx-2924001448{padding-left:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-top:var(--spacers-dp4);gap:var(--spacers-dp4);}", "@-webkit-keyframes rotation-jsx-2924001448{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-jsx-2924001448{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
67
+ }))), /*#__PURE__*/React.createElement(_JSXStyle, {
68
+ id: "615306698"
69
+ }, [".thread.jsx-615306698{margin-top:var(--spacers-dp16);}", ".container.jsx-615306698{position:relative;overflow:hidden;max-height:calc(100vh - 285px);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".container.fetching.jsx-615306698::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-615306698::after{content:'';position:absolute;top:calc(50% - 12px);left:calc(50% - 12px);width:24px;height:24px;border-width:4px;border-style:solid;border-color:rgba(110,122,138,0.15) rgba(110,122,138,0.15) rgb(20,124,215);border-image:initial;border-radius:50%;-webkit-animation:1s linear 0s infinite normal none running rotation-jsx-615306698;animation:1s linear 0s infinite normal none running rotation-jsx-615306698;}", ".scrollbox.jsx-615306698{overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".title.jsx-615306698{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;gap:var(--spacers-dp8);color:var(--colors-grey900);font-size:14px;line-height:18px;}", ".comments.jsx-615306698{padding-left:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-top:var(--spacers-dp4);gap:var(--spacers-dp4);}", "@-webkit-keyframes rotation-jsx-615306698{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-jsx-615306698{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
68
70
  };
69
71
 
70
72
  InterpretationThread.propTypes = {
71
73
  currentUser: PropTypes.object.isRequired,
72
- downloadMenuComponent: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,
73
74
  fetching: PropTypes.bool.isRequired,
74
75
  interpretation: PropTypes.object.isRequired,
75
76
  onInterpretationDeleted: PropTypes.func.isRequired,
77
+ downloadMenuComponent: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
76
78
  initialFocus: PropTypes.bool,
77
79
  onThreadUpdated: PropTypes.func
78
80
  };
@@ -4,7 +4,7 @@ import i18n from '@dhis2/d2-i18n';
4
4
  import { CircularLoader, IconChevronDown24, IconChevronUp24, colors, spacers } from '@dhis2/ui';
5
5
  import cx from 'classnames';
6
6
  import PropTypes from 'prop-types';
7
- import React, { useEffect, useState, useImperativeHandle, forwardRef } from 'react';
7
+ import React, { useCallback, useEffect, useState, useImperativeHandle, forwardRef } from 'react';
8
8
  import { InterpretationForm } from './InterpretationForm.js';
9
9
  import { InterpretationList } from './InterpretationList.js';
10
10
  const interpretationsQuery = {
@@ -40,17 +40,15 @@ export const InterpretationsUnit = /*#__PURE__*/forwardRef((_ref2, ref) => {
40
40
  } = useDataQuery(interpretationsQuery, {
41
41
  lazy: true
42
42
  });
43
-
44
- const onCompleteAction = () => {
43
+ const onCompleteAction = useCallback(() => {
45
44
  refetch({
46
45
  type,
47
46
  id
48
47
  });
49
- };
50
-
48
+ }, [type, id, refetch]);
51
49
  useImperativeHandle(ref, () => ({
52
50
  refresh: onCompleteAction
53
- }), []);
51
+ }), [onCompleteAction]);
54
52
  useEffect(() => {
55
53
  if (id) {
56
54
  refetch({
@@ -58,7 +56,7 @@ export const InterpretationsUnit = /*#__PURE__*/forwardRef((_ref2, ref) => {
58
56
  id
59
57
  });
60
58
  }
61
- }, [type, id]);
59
+ }, [type, id, refetch]);
62
60
  return /*#__PURE__*/React.createElement("div", {
63
61
  className: _JSXStyle.dynamic([["4120713286", [spacers.dp16, colors.grey400, colors.white, spacers.dp32, colors.grey900]]]) + " " + (cx('container', {
64
62
  expanded: isExpanded
@@ -188,7 +188,7 @@ export const RichTextEditor = /*#__PURE__*/forwardRef((_ref5, externalRef) => {
188
188
  var _textareaRef$current;
189
189
 
190
190
  return (_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.focus();
191
- }, [textareaRef.current]);
191
+ }, [textareaRef]);
192
192
  return /*#__PURE__*/React.createElement("div", {
193
193
  className: "jsx-".concat(mainClasses.__hash) + " " + "container"
194
194
  }, /*#__PURE__*/React.createElement(Toolbar, {
@@ -1,8 +1,8 @@
1
1
  import { colors, spacers, theme } from '@dhis2/ui';
2
2
  export const mainClasses = [".container.jsx-2278350860{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;}", ".preview.jsx-2278350860{font-size:14px;line-height:19px;color:".concat(colors.grey900, ";}"), ".textarea.jsx-2278350860{width:100%;box-sizing:border-box;padding:".concat(spacers.dp8, " ").concat(spacers.dp12, ";color:").concat(colors.grey900, ";background-color:").concat(colors.white, ";border:1px solid ").concat(colors.grey500, ";border-radius:3px;box-shadow:inset 0 0 0 1px rgba(102,113,123,0.15), inset 0 1px 2px 0 rgba(102,113,123,0.1);outline:0;font-size:14px;line-height:").concat(spacers.dp16, ";-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}"), ".textarea.jsx-2278350860:focus{outline:none;box-shadow:0 0 0 3px ".concat(theme.focus, ";}"), ".textarea.jsx-2278350860:disabled{background-color:".concat(colors.grey100, ";border-color:").concat(colors.grey500, ";color:").concat(theme.disabled, ";cursor:not-allowed;}")];
3
3
  mainClasses.__hash = "2278350860";
4
- export const toolbarClasses = [".toolbar.jsx-1189800463{background:".concat(colors.grey050, ";border-radius:3px;border:1px solid ").concat(colors.grey300, ";margin-bottom:").concat(spacers.dp4, ";}"), ".actionsWrapper.jsx-1189800463{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;padding:").concat(spacers.dp4, ";}"), ".mainActions.jsx-1189800463{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(spacers.dp4, ";margin-top:").concat(spacers.dp2, ";}"), ".sideActions.jsx-1189800463{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-left:auto;}", ".previewWrapper.jsx-1189800463{margin:".concat(spacers.dp4, ";text-align:right;}")];
5
- toolbarClasses.__hash = "1189800463";
4
+ export const toolbarClasses = [".toolbar.jsx-2267496677{background:".concat(colors.grey050, ";border-radius:3px;border:1px solid ").concat(colors.grey300, ";margin-bottom:").concat(spacers.dp4, ";}"), ".actionsWrapper.jsx-2267496677{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:".concat(spacers.dp4, ";-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:").concat(spacers.dp4, ";}"), ".mainActions.jsx-2267496677{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(spacers.dp4, ";margin-top:").concat(spacers.dp2, ";}"), ".sideActions.jsx-2267496677{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".previewWrapper.jsx-2267496677{margin:".concat(spacers.dp4, ";text-align:right;}")];
5
+ toolbarClasses.__hash = "2267496677";
6
6
  export const tooltipAnchorClasses = [".tooltip.jsx-2182400256{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"];
7
7
  tooltipAnchorClasses.__hash = "2182400256";
8
8
  export const emojisPopoverClasses = [".emojisList.jsx-2802175370{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:".concat(spacers.dp8, ";list-style-type:none;margin:0 ").concat(spacers.dp4, " 0 ").concat(spacers.dp8, ";padding:0;}"), ".emojisList.jsx-2802175370 li.jsx-2802175370{cursor:pointer;}"];
@@ -45,7 +45,7 @@ export const useUserSearchResults = _ref2 => {
45
45
  }
46
46
 
47
47
  return () => debouncedRefetch.cancel();
48
- }, [searchText]);
48
+ }, [searchText, debouncedRefetch]);
49
49
  useEffect(() => {
50
50
  if (data) {
51
51
  setData(data.users);
@@ -260,7 +260,7 @@
260
260
  "This year": "Поточний рік",
261
261
  "Last year": "Минулий рік",
262
262
  "Last 5 years": "Останні 5 років",
263
- "Last 10 years": "",
263
+ "Last 10 years": "Останні 10 років",
264
264
  "Days": "Дні",
265
265
  "Weeks": "Тижні",
266
266
  "Bi-weeks": "Двотижневі проміжки",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.0.1",
3
+ "version": "24.0.4",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {
@@ -35,7 +35,7 @@
35
35
  "@dhis2/cli-app-scripts": "^9.0.1",
36
36
  "@dhis2/cli-style": "^10.4.1",
37
37
  "@dhis2/d2-i18n": "^1.1.0",
38
- "@dhis2/ui": "^8.4.9",
38
+ "@dhis2/ui": "^8.4.11",
39
39
  "@sambego/storybook-state": "^2.0.1",
40
40
  "@storybook/addons": "^6.5.9",
41
41
  "@storybook/preset-create-react-app": "^3.1.7",