@dhis2/analytics 26.3.1 → 26.4.0

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.
@@ -25,7 +25,8 @@ const InterpretationThread = _ref => {
25
25
  onInterpretationDeleted,
26
26
  initialFocus,
27
27
  onThreadUpdated,
28
- downloadMenuComponent: DownloadMenu
28
+ downloadMenuComponent: DownloadMenu,
29
+ dashboardRedirectUrl
29
30
  } = _ref;
30
31
  const {
31
32
  fromServerDate
@@ -40,18 +41,19 @@ const InterpretationThread = _ref => {
40
41
  }, [initialFocus]);
41
42
  const interpretationAccess = (0, _index.getInterpretationAccess)(interpretation, currentUser);
42
43
  return /*#__PURE__*/_react.default.createElement("div", {
43
- className: "jsx-1846557365" + " " + ((0, _classnames.default)('container', {
44
- fetching
44
+ className: "jsx-3292109121" + " " + ((0, _classnames.default)('container', {
45
+ fetching,
46
+ dashboard: !!dashboardRedirectUrl
45
47
  }) || "")
46
48
  }, /*#__PURE__*/_react.default.createElement("div", {
47
- className: "jsx-1846557365" + " " + 'title'
49
+ className: "jsx-3292109121" + " " + 'title'
48
50
  }, /*#__PURE__*/_react.default.createElement(_ui.IconClock16, {
49
51
  color: _ui.colors.grey700
50
52
  }), (0, _moment.default)(fromServerDate(interpretation.created)).format('LLL')), DownloadMenu && /*#__PURE__*/_react.default.createElement(DownloadMenu, {
51
53
  relativePeriodDate: interpretation.created,
52
- className: "jsx-1846557365"
54
+ className: "jsx-3292109121"
53
55
  }), /*#__PURE__*/_react.default.createElement("div", {
54
- className: "jsx-1846557365" + " " + 'thread'
56
+ className: "jsx-3292109121" + " " + 'thread'
55
57
  }, /*#__PURE__*/_react.default.createElement(_index.Interpretation, {
56
58
  currentUser: currentUser,
57
59
  interpretation: interpretation,
@@ -61,9 +63,10 @@ const InterpretationThread = _ref => {
61
63
  } : null,
62
64
  onUpdated: () => onThreadUpdated(true),
63
65
  onDeleted: onInterpretationDeleted,
66
+ dashboardRedirectUrl: dashboardRedirectUrl,
64
67
  isInThread: true
65
68
  }), /*#__PURE__*/_react.default.createElement("div", {
66
- className: "jsx-1846557365" + " " + 'comments'
69
+ className: "jsx-3292109121" + " " + 'comments'
67
70
  }, interpretation.comments.map(comment => /*#__PURE__*/_react.default.createElement(_Comment.Comment, {
68
71
  key: comment.id,
69
72
  comment: comment,
@@ -77,8 +80,8 @@ const InterpretationThread = _ref => {
77
80
  onSave: () => onThreadUpdated(true),
78
81
  focusRef: focusRef
79
82
  }), /*#__PURE__*/_react.default.createElement(_style.default, {
80
- id: "1846557365"
81
- }, [".thread.jsx-1846557365{margin-top:var(--spacers-dp16);overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".container.jsx-1846557365{position:relative;overflow:auto;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-1846557365::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-1846557365::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-1846557365;animation:1s linear 0s infinite normal none running rotation-jsx-1846557365;}", ".title.jsx-1846557365{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-1846557365{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-1846557365{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-1846557365{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
83
+ id: "3292109121"
84
+ }, [".thread.jsx-3292109121{margin-top:var(--spacers-dp16);overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".dashboard.jsx-3292109121 .thread.jsx-3292109121{overflow-y:hidden;}", ".container.jsx-3292109121{position:relative;overflow:auto;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.dashboard.jsx-3292109121{max-height:none;}", ".container.fetching.jsx-3292109121::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-3292109121::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-3292109121;animation:1s linear 0s infinite normal none running rotation-jsx-3292109121;}", ".title.jsx-3292109121{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-3292109121{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-3292109121{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-3292109121{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
82
85
  };
83
86
  exports.InterpretationThread = InterpretationThread;
84
87
  InterpretationThread.propTypes = {
@@ -86,6 +89,7 @@ InterpretationThread.propTypes = {
86
89
  fetching: _propTypes.default.bool.isRequired,
87
90
  interpretation: _propTypes.default.object.isRequired,
88
91
  onInterpretationDeleted: _propTypes.default.func.isRequired,
92
+ dashboardRedirectUrl: _propTypes.default.string,
89
93
  downloadMenuComponent: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]),
90
94
  initialFocus: _propTypes.default.bool,
91
95
  onThreadUpdated: _propTypes.default.func
@@ -9,4 +9,11 @@ Object.defineProperty(exports, "InterpretationModal", {
9
9
  return _InterpretationModal.InterpretationModal;
10
10
  }
11
11
  });
12
- var _InterpretationModal = require("./InterpretationModal.js");
12
+ Object.defineProperty(exports, "InterpretationThread", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _InterpretationThread.InterpretationThread;
16
+ }
17
+ });
18
+ var _InterpretationModal = require("./InterpretationModal.js");
19
+ var _InterpretationThread = require("./InterpretationThread.js");
@@ -30,7 +30,8 @@ const InterpretationList = _ref => {
30
30
  onInterpretationClick,
31
31
  onReplyIconClick,
32
32
  refresh,
33
- disabled
33
+ disabled,
34
+ dashboardRedirectUrl
34
35
  } = _ref;
35
36
  const {
36
37
  fromServerDate
@@ -67,7 +68,8 @@ const InterpretationList = _ref => {
67
68
  onReplyIconClick: onReplyIconClick,
68
69
  onDeleted: refresh,
69
70
  onUpdated: refresh,
70
- disabled: disabled
71
+ disabled: disabled,
72
+ dashboardRedirectUrl: dashboardRedirectUrl
71
73
  }))))), /*#__PURE__*/_react.default.createElement(_style.default, {
72
74
  id: "4058400613",
73
75
  dynamic: [_ui.spacers.dp8, _ui.spacers.dp8, _ui.spacers.dp16, _ui.colors.grey800, _ui.spacers.dp12, _ui.spacers.dp12, _ui.spacers.dp32, _ui.spacers.dp4]
@@ -80,5 +82,6 @@ InterpretationList.propTypes = {
80
82
  refresh: _propTypes.default.func.isRequired,
81
83
  onInterpretationClick: _propTypes.default.func.isRequired,
82
84
  onReplyIconClick: _propTypes.default.func.isRequired,
85
+ dashboardRedirectUrl: _propTypes.default.string,
83
86
  disabled: _propTypes.default.bool
84
87
  };
@@ -40,7 +40,8 @@ const InterpretationsUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =>
40
40
  onInterpretationClick,
41
41
  onReplyIconClick,
42
42
  disabled,
43
- renderId
43
+ renderId,
44
+ dashboardRedirectUrl
44
45
  } = _ref2;
45
46
  const [isExpanded, setIsExpanded] = (0, _react.useState)(true);
46
47
  const showNoTimeDimensionHelpText = type === 'eventVisualization' && !visualizationHasTimeDimension;
@@ -103,7 +104,8 @@ const InterpretationsUnit = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =>
103
104
  onInterpretationClick: onInterpretationClick,
104
105
  onReplyIconClick: onReplyIconClick,
105
106
  refresh: onCompleteAction,
106
- disabled: disabled
107
+ disabled: disabled,
108
+ dashboardRedirectUrl: dashboardRedirectUrl
107
109
  }))), /*#__PURE__*/_react.default.createElement(_style.default, {
108
110
  id: "4120713286",
109
111
  dynamic: [_ui.spacers.dp16, _ui.colors.grey400, _ui.colors.white, _ui.spacers.dp32, _ui.colors.grey900]
@@ -119,6 +121,7 @@ InterpretationsUnit.propTypes = {
119
121
  currentUser: _propTypes.default.object.isRequired,
120
122
  id: _propTypes.default.string.isRequired,
121
123
  type: _propTypes.default.string.isRequired,
124
+ dashboardRedirectUrl: _propTypes.default.string,
122
125
  disabled: _propTypes.default.bool,
123
126
  renderId: _propTypes.default.number,
124
127
  visualizationHasTimeDimension: _propTypes.default.bool,
@@ -24,6 +24,7 @@ const Interpretation = _ref => {
24
24
  onDeleted,
25
25
  disabled,
26
26
  onReplyIconClick,
27
+ dashboardRedirectUrl,
27
28
  isInThread
28
29
  } = _ref;
29
30
  const [isUpdateMode, setIsUpdateMode] = (0, _react.useState)(false);
@@ -37,7 +38,7 @@ const Interpretation = _ref => {
37
38
  currentUser,
38
39
  onComplete: onUpdated
39
40
  });
40
- const shouldShowButton = !!onClick && !disabled;
41
+ const shouldShowButton = Boolean(!!onClick && !disabled & !dashboardRedirectUrl);
41
42
  const interpretationAccess = (0, _index.getInterpretationAccess)(interpretation, currentUser);
42
43
  let tooltip = _d2I18n.default.t('Reply');
43
44
  if (!interpretationAccess.comment) {
@@ -51,6 +52,9 @@ const Interpretation = _ref => {
51
52
  tooltip = _d2I18n.default.t('View replies');
52
53
  }
53
54
  }
55
+
56
+ // Maps still uses old url style /?id= instead of hash
57
+ const getAppInterpretationUrl = () => dashboardRedirectUrl.includes('?') ? `${dashboardRedirectUrl}&interpretationId=${interpretation.id}` : `${dashboardRedirectUrl}?interpretationId=${interpretation.id}`;
54
58
  return isUpdateMode ? /*#__PURE__*/_react.default.createElement(_InterpretationUpdateForm.InterpretationUpdateForm, {
55
59
  close: () => setIsUpdateMode(false),
56
60
  id: interpretation.id,
@@ -77,6 +81,16 @@ const Interpretation = _ref => {
77
81
  count: interpretation.comments.length,
78
82
  dataTest: "interpretation-reply-button",
79
83
  viewOnly: isInThread && !interpretationAccess.comment
84
+ }), dashboardRedirectUrl && !isInThread && /*#__PURE__*/_react.default.createElement(_index.MessageIconButton, {
85
+ tooltipContent: _d2I18n.default.t('See interpretation'),
86
+ iconComponent: _ui.IconView16,
87
+ onClick: () => onClick(interpretation.id),
88
+ dataTest: "interpretation-view-button"
89
+ }), dashboardRedirectUrl && /*#__PURE__*/_react.default.createElement(_index.MessageIconButton, {
90
+ tooltipContent: _d2I18n.default.t('Open in app'),
91
+ iconComponent: _ui.IconLaunch16,
92
+ onClick: () => window.open(getAppInterpretationUrl(), '_blank'),
93
+ dataTest: "interpretation-launch-in-app-button"
80
94
  }), interpretationAccess.share && /*#__PURE__*/_react.default.createElement(_index.MessageIconButton, {
81
95
  iconComponent: _ui.IconShare16,
82
96
  tooltipContent: _d2I18n.default.t('Share'),
@@ -111,6 +125,7 @@ Interpretation.propTypes = {
111
125
  onDeleted: _propTypes.default.func.isRequired,
112
126
  onReplyIconClick: _propTypes.default.func.isRequired,
113
127
  onUpdated: _propTypes.default.func.isRequired,
128
+ dashboardRedirectUrl: _propTypes.default.string,
114
129
  disabled: _propTypes.default.bool,
115
130
  isInThread: _propTypes.default.bool,
116
131
  onClick: _propTypes.default.func
@@ -22,6 +22,7 @@ var _exportNames = {
22
22
  AboutAOUnit: true,
23
23
  InterpretationsUnit: true,
24
24
  InterpretationModal: true,
25
+ InterpretationThread: true,
25
26
  TranslationDialog: true,
26
27
  OfflineTooltip: true,
27
28
  CachedDataQueryProvider: true,
@@ -293,13 +294,13 @@ Object.defineProperty(exports, "Analytics", {
293
294
  Object.defineProperty(exports, "BIMONTHLY", {
294
295
  enumerable: true,
295
296
  get: function () {
296
- return _index9.BIMONTHLY;
297
+ return _index11.BIMONTHLY;
297
298
  }
298
299
  });
299
300
  Object.defineProperty(exports, "BIWEEKLY", {
300
301
  enumerable: true,
301
302
  get: function () {
302
- return _index9.BIWEEKLY;
303
+ return _index11.BIWEEKLY;
303
304
  }
304
305
  });
305
306
  Object.defineProperty(exports, "COLOR_SET_BASIC", {
@@ -359,7 +360,7 @@ Object.defineProperty(exports, "CachedDataQueryProvider", {
359
360
  Object.defineProperty(exports, "DAILY", {
360
361
  enumerable: true,
361
362
  get: function () {
362
- return _index9.DAILY;
363
+ return _index11.DAILY;
363
364
  }
364
365
  });
365
366
  Object.defineProperty(exports, "DEFAULT_AXIS_IDS", {
@@ -563,7 +564,7 @@ Object.defineProperty(exports, "DynamicDimension", {
563
564
  Object.defineProperty(exports, "FINANCIAL", {
564
565
  enumerable: true,
565
566
  get: function () {
566
- return _index9.FINANCIAL;
567
+ return _index11.FINANCIAL;
567
568
  }
568
569
  });
569
570
  Object.defineProperty(exports, "FONT_STYLE_AXIS_LABELS", {
@@ -653,25 +654,25 @@ Object.defineProperty(exports, "FONT_STYLE_VISUALIZATION_TITLE", {
653
654
  Object.defineProperty(exports, "FYAPR", {
654
655
  enumerable: true,
655
656
  get: function () {
656
- return _index9.FYAPR;
657
+ return _index11.FYAPR;
657
658
  }
658
659
  });
659
660
  Object.defineProperty(exports, "FYJUL", {
660
661
  enumerable: true,
661
662
  get: function () {
662
- return _index9.FYJUL;
663
+ return _index11.FYJUL;
663
664
  }
664
665
  });
665
666
  Object.defineProperty(exports, "FYNOV", {
666
667
  enumerable: true,
667
668
  get: function () {
668
- return _index9.FYNOV;
669
+ return _index11.FYNOV;
669
670
  }
670
671
  });
671
672
  Object.defineProperty(exports, "FYOCT", {
672
673
  enumerable: true,
673
674
  get: function () {
674
- return _index9.FYOCT;
675
+ return _index11.FYOCT;
675
676
  }
676
677
  });
677
678
  Object.defineProperty(exports, "FileMenu", {
@@ -707,13 +708,19 @@ Object.defineProperty(exports, "ITEM_PROP_ID", {
707
708
  Object.defineProperty(exports, "InterpretationModal", {
708
709
  enumerable: true,
709
710
  get: function () {
710
- return _InterpretationModal.InterpretationModal;
711
+ return _index3.InterpretationModal;
712
+ }
713
+ });
714
+ Object.defineProperty(exports, "InterpretationThread", {
715
+ enumerable: true,
716
+ get: function () {
717
+ return _index3.InterpretationThread;
711
718
  }
712
719
  });
713
720
  Object.defineProperty(exports, "InterpretationsUnit", {
714
721
  enumerable: true,
715
722
  get: function () {
716
- return _InterpretationsUnit.InterpretationsUnit;
723
+ return _index2.InterpretationsUnit;
717
724
  }
718
725
  });
719
726
  Object.defineProperty(exports, "LAYOUT", {
@@ -797,7 +804,7 @@ Object.defineProperty(exports, "LegendKey", {
797
804
  Object.defineProperty(exports, "MONTHLY", {
798
805
  enumerable: true,
799
806
  get: function () {
800
- return _index9.MONTHLY;
807
+ return _index11.MONTHLY;
801
808
  }
802
809
  });
803
810
  Object.defineProperty(exports, "OfflineTooltip", {
@@ -827,19 +834,19 @@ Object.defineProperty(exports, "PivotTable", {
827
834
  Object.defineProperty(exports, "QUARTERLY", {
828
835
  enumerable: true,
829
836
  get: function () {
830
- return _index9.QUARTERLY;
837
+ return _index11.QUARTERLY;
831
838
  }
832
839
  });
833
840
  Object.defineProperty(exports, "SIXMONTHLY", {
834
841
  enumerable: true,
835
842
  get: function () {
836
- return _index9.SIXMONTHLY;
843
+ return _index11.SIXMONTHLY;
837
844
  }
838
845
  });
839
846
  Object.defineProperty(exports, "SIXMONTHLYAPR", {
840
847
  enumerable: true,
841
848
  get: function () {
842
- return _index9.SIXMONTHLYAPR;
849
+ return _index11.SIXMONTHLYAPR;
843
850
  }
844
851
  });
845
852
  Object.defineProperty(exports, "TEXT_ALIGN_CENTER", {
@@ -863,25 +870,25 @@ Object.defineProperty(exports, "TEXT_ALIGN_RIGHT", {
863
870
  Object.defineProperty(exports, "TranslationDialog", {
864
871
  enumerable: true,
865
872
  get: function () {
866
- return _index3.TranslationDialog;
873
+ return _index5.TranslationDialog;
867
874
  }
868
875
  });
869
876
  Object.defineProperty(exports, "USER_ORG_UNIT", {
870
877
  enumerable: true,
871
878
  get: function () {
872
- return _index4.USER_ORG_UNIT;
879
+ return _index6.USER_ORG_UNIT;
873
880
  }
874
881
  });
875
882
  Object.defineProperty(exports, "USER_ORG_UNIT_CHILDREN", {
876
883
  enumerable: true,
877
884
  get: function () {
878
- return _index4.USER_ORG_UNIT_CHILDREN;
885
+ return _index6.USER_ORG_UNIT_CHILDREN;
879
886
  }
880
887
  });
881
888
  Object.defineProperty(exports, "USER_ORG_UNIT_GRANDCHILDREN", {
882
889
  enumerable: true,
883
890
  get: function () {
884
- return _index4.USER_ORG_UNIT_GRANDCHILDREN;
891
+ return _index6.USER_ORG_UNIT_GRANDCHILDREN;
885
892
  }
886
893
  });
887
894
  Object.defineProperty(exports, "VALUE_TYPE_AGE", {
@@ -1139,43 +1146,43 @@ Object.defineProperty(exports, "VisualizationOptions", {
1139
1146
  Object.defineProperty(exports, "WEEKLY", {
1140
1147
  enumerable: true,
1141
1148
  get: function () {
1142
- return _index9.WEEKLY;
1149
+ return _index11.WEEKLY;
1143
1150
  }
1144
1151
  });
1145
1152
  Object.defineProperty(exports, "WEEKLYSAT", {
1146
1153
  enumerable: true,
1147
1154
  get: function () {
1148
- return _index9.WEEKLYSAT;
1155
+ return _index11.WEEKLYSAT;
1149
1156
  }
1150
1157
  });
1151
1158
  Object.defineProperty(exports, "WEEKLYSUN", {
1152
1159
  enumerable: true,
1153
1160
  get: function () {
1154
- return _index9.WEEKLYSUN;
1161
+ return _index11.WEEKLYSUN;
1155
1162
  }
1156
1163
  });
1157
1164
  Object.defineProperty(exports, "WEEKLYTHU", {
1158
1165
  enumerable: true,
1159
1166
  get: function () {
1160
- return _index9.WEEKLYTHU;
1167
+ return _index11.WEEKLYTHU;
1161
1168
  }
1162
1169
  });
1163
1170
  Object.defineProperty(exports, "WEEKLYWED", {
1164
1171
  enumerable: true,
1165
1172
  get: function () {
1166
- return _index9.WEEKLYWED;
1173
+ return _index11.WEEKLYWED;
1167
1174
  }
1168
1175
  });
1169
1176
  Object.defineProperty(exports, "WEEKS_THIS_YEAR", {
1170
1177
  enumerable: true,
1171
1178
  get: function () {
1172
- return _index9.WEEKS_THIS_YEAR;
1179
+ return _index11.WEEKS_THIS_YEAR;
1173
1180
  }
1174
1181
  });
1175
1182
  Object.defineProperty(exports, "YEARLY", {
1176
1183
  enumerable: true,
1177
1184
  get: function () {
1178
- return _index9.YEARLY;
1185
+ return _index11.YEARLY;
1179
1186
  }
1180
1187
  });
1181
1188
  Object.defineProperty(exports, "apiFetchDimensions", {
@@ -1265,7 +1272,7 @@ Object.defineProperty(exports, "axisIsEmpty", {
1265
1272
  Object.defineProperty(exports, "canDimensionBeAddedToAxis", {
1266
1273
  enumerable: true,
1267
1274
  get: function () {
1268
- return _index7.canDimensionBeAddedToAxis;
1275
+ return _index9.canDimensionBeAddedToAxis;
1269
1276
  }
1270
1277
  });
1271
1278
  Object.defineProperty(exports, "colorSets", {
@@ -1277,13 +1284,13 @@ Object.defineProperty(exports, "colorSets", {
1277
1284
  Object.defineProperty(exports, "convertOuLevelsToUids", {
1278
1285
  enumerable: true,
1279
1286
  get: function () {
1280
- return _index5.convertOuLevelsToUids;
1287
+ return _index7.convertOuLevelsToUids;
1281
1288
  }
1282
1289
  });
1283
1290
  Object.defineProperty(exports, "createVisualization", {
1284
1291
  enumerable: true,
1285
1292
  get: function () {
1286
- return _index8.createVisualization;
1293
+ return _index10.createVisualization;
1287
1294
  }
1288
1295
  });
1289
1296
  Object.defineProperty(exports, "defaultFontStyle", {
@@ -1367,31 +1374,31 @@ Object.defineProperty(exports, "getAdaptedUiLayoutByType", {
1367
1374
  Object.defineProperty(exports, "getAllLockedDimensionIds", {
1368
1375
  enumerable: true,
1369
1376
  get: function () {
1370
- return _index7.getAllLockedDimensionIds;
1377
+ return _index9.getAllLockedDimensionIds;
1371
1378
  }
1372
1379
  });
1373
1380
  Object.defineProperty(exports, "getAvailableAxes", {
1374
1381
  enumerable: true,
1375
1382
  get: function () {
1376
- return _index7.getAvailableAxes;
1383
+ return _index9.getAvailableAxes;
1377
1384
  }
1378
1385
  });
1379
1386
  Object.defineProperty(exports, "getAxisMaxNumberOfDimensions", {
1380
1387
  enumerable: true,
1381
1388
  get: function () {
1382
- return _index7.getAxisMaxNumberOfDimensions;
1389
+ return _index9.getAxisMaxNumberOfDimensions;
1383
1390
  }
1384
1391
  });
1385
1392
  Object.defineProperty(exports, "getAxisMaxNumberOfItems", {
1386
1393
  enumerable: true,
1387
1394
  get: function () {
1388
- return _index7.getAxisMaxNumberOfItems;
1395
+ return _index9.getAxisMaxNumberOfItems;
1389
1396
  }
1390
1397
  });
1391
1398
  Object.defineProperty(exports, "getAxisMinNumberOfDimensions", {
1392
1399
  enumerable: true,
1393
1400
  get: function () {
1394
- return _index7.getAxisMinNumberOfDimensions;
1401
+ return _index9.getAxisMinNumberOfDimensions;
1395
1402
  }
1396
1403
  });
1397
1404
  Object.defineProperty(exports, "getAxisName", {
@@ -1409,7 +1416,7 @@ Object.defineProperty(exports, "getAxisNameByLayoutType", {
1409
1416
  Object.defineProperty(exports, "getAxisPerLockedDimension", {
1410
1417
  enumerable: true,
1411
1418
  get: function () {
1412
- return _index7.getAxisPerLockedDimension;
1419
+ return _index9.getAxisPerLockedDimension;
1413
1420
  }
1414
1421
  });
1415
1422
  Object.defineProperty(exports, "getColorByValueFromLegendSet", {
@@ -1427,7 +1434,7 @@ Object.defineProperty(exports, "getDimensionById", {
1427
1434
  Object.defineProperty(exports, "getDisallowedDimensions", {
1428
1435
  enumerable: true,
1429
1436
  get: function () {
1430
- return _index7.getDisallowedDimensions;
1437
+ return _index9.getDisallowedDimensions;
1431
1438
  }
1432
1439
  });
1433
1440
  Object.defineProperty(exports, "getDisplayNameByVisType", {
@@ -1493,13 +1500,13 @@ Object.defineProperty(exports, "getTextAlignOptions", {
1493
1500
  Object.defineProperty(exports, "getTransferableDimension", {
1494
1501
  enumerable: true,
1495
1502
  get: function () {
1496
- return _index7.getTransferableDimension;
1503
+ return _index9.getTransferableDimension;
1497
1504
  }
1498
1505
  });
1499
1506
  Object.defineProperty(exports, "hasAxisTooManyItems", {
1500
1507
  enumerable: true,
1501
1508
  get: function () {
1502
- return _index7.hasAxisTooManyItems;
1509
+ return _index9.hasAxisTooManyItems;
1503
1510
  }
1504
1511
  });
1505
1512
  Object.defineProperty(exports, "hasCustomAxes", {
@@ -1511,13 +1518,13 @@ Object.defineProperty(exports, "hasCustomAxes", {
1511
1518
  Object.defineProperty(exports, "hasRelativeItems", {
1512
1519
  enumerable: true,
1513
1520
  get: function () {
1514
- return _index6.hasRelativeItems;
1521
+ return _index8.hasRelativeItems;
1515
1522
  }
1516
1523
  });
1517
1524
  Object.defineProperty(exports, "isAxisFull", {
1518
1525
  enumerable: true,
1519
1526
  get: function () {
1520
- return _index7.isAxisFull;
1527
+ return _index9.isAxisFull;
1521
1528
  }
1522
1529
  });
1523
1530
  Object.defineProperty(exports, "isColumnBasedType", {
@@ -1529,7 +1536,7 @@ Object.defineProperty(exports, "isColumnBasedType", {
1529
1536
  Object.defineProperty(exports, "isDimensionLocked", {
1530
1537
  enumerable: true,
1531
1538
  get: function () {
1532
- return _index7.isDimensionLocked;
1539
+ return _index9.isDimensionLocked;
1533
1540
  }
1534
1541
  });
1535
1542
  Object.defineProperty(exports, "isDualAxisType", {
@@ -1679,7 +1686,7 @@ Object.defineProperty(exports, "layoutReplaceDimension", {
1679
1686
  Object.defineProperty(exports, "ouIdHelper", {
1680
1687
  enumerable: true,
1681
1688
  get: function () {
1682
- return _index4.ouIdHelper;
1689
+ return _index6.ouIdHelper;
1683
1690
  }
1684
1691
  });
1685
1692
  Object.defineProperty(exports, "preparePayloadForSaveAs", {
@@ -1722,21 +1729,21 @@ var _utils = require("./components/FileMenu/utils.js");
1722
1729
  var _VisTypeIcon = _interopRequireDefault(require("./components/VisTypeIcon.js"));
1723
1730
  var _LegendKey = _interopRequireDefault(require("./components/LegendKey/LegendKey.js"));
1724
1731
  var _AboutAOUnit = _interopRequireDefault(require("./components/AboutAOUnit/AboutAOUnit.js"));
1725
- var _InterpretationsUnit = require("./components/Interpretations/InterpretationsUnit/InterpretationsUnit.js");
1726
- var _InterpretationModal = require("./components/Interpretations/InterpretationModal/InterpretationModal.js");
1727
- var _index2 = require("./components/Toolbar/index.js");
1728
- Object.keys(_index2).forEach(function (key) {
1732
+ var _index2 = require("./components/Interpretations/InterpretationsUnit/index.js");
1733
+ var _index3 = require("./components/Interpretations/InterpretationModal/index.js");
1734
+ var _index4 = require("./components/Toolbar/index.js");
1735
+ Object.keys(_index4).forEach(function (key) {
1729
1736
  if (key === "default" || key === "__esModule") return;
1730
1737
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
1731
- if (key in exports && exports[key] === _index2[key]) return;
1738
+ if (key in exports && exports[key] === _index4[key]) return;
1732
1739
  Object.defineProperty(exports, key, {
1733
1740
  enumerable: true,
1734
1741
  get: function () {
1735
- return _index2[key];
1742
+ return _index4[key];
1736
1743
  }
1737
1744
  });
1738
1745
  });
1739
- var _index3 = require("./components/TranslationDialog/index.js");
1746
+ var _index5 = require("./components/TranslationDialog/index.js");
1740
1747
  var _OfflineTooltip = require("./components/OfflineTooltip.js");
1741
1748
  var _CachedDataQueryProvider = require("./components/CachedDataQueryProvider.js");
1742
1749
  var _Analytics = _interopRequireDefault(require("./api/analytics/Analytics.js"));
@@ -1744,10 +1751,10 @@ var _dimensions = require("./api/dimensions.js");
1744
1751
  var _organisationUnits = require("./api/organisationUnits.js");
1745
1752
  var _axis = require("./modules/axis.js");
1746
1753
  var _predefinedDimensions = require("./modules/predefinedDimensions.js");
1747
- var _index4 = require("./modules/ouIdHelper/index.js");
1748
- var _index5 = require("./modules/ouLevelUtils/index.js");
1754
+ var _index6 = require("./modules/ouIdHelper/index.js");
1755
+ var _index7 = require("./modules/ouLevelUtils/index.js");
1749
1756
  var _getAdaptedUiLayoutByType = require("./modules/getAdaptedUiLayoutByType.js");
1750
- var _index6 = require("./modules/relativeItems/index.js");
1757
+ var _index8 = require("./modules/relativeItems/index.js");
1751
1758
  var _layout = require("./modules/layout/layout.js");
1752
1759
  var _layoutFilterDimensions = require("./modules/layout/layoutFilterDimensions.js");
1753
1760
  var _layoutGetAllAxes = require("./modules/layout/layoutGetAllAxes.js");
@@ -1787,13 +1794,13 @@ var _itemIsValid = require("./modules/layout/itemIsValid.js");
1787
1794
  var _visTypeToLayoutType = require("./modules/visTypeToLayoutType.js");
1788
1795
  var _visTypes = require("./modules/visTypes.js");
1789
1796
  var _layoutTypes = require("./modules/layoutTypes.js");
1790
- var _index7 = require("./modules/layoutUiRules/index.js");
1791
- var _index8 = require("./visualizations/index.js");
1797
+ var _index9 = require("./modules/layoutUiRules/index.js");
1798
+ var _index10 = require("./visualizations/index.js");
1792
1799
  var _fontStyle = require("./modules/fontStyle.js");
1793
1800
  var _legends = require("./modules/legends.js");
1794
1801
  var _renderValue = require("./modules/renderValue.js");
1795
1802
  var _colorSets = require("./visualizations/util/colors/colorSets.js");
1796
- var _index9 = require("./components/PeriodDimension/utils/index.js");
1803
+ var _index11 = require("./components/PeriodDimension/utils/index.js");
1797
1804
  var _relativePeriods = require("./components/PeriodDimension/utils/relativePeriods.js");
1798
1805
  var _fixedPeriods = require("./components/PeriodDimension/utils/fixedPeriods.js");
1799
1806
  var _VisualizationOptions = _interopRequireDefault(require("./components/Options/VisualizationOptions.js"));
@@ -125,8 +125,9 @@
125
125
  "View replies": "View replies",
126
126
  "Unlike": "Unlike",
127
127
  "Like": "Like",
128
- "Share": "Share",
129
128
  "See interpretation": "See interpretation",
129
+ "Open in app": "Open in app",
130
+ "Share": "Share",
130
131
  "Manage sharing": "Manage sharing",
131
132
  "Could not update interpretation": "Could not update interpretation",
132
133
  "Enter interpretation text": "Enter interpretation text",
@@ -16,7 +16,8 @@ const InterpretationThread = _ref => {
16
16
  onInterpretationDeleted,
17
17
  initialFocus,
18
18
  onThreadUpdated,
19
- downloadMenuComponent: DownloadMenu
19
+ downloadMenuComponent: DownloadMenu,
20
+ dashboardRedirectUrl
20
21
  } = _ref;
21
22
  const {
22
23
  fromServerDate
@@ -31,18 +32,19 @@ const InterpretationThread = _ref => {
31
32
  }, [initialFocus]);
32
33
  const interpretationAccess = getInterpretationAccess(interpretation, currentUser);
33
34
  return /*#__PURE__*/React.createElement("div", {
34
- className: "jsx-1846557365" + " " + (cx('container', {
35
- fetching
35
+ className: "jsx-3292109121" + " " + (cx('container', {
36
+ fetching,
37
+ dashboard: !!dashboardRedirectUrl
36
38
  }) || "")
37
39
  }, /*#__PURE__*/React.createElement("div", {
38
- className: "jsx-1846557365" + " " + 'title'
40
+ className: "jsx-3292109121" + " " + 'title'
39
41
  }, /*#__PURE__*/React.createElement(IconClock16, {
40
42
  color: colors.grey700
41
43
  }), moment(fromServerDate(interpretation.created)).format('LLL')), DownloadMenu && /*#__PURE__*/React.createElement(DownloadMenu, {
42
44
  relativePeriodDate: interpretation.created,
43
- className: "jsx-1846557365"
45
+ className: "jsx-3292109121"
44
46
  }), /*#__PURE__*/React.createElement("div", {
45
- className: "jsx-1846557365" + " " + 'thread'
47
+ className: "jsx-3292109121" + " " + 'thread'
46
48
  }, /*#__PURE__*/React.createElement(Interpretation, {
47
49
  currentUser: currentUser,
48
50
  interpretation: interpretation,
@@ -52,9 +54,10 @@ const InterpretationThread = _ref => {
52
54
  } : null,
53
55
  onUpdated: () => onThreadUpdated(true),
54
56
  onDeleted: onInterpretationDeleted,
57
+ dashboardRedirectUrl: dashboardRedirectUrl,
55
58
  isInThread: true
56
59
  }), /*#__PURE__*/React.createElement("div", {
57
- className: "jsx-1846557365" + " " + 'comments'
60
+ className: "jsx-3292109121" + " " + 'comments'
58
61
  }, interpretation.comments.map(comment => /*#__PURE__*/React.createElement(Comment, {
59
62
  key: comment.id,
60
63
  comment: comment,
@@ -68,14 +71,15 @@ const InterpretationThread = _ref => {
68
71
  onSave: () => onThreadUpdated(true),
69
72
  focusRef: focusRef
70
73
  }), /*#__PURE__*/React.createElement(_JSXStyle, {
71
- id: "1846557365"
72
- }, [".thread.jsx-1846557365{margin-top:var(--spacers-dp16);overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".container.jsx-1846557365{position:relative;overflow:auto;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-1846557365::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-1846557365::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-1846557365;animation:1s linear 0s infinite normal none running rotation-jsx-1846557365;}", ".title.jsx-1846557365{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-1846557365{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-1846557365{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-1846557365{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
74
+ id: "3292109121"
75
+ }, [".thread.jsx-3292109121{margin-top:var(--spacers-dp16);overflow-y:auto;-webkit-scroll-behavior:smooth;-moz-scroll-behavior:smooth;-ms-scroll-behavior:smooth;scroll-behavior:smooth;}", ".dashboard.jsx-3292109121 .thread.jsx-3292109121{overflow-y:hidden;}", ".container.jsx-3292109121{position:relative;overflow:auto;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.dashboard.jsx-3292109121{max-height:none;}", ".container.fetching.jsx-3292109121::before{content:'';position:absolute;inset:0px;background-color:rgba(255,255,255,0.8);}", ".container.fetching.jsx-3292109121::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-3292109121;animation:1s linear 0s infinite normal none running rotation-jsx-3292109121;}", ".title.jsx-3292109121{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-3292109121{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-3292109121{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-3292109121{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
73
76
  };
74
77
  InterpretationThread.propTypes = {
75
78
  currentUser: PropTypes.object.isRequired,
76
79
  fetching: PropTypes.bool.isRequired,
77
80
  interpretation: PropTypes.object.isRequired,
78
81
  onInterpretationDeleted: PropTypes.func.isRequired,
82
+ dashboardRedirectUrl: PropTypes.string,
79
83
  downloadMenuComponent: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
80
84
  initialFocus: PropTypes.bool,
81
85
  onThreadUpdated: PropTypes.func
@@ -1 +1,2 @@
1
- export { InterpretationModal } from './InterpretationModal.js';
1
+ export { InterpretationModal } from './InterpretationModal.js';
2
+ export { InterpretationThread } from './InterpretationThread.js';
@@ -23,7 +23,8 @@ export const InterpretationList = _ref => {
23
23
  onInterpretationClick,
24
24
  onReplyIconClick,
25
25
  refresh,
26
- disabled
26
+ disabled,
27
+ dashboardRedirectUrl
27
28
  } = _ref;
28
29
  const {
29
30
  fromServerDate
@@ -60,7 +61,8 @@ export const InterpretationList = _ref => {
60
61
  onReplyIconClick: onReplyIconClick,
61
62
  onDeleted: refresh,
62
63
  onUpdated: refresh,
63
- disabled: disabled
64
+ disabled: disabled,
65
+ dashboardRedirectUrl: dashboardRedirectUrl
64
66
  }))))), /*#__PURE__*/React.createElement(_JSXStyle, {
65
67
  id: "4058400613",
66
68
  dynamic: [spacers.dp8, spacers.dp8, spacers.dp16, colors.grey800, spacers.dp12, spacers.dp12, spacers.dp32, spacers.dp4]
@@ -72,5 +74,6 @@ InterpretationList.propTypes = {
72
74
  refresh: PropTypes.func.isRequired,
73
75
  onInterpretationClick: PropTypes.func.isRequired,
74
76
  onReplyIconClick: PropTypes.func.isRequired,
77
+ dashboardRedirectUrl: PropTypes.string,
75
78
  disabled: PropTypes.bool
76
79
  };
@@ -31,7 +31,8 @@ export const InterpretationsUnit = /*#__PURE__*/forwardRef((_ref2, ref) => {
31
31
  onInterpretationClick,
32
32
  onReplyIconClick,
33
33
  disabled,
34
- renderId
34
+ renderId,
35
+ dashboardRedirectUrl
35
36
  } = _ref2;
36
37
  const [isExpanded, setIsExpanded] = useState(true);
37
38
  const showNoTimeDimensionHelpText = type === 'eventVisualization' && !visualizationHasTimeDimension;
@@ -94,7 +95,8 @@ export const InterpretationsUnit = /*#__PURE__*/forwardRef((_ref2, ref) => {
94
95
  onInterpretationClick: onInterpretationClick,
95
96
  onReplyIconClick: onReplyIconClick,
96
97
  refresh: onCompleteAction,
97
- disabled: disabled
98
+ disabled: disabled,
99
+ dashboardRedirectUrl: dashboardRedirectUrl
98
100
  }))), /*#__PURE__*/React.createElement(_JSXStyle, {
99
101
  id: "4120713286",
100
102
  dynamic: [spacers.dp16, colors.grey400, colors.white, spacers.dp32, colors.grey900]
@@ -109,6 +111,7 @@ InterpretationsUnit.propTypes = {
109
111
  currentUser: PropTypes.object.isRequired,
110
112
  id: PropTypes.string.isRequired,
111
113
  type: PropTypes.string.isRequired,
114
+ dashboardRedirectUrl: PropTypes.string,
112
115
  disabled: PropTypes.bool,
113
116
  renderId: PropTypes.number,
114
117
  visualizationHasTimeDimension: PropTypes.bool,
@@ -1,5 +1,5 @@
1
1
  import i18n from '@dhis2/d2-i18n';
2
- import { Button, SharingDialog, IconReply16, IconShare16, IconThumbUp16, IconEdit16 } from '@dhis2/ui';
2
+ import { Button, SharingDialog, IconReply16, IconShare16, IconThumbUp16, IconEdit16, IconLaunch16, IconView16 } from '@dhis2/ui';
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { useState } from 'react';
5
5
  import { Message, MessageStatsBar, MessageIconButton, getInterpretationAccess } from '../index.js';
@@ -15,6 +15,7 @@ export const Interpretation = _ref => {
15
15
  onDeleted,
16
16
  disabled,
17
17
  onReplyIconClick,
18
+ dashboardRedirectUrl,
18
19
  isInThread
19
20
  } = _ref;
20
21
  const [isUpdateMode, setIsUpdateMode] = useState(false);
@@ -28,7 +29,7 @@ export const Interpretation = _ref => {
28
29
  currentUser,
29
30
  onComplete: onUpdated
30
31
  });
31
- const shouldShowButton = !!onClick && !disabled;
32
+ const shouldShowButton = Boolean(!!onClick && !disabled & !dashboardRedirectUrl);
32
33
  const interpretationAccess = getInterpretationAccess(interpretation, currentUser);
33
34
  let tooltip = i18n.t('Reply');
34
35
  if (!interpretationAccess.comment) {
@@ -42,6 +43,9 @@ export const Interpretation = _ref => {
42
43
  tooltip = i18n.t('View replies');
43
44
  }
44
45
  }
46
+
47
+ // Maps still uses old url style /?id= instead of hash
48
+ const getAppInterpretationUrl = () => dashboardRedirectUrl.includes('?') ? `${dashboardRedirectUrl}&interpretationId=${interpretation.id}` : `${dashboardRedirectUrl}?interpretationId=${interpretation.id}`;
45
49
  return isUpdateMode ? /*#__PURE__*/React.createElement(InterpretationUpdateForm, {
46
50
  close: () => setIsUpdateMode(false),
47
51
  id: interpretation.id,
@@ -68,6 +72,16 @@ export const Interpretation = _ref => {
68
72
  count: interpretation.comments.length,
69
73
  dataTest: "interpretation-reply-button",
70
74
  viewOnly: isInThread && !interpretationAccess.comment
75
+ }), dashboardRedirectUrl && !isInThread && /*#__PURE__*/React.createElement(MessageIconButton, {
76
+ tooltipContent: i18n.t('See interpretation'),
77
+ iconComponent: IconView16,
78
+ onClick: () => onClick(interpretation.id),
79
+ dataTest: "interpretation-view-button"
80
+ }), dashboardRedirectUrl && /*#__PURE__*/React.createElement(MessageIconButton, {
81
+ tooltipContent: i18n.t('Open in app'),
82
+ iconComponent: IconLaunch16,
83
+ onClick: () => window.open(getAppInterpretationUrl(), '_blank'),
84
+ dataTest: "interpretation-launch-in-app-button"
71
85
  }), interpretationAccess.share && /*#__PURE__*/React.createElement(MessageIconButton, {
72
86
  iconComponent: IconShare16,
73
87
  tooltipContent: i18n.t('Share'),
@@ -101,6 +115,7 @@ Interpretation.propTypes = {
101
115
  onDeleted: PropTypes.func.isRequired,
102
116
  onReplyIconClick: PropTypes.func.isRequired,
103
117
  onUpdated: PropTypes.func.isRequired,
118
+ dashboardRedirectUrl: PropTypes.string,
104
119
  disabled: PropTypes.bool,
105
120
  isInThread: PropTypes.bool,
106
121
  onClick: PropTypes.func
package/build/es/index.js CHANGED
@@ -16,8 +16,8 @@ export { preparePayloadForSaveAs } from './components/FileMenu/utils.js';
16
16
  export { default as VisTypeIcon } from './components/VisTypeIcon.js';
17
17
  export { default as LegendKey } from './components/LegendKey/LegendKey.js';
18
18
  export { default as AboutAOUnit } from './components/AboutAOUnit/AboutAOUnit.js';
19
- export { InterpretationsUnit } from './components/Interpretations/InterpretationsUnit/InterpretationsUnit.js';
20
- export { InterpretationModal } from './components/Interpretations/InterpretationModal/InterpretationModal.js';
19
+ export { InterpretationsUnit } from './components/Interpretations/InterpretationsUnit/index.js';
20
+ export { InterpretationModal, InterpretationThread } from './components/Interpretations/InterpretationModal/index.js';
21
21
  export * from './components/Toolbar/index.js';
22
22
  export { TranslationDialog } from './components/TranslationDialog/index.js';
23
23
  export { OfflineTooltip } from './components/OfflineTooltip.js';
@@ -125,8 +125,9 @@
125
125
  "View replies": "View replies",
126
126
  "Unlike": "Unlike",
127
127
  "Like": "Like",
128
- "Share": "Share",
129
128
  "See interpretation": "See interpretation",
129
+ "Open in app": "Open in app",
130
+ "Share": "Share",
130
131
  "Manage sharing": "Manage sharing",
131
132
  "Could not update interpretation": "Could not update interpretation",
132
133
  "Enter interpretation text": "Enter interpretation text",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "26.3.1",
3
+ "version": "26.4.0",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {