cozy-ui 131.0.0 → 131.0.1

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
+ ## [131.0.1](https://github.com/cozy/cozy-ui/compare/v131.0.0...v131.0.1) (2025-10-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ShortcutDialog:** await save callback to display errors ([60d68c1](https://github.com/cozy/cozy-ui/commit/60d68c1))
7
+
1
8
  # [131.0.0](https://github.com/cozy/cozy-ui/compare/v130.11.1...v131.0.0) (2025-10-22)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "131.0.0",
3
+ "version": "131.0.1",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -45,7 +45,9 @@ export const checkAndSaveShortcut = async ({
45
45
  return
46
46
  }
47
47
  try {
48
- onSave(validFileName, validURL)
48
+ // Because we do not know if the onSave is async or sync and we want to mutualize error catching
49
+ // we need to always await onSave
50
+ await onSave(validFileName, validURL)
49
51
 
50
52
  showAlert({
51
53
  message: isEditing
@@ -54,27 +54,35 @@ export var checkAndSaveShortcut = /*#__PURE__*/function () {
54
54
  return _context.abrupt("return");
55
55
 
56
56
  case 9:
57
- try {
58
- onSave(validFileName, validURL);
59
- showAlert({
60
- message: isEditing ? t('shortcut-dialog.edited') : t('shortcut-dialog.created'),
61
- severity: 'success'
62
- });
63
- } catch (_unused) {
64
- showAlert({
65
- message: t('shortcut-dialog.errored'),
66
- severity: 'error'
67
- });
68
- }
57
+ _context.prev = 9;
58
+ _context.next = 12;
59
+ return onSave(validFileName, validURL);
60
+
61
+ case 12:
62
+ showAlert({
63
+ message: isEditing ? t('shortcut-dialog.edited') : t('shortcut-dialog.created'),
64
+ severity: 'success'
65
+ });
66
+ _context.next = 18;
67
+ break;
68
+
69
+ case 15:
70
+ _context.prev = 15;
71
+ _context.t0 = _context["catch"](9);
72
+ showAlert({
73
+ message: t('shortcut-dialog.errored'),
74
+ severity: 'error'
75
+ });
69
76
 
77
+ case 18:
70
78
  onClose();
71
79
 
72
- case 11:
80
+ case 19:
73
81
  case "end":
74
82
  return _context.stop();
75
83
  }
76
84
  }
77
- }, _callee);
85
+ }, _callee, null, [[9, 15]]);
78
86
  }));
79
87
 
80
88
  return function checkAndSaveShortcut(_x) {