@hotta/react-native-imagepicker 0.2.5 → 0.2.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.
@@ -1,2 +1,10 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <application>
3
+ <activity
4
+ android:name="com.luck.picture.lib.basic.PictureSelectorSupporterActivity"
5
+ android:screenOrientation="portrait" />
6
+ <activity
7
+ android:name="com.luck.picture.lib.basic.PictureSelectorTransparentActivity"
8
+ android:screenOrientation="portrait" />
9
+ </application>
2
10
  </manifest>
@@ -39,9 +39,17 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
39
39
  promise: Promise?
40
40
  ) {
41
41
  pickerOptions = options;
42
+ val imageCount = options?.getInt("imageCount") ?: 1
43
+ val isCamera = options?.getBoolean("isCamera") ?: false
42
44
  PictureSelector.create(reactApplicationContext.currentActivity)
43
45
  .openGallery(SelectMimeType.ofImage())
44
46
  .setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
47
+ .setSelectionMode(
48
+ if (imageCount > 1) SelectModeConfig.MULTIPLE else SelectModeConfig.SINGLE
49
+ )
50
+ .setMaxSelectNum(imageCount)
51
+ .isDisplayCamera(isCamera)
52
+ .setSelectorUIStyle(getNoCountStyle())
45
53
  .setImageEngine(imageEngine)
46
54
  .forResult(object : OnResultCallbackListener<LocalMedia> {
47
55
  override fun onResult(localMediaList: ArrayList<LocalMedia?>?) {
@@ -106,7 +114,7 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
106
114
  // 隐藏选择后的数字/角标索引
107
115
  isSelectNumberStyle = false
108
116
  isPreviewSelectNumberStyle = false
109
- // 预览页点击“下一步”时,自动选择当前视频并返回
117
+ // 预览页点击“下一步”时,自动选择当前媒体并返回
110
118
  isCompleteSelectRelativeTop = true
111
119
  // 隐藏列表页和预览页的勾选按钮
112
120
  selectBackground = android.R.color.transparent
@@ -8,14 +8,4 @@ const HTNativeImagePicker = (() => {
8
8
  };
9
9
  })();
10
10
  export default HTNativeImagePicker;
11
- //# sourceMappingURL=index.js.map asyncShowVideoPicker: options => {
12
- const _options = {
13
- ...defaultOptions,
14
- ...options
15
- };
16
- return NativeImagePicker.asyncShowVideoPicker(_options);
17
- }
18
- };
19
- })();
20
- export default HTNativeImagePicker;
21
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeImagePicker","defaultOptions","HTNativeImagePicker","asyncShowImagePicker","options","_options","asyncShowVideoPicker"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,iBAAiB,IACtBC,cAAc,QAIR,wBAAqB;AAE7B,MAAMC,mBAAmB,GAAG,CAAC,MAAM;EACjC,OAAO;IACLC,oBAAoB,EAAGC,OAA0B,IAAM;MACrD,MAAMC,QAAQ,GAAG;QAAE,GAAGJ,cAAc;QAAE,GAAGG;MAAQ,CAAC;MAClD,OAAOJ,iBAAiB,CAACG,oBAAoB,CAACE,QAAQ,CAAC;IACzD,CAAC;IACDC,oBAAoB,EAAGF,OAA0B,IAAM;MACrD,MAAMC,QAAQ,GAAG;QAAE,GAAGJ,cAAc;QAAE,GAAGG;MAAQ,CAAC;MAClD,OAAOJ,iBAAiB,CAACM,oBAAoB,CAACD,QAAQ,CAAC;IACzD;EACF,CAAC;AACH,CAAC,EAAE,CAAC;AAEJ,eAAeH,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["NativeImagePicker","HTNativeImagePicker","asyncShowImagePicker","asyncShowVideoPicker"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,wBAAqB;AAEnD,MAAMC,mBAAmB,GAAG,CAAC,MAAM;EACjC,OAAO;IACLC,oBAAoB,EAAEF,iBAAiB,CAACE,oBAAoB;IAC5DC,oBAAoB,EAAEH,iBAAiB,CAACG;EAC1C,CAAC;AACH,CAAC,EAAE,CAAC;AAEJ,eAAeF,mBAAmB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotta/react-native-imagepicker",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "@hotta/react-native-imagepicker",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",