@react-native-ohos/react-native-map-clustering 3.4.1-rc.1 → 3.5.0
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 +29 -0
- package/COMMITTERS.md +6 -0
- package/LICENSE +21 -21
- package/OAT.xml +57 -57
- package/README.OpenSource +10 -10
- package/README.md +13 -13
- package/example/.eslintrc +19 -0
- package/example/.node-version +6 -0
- package/example/.prettierrc.js +7 -0
- package/example/.watchmanconfig +6 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +6 -0
- package/example/contexts.ts +9 -0
- package/example/harmony/AppScope/app.json5 +10 -0
- package/example/harmony/AppScope/resources/base/element/string.json +8 -0
- package/example/harmony/AppScope/resources/base/media/app_icon.png +0 -0
- package/example/harmony/build-profile.template.json5 +36 -0
- package/example/harmony/codelinter.json +32 -0
- package/example/harmony/entry/build-profile.json5 +22 -0
- package/example/harmony/entry/hvigorfile.ts +8 -0
- package/example/harmony/entry/oh-package.json5 +11 -0
- package/example/harmony/entry/src/main/cpp/CMakeLists.txt +42 -0
- package/example/harmony/entry/src/main/cpp/PackageProvider.cpp +17 -0
- package/example/harmony/entry/src/main/ets/RNPackagesFactory.ets +15 -0
- package/example/harmony/entry/src/main/ets/assets/fonts/Pacifico-Regular.ttf +0 -0
- package/example/harmony/entry/src/main/ets/assets/fonts/StintUltraCondensed-Regular.ttf +0 -0
- package/example/harmony/entry/src/main/ets/entryability/EntryAbility.ets +27 -0
- package/example/harmony/entry/src/main/ets/pages/Index.ets +209 -0
- package/example/harmony/entry/src/main/ets/pages/SurfaceDeadlockTest.ets +135 -0
- package/example/harmony/entry/src/main/ets/pages/TouchDisplayer.ets +44 -0
- package/example/harmony/entry/src/main/module.json5 +72 -0
- package/example/harmony/entry/src/main/resources/base/element/color.json +8 -0
- package/example/harmony/entry/src/main/resources/base/element/string.json +20 -0
- package/example/harmony/entry/src/main/resources/base/media/icon.png +0 -0
- package/example/harmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/example/harmony/entry/src/main/resources/rawfile/1.txt +1 -0
- package/example/harmony/format.ps1 +18 -0
- package/example/harmony/hvigor/hvigor-config.json5 +21 -0
- package/example/harmony/hvigorfile.ts +9 -0
- package/example/harmony/oh-package.json5 +12 -0
- package/example/index.js +11 -0
- package/example/jest.config.js +11 -0
- package/example/metro.config.js +30 -0
- package/example/package.json +61 -0
- package/example/react-native.config.js +11 -0
- package/example/scripts/create-build-profile.js +46 -0
- package/example/src/App.tsx +186 -0
- package/example/src/Navigation.tsx +163 -0
- package/example/src/index.tsx +59 -0
- package/example/tsconfig.json +14 -0
- package/index.d.ts +40 -40
- package/index.js +2 -2
- package/lib/ClusterHarmony.js +21 -21
- package/lib/ClusteredMapView.js +310 -310
- package/package.json +42 -42
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 鸿蒙化Log
|
|
4
|
+
|
|
5
|
+
### v3.5.0
|
|
6
|
+
|
|
7
|
+
- release version 3.5.0
|
|
8
|
+
|
|
9
|
+
### v3.5.0-rc.1
|
|
10
|
+
|
|
11
|
+
- pre-release version 3.5.0-rc.1
|
|
12
|
+
|
|
13
|
+
### v3.4.1-rc.1
|
|
14
|
+
|
|
15
|
+
- pre-release version 3.4.1-rc.1
|
|
16
|
+
- feat: add Openharmony support for react-native-map-clustering
|
|
17
|
+
|
|
18
|
+
## ReleasesLog
|
|
19
|
+
|
|
20
|
+
### v3.4.0
|
|
21
|
+
|
|
22
|
+
- Minor fixes for library.
|
|
23
|
+
|
|
24
|
+
- Merged PRs:
|
|
25
|
+
[#183](https://github.com/tomekvenits/react-native-map-clustering/pull/183)
|
|
26
|
+
[#184](https://github.com/tomekvenits/react-native-map-clustering/pull/184)
|
|
27
|
+
[#190](https://github.com/tomekvenits/react-native-map-clustering/pull/190)
|
|
28
|
+
[#191](https://github.com/tomekvenits/react-native-map-clustering/pull/191)
|
|
29
|
+
[#194](https://github.com/tomekvenits/react-native-map-clustering/pull/194)
|
package/COMMITTERS.md
ADDED
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Tony Arrived
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Tony Arrived
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/OAT.xml
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
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="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
19
|
-
<filteritem type="filename" name="*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
20
|
-
<filteritem type="filename" name="*/*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
21
|
-
<filteritem type="filename" name="LICENSE" desc="版权文件,不添加许可证头"/>
|
|
22
|
-
<filteritem type="filepath" name="hvigorw" desc="工程模板,不添加许可证头"/>
|
|
23
|
-
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不添加许可证头"/>
|
|
24
|
-
<filteritem type="filepath" name="js/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
25
|
-
<filteritem type="filepath" name="js/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
26
|
-
<filteritem type="filepath" name="src/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
27
|
-
<filteritem type="filepath" name="src/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
28
|
-
<filteritem type="filepath" name="*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
29
|
-
<filteritem type="filepath" name="*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
30
|
-
<filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
31
|
-
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
32
|
-
<filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
33
|
-
<filteritem type="filepath" name="lib/ClusteredMapView.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
34
|
-
</filefilter>
|
|
35
|
-
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
|
36
|
-
<filteritem type="filename" name="*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
37
|
-
<filteritem type="filename" name="*/*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
38
|
-
<filteritem type="filename" name="LICENSE" desc="版权文件,不添加版权头"/>
|
|
39
|
-
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
40
|
-
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
41
|
-
<filteritem type="filepath" name="js/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
42
|
-
<filteritem type="filepath" name="js/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
43
|
-
<filteritem type="filepath" name="src/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
44
|
-
<filteritem type="filepath" name="src/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
45
|
-
<filteritem type="filepath" name="*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
46
|
-
<filteritem type="filepath" name="*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
47
|
-
<filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
48
|
-
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
49
|
-
<filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
50
|
-
<filteritem type="filepath" name="lib/ClusteredMapView.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
51
|
-
</filefilter>
|
|
52
|
-
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
|
53
|
-
</filefilter>
|
|
54
|
-
|
|
55
|
-
</filefilterlist>
|
|
56
|
-
</oatconfig>
|
|
57
|
-
</configuration>
|
|
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="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
19
|
+
<filteritem type="filename" name="*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
20
|
+
<filteritem type="filename" name="*/*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
21
|
+
<filteritem type="filename" name="LICENSE" desc="版权文件,不添加许可证头"/>
|
|
22
|
+
<filteritem type="filepath" name="hvigorw" desc="工程模板,不添加许可证头"/>
|
|
23
|
+
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不添加许可证头"/>
|
|
24
|
+
<filteritem type="filepath" name="js/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
25
|
+
<filteritem type="filepath" name="js/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
26
|
+
<filteritem type="filepath" name="src/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
27
|
+
<filteritem type="filepath" name="src/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
28
|
+
<filteritem type="filepath" name="*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
29
|
+
<filteritem type="filepath" name="*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
30
|
+
<filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
31
|
+
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
32
|
+
<filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
33
|
+
<filteritem type="filepath" name="lib/ClusteredMapView.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
34
|
+
</filefilter>
|
|
35
|
+
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
|
36
|
+
<filteritem type="filename" name="*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
37
|
+
<filteritem type="filename" name="*/*.json5" desc="hvigor配置文件,DevEco Studio自动生成,不手动修改"/>
|
|
38
|
+
<filteritem type="filename" name="LICENSE" desc="版权文件,不添加版权头"/>
|
|
39
|
+
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
40
|
+
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
41
|
+
<filteritem type="filepath" name="js/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
42
|
+
<filteritem type="filepath" name="js/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
43
|
+
<filteritem type="filepath" name="src/*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
44
|
+
<filteritem type="filepath" name="src/*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
45
|
+
<filteritem type="filepath" name="*.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
46
|
+
<filteritem type="filepath" name="*.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
47
|
+
<filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
48
|
+
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
49
|
+
<filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
50
|
+
<filteritem type="filepath" name="lib/ClusteredMapView.js" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
51
|
+
</filefilter>
|
|
52
|
+
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
|
53
|
+
</filefilter>
|
|
54
|
+
|
|
55
|
+
</filefilterlist>
|
|
56
|
+
</oatconfig>
|
|
57
|
+
</configuration>
|
package/README.OpenSource
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"Name": "react-native-map-clustering",
|
|
4
|
-
"License": "MIT License",
|
|
5
|
-
"License File": "https://github.com/
|
|
6
|
-
"Version Number": "3.4.
|
|
7
|
-
"Owner" : "xiafeng@huawei.com",
|
|
8
|
-
"Upstream URL": "https://github.com/
|
|
9
|
-
"Description": "React Native Map Clustering both for Android and iOS"
|
|
10
|
-
}
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"Name": "react-native-map-clustering",
|
|
4
|
+
"License": "MIT License",
|
|
5
|
+
"License File": "https://github.com/tomekvenits/react-native-map-clustering/blob/master/LICENSE",
|
|
6
|
+
"Version Number": "3.4.0",
|
|
7
|
+
"Owner" : "xiafeng@huawei.com",
|
|
8
|
+
"Upstream URL": "https://github.com/tomekvenits/react-native-map-clustering",
|
|
9
|
+
"Description": "React Native Map Clustering both for Android and iOS"
|
|
10
|
+
}
|
|
11
11
|
]
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# @react-native-
|
|
2
|
-
|
|
3
|
-
This project is based on [react-native-map-clustering](https://github.com/
|
|
4
|
-
|
|
5
|
-
## Documentation
|
|
6
|
-
|
|
7
|
-
- [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-map-clustering.md)
|
|
8
|
-
|
|
9
|
-
- [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-map-clustering.md)
|
|
10
|
-
|
|
11
|
-
## License
|
|
12
|
-
|
|
13
|
-
This library is licensed under [The MIT License (MIT)](https://github.com/react-native-oh-library/react-native-map-clustering/blob/sig/LICENSE)
|
|
1
|
+
# @react-native-ohos/react-native-map-clustering
|
|
2
|
+
|
|
3
|
+
This project is based on [react-native-map-clustering@v3.4.0](https://github.com/tomekvenits/react-native-map-clustering/tree/3.4.0)
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
- [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-map-clustering.md)
|
|
8
|
+
|
|
9
|
+
- [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-map-clustering.md)
|
|
10
|
+
|
|
11
|
+
## License
|
|
12
|
+
|
|
13
|
+
This library is licensed under [The MIT License (MIT)](https://github.com/react-native-oh-library/react-native-map-clustering/blob/sig/LICENSE)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
{
|
|
8
|
+
"extends": "@react-native",
|
|
9
|
+
"rules": {
|
|
10
|
+
"react-native/no-inline-styles": "off",
|
|
11
|
+
"react/no-unstable-nested-components": "off",
|
|
12
|
+
"react/react-in-jsx-scope": "off",
|
|
13
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
14
|
+
"react-hooks/exhaustive-deps": "off",
|
|
15
|
+
"radix": "off",
|
|
16
|
+
"prettier/prettier": "warn",
|
|
17
|
+
"max-lines": "off"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/example/app.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
|
|
9
|
+
export const AppParamsContext = React.createContext(undefined);
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": {
|
|
3
|
+
"products": [
|
|
4
|
+
{
|
|
5
|
+
"name": 'default',
|
|
6
|
+
"signingConfig": 'default',
|
|
7
|
+
"compileSdkVersion": '5.0.1(13)',
|
|
8
|
+
"compatibleSdkVersion": '5.0.0(12)',
|
|
9
|
+
"runtimeOS": 'HarmonyOS'
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
"buildModeSet": [
|
|
13
|
+
{
|
|
14
|
+
"name": 'debug',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": 'release',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
"signingConfigs": []
|
|
21
|
+
},
|
|
22
|
+
"modules": [
|
|
23
|
+
{
|
|
24
|
+
"name": 'entry',
|
|
25
|
+
"srcPath": './entry',
|
|
26
|
+
"targets": [
|
|
27
|
+
{
|
|
28
|
+
"name": 'default',
|
|
29
|
+
"applyToProducts": [
|
|
30
|
+
'default'
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": ["**/*.ts", "**/*.ets"],
|
|
3
|
+
"ignore": [
|
|
4
|
+
"**/ohosTest/**/*",
|
|
5
|
+
"**/node_modules/**/*",
|
|
6
|
+
"**/hvigorfile.ts",
|
|
7
|
+
"**/node_modules/**/*",
|
|
8
|
+
"**/oh_modules/**/*",
|
|
9
|
+
"**/build/**/*",
|
|
10
|
+
"**/.preview/**/*"
|
|
11
|
+
],
|
|
12
|
+
"plugins": ["@typescript-eslint"],
|
|
13
|
+
"ruleSet": [],
|
|
14
|
+
"rules": {
|
|
15
|
+
"@typescript-eslint/await-thenable": "warn",
|
|
16
|
+
"@typescript-eslint/consistent-type-imports": "warn",
|
|
17
|
+
"@typescript-eslint/explicit-function-return-type": "warn",
|
|
18
|
+
"@typescript-eslint/explicit-module-boundary-types": "warn",
|
|
19
|
+
"@typescript-eslint/no-dynamic-delete": "warn",
|
|
20
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
21
|
+
"@typescript-eslint/no-for-in-array": "warn",
|
|
22
|
+
"@typescript-eslint/no-this-alias": "warn",
|
|
23
|
+
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
24
|
+
"@typescript-eslint/no-unsafe-argument": "warn",
|
|
25
|
+
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
26
|
+
"@typescript-eslint/no-unsafe-call": "warn",
|
|
27
|
+
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
28
|
+
"@typescript-eslint/no-unsafe-return": "warn",
|
|
29
|
+
"@typescript-eslint/prefer-literal-enum-member": "warn"
|
|
30
|
+
},
|
|
31
|
+
"overrides": []
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiType": 'stageMode',
|
|
3
|
+
"buildOption": {
|
|
4
|
+
"externalNativeOptions": {
|
|
5
|
+
"path": "./src/main/cpp/CMakeLists.txt",
|
|
6
|
+
"arguments": "",
|
|
7
|
+
"cppFlags": "-s",
|
|
8
|
+
"abiFilters": [
|
|
9
|
+
"arm64-v8a",
|
|
10
|
+
"x86_64"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
"targets": [
|
|
15
|
+
{
|
|
16
|
+
"name": "default",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "ohosTest",
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
|
|
8
|
+
export { hapTasks } from '@ohos/hvigor-ohos-plugin';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"license": "ISC",
|
|
3
|
+
"devDependencies": {},
|
|
4
|
+
"name": "entry",
|
|
5
|
+
"description": "example description",
|
|
6
|
+
"version": "1.0.0",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@rnoh/react-native-openharmony": "file:../../node_modules/react-native-harmony/harmony/react_native_openharmony.har",
|
|
9
|
+
"@react-native-ohos/react-native-maps": "file:../../node_modules/@react-native-ohos/react-native-maps/harmony/maps.har"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
project(rnapp)
|
|
2
|
+
cmake_minimum_required(VERSION 3.4.1)
|
|
3
|
+
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
|
4
|
+
set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
5
|
+
set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
|
|
6
|
+
set(OH_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
|
|
7
|
+
set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules/@rnoh/react-native-openharmony/src/main/cpp")
|
|
8
|
+
set(RNOH_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/generated")
|
|
9
|
+
set(LOG_VERBOSITY_LEVEL 1)
|
|
10
|
+
set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
|
|
11
|
+
set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
|
|
12
|
+
set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
|
|
13
|
+
|
|
14
|
+
set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
|
|
15
|
+
add_compile_definitions(WITH_HITRACE_SYSTRACE)
|
|
16
|
+
|
|
17
|
+
# (VM) Define a variable and assign it to the current module's cpp directory
|
|
18
|
+
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
|
19
|
+
|
|
20
|
+
# Add the Header File directory, including cpp, cpp/include, and tell cmake to find the Header Files introduced by the code here
|
|
21
|
+
include_directories(${NATIVERENDER_ROOT_PATH}
|
|
22
|
+
${NATIVERENDER_ROOT_PATH}/include)
|
|
23
|
+
|
|
24
|
+
add_subdirectory("${RNOH_CPP_DIR}" ./rn)
|
|
25
|
+
|
|
26
|
+
# RNOH_BEGIN: manual_package_linking_1
|
|
27
|
+
add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-maps/src/main/cpp" ./maps)
|
|
28
|
+
|
|
29
|
+
# RNOH_END: manual_package_linking_1
|
|
30
|
+
|
|
31
|
+
file(GLOB GENERATED_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/generated/*.cpp") # this line is needed by codegen v1
|
|
32
|
+
|
|
33
|
+
add_library(rnoh_app SHARED
|
|
34
|
+
${GENERATED_CPP_FILES}
|
|
35
|
+
"./PackageProvider.cpp"
|
|
36
|
+
"${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
|
|
37
|
+
)
|
|
38
|
+
target_link_libraries(rnoh_app PUBLIC rnoh)
|
|
39
|
+
|
|
40
|
+
# RNOH_BEGIN: manual_package_linking_2
|
|
41
|
+
target_link_libraries(rnoh_app PUBLIC rnoh_maps)
|
|
42
|
+
# RNOH_END: manual_package_linking_2
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
+
// Use of this source code is governed by a MIT license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
#include "RNOH/PackageProvider.h"
|
|
6
|
+
#include "generated/RNOHGeneratedPackage.h"
|
|
7
|
+
#include "MapsPackage.h"
|
|
8
|
+
|
|
9
|
+
using namespace rnoh;
|
|
10
|
+
|
|
11
|
+
std::vector<std::shared_ptr<Package>> PackageProvider::getPackages(Package::Context ctx)
|
|
12
|
+
{
|
|
13
|
+
return {
|
|
14
|
+
std::make_shared<RNOHGeneratedPackage>(ctx), // generated by codegen v1
|
|
15
|
+
std::make_shared<MapsPackage>(ctx)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import type {RNPackageContext, RNPackage} from '@rnoh/react-native-openharmony/ts';
|
|
9
|
+
import {MapsPackage} from '@react-native-ohos/react-native-maps/ts';
|
|
10
|
+
|
|
11
|
+
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
|
|
12
|
+
return [
|
|
13
|
+
new MapsPackage(ctx)
|
|
14
|
+
];
|
|
15
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {RNAbility} from '@rnoh/react-native-openharmony';
|
|
8
|
+
import { AbilityConstant, Want } from '@kit.AbilityKit';
|
|
9
|
+
|
|
10
|
+
export default class EntryAbility extends RNAbility {
|
|
11
|
+
|
|
12
|
+
onCreate(want: Want) {
|
|
13
|
+
super.onCreate(want)
|
|
14
|
+
this.handleWeChatCallIfNeed(want)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
getPagePath() {
|
|
18
|
+
return 'pages/Index';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
onNewWant(want: Want, _launchParam: AbilityConstant.LaunchParam): void {
|
|
22
|
+
this.handleWeChatCallIfNeed(want)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private handleWeChatCallIfNeed(want: Want) {
|
|
26
|
+
}
|
|
27
|
+
}
|