@dhis2/analytics 23.13.13 → 24.0.2

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +15 -9
  3. package/build/cjs/components/AboutAOUnit/utils.js +48 -0
  4. package/build/cjs/components/Interpretations/InterpretationModal/InterpretationModal.js +3 -3
  5. package/build/cjs/components/Interpretations/InterpretationModal/InterpretationThread.js +14 -12
  6. package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +4 -6
  7. package/build/cjs/components/Interpretations/common/RichTextEditor/RichTextEditor.js +1 -1
  8. package/build/cjs/components/Interpretations/common/RichTextEditor/styles/RichTextEditor.style.js +2 -2
  9. package/build/cjs/components/Interpretations/common/UserMention/useUserSearchResults.js +1 -1
  10. package/build/cjs/locales/ar/translations.json +4 -1
  11. package/build/cjs/locales/ar_EG/translations.json +4 -1
  12. package/build/cjs/locales/ar_IQ/translations.json +4 -1
  13. package/build/cjs/locales/ckb/translations.json +4 -1
  14. package/build/cjs/locales/cs/translations.json +4 -1
  15. package/build/cjs/locales/da/translations.json +4 -1
  16. package/build/cjs/locales/en/translations.json +4 -1
  17. package/build/cjs/locales/es/translations.json +4 -1
  18. package/build/cjs/locales/fr/translations.json +4 -1
  19. package/build/cjs/locales/id/translations.json +4 -1
  20. package/build/cjs/locales/km/translations.json +4 -1
  21. package/build/cjs/locales/lo/translations.json +4 -1
  22. package/build/cjs/locales/my/translations.json +4 -1
  23. package/build/cjs/locales/nb/translations.json +4 -1
  24. package/build/cjs/locales/nl/translations.json +4 -1
  25. package/build/cjs/locales/or/translations.json +4 -1
  26. package/build/cjs/locales/prs/translations.json +4 -1
  27. package/build/cjs/locales/ps/translations.json +4 -1
  28. package/build/cjs/locales/pt/translations.json +4 -1
  29. package/build/cjs/locales/pt_BR/translations.json +4 -1
  30. package/build/cjs/locales/ro/translations.json +4 -1
  31. package/build/cjs/locales/ru/translations.json +4 -1
  32. package/build/cjs/locales/sv/translations.json +4 -1
  33. package/build/cjs/locales/tet/translations.json +4 -1
  34. package/build/cjs/locales/tg/translations.json +4 -1
  35. package/build/cjs/locales/uk/translations.json +4 -1
  36. package/build/cjs/locales/ur/translations.json +4 -1
  37. package/build/cjs/locales/uz/translations.json +4 -1
  38. package/build/cjs/locales/uz_Latn/translations.json +4 -1
  39. package/build/cjs/locales/vi/translations.json +4 -1
  40. package/build/cjs/locales/zh/translations.json +4 -1
  41. package/build/cjs/locales/zh_CN/translations.json +4 -1
  42. package/build/es/components/AboutAOUnit/AboutAOUnit.js +14 -9
  43. package/build/es/components/AboutAOUnit/utils.js +31 -0
  44. package/build/es/components/Interpretations/InterpretationModal/InterpretationModal.js +3 -3
  45. package/build/es/components/Interpretations/InterpretationModal/InterpretationThread.js +14 -12
  46. package/build/es/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +5 -7
  47. package/build/es/components/Interpretations/common/RichTextEditor/RichTextEditor.js +1 -1
  48. package/build/es/components/Interpretations/common/RichTextEditor/styles/RichTextEditor.style.js +2 -2
  49. package/build/es/components/Interpretations/common/UserMention/useUserSearchResults.js +1 -1
  50. package/build/es/locales/ar/translations.json +4 -1
  51. package/build/es/locales/ar_EG/translations.json +4 -1
  52. package/build/es/locales/ar_IQ/translations.json +4 -1
  53. package/build/es/locales/ckb/translations.json +4 -1
  54. package/build/es/locales/cs/translations.json +4 -1
  55. package/build/es/locales/da/translations.json +4 -1
  56. package/build/es/locales/en/translations.json +4 -1
  57. package/build/es/locales/es/translations.json +4 -1
  58. package/build/es/locales/fr/translations.json +4 -1
  59. package/build/es/locales/id/translations.json +4 -1
  60. package/build/es/locales/km/translations.json +4 -1
  61. package/build/es/locales/lo/translations.json +4 -1
  62. package/build/es/locales/my/translations.json +4 -1
  63. package/build/es/locales/nb/translations.json +4 -1
  64. package/build/es/locales/nl/translations.json +4 -1
  65. package/build/es/locales/or/translations.json +4 -1
  66. package/build/es/locales/prs/translations.json +4 -1
  67. package/build/es/locales/ps/translations.json +4 -1
  68. package/build/es/locales/pt/translations.json +4 -1
  69. package/build/es/locales/pt_BR/translations.json +4 -1
  70. package/build/es/locales/ro/translations.json +4 -1
  71. package/build/es/locales/ru/translations.json +4 -1
  72. package/build/es/locales/sv/translations.json +4 -1
  73. package/build/es/locales/tet/translations.json +4 -1
  74. package/build/es/locales/tg/translations.json +4 -1
  75. package/build/es/locales/uk/translations.json +4 -1
  76. package/build/es/locales/ur/translations.json +4 -1
  77. package/build/es/locales/uz/translations.json +4 -1
  78. package/build/es/locales/uz_Latn/translations.json +4 -1
  79. package/build/es/locales/vi/translations.json +4 -1
  80. package/build/es/locales/zh/translations.json +4 -1
  81. package/build/es/locales/zh_CN/translations.json +4 -1
  82. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## [24.0.2](https://github.com/dhis2/analytics/compare/v24.0.1...v24.0.2) (2022-08-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * various fixes in InterpretationModal for maps LIBS-341 ([#1324](https://github.com/dhis2/analytics/issues/1324)) ([be1f462](https://github.com/dhis2/analytics/commit/be1f46297f055978de6cf3d7acae21c8f1fe1491))
7
+
8
+ ## [24.0.1](https://github.com/dhis2/analytics/compare/v24.0.0...v24.0.1) (2022-08-23)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **translations:** sync translations from transifex (master) ([f7ec5e7](https://github.com/dhis2/analytics/commit/f7ec5e76f6448fdb241afbd876e8b6369c2bdf8f))
14
+
15
+ # [24.0.0](https://github.com/dhis2/analytics/compare/v23.13.13...v24.0.0) (2022-08-22)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * add support for Maps app (LIBS-339) ([#1322](https://github.com/dhis2/analytics/issues/1322)) ([b92717d](https://github.com/dhis2/analytics/commit/b92717d941d7bdb15394cecd663fa7fa9b1a57f2))
21
+
22
+
23
+ ### BREAKING CHANGES
24
+
25
+ * the type prop changed from the plural version to the singular, this requires updating the apps that use the AboutAOUnit component.
26
+
1
27
  ## [23.13.13](https://github.com/dhis2/analytics/compare/v23.13.12...v23.13.13) (2022-08-22)
2
28
 
3
29
 
@@ -25,6 +25,8 @@ var _list = require("../../modules/list.js");
25
25
 
26
26
  var _AboutAOUnitStyle = _interopRequireDefault(require("./styles/AboutAOUnit.style.js"));
27
27
 
28
+ var _utils = require("./utils.js");
29
+
28
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
31
 
30
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -36,7 +38,7 @@ const READ_AND_WRITE = 'rw';
36
38
 
37
39
  const getQueries = type => ({
38
40
  ao: {
39
- resource: type,
41
+ resource: _utils.AOTypeMap[type].apiEndpoint,
40
42
  id: _ref => {
41
43
  let {
42
44
  id
@@ -59,22 +61,24 @@ const getQueries = type => ({
59
61
  });
60
62
 
61
63
  const getSubscribeMutation = (type, id) => ({
62
- resource: "".concat(type, "/").concat(id, "/subscriber"),
64
+ resource: "".concat(_utils.AOTypeMap[type].apiEndpoint, "/").concat(id, "/subscriber"),
63
65
  type: 'create'
64
66
  });
65
67
 
66
68
  const getUnsubscribeMutation = (type, id) => ({
67
- resource: "".concat(type, "/").concat(id, "/subscriber"),
69
+ resource: "".concat(_utils.AOTypeMap[type].apiEndpoint, "/").concat(id, "/subscriber"),
68
70
  type: 'delete'
69
71
  });
70
72
 
71
73
  const AboutAOUnit = _ref3 => {
74
+ var _data$ao$createdBy;
75
+
72
76
  let {
73
77
  type,
74
78
  id
75
79
  } = _ref3;
76
80
  const [isExpanded, setIsExpanded] = (0, _react.useState)(true);
77
- const queries = (0, _react.useMemo)(() => getQueries(type), []);
81
+ const queries = (0, _react.useMemo)(() => getQueries(type), [type]);
78
82
  const {
79
83
  data,
80
84
  loading: dataIsLoading,
@@ -82,8 +86,8 @@ const AboutAOUnit = _ref3 => {
82
86
  } = (0, _appRuntime.useDataQuery)(queries, {
83
87
  lazy: true
84
88
  });
85
- const subscribeMutation = (0, _react.useMemo)(() => getSubscribeMutation(type, id), []);
86
- const unsubscribeMutation = (0, _react.useMemo)(() => getUnsubscribeMutation(type, id), []);
89
+ const subscribeMutation = (0, _react.useMemo)(() => getSubscribeMutation(type, id), [type, id]);
90
+ const unsubscribeMutation = (0, _react.useMemo)(() => getUnsubscribeMutation(type, id), [type, id]);
87
91
  const [subscribe, {
88
92
  loading: subscribeIsLoading
89
93
  }] = (0, _appRuntime.useDataMutation)(subscribeMutation, {
@@ -112,7 +116,7 @@ const AboutAOUnit = _ref3 => {
112
116
  id
113
117
  });
114
118
  }
115
- }, [type, id, refetch]);
119
+ }, [id, refetch]);
116
120
 
117
121
  const getAccessLevelString = access => {
118
122
  const re = new RegExp("(?<accessLevel>".concat(READ_AND_WRITE, "?)"));
@@ -159,7 +163,7 @@ const AboutAOUnit = _ref3 => {
159
163
  className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "header"
160
164
  }, /*#__PURE__*/_react.default.createElement("span", {
161
165
  className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "title"
162
- }, _d2I18n.default.t('About this visualization')), isExpanded ? /*#__PURE__*/_react.default.createElement(_ui.IconChevronUp24, {
166
+ }, (0, _utils.getTranslatedString)(type, 'unitTitle')), isExpanded ? /*#__PURE__*/_react.default.createElement(_ui.IconChevronUp24, {
163
167
  color: _ui.colors.grey700
164
168
  }) : /*#__PURE__*/_react.default.createElement(_ui.IconChevronDown24, {
165
169
  color: _ui.colors.grey700
@@ -189,9 +193,11 @@ const AboutAOUnit = _ref3 => {
189
193
  className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "detailLine"
190
194
  }, /*#__PURE__*/_react.default.createElement(_ui.IconUser16, {
191
195
  color: _ui.colors.grey700
192
- }), _d2I18n.default.t('Created {{time}} by {{author}}', {
196
+ }), (_data$ao$createdBy = data.ao.createdBy) !== null && _data$ao$createdBy !== void 0 && _data$ao$createdBy.displayName ? _d2I18n.default.t('Created {{time}} by {{author}}', {
193
197
  time: (0, _moment.default)(data.ao.created).fromNow(),
194
198
  author: data.ao.createdBy.displayName
199
+ }) : _d2I18n.default.t('Created {{time}}', {
200
+ time: (0, _moment.default)(data.ao.created).fromNow()
195
201
  })), /*#__PURE__*/_react.default.createElement("p", {
196
202
  className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "detailLine"
197
203
  }, /*#__PURE__*/_react.default.createElement(_ui.IconView16, {
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTranslatedString = exports.AO_TYPE_VISUALIZATION = exports.AO_TYPE_MAP = exports.AO_TYPE_EVENT_VISUALIZATION = exports.AOTypeMap = void 0;
7
+
8
+ var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const AO_TYPE_VISUALIZATION = 'visualization';
13
+ exports.AO_TYPE_VISUALIZATION = AO_TYPE_VISUALIZATION;
14
+ const AO_TYPE_MAP = 'map';
15
+ exports.AO_TYPE_MAP = AO_TYPE_MAP;
16
+ const AO_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
17
+ exports.AO_TYPE_EVENT_VISUALIZATION = AO_TYPE_EVENT_VISUALIZATION;
18
+ const AOTypeMap = {
19
+ [AO_TYPE_VISUALIZATION]: {
20
+ apiEndpoint: 'visualizations'
21
+ },
22
+ [AO_TYPE_MAP]: {
23
+ apiEndpoint: 'maps'
24
+ },
25
+ [AO_TYPE_EVENT_VISUALIZATION]: {
26
+ apiEndpoint: 'eventVisualizations'
27
+ }
28
+ };
29
+ exports.AOTypeMap = AOTypeMap;
30
+ const NO_TYPE = 'NO_TYPE';
31
+ const texts = {
32
+ [AO_TYPE_MAP]: {
33
+ unitTitle: _d2I18n.default.t('About this map')
34
+ },
35
+ [AO_TYPE_EVENT_VISUALIZATION]: {
36
+ unitTitle: _d2I18n.default.t('About this line list')
37
+ },
38
+ [AO_TYPE_VISUALIZATION]: {
39
+ unitTitle: _d2I18n.default.t('About this visualization')
40
+ },
41
+ [NO_TYPE]: {
42
+ unitTitle: _d2I18n.default.t('About this visualization')
43
+ }
44
+ };
45
+
46
+ const getTranslatedString = (type, key) => (texts[type] || texts[NO_TYPE])[key];
47
+
48
+ exports.getTranslatedString = getTranslatedString;
@@ -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);
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "لا يوجد وصف",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times_0": "",
13
13
  "Viewed {{count}} times_1": "",
14
14
  "Viewed {{count}} times_2": "",
@@ -20,6 +20,9 @@
20
20
  "Unsubscribe": "",
21
21
  "Subscribe to get updates about new interpretations.": "",
22
22
  "Subscribe": "",
23
+ "About this map": "",
24
+ "About this line list": "",
25
+ "About this visualization": "",
23
26
  "This app could not retrieve required data.": "",
24
27
  "Network error": "",
25
28
  "Data Type": "نوع البيانات",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times_0": "",
13
13
  "Viewed {{count}} times_1": "",
14
14
  "Viewed {{count}} times_2": "",
@@ -20,6 +20,9 @@
20
20
  "Unsubscribe": "",
21
21
  "Subscribe to get updates about new interpretations.": "",
22
22
  "Subscribe": "",
23
+ "About this map": "",
24
+ "About this line list": "",
25
+ "About this visualization": "",
23
26
  "This app could not retrieve required data.": "",
24
27
  "Network error": "",
25
28
  "Data Type": "",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "لا يوجد وصف",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times_0": "",
13
13
  "Viewed {{count}} times_1": "",
14
14
  "Viewed {{count}} times_2": "",
@@ -20,6 +20,9 @@
20
20
  "Unsubscribe": "",
21
21
  "Subscribe to get updates about new interpretations.": "",
22
22
  "Subscribe": "",
23
+ "About this map": "",
24
+ "About this line list": "",
25
+ "About this visualization": "",
23
26
  "This app could not retrieve required data.": "",
24
27
  "Network error": "",
25
28
  "Data Type": "",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times_0": "",
13
13
  "Viewed {{count}} times_1": "",
14
14
  "Notifications": "",
@@ -16,6 +16,9 @@
16
16
  "Unsubscribe": "",
17
17
  "Subscribe to get updates about new interpretations.": "",
18
18
  "Subscribe": "",
19
+ "About this map": "",
20
+ "About this line list": "",
21
+ "About this visualization": "",
19
22
  "This app could not retrieve required data.": "",
20
23
  "Network error": "",
21
24
  "Data Type": "",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "Sdíleno s {{commaSeparatedListOfUsersAndGroups}}",
7
7
  "Not shared with any users or groups": "Nesdíleno s žádnými uživateli ani skupinami",
8
- "About this visualization": "O této vizualizaci",
9
8
  "No description": "Bez popisu",
10
9
  "Last updated {{time}}": "Poslední aktualizace {{time}}",
11
10
  "Created {{time}} by {{author}}": "Vytvořeno {{time}} uživatelem {{author}}",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times_0": "Zobrazeno 1 krát",
13
13
  "Viewed {{count}} times_1": "Zobrazeno {{count}}krát",
14
14
  "Viewed {{count}} times_2": "Zobrazeno {{count}}krát",
@@ -18,6 +18,9 @@
18
18
  "Unsubscribe": "Odhlásit odběr",
19
19
  "Subscribe to get updates about new interpretations.": "Přihlaste se k odběru novinek o nových interpretacích.",
20
20
  "Subscribe": "Odebírat",
21
+ "About this map": "",
22
+ "About this line list": "",
23
+ "About this visualization": "O této vizualizaci",
21
24
  "This app could not retrieve required data.": "Tato aplikace nemohla načíst požadovaná data.",
22
25
  "Network error": "Chyba sítě",
23
26
  "Data Type": "Typ dat",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Viewed {{count}} times_plural": "",
14
14
  "Notifications": "",
@@ -16,6 +16,9 @@
16
16
  "Unsubscribe": "",
17
17
  "Subscribe to get updates about new interpretations.": "",
18
18
  "Subscribe": "",
19
+ "About this map": "",
20
+ "About this line list": "",
21
+ "About this visualization": "",
19
22
  "This app could not retrieve required data.": "",
20
23
  "Network error": "",
21
24
  "Data Type": "",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "Shared with {{commaSeparatedListOfUsersAndGroups}}",
7
7
  "Not shared with any users or groups": "Not shared with any users or groups",
8
- "About this visualization": "About this visualization",
9
8
  "No description": "No description",
10
9
  "Last updated {{time}}": "Last updated {{time}}",
11
10
  "Created {{time}} by {{author}}": "Created {{time}} by {{author}}",
11
+ "Created {{time}}": "Created {{time}}",
12
12
  "Viewed {{count}} times": "Viewed 1 time",
13
13
  "Viewed {{count}} times_plural": "Viewed {{count}} times",
14
14
  "Notifications": "Notifications",
@@ -16,6 +16,9 @@
16
16
  "Unsubscribe": "Unsubscribe",
17
17
  "Subscribe to get updates about new interpretations.": "Subscribe to get updates about new interpretations.",
18
18
  "Subscribe": "Subscribe",
19
+ "About this map": "About this map",
20
+ "About this line list": "About this line list",
21
+ "About this visualization": "About this visualization",
19
22
  "This app could not retrieve required data.": "This app could not retrieve required data.",
20
23
  "Network error": "Network error",
21
24
  "Data Type": "Data Type",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "Sin descripción",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Viewed {{count}} times_plural": "",
14
14
  "Notifications": "",
@@ -16,6 +16,9 @@
16
16
  "Unsubscribe": "",
17
17
  "Subscribe to get updates about new interpretations.": "",
18
18
  "Subscribe": "",
19
+ "About this map": "",
20
+ "About this line list": "",
21
+ "About this visualization": "",
19
22
  "This app could not retrieve required data.": "",
20
23
  "Network error": "",
21
24
  "Data Type": "Tipo de datos",
@@ -5,10 +5,10 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "Aucune description",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Viewed {{count}} times_plural": "",
14
14
  "Notifications": "Notifications",
@@ -16,6 +16,9 @@
16
16
  "Unsubscribe": "",
17
17
  "Subscribe to get updates about new interpretations.": "",
18
18
  "Subscribe": "",
19
+ "About this map": "",
20
+ "About this line list": "",
21
+ "About this visualization": "",
19
22
  "This app could not retrieve required data.": "",
20
23
  "Network error": "",
21
24
  "Data Type": "Type de données",
@@ -5,16 +5,19 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "Tidak ada deskripsi",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Notifications": "",
14
14
  "You're subscribed and getting updates about new interpretations.": "",
15
15
  "Unsubscribe": "",
16
16
  "Subscribe to get updates about new interpretations.": "",
17
17
  "Subscribe": "",
18
+ "About this map": "",
19
+ "About this line list": "",
20
+ "About this visualization": "",
18
21
  "This app could not retrieve required data.": "",
19
22
  "Network error": "",
20
23
  "Data Type": "Tipe Data",
@@ -5,16 +5,19 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Notifications": "",
14
14
  "You're subscribed and getting updates about new interpretations.": "",
15
15
  "Unsubscribe": "",
16
16
  "Subscribe to get updates about new interpretations.": "",
17
17
  "Subscribe": "",
18
+ "About this map": "",
19
+ "About this line list": "",
20
+ "About this visualization": "",
18
21
  "This app could not retrieve required data.": "",
19
22
  "Network error": "",
20
23
  "Data Type": "",
@@ -5,16 +5,19 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "ບໍ່ມີລາຍລະອຽດ",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Notifications": "",
14
14
  "You're subscribed and getting updates about new interpretations.": "",
15
15
  "Unsubscribe": "",
16
16
  "Subscribe to get updates about new interpretations.": "",
17
17
  "Subscribe": "",
18
+ "About this map": "",
19
+ "About this line list": "",
20
+ "About this visualization": "",
18
21
  "This app could not retrieve required data.": "",
19
22
  "Network error": "",
20
23
  "Data Type": "",
@@ -5,16 +5,19 @@
5
5
  "{{userOrGroup}} ({{accessLevel}})": "",
6
6
  "Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
7
7
  "Not shared with any users or groups": "",
8
- "About this visualization": "",
9
8
  "No description": "",
10
9
  "Last updated {{time}}": "",
11
10
  "Created {{time}} by {{author}}": "",
11
+ "Created {{time}}": "",
12
12
  "Viewed {{count}} times": "",
13
13
  "Notifications": "",
14
14
  "You're subscribed and getting updates about new interpretations.": "",
15
15
  "Unsubscribe": "",
16
16
  "Subscribe to get updates about new interpretations.": "",
17
17
  "Subscribe": "",
18
+ "About this map": "",
19
+ "About this line list": "",
20
+ "About this visualization": "",
18
21
  "This app could not retrieve required data.": "",
19
22
  "Network error": "",
20
23
  "Data Type": "",