@dhis2/analytics 24.0.4 → 24.0.7

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
+ ## [24.0.7](https://github.com/dhis2/analytics/compare/v24.0.6...v24.0.7) (2022-08-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **translations:** sync translations from transifex (master) ([3246bf2](https://github.com/dhis2/analytics/commit/3246bf2b5eba3ea94b43fcd0dc6d6de4e7b60e46))
7
+
8
+ ## [24.0.6](https://github.com/dhis2/analytics/compare/v24.0.5...v24.0.6) (2022-08-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * change default value for Save as (DHIS2-13328) ([#1325](https://github.com/dhis2/analytics/issues/1325)) ([1957c51](https://github.com/dhis2/analytics/commit/1957c519a47998f3ae637836861a88dac0ec5110))
14
+
15
+ ## [24.0.5](https://github.com/dhis2/analytics/compare/v24.0.4...v24.0.5) (2022-08-26)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **translations:** sync translations from transifex (master) ([fd8b5e3](https://github.com/dhis2/analytics/commit/fd8b5e3fd9f055abca80d4ccd92993ef87294d8b))
21
+
1
22
  ## [24.0.4](https://github.com/dhis2/analytics/compare/v24.0.3...v24.0.4) (2022-08-25)
2
23
 
3
24
 
@@ -24,10 +24,10 @@ const visObject = {
24
24
  href: 'http://localhost:8080/api/32/visualizations/a8LrqsBQlHP',
25
25
  id: 'a8LrqsBQlHP',
26
26
  created: '2012-11-05T09:17:23.388',
27
- name: 'ANC: 1-3 dropout rate Yearly copy1',
27
+ name: 'ANC: 1-3 dropout rate Yearly',
28
28
  publicAccess: '--------',
29
29
  displayDescription: 'some _italic (10%)_ and some *bold (10%)*',
30
- displayName: 'ANC: 1-3 dropout rate Yearly copy1',
30
+ displayName: 'ANC: 1-3 dropout rate Yearly',
31
31
  description: 'some _italic (10%)_ and some *bold (10%)*',
32
32
  externalAccess: false,
33
33
  access: {
@@ -30,7 +30,9 @@ const SaveAsDialog = _ref => {
30
30
  onClose,
31
31
  onSaveAs
32
32
  } = _ref;
33
- const [name, setName] = (0, _react.useState)(object === null || object === void 0 ? void 0 : object.name);
33
+ const [name, setName] = (0, _react.useState)(object !== null && object !== void 0 && object.displayName || object !== null && object !== void 0 && object.name ? _index.default.t('{{objectName}} (copy)', {
34
+ objectName: object.name
35
+ }) : '');
34
36
  const [description, setDescription] = (0, _react.useState)(object === null || object === void 0 ? void 0 : object.description); // the actual API request is done in the app
35
37
 
36
38
  const saveObjectAs = () => {
@@ -83,6 +85,7 @@ exports.SaveAsDialog = SaveAsDialog;
83
85
  SaveAsDialog.propTypes = {
84
86
  object: _propTypes.default.shape({
85
87
  description: _propTypes.default.string,
88
+ displayName: _propTypes.default.string,
86
89
  name: _propTypes.default.string
87
90
  }),
88
91
  type: _propTypes.default.oneOf(_utils.supportedFileTypes),
@@ -44,7 +44,7 @@ describe('The FileMenu - SaveAsDialog component', () => {
44
44
  });
45
45
  it('renders a InputField for name with prefilled value from the object prop', () => {
46
46
  const nameInputField = getSaveAsDialogComponent(props).findWhere(n => n.prop('label') === 'Name');
47
- expect(nameInputField.prop('value')).toEqual(props.object.name);
47
+ expect(nameInputField.prop('value')).toEqual('Save as name test (copy)');
48
48
  });
49
49
  it('renders a TextAreaField for description with prefilled value from the object prop', () => {
50
50
  const descriptionInputField = getSaveAsDialogComponent(props).findWhere(n => n.prop('label') === 'Description');
@@ -53,7 +53,7 @@ describe('The FileMenu - SaveAsDialog component', () => {
53
53
  it('calls the onSaveAs callback when the Save button is clicked', () => {
54
54
  getSaveAsDialogComponent(props).find(_ui.Button).at(1).simulate('click');
55
55
  expect(onSaveAs).toHaveBeenCalledWith({
56
- name: props.object.name,
56
+ name: 'Save as name test (copy)',
57
57
  description: props.object.description
58
58
  });
59
59
  });
@@ -81,6 +81,7 @@
81
81
  "Name": "Name",
82
82
  "Description": "Description",
83
83
  "Rename": "Rename",
84
+ "{{objectName}} (copy)": "{{objectName}} (copy)",
84
85
  "Save {{fileType}} as": "Save {{fileType}} as",
85
86
  "event report": "event report",
86
87
  "line list": "line list",
@@ -83,6 +83,7 @@
83
83
  "Name": "Ім'я",
84
84
  "Description": "Змалювання",
85
85
  "Rename": "Перейменувати",
86
+ "{{objectName}} (copy)": "",
86
87
  "Save {{fileType}} as": "",
87
88
  "event report": "звіт про подію",
88
89
  "line list": "",
@@ -129,14 +130,14 @@
129
130
  "Created": "Створено",
130
131
  "Last updated": "Останнє оновлення",
131
132
  "Type": "Тип",
132
- "Clear filters": "",
133
+ "Clear filters": "Очистити фільтри",
133
134
  "{{firstItemIndex}}-{{lastItemIndex}} of {{totalNumberOfItems}}": "",
134
135
  "Open": "Відкрити",
135
136
  "Couldn't load items": "",
136
137
  "There was a problem loading items. Try again or contact your system administrator.": "",
137
138
  "No items found. Create a new to get started.": "",
138
139
  "No items found. Try adjusting your search or filter options to find what you're looking for.": "",
139
- "Create new": "",
140
+ "Create new": "Створити новий",
140
141
  "Open a visualization": "",
141
142
  "Loading visualizations": "",
142
143
  "Couldn't load visualizations": "",
@@ -8,15 +8,15 @@
8
8
  "No description": "无描述",
9
9
  "Last updated {{time}}": "最后更新 {{time}}",
10
10
  "Created {{time}} by {{author}}": "由 {{author}} 在 {{time}} 创建",
11
- "Created {{time}}": "",
11
+ "Created {{time}}": "已创建 {{time}}",
12
12
  "Viewed {{count}} times": "查看了 {{count}} 次",
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": "",
18
+ "About this map": "关于该地图",
19
+ "About this line list": "关于此行列表",
20
20
  "About this visualization": "关于此可视化",
21
21
  "This app could not retrieve required data.": "此应用无法检索所需数据。",
22
22
  "Network error": "网络错误",
@@ -59,7 +59,7 @@
59
59
  "Manually select items...": "手动选择条目...",
60
60
  "Nothing found in {{- dimensionTitle}}": "在 {{- dimensionTitle}} 中找不到任何内容",
61
61
  "Search": "搜索",
62
- "Nothing found for {{- searchTerm}}": "",
62
+ "Nothing found for {{- searchTerm}}": "没有找到 {{- searchTerm}}",
63
63
  "Delete {{fileType}}": "删除{{fileType}}",
64
64
  "This {{fileType}} and related interpretations will be deleted. Continue?": "此{{fileType}}和相关解释将被删除。继续?",
65
65
  "Cancel": "取消",
@@ -91,7 +91,7 @@
91
91
  "Could not update comment": "无法更新评论",
92
92
  "Enter comment text": "输入评论文本",
93
93
  "Update": "更新",
94
- "Viewing interpretation: {{- visualisationName}}": "",
94
+ "Viewing interpretation: {{- visualisationName}}": "查看注释:{{-visualisationName}}",
95
95
  "Could not load interpretation": "无法加载解释",
96
96
  "The interpretation couldn’t be displayed. Try again or contact your system administrator.": "无法显示解释。重试或联系您的系统管理员。",
97
97
  "Hide interpretation": "隐藏解释",
@@ -115,7 +115,7 @@
115
115
  "Back to write mode": "返回写入模式",
116
116
  "Too many results. Try refining the search.": "结果太多。尝试优化搜索。",
117
117
  "Search for a user": "搜索用户",
118
- "Searching for \"{{- searchText}}\"": "",
118
+ "Searching for \"{{- searchText}}\"": "搜索“{{- searchText}}”",
119
119
  "No results found": "没有结果",
120
120
  "Created by": "创建人",
121
121
  "Anyone": "任何人",
@@ -16,10 +16,10 @@ const visObject = {
16
16
  href: 'http://localhost:8080/api/32/visualizations/a8LrqsBQlHP',
17
17
  id: 'a8LrqsBQlHP',
18
18
  created: '2012-11-05T09:17:23.388',
19
- name: 'ANC: 1-3 dropout rate Yearly copy1',
19
+ name: 'ANC: 1-3 dropout rate Yearly',
20
20
  publicAccess: '--------',
21
21
  displayDescription: 'some _italic (10%)_ and some *bold (10%)*',
22
- displayName: 'ANC: 1-3 dropout rate Yearly copy1',
22
+ displayName: 'ANC: 1-3 dropout rate Yearly',
23
23
  description: 'some _italic (10%)_ and some *bold (10%)*',
24
24
  externalAccess: false,
25
25
  access: {
@@ -11,7 +11,9 @@ export const SaveAsDialog = _ref => {
11
11
  onClose,
12
12
  onSaveAs
13
13
  } = _ref;
14
- const [name, setName] = useState(object === null || object === void 0 ? void 0 : object.name);
14
+ const [name, setName] = useState(object !== null && object !== void 0 && object.displayName || object !== null && object !== void 0 && object.name ? i18n.t('{{objectName}} (copy)', {
15
+ objectName: object.name
16
+ }) : '');
15
17
  const [description, setDescription] = useState(object === null || object === void 0 ? void 0 : object.description); // the actual API request is done in the app
16
18
 
17
19
  const saveObjectAs = () => {
@@ -62,6 +64,7 @@ export const SaveAsDialog = _ref => {
62
64
  SaveAsDialog.propTypes = {
63
65
  object: PropTypes.shape({
64
66
  description: PropTypes.string,
67
+ displayName: PropTypes.string,
65
68
  name: PropTypes.string
66
69
  }),
67
70
  type: PropTypes.oneOf(supportedFileTypes),
@@ -36,7 +36,7 @@ describe('The FileMenu - SaveAsDialog component', () => {
36
36
  });
37
37
  it('renders a InputField for name with prefilled value from the object prop', () => {
38
38
  const nameInputField = getSaveAsDialogComponent(props).findWhere(n => n.prop('label') === 'Name');
39
- expect(nameInputField.prop('value')).toEqual(props.object.name);
39
+ expect(nameInputField.prop('value')).toEqual('Save as name test (copy)');
40
40
  });
41
41
  it('renders a TextAreaField for description with prefilled value from the object prop', () => {
42
42
  const descriptionInputField = getSaveAsDialogComponent(props).findWhere(n => n.prop('label') === 'Description');
@@ -45,7 +45,7 @@ describe('The FileMenu - SaveAsDialog component', () => {
45
45
  it('calls the onSaveAs callback when the Save button is clicked', () => {
46
46
  getSaveAsDialogComponent(props).find(Button).at(1).simulate('click');
47
47
  expect(onSaveAs).toHaveBeenCalledWith({
48
- name: props.object.name,
48
+ name: 'Save as name test (copy)',
49
49
  description: props.object.description
50
50
  });
51
51
  });
@@ -81,6 +81,7 @@
81
81
  "Name": "Name",
82
82
  "Description": "Description",
83
83
  "Rename": "Rename",
84
+ "{{objectName}} (copy)": "{{objectName}} (copy)",
84
85
  "Save {{fileType}} as": "Save {{fileType}} as",
85
86
  "event report": "event report",
86
87
  "line list": "line list",
@@ -83,6 +83,7 @@
83
83
  "Name": "Ім'я",
84
84
  "Description": "Змалювання",
85
85
  "Rename": "Перейменувати",
86
+ "{{objectName}} (copy)": "",
86
87
  "Save {{fileType}} as": "",
87
88
  "event report": "звіт про подію",
88
89
  "line list": "",
@@ -129,14 +130,14 @@
129
130
  "Created": "Створено",
130
131
  "Last updated": "Останнє оновлення",
131
132
  "Type": "Тип",
132
- "Clear filters": "",
133
+ "Clear filters": "Очистити фільтри",
133
134
  "{{firstItemIndex}}-{{lastItemIndex}} of {{totalNumberOfItems}}": "",
134
135
  "Open": "Відкрити",
135
136
  "Couldn't load items": "",
136
137
  "There was a problem loading items. Try again or contact your system administrator.": "",
137
138
  "No items found. Create a new to get started.": "",
138
139
  "No items found. Try adjusting your search or filter options to find what you're looking for.": "",
139
- "Create new": "",
140
+ "Create new": "Створити новий",
140
141
  "Open a visualization": "",
141
142
  "Loading visualizations": "",
142
143
  "Couldn't load visualizations": "",
@@ -8,15 +8,15 @@
8
8
  "No description": "无描述",
9
9
  "Last updated {{time}}": "最后更新 {{time}}",
10
10
  "Created {{time}} by {{author}}": "由 {{author}} 在 {{time}} 创建",
11
- "Created {{time}}": "",
11
+ "Created {{time}}": "已创建 {{time}}",
12
12
  "Viewed {{count}} times": "查看了 {{count}} 次",
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": "",
18
+ "About this map": "关于该地图",
19
+ "About this line list": "关于此行列表",
20
20
  "About this visualization": "关于此可视化",
21
21
  "This app could not retrieve required data.": "此应用无法检索所需数据。",
22
22
  "Network error": "网络错误",
@@ -59,7 +59,7 @@
59
59
  "Manually select items...": "手动选择条目...",
60
60
  "Nothing found in {{- dimensionTitle}}": "在 {{- dimensionTitle}} 中找不到任何内容",
61
61
  "Search": "搜索",
62
- "Nothing found for {{- searchTerm}}": "",
62
+ "Nothing found for {{- searchTerm}}": "没有找到 {{- searchTerm}}",
63
63
  "Delete {{fileType}}": "删除{{fileType}}",
64
64
  "This {{fileType}} and related interpretations will be deleted. Continue?": "此{{fileType}}和相关解释将被删除。继续?",
65
65
  "Cancel": "取消",
@@ -91,7 +91,7 @@
91
91
  "Could not update comment": "无法更新评论",
92
92
  "Enter comment text": "输入评论文本",
93
93
  "Update": "更新",
94
- "Viewing interpretation: {{- visualisationName}}": "",
94
+ "Viewing interpretation: {{- visualisationName}}": "查看注释:{{-visualisationName}}",
95
95
  "Could not load interpretation": "无法加载解释",
96
96
  "The interpretation couldn’t be displayed. Try again or contact your system administrator.": "无法显示解释。重试或联系您的系统管理员。",
97
97
  "Hide interpretation": "隐藏解释",
@@ -115,7 +115,7 @@
115
115
  "Back to write mode": "返回写入模式",
116
116
  "Too many results. Try refining the search.": "结果太多。尝试优化搜索。",
117
117
  "Search for a user": "搜索用户",
118
- "Searching for \"{{- searchText}}\"": "",
118
+ "Searching for \"{{- searchText}}\"": "搜索“{{- searchText}}”",
119
119
  "No results found": "没有结果",
120
120
  "Created by": "创建人",
121
121
  "Anyone": "任何人",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.0.4",
3
+ "version": "24.0.7",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {