@dhis2/analytics 23.5.0 → 23.6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ # [23.6.0](https://github.com/dhis2/analytics/compare/v23.5.2...v23.6.0) (2022-03-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * disable Save button when onSave not passed (TECH-1013) ([#1167](https://github.com/dhis2/analytics/issues/1167)) ([fa87c8b](https://github.com/dhis2/analytics/commit/fa87c8b9ef3fe8e237e7d21423c81daf0ff6c817))
7
+
8
+ ## [23.5.2](https://github.com/dhis2/analytics/compare/v23.5.1...v23.5.2) (2022-02-28)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **translations:** sync translations from transifex (master) ([a4a1ecc](https://github.com/dhis2/analytics/commit/a4a1eccd9eb8a5ad317790d4899f6c769789fed5))
14
+
15
+ ## [23.5.1](https://github.com/dhis2/analytics/compare/v23.5.0...v23.5.1) (2022-02-22)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **translations:** sync translations from transifex (master) ([478c083](https://github.com/dhis2/analytics/commit/478c0839702cb144d2dc8c9e5f08499235aa87c4))
21
+
1
22
  # [23.5.0](https://github.com/dhis2/analytics/compare/v23.4.1...v23.5.0) (2022-02-21)
2
23
 
3
24
 
@@ -196,9 +196,9 @@ const FileMenu = ({
196
196
  }), /*#__PURE__*/_react.default.createElement(_ui.MenuItem, {
197
197
  label: fileObject !== null && fileObject !== void 0 && fileObject.id ? _index.default.t('Save') : _index.default.t('Save…'),
198
198
  icon: /*#__PURE__*/_react.default.createElement(_ui.IconSave24, {
199
- color: !(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access = fileObject.access) !== null && _fileObject$access !== void 0 && _fileObject$access.update ? iconActiveColor : iconInactiveColor
199
+ color: !onSave || !(!(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access = fileObject.access) !== null && _fileObject$access !== void 0 && _fileObject$access.update) ? iconInactiveColor : iconActiveColor
200
200
  }),
201
- disabled: !(!(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access2 = fileObject.access) !== null && _fileObject$access2 !== void 0 && _fileObject$access2.update),
201
+ disabled: !onSave || !(!(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access2 = fileObject.access) !== null && _fileObject$access2 !== void 0 && _fileObject$access2.update),
202
202
  onClick: fileObject !== null && fileObject !== void 0 && fileObject.id ? () => {
203
203
  toggleMenu();
204
204
  onSave();
@@ -263,7 +263,6 @@ FileMenu.defaultProps = {
263
263
  onNew: Function.prototype,
264
264
  onOpen: Function.prototype,
265
265
  onRename: Function.prototype,
266
- onSave: Function.prototype,
267
266
  onSaveAs: Function.prototype,
268
267
  onTranslate: Function.prototype
269
268
  };
@@ -85,7 +85,7 @@
85
85
  "Anyone": "Kdokoliv",
86
86
  "Only you": "Jen vy",
87
87
  "Others": "Ostatní",
88
- "Not supported by this app yet": "",
88
+ "Not supported by this app yet": "Tato aplikace zatím nepodporuje",
89
89
  "Filter by name": "Filtrovat podle názvu",
90
90
  "Created": "Vytvořeno",
91
91
  "Last updated": "Naposledy aktualizováno",
@@ -82,7 +82,7 @@
82
82
  "Anyone": "任何人",
83
83
  "Only you": "只有你",
84
84
  "Others": "其它",
85
- "Not supported by this app yet": "",
85
+ "Not supported by this app yet": "此应用尚不支持",
86
86
  "Filter by name": "按名称过滤",
87
87
  "Created": "已创建",
88
88
  "Last updated": "上次更新",
@@ -170,9 +170,9 @@ export const FileMenu = ({
170
170
  }), /*#__PURE__*/React.createElement(MenuItem, {
171
171
  label: fileObject !== null && fileObject !== void 0 && fileObject.id ? i18n.t('Save') : i18n.t('Save…'),
172
172
  icon: /*#__PURE__*/React.createElement(IconSave24, {
173
- color: !(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access = fileObject.access) !== null && _fileObject$access !== void 0 && _fileObject$access.update ? iconActiveColor : iconInactiveColor
173
+ color: !onSave || !(!(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access = fileObject.access) !== null && _fileObject$access !== void 0 && _fileObject$access.update) ? iconInactiveColor : iconActiveColor
174
174
  }),
175
- disabled: !(!(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access2 = fileObject.access) !== null && _fileObject$access2 !== void 0 && _fileObject$access2.update),
175
+ disabled: !onSave || !(!(fileObject !== null && fileObject !== void 0 && fileObject.id) || fileObject !== null && fileObject !== void 0 && (_fileObject$access2 = fileObject.access) !== null && _fileObject$access2 !== void 0 && _fileObject$access2.update),
176
176
  onClick: fileObject !== null && fileObject !== void 0 && fileObject.id ? () => {
177
177
  toggleMenu();
178
178
  onSave();
@@ -235,7 +235,6 @@ FileMenu.defaultProps = {
235
235
  onNew: Function.prototype,
236
236
  onOpen: Function.prototype,
237
237
  onRename: Function.prototype,
238
- onSave: Function.prototype,
239
238
  onSaveAs: Function.prototype,
240
239
  onTranslate: Function.prototype
241
240
  };
@@ -85,7 +85,7 @@
85
85
  "Anyone": "Kdokoliv",
86
86
  "Only you": "Jen vy",
87
87
  "Others": "Ostatní",
88
- "Not supported by this app yet": "",
88
+ "Not supported by this app yet": "Tato aplikace zatím nepodporuje",
89
89
  "Filter by name": "Filtrovat podle názvu",
90
90
  "Created": "Vytvořeno",
91
91
  "Last updated": "Naposledy aktualizováno",
@@ -82,7 +82,7 @@
82
82
  "Anyone": "任何人",
83
83
  "Only you": "只有你",
84
84
  "Others": "其它",
85
- "Not supported by this app yet": "",
85
+ "Not supported by this app yet": "此应用尚不支持",
86
86
  "Filter by name": "按名称过滤",
87
87
  "Created": "已创建",
88
88
  "Last updated": "上次更新",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "23.5.0",
3
+ "version": "23.6.0",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {