@dhis2/analytics 24.3.2 → 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,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [24.3.2](https://github.com/dhis2/analytics/compare/v24.3.1...v24.3.2) (2022-11-01)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -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 ?
|
|
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
|
};
|
|
@@ -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 ?
|
|
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
|
};
|