@dhis2/analytics 24.3.5 → 24.3.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,17 @@
1
+ ## [24.3.7](https://github.com/dhis2/analytics/compare/v24.3.6...v24.3.7) (2022-11-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **translations:** sync translations from transifex (master) ([4838a17](https://github.com/dhis2/analytics/commit/4838a1714a33a7fd06d12681b578701d6a735fd3))
7
+
8
+ ## [24.3.6](https://github.com/dhis2/analytics/compare/v24.3.5...v24.3.6) (2022-11-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **OpenFileDialog:** use case insensitive sorting on displayName (DHIS2-13554) ([#1384](https://github.com/dhis2/analytics/issues/1384)) ([e8348f7](https://github.com/dhis2/analytics/commit/e8348f7fe4b9a9d6349eddf9c86b11b5939564a2))
14
+
1
15
  ## [24.3.5](https://github.com/dhis2/analytics/compare/v24.3.4...v24.3.5) (2022-11-17)
2
16
 
3
17
 
@@ -171,7 +171,7 @@ const FileMenu = _ref => {
171
171
  onNew: onNew,
172
172
  currentUser: currentUser
173
173
  }), menuIsOpen && /*#__PURE__*/_react.default.createElement(_ui.Layer, {
174
- onClick: toggleMenu,
174
+ onBackdropClick: toggleMenu,
175
175
  position: "fixed",
176
176
  level: 2000,
177
177
  dataTest: "file-menu-toggle-layer"
@@ -47,7 +47,7 @@ const getQuery = type => ({
47
47
  params: _ref => {
48
48
  let {
49
49
  sortField = 'displayName',
50
- sortDirection = 'asc',
50
+ sortDirection = 'iasc',
51
51
  page = 1,
52
52
  filters
53
53
  } = _ref;
@@ -138,6 +138,13 @@ const OpenFileDialog = _ref2 => {
138
138
 
139
139
  return queryFilters;
140
140
  }, [currentUser, filters]);
141
+ const formatSortDirection = (0, _react.useCallback)(() => {
142
+ if (sortField === 'displayName' && sortDirection !== 'default') {
143
+ return "i".concat(sortDirection);
144
+ }
145
+
146
+ return sortDirection;
147
+ }, [sortField, sortDirection]);
141
148
  const {
142
149
  loading,
143
150
  error,
@@ -177,11 +184,11 @@ const OpenFileDialog = _ref2 => {
177
184
  refetch({
178
185
  page,
179
186
  sortField,
180
- sortDirection,
187
+ sortDirection: formatSortDirection(),
181
188
  filters: formatFilters()
182
189
  });
183
190
  }
184
- }, [open, page, sortField, sortDirection, filters, refetch, formatFilters]);
191
+ }, [open, page, sortField, filters, refetch, formatFilters, formatSortDirection]);
185
192
  const headers = [{
186
193
  field: 'displayName',
187
194
  label: _d2I18n.default.t('Name'),
@@ -54,7 +54,7 @@
54
54
  "Main dimensions": "Dimensions principales",
55
55
  "Your dimensions": "Vos dimensions",
56
56
  "Dimension recommended with selected data": "Dimension recommandée avec les données sélectionnées",
57
- "All items": "",
57
+ "All items": "Tous les items",
58
58
  "Automatically include all items": "",
59
59
  "Select all {{- dimensionTitle}} items. With this option, new items added in the future will be automatically included.": "",
60
60
  "Manually select items...": "",
@@ -81,6 +81,7 @@
81
81
  "Name": "Nom",
82
82
  "Description": "Description",
83
83
  "Rename": "Renommer",
84
+ "{{objectName}} (copy)": "",
84
85
  "Save {{fileType}} as": "Enregistrer {{fileType}} comme",
85
86
  "event report": "Rapport d'évènements",
86
87
  "line list": "",
@@ -118,6 +119,7 @@
118
119
  "Search for a user": "",
119
120
  "Searching for \"{{- searchText}}\"": "",
120
121
  "No results found": "Aucun résultat trouvé",
122
+ "Not available offline": "",
121
123
  "Created by": "Créé par",
122
124
  "Anyone": "Toute personne",
123
125
  "Only you": "",
@@ -268,6 +270,7 @@
268
270
  "Choose a locale to translate from the menu above": "",
269
271
  "Translate: {{objectName}}": "",
270
272
  "Save translations": "",
273
+ "Cannot save while offline": "",
271
274
  "Could not load translations": "",
272
275
  "Retry": "",
273
276
  "Series": "Séries",
@@ -145,7 +145,7 @@ export const FileMenu = _ref => {
145
145
  onNew: onNew,
146
146
  currentUser: currentUser
147
147
  }), menuIsOpen && /*#__PURE__*/React.createElement(Layer, {
148
- onClick: toggleMenu,
148
+ onBackdropClick: toggleMenu,
149
149
  position: "fixed",
150
150
  level: 2000,
151
151
  dataTest: "file-menu-toggle-layer"
@@ -20,7 +20,7 @@ const getQuery = type => ({
20
20
  params: _ref => {
21
21
  let {
22
22
  sortField = 'displayName',
23
- sortDirection = 'asc',
23
+ sortDirection = 'iasc',
24
24
  page = 1,
25
25
  filters
26
26
  } = _ref;
@@ -111,6 +111,13 @@ export const OpenFileDialog = _ref2 => {
111
111
 
112
112
  return queryFilters;
113
113
  }, [currentUser, filters]);
114
+ const formatSortDirection = useCallback(() => {
115
+ if (sortField === 'displayName' && sortDirection !== 'default') {
116
+ return "i".concat(sortDirection);
117
+ }
118
+
119
+ return sortDirection;
120
+ }, [sortField, sortDirection]);
114
121
  const {
115
122
  loading,
116
123
  error,
@@ -150,11 +157,11 @@ export const OpenFileDialog = _ref2 => {
150
157
  refetch({
151
158
  page,
152
159
  sortField,
153
- sortDirection,
160
+ sortDirection: formatSortDirection(),
154
161
  filters: formatFilters()
155
162
  });
156
163
  }
157
- }, [open, page, sortField, sortDirection, filters, refetch, formatFilters]);
164
+ }, [open, page, sortField, filters, refetch, formatFilters, formatSortDirection]);
158
165
  const headers = [{
159
166
  field: 'displayName',
160
167
  label: i18n.t('Name'),
@@ -54,7 +54,7 @@
54
54
  "Main dimensions": "Dimensions principales",
55
55
  "Your dimensions": "Vos dimensions",
56
56
  "Dimension recommended with selected data": "Dimension recommandée avec les données sélectionnées",
57
- "All items": "",
57
+ "All items": "Tous les items",
58
58
  "Automatically include all items": "",
59
59
  "Select all {{- dimensionTitle}} items. With this option, new items added in the future will be automatically included.": "",
60
60
  "Manually select items...": "",
@@ -81,6 +81,7 @@
81
81
  "Name": "Nom",
82
82
  "Description": "Description",
83
83
  "Rename": "Renommer",
84
+ "{{objectName}} (copy)": "",
84
85
  "Save {{fileType}} as": "Enregistrer {{fileType}} comme",
85
86
  "event report": "Rapport d'évènements",
86
87
  "line list": "",
@@ -118,6 +119,7 @@
118
119
  "Search for a user": "",
119
120
  "Searching for \"{{- searchText}}\"": "",
120
121
  "No results found": "Aucun résultat trouvé",
122
+ "Not available offline": "",
121
123
  "Created by": "Créé par",
122
124
  "Anyone": "Toute personne",
123
125
  "Only you": "",
@@ -268,6 +270,7 @@
268
270
  "Choose a locale to translate from the menu above": "",
269
271
  "Translate: {{objectName}}": "",
270
272
  "Save translations": "",
273
+ "Cannot save while offline": "",
271
274
  "Could not load translations": "",
272
275
  "Retry": "",
273
276
  "Series": "Séries",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "24.3.5",
3
+ "version": "24.3.7",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {