@nativescript-community/ui-document-picker 1.1.8 → 1.1.12

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
@@ -3,6 +3,48 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.12](https://github.com/nativescript-community/ui-document-picker/compare/v1.1.11...v1.1.12) (2022-02-18)
7
+
8
+ **Note:** Version bump only for package @nativescript-community/ui-document-picker
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.1.11](https://github.com/nativescript-community/ui-document-picker/compare/v1.1.10...v1.1.11) (2022-02-16)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * missing dependency ([203fb9e](https://github.com/nativescript-community/ui-document-picker/commit/203fb9e46c7f6c526ff67c50ff8f60d842bd097e))
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.1.10](https://github.com/nativescript-community/ui-document-picker/compare/v1.1.9...v1.1.10) (2022-02-16)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **android:** removed unused dependency ([448d753](https://github.com/nativescript-community/ui-document-picker/commit/448d75379ce7c25d6faba64b2a4a320b4f5e058c))
31
+
32
+
33
+
34
+
35
+
36
+ ## [1.1.9](https://github.com/nativescript-community/ui-document-picker/compare/v1.1.8...v1.1.9) (2022-01-29)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * **android:** fixed path on some devices ([97881c8](https://github.com/nativescript-community/ui-document-picker/commit/97881c808dee5fb4f78339e2562482554dbe3bc4))
42
+ * **android:** remove `MANAGE_EXTERNAL_STORAGE` as it prevents app release ([564a5b3](https://github.com/nativescript-community/ui-document-picker/commit/564a5b3706c9bdd2ba9be963e77b7f03bd5f6eb4))
43
+
44
+
45
+
46
+
47
+
6
48
  ## [1.1.8](https://github.com/nativescript-community/ui-document-picker/compare/v13.0.32...v1.1.8) (2021-12-03)
7
49
 
8
50
 
package/index.ios.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FolderPickerOptions } from '.';
2
2
  import { FilePickerOptions } from './index.common';
3
3
  export { FilePickerOptions };
4
- export declare function openFilePicker(params: FilePickerOptions): Promise<unknown>;
4
+ export declare function openFilePicker(params?: FilePickerOptions): Promise<unknown>;
5
5
  export declare function pickFolder(params?: FolderPickerOptions): Promise<{
6
6
  folders: any[];
7
7
  }>;
package/index.ios.js CHANGED
@@ -44,11 +44,14 @@ var DocumentPickerDelegate = /** @class */ (function (_super) {
44
44
  return DocumentPickerDelegate;
45
45
  }(NSObject));
46
46
  let delegate;
47
- export function openFilePicker(params) {
47
+ export function openFilePicker(params = {}) {
48
48
  let documentTypes;
49
49
  if (params.extensions && params.extensions.length > 0) {
50
50
  documentTypes = Utils.ios.collections.jsArrayToNSArray(params.extensions);
51
51
  }
52
+ else {
53
+ documentTypes = Utils.ios.collections.jsArrayToNSArray([kUTTypeContent]);
54
+ }
52
55
  return new Promise((resolve, reject) => {
53
56
  const controller = UIDocumentPickerViewController.alloc().initWithDocumentTypesInMode(documentTypes, params.pickerMode !== undefined ? params.pickerMode : 0);
54
57
  delegate = DocumentPickerDelegate.initWithResolveReject(resolve, reject);
package/index.ios.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.ios.js","sourceRoot":"../src/","sources":["index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuD3C,IAAI,QAAQ,CAAC;AACb,MAAM,UAAU,cAAc,CAAC,MAAyB;IAEpD,IAAI,aAAa,CAAC;IAElB,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACnD,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC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ACH,OAAO,EAAE,EAAE;KACd,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-document-picker",
3
- "version": "1.1.8",
3
+ "version": "1.1.12",
4
4
  "description": "A NativeScript plugin that allows you to select files from the device.",
5
5
  "main": "index",
6
6
  "typings": "index.d.ts",
@@ -38,5 +38,8 @@
38
38
  },
39
39
  "license": "Apache-2.0",
40
40
  "readmeFilename": "README.md",
41
- "gitHead": "30e29361ede5e1358c817782694db6af592296e3"
41
+ "dependencies": {
42
+ "@nativescript-community/perms": "2.2.5"
43
+ },
44
+ "gitHead": "9e02a0c6759105f03087eb2eed0ac6356c96becf"
42
45
  }
@@ -1,4 +1,3 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
4
3
  </manifest>
@@ -1,5 +1,5 @@
1
1
  dependencies {
2
- def storageVersion = project.hasProperty("storageVersion") ? project.storageVersion : "0.13.0"
3
- implementation "com.anggrayudi:storage:$storageVersion"
2
+ // def storageVersion = project.hasProperty("storageVersion") ? project.storageVersion : "0.13.0"
3
+ // implementation "com.anggrayudi:storage:$storageVersion"
4
4
 
5
5
  }
@@ -209,6 +209,11 @@ public class FilePath {
209
209
  return fullPath;
210
210
  }
211
211
 
212
+ fullPath = "/storage/" + type + relativePath;
213
+ if (fileExists(fullPath)) {
214
+ return fullPath;
215
+ }
216
+
212
217
  return fullPath;
213
218
  }
214
219