@react-native-ohos/react-native-image-crop-picker 0.50.2-rc.2 → 0.50.2-rc.3

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.
@@ -0,0 +1 @@
1
+ open_collective: react-native-image-crop-picker
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+ ## 0.50.2-rc.3
3
+ pre-release version 0.50.2-rc.3
4
+
5
+ ## v0.50.1
6
+ ## 更新内容
7
+ * feat: add OpenHarmony support for react-native-image-crop-picker
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pusic007@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
package/COMMITTERS.md ADDED
@@ -0,0 +1,6 @@
1
+ ## Committers列表
2
+
3
+ ### 以下是此项目的committer人员
4
+ 不区分先后顺序
5
+
6
+ - [xiafeng_xf_admin](https://gitee.com/xiafeng_xf_admin)
@@ -0,0 +1,68 @@
1
+ # Contribute
2
+
3
+ ## Introduction
4
+
5
+ First, thank you for considering contributing to react-native-image-crop-picker! It's people like you that make the open source community such a great community! 😊
6
+
7
+ We welcome any type of contribution, not only code. You can help with
8
+ - **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
9
+ - **Marketing**: writing blog posts, howto's, printing stickers, ...
10
+ - **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
11
+ - **Code**: take a look at the [open issues](https://github.com/ivpusic/react-native-image-crop-picker/issues). Even if you can't write code, commenting on them, showing that you care about a given
12
+ matters. It helps us triage them.
13
+ - **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/react-native-image-crop-picker).
14
+
15
+ ## Your First Contribution
16
+
17
+ Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
18
+
19
+ ## Submitting code
20
+
21
+ Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
22
+
23
+ ## Code review process
24
+
25
+ The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
26
+ It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
27
+
28
+ ## Financial contributions
29
+
30
+ We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/react-native-image-crop-picker).
31
+ Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
32
+
33
+ ## Questions
34
+
35
+ If you have any questions, create an [issue](https://github.com/ivpusic/react-native-image-crop-picker/issues) (protip: do a quick search first to see if someone else didn't ask the same question before!).
36
+ You can also reach us at hello@react-native-image-crop-picker.opencollective.com.
37
+
38
+ ## Credits
39
+
40
+ ### Contributors
41
+
42
+ Thank you to all the people who have already contributed to react-native-image-crop-picker!
43
+ <a href="graphs/contributors"><img src="https://opencollective.com/react-native-image-crop-picker/contributors.svg?width=890" /></a>
44
+
45
+
46
+ ### Backers
47
+
48
+ Thank you to all our backers! [[Become a backer](https://opencollective.com/react-native-image-crop-picker#backer)]
49
+
50
+ <a href="https://opencollective.com/react-native-image-crop-picker#backers" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/backers.svg?width=890"></a>
51
+
52
+
53
+ ### Sponsors
54
+
55
+ Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/react-native-image-crop-picker#sponsor))
56
+
57
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/0/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/0/avatar.svg"></a>
58
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/1/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/1/avatar.svg"></a>
59
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/2/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/2/avatar.svg"></a>
60
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/3/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/3/avatar.svg"></a>
61
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/4/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/4/avatar.svg"></a>
62
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/5/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/5/avatar.svg"></a>
63
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/6/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/6/avatar.svg"></a>
64
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/7/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/7/avatar.svg"></a>
65
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/8/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/8/avatar.svg"></a>
66
+ <a href="https://opencollective.com/react-native-image-crop-picker/sponsor/9/website" target="_blank"><img src="https://opencollective.com/react-native-image-crop-picker/sponsor/9/avatar.svg"></a>
67
+
68
+ <!-- This `CONTRIBUTING.md` is based on @nayafia's template https://github.com/nayafia/contributing-template -->
@@ -0,0 +1,34 @@
1
+ ### Version
2
+ Tell us which versions you are using:
3
+
4
+ - react-native-image-crop-picker v0.?.?
5
+ - react-native v0.?.?
6
+
7
+ ### Platform
8
+ Tell us to which platform this issue is related
9
+
10
+ - iOS
11
+ - Android
12
+
13
+ ### Expected behaviour
14
+
15
+
16
+
17
+ ### Actual behaviour
18
+
19
+
20
+
21
+ ### Steps to reproduce
22
+
23
+ 1.
24
+
25
+ 2.
26
+
27
+ 3.
28
+
29
+ ### Attachments
30
+
31
+ // stacktrace or any other useful debug info
32
+
33
+ Love react-native-image-crop-picker? Please consider supporting our collective:
34
+ 👉 https://opencollective.com/react-native-image-crop-picker/donate
package/OAT.xml ADDED
@@ -0,0 +1,81 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <configuration>
3
+ <oatconfig>
4
+ <licensefile>LICENSE</licensefile>
5
+ <policylist>
6
+ <policy name="projectPolicy" desc="">
7
+ <policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
8
+ </policy>
9
+ <policy name="projectPolicy" desc="">
10
+ <policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/>
11
+ <policyitem type="compatibility" name="Apache-2.0" path=".*" desc="不影响兼容性"/>
12
+ <policyitem type="compatibility" name="BSDStyleLicense" path=".*" desc="不影响兼容性" />
13
+ <policyitem type="compatibility" name="MIT" path=".*" desc="不影响兼容性" />
14
+ <policyitem type="compatibility" name="GPLStyleLicense" path=".*" desc="不影响兼容性" />
15
+ </policy>
16
+ </policylist>
17
+ <filefilterlist>
18
+ <filefilter name="copyrightPolicyFilter" desc="Filters for compatibility,license header policies">
19
+ <filteritem type="filepath" name="example/.*" desc="示例工程,不涉及业务代码"/>
20
+ <filteritem type="filepath" name="harmony/image_crop_picker/hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
21
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/cpp/generated/.*" desc="codegen自动生成,不手动修改"/>
22
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/cpp/generated/RNOH/generated/turbo_modules/.*" desc="codegen自动生成,不手动修改"/>
23
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/cpp/generated/RNOH/generated/.*" desc="codegen自动生成,不手动修改"/>
24
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/ets/generated/.*" desc="codegen自动生成,不手动修改"/>
25
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/ets/generated/components/.*" desc="codegen自动生成,不手动修改"/>
26
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/ets/generated/turboMoudules/.*" desc="codegen自动生成,不手动修改"/>
27
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/test/.*" desc="DevEco Studio自动生成,不手动修改"/>
28
+ <filteritem type="filename" name="*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
29
+ <filteritem type="filename" name="*/*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
30
+ <filteritem type="filename" name="LICENSE" desc="版权文件,不添加版权头"/>
31
+ <filteritem type="filename" name="NOTICE" desc="NOTICE文件,不添加版权头"/>
32
+ <filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
33
+ <filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
34
+ <filteritem type="filepath" name="src/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
35
+ <filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
36
+ <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
37
+ <filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
38
+ <filteritem type="filepath" name="js/index.js" desc="js代码源库没加版权头与源库保持一直,以防有修改版权风险"/>
39
+ <filteritem type="filepath" name="js/NativeRNCImageCropPicker.ts" desc="js代码源库没加版权头与源库保持一直,以防有修改版权风险"/>
40
+ <filteritem type="filepath" name="CHANGELOG.md" desc="changelog,不添加版权头"/>
41
+ </filefilter>
42
+ <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
43
+ <filteritem type="filepath" name="example/.*" desc="示例工程,不涉及业务代码"/>
44
+ <filteritem type="filepath" name="harmony/image_crop_picker/hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
45
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/cpp/generated/.*" desc="codegen自动生成,不手动修改"/>
46
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/cpp/generated/RNOH/generated/turbo_modules/.*" desc="codegen自动生成,不手动修改"/>
47
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/cpp/generated/RNOH/generated/.*" desc="codegen自动生成,不手动修改"/>
48
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/ets/generated/.*" desc="codegen自动生成,不手动修改"/>
49
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/ets/generated/components/.*" desc="codegen自动生成,不手动修改"/>
50
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/ets/generated/turboMoudules/.*" desc="codegen自动生成,不手动修改"/>
51
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/test/.*" desc="DevEco Studio自动生成,不手动修改"/>
52
+ <filteritem type="filename" name="*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
53
+ <filteritem type="filename" name="*/*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
54
+ <filteritem type="filename" name="LICENSE" desc="版权文件,不添加许可证头"/>
55
+ <filteritem type="filename" name="NOTICE" desc="NOTICE文件,不添加许可证头"/>
56
+ <filteritem type="filepath" name="hvigorw" desc="工程模板,不添加许可证头"/>
57
+ <filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不添加许可证头"/>
58
+ <filteritem type="filepath" name="src/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
59
+ <filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
60
+ <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不添加许可证头"/>
61
+ <filteritem type="filepath" name="js/NativeRNCImageCropPicker.ts" desc="与源库保持一致,不添加许可证头"/>
62
+ <filteritem type="filepath" name="js/index.js" desc="与源库保持一致,不添加许可证头"/>
63
+ <filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不添加许可证头,以防有修改版权风险"/>
64
+ <filteritem type="filepath" name="CHANGELOG.md" desc="changelog,不添加许可证头,以防有修改版权风险"/>
65
+ </filefilter>
66
+
67
+ <filefilter name="binaryFileTypePolicyFilter" desc="Filters for copyright header policies">
68
+ <filteritem type="filepath" name="example/.*" desc="示例工程,不涉及业务代码"/>
69
+ <filteritem type="filename" name="icon.png" desc="项目工程默认图片文件"/>
70
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/resources/base/media/app_icon.png" desc="项目工程默认图片文件"/>
71
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/resources/base/media/ic_anti_clockwise.png" desc="项目工程默认图片文件"/>
72
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/resources/base/media/ic_clockwise.png" desc="项目工程默认图片文件"/>
73
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/resources/base/media/ic_reset.png" desc="项目工程默认图片文件"/>
74
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/resources/base/media/ic_save.png" desc="项目工程默认图片文件"/>
75
+ <filteritem type="filepath" name="harmony/image_crop_picker/src/main/resources/base/media/.*" desc="项目工程默认图片文件"/>
76
+ <filteritem type="filepath" name="harmony/image_crop_picker.har" desc="项目打包文件"/>
77
+ <filteritem type="filepath" name="CHANGELOG.md" desc="changelog"/>
78
+ </filefilter>
79
+ </filefilterlist>
80
+ </oatconfig>
81
+ </configuration>
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ presets: ['module:metro-react-native-babel-preset'],
3
+ plugins: [
4
+ [
5
+ 'module-resolver',
6
+ {
7
+ alias: {
8
+ '@react-native-community/push-notification-ios': './js',
9
+ },
10
+ cwd: 'babelrc',
11
+ },
12
+ ],
13
+ ],
14
+ };
@@ -3,7 +3,7 @@
3
3
  "description": "Please describe the basic information.",
4
4
  "main": "index.ets",
5
5
  "type": "module",
6
- "version": "0.50.2-rc.2",
6
+ "version": "0.50.2-rc.3",
7
7
  "dependencies": {
8
8
  "@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/harmony/react_native_openharmony.har"
9
9
  },
@@ -1,25 +1,25 @@
1
- /**
2
- * This code was generated by "react-native codegen-harmony"
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be
5
- * lost once the code is regenerated.
6
- *
7
- * @generatorVersion: 1
8
- */
9
-
10
- #include "ImageCropPicker.h"
11
-
12
- namespace rnoh {
13
- using namespace facebook;
14
-
15
- ImageCropPicker::ImageCropPicker(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
16
- methodMap_ = {
17
- ARK_ASYNC_METHOD_METADATA(openPicker, 1),
18
- ARK_ASYNC_METHOD_METADATA(openCamera, 1),
19
- ARK_ASYNC_METHOD_METADATA(openCropper, 1),
20
- ARK_ASYNC_METHOD_METADATA(clean, 0),
21
- ARK_ASYNC_METHOD_METADATA(cleanSingle, 1),
22
- };
23
- }
24
-
25
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-harmony"
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be
5
+ * lost once the code is regenerated.
6
+ *
7
+ * @generatorVersion: 1
8
+ */
9
+
10
+ #include "ImageCropPicker.h"
11
+
12
+ namespace rnoh {
13
+ using namespace facebook;
14
+
15
+ ImageCropPicker::ImageCropPicker(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
16
+ methodMap_ = {
17
+ ARK_ASYNC_METHOD_METADATA(openPicker, 1),
18
+ ARK_ASYNC_METHOD_METADATA(openCamera, 1),
19
+ ARK_ASYNC_METHOD_METADATA(openCropper, 1),
20
+ ARK_ASYNC_METHOD_METADATA(clean, 0),
21
+ ARK_ASYNC_METHOD_METADATA(cleanSingle, 1),
22
+ };
23
+ }
24
+
25
+ } // namespace rnoh
@@ -1,21 +1,21 @@
1
- /**
2
- * This code was generated by "react-native codegen-harmony"
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be
5
- * lost once the code is regenerated.
6
- *
7
- * @generatorVersion: 1
8
- */
9
-
10
- #pragma once
11
-
12
- #include "RNOH/ArkTSTurboModule.h"
13
-
14
- namespace rnoh {
15
-
16
- class JSI_EXPORT ImageCropPicker : public ArkTSTurboModule {
17
- public:
18
- ImageCropPicker(const ArkTSTurboModule::Context ctx, const std::string name);
19
- };
20
-
21
- } // namespace rnoh
1
+ /**
2
+ * This code was generated by "react-native codegen-harmony"
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be
5
+ * lost once the code is regenerated.
6
+ *
7
+ * @generatorVersion: 1
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include "RNOH/ArkTSTurboModule.h"
13
+
14
+ namespace rnoh {
15
+
16
+ class JSI_EXPORT ImageCropPicker : public ArkTSTurboModule {
17
+ public:
18
+ ImageCropPicker(const ArkTSTurboModule::Context ctx, const std::string name);
19
+ };
20
+
21
+ } // namespace rnoh
@@ -843,29 +843,37 @@ export class ImageCropPickerTurboModule extends TurboModule implements ImageCrop
843
843
  async getFileInfo(includeBase64: boolean, filePath: string, compressOrTempFilePath: string, exifInfo: Exif): Promise<VideoImageInfo> {
844
844
  let videoImageInfo: VideoImageInfo = { duration: null };
845
845
  let imageType;
846
- let i = this.isNullOrUndefined(compressOrTempFilePath) ? filePath.lastIndexOf('/') : compressOrTempFilePath.lastIndexOf('/')
847
- let fileName = this.isNullOrUndefined(compressOrTempFilePath) ? filePath.substring(i + 1) : compressOrTempFilePath.substring(i + 1)
848
- i = filePath.lastIndexOf('.')
846
+
847
+ const targetFilePath = !this.isNullOrUndefined(compressOrTempFilePath) ? compressOrTempFilePath : filePath;
848
+ const isUsingCompressedFile = !this.isNullOrUndefined(compressOrTempFilePath);
849
+
850
+ let i = targetFilePath.lastIndexOf('/');
851
+ let fileName = targetFilePath.substring(i + 1);
852
+ i = targetFilePath.lastIndexOf('.');
849
853
  if (i != -1) {
850
- imageType = filePath.substring(i + 1)
854
+ imageType = targetFilePath.substring(i + 1);
851
855
  }
852
- videoImageInfo.path = this.isNullOrUndefined(compressOrTempFilePath) ? filePrefix + filePath : compressOrTempFilePath + filePath;
856
+
857
+ videoImageInfo.path = filePrefix + targetFilePath;
853
858
  videoImageInfo.filename = fileName;
854
859
  videoImageInfo.mime = 'image/' + imageType;
855
860
 
856
- let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY)
861
+ let file = fs.openSync(targetFilePath, fs.OpenMode.READ_ONLY);
857
862
  let stat = fs.statSync(file.fd);
858
863
  let length = stat.size;
859
864
  videoImageInfo.size = length;
860
865
  videoImageInfo.creationDate = stat.ctime;
861
866
  videoImageInfo.modificationDate = stat.mtime;
862
- if (this.isImage(filePath)) {
867
+
868
+ if (this.isImage(targetFilePath)) {
863
869
  let imageIS = image.createImageSource(file.fd)
864
870
  let imagePM = await imageIS.createPixelMap()
865
871
  let imgInfo = await imagePM.getImageInfo();
866
- videoImageInfo.data = includeBase64 ? this.imageToBase64(compressOrTempFilePath || filePath) : null;
872
+
873
+ videoImageInfo.data = includeBase64 ? this.imageToBase64(targetFilePath) : null;
867
874
  videoImageInfo.height = imgInfo.size.height;
868
875
  videoImageInfo.width = imgInfo.size.width;
876
+
869
877
  videoImageInfo.exif = exifInfo;
870
878
  imagePM.release().then(() => {
871
879
  imagePM = undefined;
@@ -876,7 +884,6 @@ export class ImageCropPickerTurboModule extends TurboModule implements ImageCrop
876
884
  } else {
877
885
  videoImageInfo.mime = 'video/' + imageType;
878
886
  let url = 'fd://' + file.fd;
879
- Logger.info(`${TAG} start avPlayer url = ${url}`);
880
887
  avMetadataExtractor = await media.createAVMetadataExtractor();
881
888
  avMetadataExtractor.fdSrc = { fd: file.fd, offset: 0, length: length };
882
889
  try {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-image-crop-picker",
3
- "version": "0.50.2-rc.2",
3
+ "version": "0.50.2-rc.3",
4
4
  "description": "Select single or multiple images, with cropping option",
5
5
  "main": "js/index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  "bugs": {
30
30
  "url": "https://gitcode.com/openharmony-sig/rntpc_react-native-image-crop-picker/issues"
31
31
  },
32
- "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-image-crop-picker#readme",
32
+ "homepage": "https://gitcode.com/openharmony-sig/rntpc_react-native-image-crop-picker/tree/br_rnoh0.77#readme",
33
33
  "dependencies": {
34
34
  "react-native-image-crop-picker": "^0.50.1"
35
35
  },
@@ -46,13 +46,5 @@
46
46
  "publishConfig": {
47
47
  "registry": "https://registry.npmjs.org/",
48
48
  "access": "public"
49
- },
50
- "files": [
51
- "src/",
52
- "lib/",
53
- "harmony/",
54
- "js/",
55
- "README.md",
56
- "index.d.ts"
57
- ]
49
+ }
58
50
  }
package/svg.svg ADDED
@@ -0,0 +1,122 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="841.89px" height="595.275px" viewBox="0 0 841.89 595.275" enable-background="new 0 0 841.89 595.275"
6
+ xml:space="preserve">
7
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#37A3DC" d="M33.177,175.389h175.186c17.944,0,32.626,14.682,32.626,32.626
8
+ V383.2c0,17.944-14.682,32.626-32.626,32.626H33.177c-17.944,0-32.626-14.682-32.626-32.626V208.015
9
+ C0.551,190.071,15.232,175.389,33.177,175.389z"/>
10
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#428DCC" d="M240.989,383.2V208.015c0-8.057-3.196-17.177-9.584-23.042
11
+ l-221.27,221.27c4.988,5.637,14.078,9.584,23.042,9.584h175.186C228.818,415.826,240.988,398.709,240.989,383.2z"/>
12
+ <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#E3F2FD" points="35.172,246.077 35.173,234.056 59.218,234.056
13
+ 59.218,210.011 71.239,210.01 71.239,234.056 182.322,234.056 182.322,345.138 206.367,345.138 206.367,357.16 182.322,357.16
14
+ 182.322,381.204 170.3,381.205 170.3,357.16 59.218,357.16 59.218,246.077 "/>
15
+ <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#202021" points="47.068,299.271 35.193,299.268 35.223,381.156
16
+ 116.606,381.217 116.616,368.863 47.146,368.813 "/>
17
+ <rect x="71.239" y="246.077" fill-rule="evenodd" clip-rule="evenodd" fill="none" width="99.061" height="99.061"/>
18
+ <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#47AE54" points="170.3,345.138 71.239,345.138 107.496,308.883
19
+ 121.521,322.908 153.58,290.85 170.3,307.38 "/>
20
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#FFD600" d="M95.349,281.95c6.567,0,11.923-5.339,11.923-11.887
21
+ s-5.356-11.887-11.923-11.887s-11.923,5.34-11.923,11.887S88.782,281.95,95.349,281.95z"/>
22
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#E3F2FD" d="M200.618,206.174l5.636-5.684c2.906-2.843,7.137-2.442,9.541-0.041
23
+ c2.645,2.5,2.638,6.992,0.041,9.541l-5.636,5.683l2.105,2.088c0.777,0.759,0.658,2.007,0.012,2.621l-2.141,2.158
24
+ c-0.585,0.674-1.836,0.768-2.621,0.011l-3.264-3.236l-7.265-7.204l-3.264-3.236c-0.737-0.727-0.723-1.935-0.011-2.622l2.14-2.158
25
+ c0.805-0.764,1.954-0.69,2.621-0.011L200.618,206.174z"/>
26
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#E3F2FD" d="M204.291,219.316l-7.265-7.204l-10.542,10.631
27
+ c-1.497,1.486-2.032,4.226-0.887,5.996l-3.005,3.03c-0.614,0.563-0.576,1.655,0.009,2.154c0.642,0.64,1.569,0.57,2.154-0.009
28
+ l3.005-3.03c2.042,1.116,4.443,0.592,5.988-0.938L204.291,219.316z"/>
29
+ <g>
30
+ <path fill="#202021" d="M296.468,236.642c1.95-0.344,4.704-0.612,7.571-0.612c3.709,0,11.204,0.459,11.204,8.336
31
+ c0,3.594-2.294,6.233-5.047,7.304v0.115c2.065,0.803,3.212,2.791,3.9,5.774c0.841,3.479,1.606,6.998,2.18,8.106h-5.812
32
+ c-0.421-0.841-1.147-3.403-1.835-6.959c-0.765-3.786-1.95-4.971-4.627-4.971h-1.912v11.931h-5.621V236.642z M302.089,249.528h2.333
33
+ c3.212,0,5.163-1.874,5.163-4.665c0-3.786-2.83-4.512-4.895-4.512c-1.262,0-2.142,0.077-2.601,0.229V249.528z"/>
34
+ <path fill="#202021" d="M323.881,256.717c0.153,3.633,2.753,5.085,5.812,5.085c2.103,0,3.748-0.382,5.201-0.879l0.803,3.9
35
+ c-1.759,0.765-4.245,1.224-6.883,1.224c-6.577,0-10.324-4.13-10.324-10.745c0-6.118,3.518-11.395,9.75-11.395
36
+ c5.162,0,8.527,3.671,8.527,10.554c0,0.841-0.038,1.645-0.153,2.256H323.881z M331.529,252.779
37
+ c0.038-2.218-0.841-4.933-3.633-4.933c-2.715,0-3.862,2.83-4.015,4.933H331.529z"/>
38
+ <path fill="#202021" d="M340.817,245.743c1.415-0.841,4.053-1.797,7.38-1.797c6.615,0,8.413,4.207,8.413,8.872v7.801
39
+ c0,1.874,0.077,3.747,0.306,5.047h-5.085l-0.344-2.218h-0.115c-1.224,1.683-3.289,2.638-5.659,2.638
40
+ c-3.938,0-6.386-2.944-6.386-6.386c0-5.468,4.856-8.03,11.625-8.03c0-2.104-0.727-3.709-3.824-3.709
41
+ c-1.95,0-3.862,0.612-5.238,1.453L340.817,245.743z M351.104,255.302c-3.059,0-6.233,0.727-6.233,3.824
42
+ c0,2.026,1.262,2.906,2.677,2.906c1.338,0,3.556-0.956,3.556-3.671V255.302z"/>
43
+ <path fill="#202021" d="M375.19,249.069c-0.727-0.344-1.759-0.688-3.327-0.688c-3.556,0-5.621,2.868-5.621,6.615
44
+ c0,4.168,2.409,6.577,5.66,6.577c1.415,0,2.523-0.268,3.441-0.688l0.612,4.245c-0.956,0.458-2.906,0.917-5.162,0.917
45
+ c-6.233,0-10.286-4.053-10.286-10.821c0-6.386,4.129-11.281,11.166-11.281c1.835,0,3.518,0.421,4.436,0.803L375.19,249.069z"/>
46
+ <path fill="#202021" d="M380.502,244.366v-3.9l5.583-1.644v5.544h4.703v4.168h-4.703v9.254c0,2.562,0.803,3.632,2.524,3.632
47
+ c0.803,0,1.262-0.076,1.835-0.191l0.076,4.321c-0.765,0.306-2.141,0.497-3.786,0.497c-6.118,0-6.233-5.315-6.233-7.686v-9.827
48
+ h-2.791v-4.168H380.502z"/>
49
+ <path fill="#202021" d="M424.281,236.26v29.405h-5.659l-6.309-12.16c-1.568-3.021-3.289-6.654-4.512-9.866h-0.153
50
+ c0.229,3.633,0.344,7.762,0.344,13.001v9.024h-5.124V236.26h6.118l6.195,11.93c1.568,2.944,3.212,6.539,4.397,9.598h0.077
51
+ c-0.344-3.748-0.497-7.916-0.497-12.695v-8.833H424.281z"/>
52
+ <path fill="#202021" d="M429.86,245.743c1.415-0.841,4.054-1.797,7.38-1.797c6.615,0,8.412,4.207,8.412,8.872v7.801
53
+ c0,1.874,0.077,3.747,0.307,5.047h-5.086l-0.344-2.218h-0.115c-1.224,1.683-3.288,2.638-5.659,2.638
54
+ c-3.938,0-6.386-2.944-6.386-6.386c0-5.468,4.856-8.03,11.624-8.03c0-2.104-0.727-3.709-3.823-3.709
55
+ c-1.95,0-3.862,0.612-5.239,1.453L429.86,245.743z M440.146,255.302c-3.06,0-6.232,0.727-6.232,3.824
56
+ c0,2.026,1.262,2.906,2.676,2.906c1.339,0,3.557-0.956,3.557-3.671V255.302z"/>
57
+ <path fill="#202021" d="M451.613,244.366v-3.9l5.583-1.644v5.544h4.703v4.168h-4.703v9.254c0,2.562,0.803,3.632,2.523,3.632
58
+ c0.804,0,1.263-0.076,1.836-0.191l0.076,4.321c-0.765,0.306-2.142,0.497-3.785,0.497c-6.118,0-6.233-5.315-6.233-7.686v-9.827
59
+ h-2.791v-4.168H451.613z"/>
60
+ <path fill="#202021" d="M468.207,241.575c-1.797,0-3.021-1.3-3.021-3.021c0-1.759,1.262-3.021,3.021-3.021
61
+ c1.835,0,3.059,1.262,3.059,3.021C471.266,240.389,469.966,241.575,468.207,241.575z M471.075,244.366v21.299h-5.66v-21.299
62
+ H471.075z"/>
63
+ <path fill="#202021" d="M488.013,244.366h5.851l-7.266,21.299h-5.468l-7.15-21.299h6.079l2.792,10.324
64
+ c0.459,1.835,0.841,3.595,1.186,5.43h0.114c0.345-1.835,0.727-3.556,1.186-5.43L488.013,244.366z"/>
65
+ <path fill="#202021" d="M501.049,256.717c0.152,3.633,2.753,5.085,5.813,5.085c2.103,0,3.747-0.382,5.2-0.879l0.803,3.9
66
+ c-1.759,0.765-4.244,1.224-6.883,1.224c-6.577,0-10.324-4.13-10.324-10.745c0-6.118,3.518-11.395,9.751-11.395
67
+ c5.162,0,8.526,3.671,8.526,10.554c0,0.841-0.038,1.645-0.152,2.256H501.049z M508.696,252.779
68
+ c0.038-2.218-0.841-4.933-3.633-4.933c-2.715,0-3.862,2.83-4.015,4.933H508.696z"/>
69
+ <path fill="#428DCB" d="M298.517,331.213v-50.409h9.702v50.409H298.517z"/>
70
+ <path fill="#428DCB" d="M345.974,300.076c3.016-4.458,6.752-6.097,10.816-6.097c6.359,0,11.275,4.523,11.275,15.077v22.156h-9.505
71
+ v-20.648c0-5.244-1.442-8.719-5.31-8.719c-2.688,0-5.703,2.098-5.703,7.211v22.156h-9.505v-21.566c0-4.326-1.376-7.801-5.179-7.801
72
+ c-2.688,0-5.834,2.491-5.834,7.407v21.96h-9.505v-25.5c0-4.261-0.131-7.734-0.262-10.947h8.259l0.459,4.851h0.197
73
+ c1.704-2.622,4.916-5.638,10.357-5.638c4.458,0,7.866,2.36,9.309,6.097H345.974z"/>
74
+ <path fill="#428DCB" d="M376.845,297.061c2.426-1.442,6.949-3.081,12.652-3.081c11.34,0,14.421,7.211,14.421,15.208v13.373
75
+ c0,3.212,0.131,6.424,0.524,8.652h-8.719l-0.59-3.802h-0.196c-2.098,2.884-5.638,4.522-9.702,4.522
76
+ c-6.751,0-10.947-5.047-10.947-10.947c0-9.373,8.325-13.766,19.928-13.766c0-3.605-1.246-6.358-6.555-6.358
77
+ c-3.343,0-6.621,1.049-8.98,2.491L376.845,297.061z M394.479,313.448c-5.244,0-10.685,1.245-10.685,6.556
78
+ c0,3.474,2.163,4.981,4.588,4.981c2.294,0,6.097-1.639,6.097-6.293V313.448z"/>
79
+ <path fill="#428DCB" d="M435.38,294.766h8.456c-0.196,2.622-0.328,5.834-0.328,10.881v20.583c0,7.146-0.655,20.387-18.42,20.387
80
+ c-4.261,0-8.652-0.852-11.537-2.49l1.901-7.408c2.163,1.181,5.572,2.36,9.439,2.36c5.44,0,9.046-3.081,9.046-10.095v-2.688h-0.131
81
+ c-1.836,2.884-5.113,4.654-9.111,4.654c-8.653,0-14.094-7.801-14.094-17.765c0-12.062,7.014-19.207,15.077-19.207
82
+ c4.589,0,7.539,2.229,9.178,5.113h0.131L435.38,294.766z M433.807,308.926c0-4.654-2.818-7.342-6.097-7.342
83
+ c-4.392,0-7.342,4.457-7.342,11.34c0,6.358,2.688,10.686,7.276,10.686c2.229,0,6.162-1.442,6.162-7.604V308.926z"/>
84
+ <path fill="#428DCB" d="M459.564,315.874c0.263,6.228,4.72,8.718,9.964,8.718c3.605,0,6.425-0.655,8.915-1.508l1.377,6.687
85
+ c-3.016,1.312-7.276,2.098-11.8,2.098c-11.274,0-17.698-7.079-17.698-18.42c0-10.488,6.03-19.534,16.715-19.534
86
+ c8.85,0,14.618,6.293,14.618,18.092c0,1.442-0.065,2.819-0.262,3.868H459.564z M472.675,309.122
87
+ c0.065-3.802-1.442-8.456-6.228-8.456c-4.654,0-6.62,4.851-6.883,8.456H472.675z"/>
88
+ <path fill="#428DCB" d="M533.831,289.85c-1.967-0.852-4.589-1.639-8.063-1.639c-8.325,0-15.012,5.703-15.012,17.896
89
+ c0,11.406,5.834,17.503,14.946,17.503c3.015,0,6.227-0.591,8.193-1.442l1.377,7.801c-1.901,0.917-5.966,1.9-11.145,1.9
90
+ c-15.142,0-23.532-10.291-23.532-25.237c0-17.633,11.34-26.548,24.713-26.548c5.44,0,8.98,1.114,10.423,1.901L533.831,289.85z"/>
91
+ <path fill="#428DCB" d="M550.544,301.059c1.704-4.719,5.638-7.145,9.046-7.145c0.918,0,1.508,0.065,2.163,0.196v9.243
92
+ c-0.721-0.131-1.507-0.197-2.49-0.197c-4.393,0-7.735,2.95-7.735,9.178v18.879h-9.702v-25.106c0-4.522-0.131-8.128-0.262-11.406
93
+ h8.325l0.393,6.358H550.544z"/>
94
+ <path fill="#428DCB" d="M598.984,312.662c0,13.896-8.915,19.271-17.043,19.271c-9.833,0-16.913-6.948-16.913-18.813
95
+ c0-12.259,7.407-19.207,17.306-19.207C592.561,293.914,598.984,301.584,598.984,312.662z M582.138,301.059
96
+ c-5.375,0-7.276,6.293-7.276,11.865c0,6.49,2.491,11.865,7.211,11.865c4.589,0,7.079-5.441,7.079-11.931
97
+ C589.151,307.155,587.119,301.059,582.138,301.059z"/>
98
+ <path fill="#428DCB" d="M614.648,299.683h0.131c2.36-3.736,6.097-5.769,10.816-5.769c7.997,0,13.896,7.473,13.896,18.682
99
+ c0,13.438-7.604,19.338-15.011,19.338c-3.999,0-7.08-1.835-8.653-4.261h-0.131v18.158h-9.702v-39.2c0-4.72-0.131-8.587-0.262-11.93
100
+ h8.456L614.648,299.683z M615.697,316.464c0,5.31,3.212,7.866,6.489,7.866c4.917,0,7.474-4.851,7.474-11.406
101
+ c0-6.489-2.491-11.209-7.276-11.209c-3.737,0-6.687,3.539-6.687,7.932V316.464z"/>
102
+ <path fill="#428DCB" d="M660.988,331.213v-49.754c3.146-0.59,7.474-1.049,13.045-1.049c6.358,0,11.145,1.246,14.356,3.999
103
+ c3.015,2.556,4.851,6.621,4.851,11.274c0,13.832-11.537,16.912-19.076,16.912c-1.376,0-2.556-0.065-3.539-0.262v18.879H660.988z
104
+ M670.625,304.73c0.918,0.196,1.967,0.262,3.408,0.262c6.031,0,9.57-3.408,9.57-8.85c0-5.375-3.408-8.194-8.783-8.194
105
+ c-1.967,0-3.344,0.197-4.195,0.393V304.73z"/>
106
+ <path fill="#428DCB" d="M704.578,289.915c-3.081,0-5.179-2.229-5.179-5.178c0-3.016,2.163-5.179,5.179-5.179
107
+ c3.146,0,5.244,2.163,5.244,5.179C709.822,287.883,707.593,289.915,704.578,289.915z M709.494,294.701v36.512h-9.702v-36.512
108
+ H709.494z"/>
109
+ <path fill="#428DCB" d="M741.416,302.764c-1.246-0.59-3.016-1.18-5.703-1.18c-6.097,0-9.637,4.916-9.637,11.34
110
+ c0,7.146,4.13,11.275,9.702,11.275c2.425,0,4.326-0.459,5.899-1.181l1.049,7.276c-1.639,0.787-4.981,1.573-8.85,1.573
111
+ c-10.685,0-17.633-6.948-17.633-18.551c0-10.947,7.079-19.338,19.141-19.338c3.146,0,6.031,0.721,7.604,1.376L741.416,302.764z"/>
112
+ <path fill="#428DCB" d="M767.896,309.712l13.373,21.501h-11.537l-8.521-15.602l-2.557,3.475v12.127h-9.702v-52.704h9.702v32.121
113
+ h0.196c0.787-1.639,1.573-3.146,2.426-4.523l7.276-11.406h11.274L767.896,309.712z"/>
114
+ <path fill="#428DCB" d="M792.278,315.874c0.263,6.228,4.72,8.718,9.964,8.718c3.605,0,6.424-0.655,8.915-1.508l1.377,6.687
115
+ c-3.016,1.312-7.276,2.098-11.8,2.098c-11.274,0-17.698-7.079-17.698-18.42c0-10.488,6.03-19.534,16.716-19.534
116
+ c8.849,0,14.617,6.293,14.617,18.092c0,1.442-0.065,2.819-0.262,3.868H792.278z M805.389,309.122
117
+ c0.065-3.802-1.441-8.456-6.228-8.456c-4.653,0-6.62,4.851-6.883,8.456H805.389z"/>
118
+ <path fill="#428DCB" d="M829.838,301.059c1.704-4.719,5.638-7.145,9.046-7.145c0.918,0,1.508,0.065,2.163,0.196v9.243
119
+ c-0.721-0.131-1.508-0.197-2.49-0.197c-4.393,0-7.735,2.95-7.735,9.178v18.879h-9.702v-25.106c0-4.522-0.131-8.128-0.262-11.406
120
+ h8.325l0.394,6.358H829.838z"/>
121
+ </g>
122
+ </svg>
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Basic Options */
4
+ "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
5
+ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6
+ "noEmit": true,
7
+ /* Strict Type-Checking Options */
8
+ "strict": true, /* Enable all strict type-checking options. */
9
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
10
+ }
11
+ }