@widergy/mobile-ui 2.1.1 → 2.1.2

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
+ ## [2.1.2](https://github.com/widergy/mobile-ui/compare/v2.1.1...v2.1.2) (2025-10-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * [CX-1362] attachment name lost on back step ([c392792](https://github.com/widergy/mobile-ui/commit/c392792e941767072adad41c0701b672720c2745))
7
+
1
8
  ## [2.1.1](https://github.com/widergy/mobile-ui/compare/v2.1.0...v2.1.1) (2025-10-20)
2
9
 
3
10
 
@@ -180,7 +180,7 @@ const MultipleFilePicker = ({
180
180
 
181
181
  setNewFile({
182
182
  uploadFile: { name: document.name, size: document.size },
183
- rawFile: blobToFile(file, document.type)
183
+ rawFile: blobToFile(file, document.type, document.name)
184
184
  });
185
185
  added += 1;
186
186
  }
@@ -150,8 +150,8 @@ export const getInitialValuesFrom = files =>
150
150
  files
151
151
  ?.map(fileBlob => {
152
152
  // eslint-disable-next-line no-underscore-dangle
153
- const fileData = fileBlob?.file?._data || {};
153
+ const fileData = fileBlob?._data || {};
154
154
 
155
- return fileData ? { name: fileData?.name, size: fileData?.size } : null;
155
+ return fileData ? { name: fileBlob?.name || fileData?.name, size: fileData?.size } : null;
156
156
  })
157
157
  .filter(file => file !== null) || [];
@@ -11,7 +11,8 @@ export const isImageByUri = uri => {
11
11
  return uCaseUri.includes('.JPG') || uCaseUri.includes('.JPEG') || uCaseUri.includes('PNG');
12
12
  };
13
13
 
14
- export const blobToFile = (blob, type) => new File([blob], blob.data.name, { type });
14
+ export const blobToFile = (blob, type, customName) =>
15
+ new File([blob], customName || blob.data?.name || blob.name || 'archivo', { type });
15
16
 
16
17
  // We use the XMLHttpRequest API since the fetch API does not behave correctly under new sdks on Android
17
18
  export const uriToBlob = uri => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "2.1.1",
5
+ "version": "2.1.2",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [