@dhis2/analytics 24.3.1 → 24.3.3

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,17 @@
1
+ ## [24.3.3](https://github.com/dhis2/analytics/compare/v24.3.2...v24.3.3) (2022-11-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * require onSaveAs function to enable save as in file menu (DHIS2-14087) ([#1372](https://github.com/dhis2/analytics/issues/1372)) ([11c9dca](https://github.com/dhis2/analytics/commit/11c9dca19d8e605cec7f9fa40268e2d324506a93))
7
+
8
+ ## [24.3.2](https://github.com/dhis2/analytics/compare/v24.3.1...v24.3.2) (2022-11-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * pass required prop to plugin used in interpretation modal ([#1361](https://github.com/dhis2/analytics/issues/1361)) ([82d6c38](https://github.com/dhis2/analytics/commit/82d6c3877bbb3497ea22e3b01d2f1ac37ed67742))
14
+
1
15
  ## [24.3.1](https://github.com/dhis2/analytics/compare/v24.3.0...v24.3.1) (2022-10-28)
2
16
 
3
17
 
@@ -132,7 +132,7 @@ const FileMenu = _ref => {
132
132
  return /*#__PURE__*/_react.default.createElement(_SaveAsDialog.SaveAsDialog, {
133
133
  type: fileType,
134
134
  object: fileObject,
135
- onSaveAs: onSaveAs,
135
+ onSaveAs: onSaveAs || Function.prototype,
136
136
  onClose: onDialogClose
137
137
  });
138
138
 
@@ -208,9 +208,9 @@ const FileMenu = _ref => {
208
208
  }), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, {
209
209
  label: _index.default.t('Save as…'),
210
210
  icon: /*#__PURE__*/_react.default.createElement(_ui.IconSave24, {
211
- color: fileObject !== null && fileObject !== void 0 && fileObject.id ? iconActiveColor : iconInactiveColor
211
+ color: !(onSaveAs && fileObject !== null && fileObject !== void 0 && fileObject.id) ? iconInactiveColor : iconActiveColor
212
212
  }),
213
- disabled: !(fileObject !== null && fileObject !== void 0 && fileObject.id),
213
+ disabled: !(onSaveAs && fileObject !== null && fileObject !== void 0 && fileObject.id),
214
214
  onClick: onMenuItemClick('saveas'),
215
215
  dataTest: "file-menu-saveas"
216
216
  }), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, {
@@ -264,7 +264,6 @@ FileMenu.defaultProps = {
264
264
  onNew: Function.prototype,
265
265
  onOpen: Function.prototype,
266
266
  onRename: Function.prototype,
267
- onSaveAs: Function.prototype,
268
267
  onShare: Function.prototype,
269
268
  onTranslate: Function.prototype
270
269
  };
@@ -62,6 +62,8 @@ const query = {
62
62
  };
63
63
 
64
64
  const InterpretationModal = _ref2 => {
65
+ var _currentUser$settings;
66
+
65
67
  let {
66
68
  currentUser,
67
69
  isVisualizationLoading,
@@ -153,6 +155,7 @@ const InterpretationModal = _ref2 => {
153
155
  },
154
156
  visualization: visualization,
155
157
  onResponsesReceived: onResponsesReceived,
158
+ displayProperty: (_currentUser$settings = currentUser.settings) === null || _currentUser$settings === void 0 ? void 0 : _currentUser$settings.keyAnalysisDisplayProperty,
156
159
  className: _style.default.dynamic([["3175860552", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]])
157
160
  })), /*#__PURE__*/_react.default.createElement("div", {
158
161
  className: _style.default.dynamic([["3175860552", [_ui.colors.grey900, _ui.spacers.dp24, _ui.spacers.dp4, _ui.spacers.dp4]]]) + " " + "thread-wrap"
@@ -106,7 +106,7 @@ export const FileMenu = _ref => {
106
106
  return /*#__PURE__*/React.createElement(SaveAsDialog, {
107
107
  type: fileType,
108
108
  object: fileObject,
109
- onSaveAs: onSaveAs,
109
+ onSaveAs: onSaveAs || Function.prototype,
110
110
  onClose: onDialogClose
111
111
  });
112
112
 
@@ -182,9 +182,9 @@ export const FileMenu = _ref => {
182
182
  }), /*#__PURE__*/React.createElement(MenuItem, {
183
183
  label: i18n.t('Save as…'),
184
184
  icon: /*#__PURE__*/React.createElement(IconSave24, {
185
- color: fileObject !== null && fileObject !== void 0 && fileObject.id ? iconActiveColor : iconInactiveColor
185
+ color: !(onSaveAs && fileObject !== null && fileObject !== void 0 && fileObject.id) ? iconInactiveColor : iconActiveColor
186
186
  }),
187
- disabled: !(fileObject !== null && fileObject !== void 0 && fileObject.id),
187
+ disabled: !(onSaveAs && fileObject !== null && fileObject !== void 0 && fileObject.id),
188
188
  onClick: onMenuItemClick('saveas'),
189
189
  dataTest: "file-menu-saveas"
190
190
  }), /*#__PURE__*/React.createElement(MenuItem, {
@@ -236,7 +236,6 @@ FileMenu.defaultProps = {
236
236
  onNew: Function.prototype,
237
237
  onOpen: Function.prototype,
238
238
  onRename: Function.prototype,
239
- onSaveAs: Function.prototype,
240
239
  onShare: Function.prototype,
241
240
  onTranslate: Function.prototype
242
241
  };
@@ -40,6 +40,8 @@ const query = {
40
40
  };
41
41
 
42
42
  const InterpretationModal = _ref2 => {
43
+ var _currentUser$settings;
44
+
43
45
  let {
44
46
  currentUser,
45
47
  isVisualizationLoading,
@@ -131,6 +133,7 @@ const InterpretationModal = _ref2 => {
131
133
  },
132
134
  visualization: visualization,
133
135
  onResponsesReceived: onResponsesReceived,
136
+ displayProperty: (_currentUser$settings = currentUser.settings) === null || _currentUser$settings === void 0 ? void 0 : _currentUser$settings.keyAnalysisDisplayProperty,
134
137
  className: _JSXStyle.dynamic([["3175860552", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]])
135
138
  })), /*#__PURE__*/React.createElement("div", {
136
139
  className: _JSXStyle.dynamic([["3175860552", [colors.grey900, spacers.dp24, spacers.dp4, spacers.dp4]]]) + " " + "thread-wrap"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.3.1",
3
+ "version": "24.3.3",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {