@react-native-ohos/react-native-default-preference 1.4.5-rc.1 → 1.4.5-rc.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/COMMITTERS.md +10 -10
- package/LICENSE +21 -21
- package/OAT.xml +68 -68
- package/README.OpenSource +10 -10
- package/README.md +12 -12
- package/RNDefaultPreference.podspec +22 -22
- package/flow-typed/index.js +23 -23
- package/harmony/react_native_default_preference/Index.ets +8 -7
- package/harmony/react_native_default_preference/build-profile.json5 +25 -25
- package/harmony/react_native_default_preference/hvigorfile.ts +6 -6
- package/harmony/react_native_default_preference/obfuscation-rules.txt +17 -17
- package/harmony/react_native_default_preference/oh-package.json5 +12 -12
- package/harmony/react_native_default_preference/src/main/cpp/CMakeLists.txt +1 -1
- package/harmony/react_native_default_preference/src/main/cpp/RNDefaultPreferencePackage.h +36 -0
- package/harmony/react_native_default_preference/src/main/cpp/generated/RNOH/generated/BaseReactNativeDefaultPreferencePackage.h +65 -72
- package/harmony/react_native_default_preference/src/main/cpp/generated/RNOH/generated/turbo_modules/DefaultPreferenceNativeModule.cpp +25 -25
- package/harmony/react_native_default_preference/src/main/cpp/generated/RNOH/generated/turbo_modules/DefaultPreferenceNativeModule.h +16 -16
- package/harmony/react_native_default_preference/src/main/ets/Logger.ts +45 -45
- package/harmony/react_native_default_preference/src/main/ets/{RNDefaultPreferencePackage.ts → RNDefaultPreferencePackage.ets} +28 -27
- package/harmony/react_native_default_preference/src/main/ets/RNDefaultPreferenceTurboModule.ts +143 -143
- package/harmony/react_native_default_preference/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/react_native_default_preference/src/main/ets/generated/index.ets +5 -5
- package/harmony/react_native_default_preference/src/main/ets/generated/ts.ts +6 -6
- package/harmony/react_native_default_preference/src/main/ets/generated/turboModules/DefaultPreferenceNativeModule.ts +32 -32
- package/harmony/react_native_default_preference/src/main/ets/generated/turboModules/ts.ts +5 -5
- package/harmony/react_native_default_preference/src/main/ets/pages/Index.ets +22 -22
- package/harmony/react_native_default_preference/src/main/ets/utils/Calc.ets +8 -8
- package/harmony/react_native_default_preference/src/main/module.json5 +10 -10
- package/harmony/react_native_default_preference/src/main/resources/base/element/string.json +7 -7
- package/harmony/react_native_default_preference/{ts.ts → ts.ets} +7 -7
- package/harmony/react_native_default_preference.har +0 -0
- package/index.d.ts +19 -19
- package/index.js +12 -12
- package/package.json +44 -35
- package/src/NativeDefaultPreference.ts +21 -21
- package/harmony/react_native_default_preference/BuildProfile.ets +0 -17
- package/harmony/react_native_default_preference/oh-package-lock.json5 +0 -18
- package/harmony/react_native_default_preference/src/main/cpp/DefaultPreferencePackage.h +0 -19
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/ComponentDescriptors.h +0 -24
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/EventEmitters.cpp +0 -16
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/EventEmitters.h +0 -17
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/Props.cpp +0 -19
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/Props.h +0 -18
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/ShadowNodes.cpp +0 -17
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/ShadowNodes.h +0 -23
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/States.cpp +0 -16
- package/harmony/react_native_default_preference/src/main/cpp/generated/react/renderer/components/react_native_default_preference/States.h +0 -19
package/COMMITTERS.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
## Committers列表
|
|
2
|
-
|
|
3
|
-
### 以下是此项目的committer人员
|
|
4
|
-
|
|
5
|
-
不区分先后顺序
|
|
6
|
-
|
|
7
|
-
- [MaDiXin](https://gitee.com/MaDiXin)
|
|
8
|
-
- [xiafeng_xf_admin](https://gitee.com/xiafeng_xf_admin)
|
|
9
|
-
- [ChenLixi](https://gitee.com/Louis-C7)
|
|
10
|
-
- [LinJiacheng](https://gitee.com/LLLLLLin)
|
|
1
|
+
## Committers列表
|
|
2
|
+
|
|
3
|
+
### 以下是此项目的committer人员
|
|
4
|
+
|
|
5
|
+
不区分先后顺序
|
|
6
|
+
|
|
7
|
+
- [MaDiXin](https://gitee.com/MaDiXin)
|
|
8
|
+
- [xiafeng_xf_admin](https://gitee.com/xiafeng_xf_admin)
|
|
9
|
+
- [ChenLixi](https://gitee.com/Louis-C7)
|
|
10
|
+
- [LinJiacheng](https://gitee.com/LLLLLLin)
|
|
11
11
|
- [ZhengJinshou](https://gitee.com/longziz)
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Kevin Leung
|
|
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) 2017 Kevin Leung
|
|
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,69 +1,69 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
Unless required by applicable law or agreed to in writing, software
|
|
8
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
-
See the License for the specific language governing permissions and
|
|
11
|
-
limitations under the License.
|
|
12
|
-
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
|
13
|
-
-->
|
|
14
|
-
|
|
15
|
-
<configuration>
|
|
16
|
-
<oatconfig>
|
|
17
|
-
<licensefile>LICENSE</licensefile>
|
|
18
|
-
<policylist>
|
|
19
|
-
<policy name="projectPolicy" desc="">
|
|
20
|
-
<policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
|
|
21
|
-
</policy>
|
|
22
|
-
<policy name="projectPolicy" desc="">
|
|
23
|
-
<policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/>
|
|
24
|
-
<policyitem type="compatibility" name="Apache-2.0" path=".*" desc="不影响兼容性"/>
|
|
25
|
-
<policyitem type="compatibility" name="BSDStyleLicense" path=".*" desc="不影响兼容性" />
|
|
26
|
-
<policyitem type="compatibility" name="MIT" path=".*" desc="不影响兼容性" />
|
|
27
|
-
<policyitem type="compatibility" name="GPLStyleLicense" path=".*" desc="不影响兼容性" />
|
|
28
|
-
</policy>
|
|
29
|
-
</policylist>
|
|
30
|
-
<filefilterlist>
|
|
31
|
-
<filefilter name="defaultFilter" desc="Files not to check">
|
|
32
|
-
|
|
33
|
-
</filefilter>
|
|
34
|
-
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
35
|
-
<filteritem type="filename" name="LICENSE" desc="许可证说明文件,不添加版权头"/>
|
|
36
|
-
<filteritem type="filename" name="RNDefaultPreference.podspec" desc="工程配置文件,不添加版权头"/>
|
|
37
|
-
<filteritem type="filename" name="README.OpenSource" desc="许可证说明文件,不添加版权头"/>
|
|
38
|
-
<filteritem type="filename" name="index.d.ts" desc="需要引用的原库文件,不添加许可证头"/>
|
|
39
|
-
<filteritem type="filename" name="index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
40
|
-
<filteritem type="filepath" name="flow-typed/index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
41
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/src/main/module.json5" desc="工程配置文件,不添加许可证头"/>
|
|
42
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/BuildProfile.ets" desc="工程配置文件,不添加许可证头"/>
|
|
43
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/build-profile.json5" desc="工程配置文件,不添加许可证头"/>
|
|
44
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/hvigorfile.ts" desc="工程配置文件,不添加许可证头"/>
|
|
45
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package-lock.json5" desc="工程配置文件,不添加许可证头"/>
|
|
46
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package.json5" desc="工程配置文件,不添加许可证头"/>
|
|
47
|
-
|
|
48
|
-
</filefilter>
|
|
49
|
-
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for copyright header policies">
|
|
50
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference.har" desc="项目打包文件"/>
|
|
51
|
-
</filefilter>
|
|
52
|
-
|
|
53
|
-
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
|
54
|
-
<filteritem type="filename" name="RNDefaultPreference.podspec" desc="工程配置文件,不添加版权头"/>
|
|
55
|
-
<filteritem type="filename" name="README.OpenSource" desc="许可证说明文件,不添加版权头"/>
|
|
56
|
-
<filteritem type="filename" name="index.d.ts" desc="需要引用的原库文件,不添加许可证头"/>
|
|
57
|
-
<filteritem type="filename" name="index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
58
|
-
<filteritem type="filepath" name="flow-typed/index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
59
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/src/main/module.json5" desc="工程配置文件,不添加许可证头"/>
|
|
60
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/BuildProfile.ets" desc="工程配置文件,不添加许可证头"/>
|
|
61
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/build-profile.json5" desc="工程配置文件,不添加许可证头"/>
|
|
62
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/hvigorfile.ts" desc="工程配置文件,不添加许可证头"/>
|
|
63
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package-lock.json5" desc="工程配置文件,不添加许可证头"/>
|
|
64
|
-
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package.json5" desc="工程配置文件,不添加许可证头"/>
|
|
65
|
-
|
|
66
|
-
</filefilter>
|
|
67
|
-
</filefilterlist>
|
|
68
|
-
</oatconfig>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
See the License for the specific language governing permissions and
|
|
11
|
+
limitations under the License.
|
|
12
|
+
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
<configuration>
|
|
16
|
+
<oatconfig>
|
|
17
|
+
<licensefile>LICENSE</licensefile>
|
|
18
|
+
<policylist>
|
|
19
|
+
<policy name="projectPolicy" desc="">
|
|
20
|
+
<policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
|
|
21
|
+
</policy>
|
|
22
|
+
<policy name="projectPolicy" desc="">
|
|
23
|
+
<policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/>
|
|
24
|
+
<policyitem type="compatibility" name="Apache-2.0" path=".*" desc="不影响兼容性"/>
|
|
25
|
+
<policyitem type="compatibility" name="BSDStyleLicense" path=".*" desc="不影响兼容性" />
|
|
26
|
+
<policyitem type="compatibility" name="MIT" path=".*" desc="不影响兼容性" />
|
|
27
|
+
<policyitem type="compatibility" name="GPLStyleLicense" path=".*" desc="不影响兼容性" />
|
|
28
|
+
</policy>
|
|
29
|
+
</policylist>
|
|
30
|
+
<filefilterlist>
|
|
31
|
+
<filefilter name="defaultFilter" desc="Files not to check">
|
|
32
|
+
|
|
33
|
+
</filefilter>
|
|
34
|
+
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
35
|
+
<filteritem type="filename" name="LICENSE" desc="许可证说明文件,不添加版权头"/>
|
|
36
|
+
<filteritem type="filename" name="RNDefaultPreference.podspec" desc="工程配置文件,不添加版权头"/>
|
|
37
|
+
<filteritem type="filename" name="README.OpenSource" desc="许可证说明文件,不添加版权头"/>
|
|
38
|
+
<filteritem type="filename" name="index.d.ts" desc="需要引用的原库文件,不添加许可证头"/>
|
|
39
|
+
<filteritem type="filename" name="index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
40
|
+
<filteritem type="filepath" name="flow-typed/index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
41
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/src/main/module.json5" desc="工程配置文件,不添加许可证头"/>
|
|
42
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/BuildProfile.ets" desc="工程配置文件,不添加许可证头"/>
|
|
43
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/build-profile.json5" desc="工程配置文件,不添加许可证头"/>
|
|
44
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/hvigorfile.ts" desc="工程配置文件,不添加许可证头"/>
|
|
45
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package-lock.json5" desc="工程配置文件,不添加许可证头"/>
|
|
46
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package.json5" desc="工程配置文件,不添加许可证头"/>
|
|
47
|
+
|
|
48
|
+
</filefilter>
|
|
49
|
+
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for copyright header policies">
|
|
50
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference.har" desc="项目打包文件"/>
|
|
51
|
+
</filefilter>
|
|
52
|
+
|
|
53
|
+
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
|
54
|
+
<filteritem type="filename" name="RNDefaultPreference.podspec" desc="工程配置文件,不添加版权头"/>
|
|
55
|
+
<filteritem type="filename" name="README.OpenSource" desc="许可证说明文件,不添加版权头"/>
|
|
56
|
+
<filteritem type="filename" name="index.d.ts" desc="需要引用的原库文件,不添加许可证头"/>
|
|
57
|
+
<filteritem type="filename" name="index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
58
|
+
<filteritem type="filepath" name="flow-typed/index.js" desc="需要引用的原库文件,不添加许可证头"/>
|
|
59
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/src/main/module.json5" desc="工程配置文件,不添加许可证头"/>
|
|
60
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/BuildProfile.ets" desc="工程配置文件,不添加许可证头"/>
|
|
61
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/build-profile.json5" desc="工程配置文件,不添加许可证头"/>
|
|
62
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/hvigorfile.ts" desc="工程配置文件,不添加许可证头"/>
|
|
63
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package-lock.json5" desc="工程配置文件,不添加许可证头"/>
|
|
64
|
+
<filteritem type="filepath" name="harmony/react_native_default_preference/oh-package.json5" desc="工程配置文件,不添加许可证头"/>
|
|
65
|
+
|
|
66
|
+
</filefilter>
|
|
67
|
+
</filefilterlist>
|
|
68
|
+
</oatconfig>
|
|
69
69
|
</configuration>
|
package/README.OpenSource
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"Name": "react-native-default-preference",
|
|
4
|
-
"License": "MIT License",
|
|
5
|
-
"License File": "https://github.com/kevinresol/react-native-default-preference/blob/master/LICENSE",
|
|
6
|
-
"Version Number": "1.4.4",
|
|
7
|
-
"Owner" : "xiafeng@huawei.com",
|
|
8
|
-
"Upstream URL": "https://github.com/kevinresol/react-native-default-preference",
|
|
9
|
-
"Description": "Use SharedPreference (Android) and UserDefaults (iOS) with React Native over a unified interface"
|
|
10
|
-
}
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"Name": "react-native-default-preference",
|
|
4
|
+
"License": "MIT License",
|
|
5
|
+
"License File": "https://github.com/kevinresol/react-native-default-preference/blob/master/LICENSE",
|
|
6
|
+
"Version Number": "1.4.4",
|
|
7
|
+
"Owner" : "xiafeng@huawei.com",
|
|
8
|
+
"Upstream URL": "https://github.com/kevinresol/react-native-default-preference",
|
|
9
|
+
"Description": "Use SharedPreference (Android) and UserDefaults (iOS) with React Native over a unified interface"
|
|
10
|
+
}
|
|
11
11
|
]
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# @react-native-
|
|
2
|
-
|
|
3
|
-
This project is based on [react-native-default-preference](https://github.com/kevinresol/react-native-default-preference)
|
|
4
|
-
|
|
5
|
-
## Documentation
|
|
6
|
-
|
|
7
|
-
[中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-default-preference.md)
|
|
8
|
-
|
|
9
|
-
[English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-default-preference.md)
|
|
10
|
-
|
|
11
|
-
## License
|
|
12
|
-
|
|
1
|
+
# @react-native-ohos/react-native-default-preference
|
|
2
|
+
|
|
3
|
+
This project is based on [react-native-default-preference](https://github.com/kevinresol/react-native-default-preference)
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
[中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-default-preference.md)
|
|
8
|
+
|
|
9
|
+
[English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-default-preference.md)
|
|
10
|
+
|
|
11
|
+
## License
|
|
12
|
+
|
|
13
13
|
This library is licensed under [The MIT License (MIT)](https://github.com/kevinresol/react-native-default-preference/blob/master/LICENSE).
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
require 'json'
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "RNDefaultPreference"
|
|
7
|
-
s.version = package['version']
|
|
8
|
-
s.summary = package['description']
|
|
9
|
-
s.description = package['description']
|
|
10
|
-
s.license = package['license']
|
|
11
|
-
s.author = package['author']
|
|
12
|
-
s.homepage = package['homepage']
|
|
13
|
-
|
|
14
|
-
s.platforms = { :ios => "9.0", :tvos => "11.0" }
|
|
15
|
-
s.ios.deployment_target = '9.0'
|
|
16
|
-
|
|
17
|
-
s.preserve_paths = 'README.md', 'package.json', 'index.js'
|
|
18
|
-
s.source_files = 'iOS/*.{h,m}'
|
|
19
|
-
s.source = { :git => 'https://github.com/kevinresol/react-native-default-preference.git' }
|
|
20
|
-
|
|
21
|
-
s.dependency 'React-Core'
|
|
22
|
-
end
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "RNDefaultPreference"
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => "9.0", :tvos => "11.0" }
|
|
15
|
+
s.ios.deployment_target = '9.0'
|
|
16
|
+
|
|
17
|
+
s.preserve_paths = 'README.md', 'package.json', 'index.js'
|
|
18
|
+
s.source_files = 'iOS/*.{h,m}'
|
|
19
|
+
s.source = { :git => 'https://github.com/kevinresol/react-native-default-preference.git' }
|
|
20
|
+
|
|
21
|
+
s.dependency 'React-Core'
|
|
22
|
+
end
|
package/flow-typed/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flowtype definitions for index
|
|
3
|
-
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.10.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
declare module "react-native-default-preference" {
|
|
8
|
-
declare export interface RNDefaultPreferenceKeys {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
}
|
|
11
|
-
declare export default class RNDefaultPreference {
|
|
12
|
-
static get(key: string): Promise<string | undefined | null>;
|
|
13
|
-
static set(key: string, value: string): Promise<void>;
|
|
14
|
-
static clear(key: string): Promise<void>;
|
|
15
|
-
static getMultiple(keys: string[]): Promise<RNDefaultPreferenceKeys>;
|
|
16
|
-
static setMultiple(data: RNDefaultPreferenceKeys): Promise<void>;
|
|
17
|
-
static clearMultiple(keys: string[]): Promise<void>;
|
|
18
|
-
static getAll(): Promise<RNDefaultPreferenceKeys>;
|
|
19
|
-
static clearAll(): Promise<void>;
|
|
20
|
-
static getName(): Promise<string>;
|
|
21
|
-
static setName(name: string): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.10.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
declare module "react-native-default-preference" {
|
|
8
|
+
declare export interface RNDefaultPreferenceKeys {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
}
|
|
11
|
+
declare export default class RNDefaultPreference {
|
|
12
|
+
static get(key: string): Promise<string | undefined | null>;
|
|
13
|
+
static set(key: string, value: string): Promise<void>;
|
|
14
|
+
static clear(key: string): Promise<void>;
|
|
15
|
+
static getMultiple(keys: string[]): Promise<RNDefaultPreferenceKeys>;
|
|
16
|
+
static setMultiple(data: RNDefaultPreferenceKeys): Promise<void>;
|
|
17
|
+
static clearMultiple(keys: string[]): Promise<void>;
|
|
18
|
+
static getAll(): Promise<RNDefaultPreferenceKeys>;
|
|
19
|
+
static clearAll(): Promise<void>;
|
|
20
|
+
static getName(): Promise<string>;
|
|
21
|
+
static setName(name: string): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,7 +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
|
-
export * from "./ts"
|
|
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
|
+
import { RNDefaultPreferencePackage as DefaultPreferencePackage } from './src/main/ets/RNDefaultPreferencePackage';
|
|
7
|
+
export * from "./ts"
|
|
8
|
+
export default DefaultPreferencePackage
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"apiType": "stageMode",
|
|
3
|
-
/* "buildOption": {
|
|
4
|
-
},
|
|
5
|
-
"buildOptionSet": [
|
|
6
|
-
{
|
|
7
|
-
"name": "release",
|
|
8
|
-
"arkOptions": {
|
|
9
|
-
"obfuscation": {
|
|
10
|
-
"ruleOptions": {
|
|
11
|
-
"enable": true,
|
|
12
|
-
"files": [
|
|
13
|
-
"./obfuscation-rules.txt"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],*/
|
|
20
|
-
"targets": [
|
|
21
|
-
{
|
|
22
|
-
"name": "default",
|
|
23
|
-
"runtimeOS": "HarmonyOS"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"apiType": "stageMode",
|
|
3
|
+
/* "buildOption": {
|
|
4
|
+
},
|
|
5
|
+
"buildOptionSet": [
|
|
6
|
+
{
|
|
7
|
+
"name": "release",
|
|
8
|
+
"arkOptions": {
|
|
9
|
+
"obfuscation": {
|
|
10
|
+
"ruleOptions": {
|
|
11
|
+
"enable": true,
|
|
12
|
+
"files": [
|
|
13
|
+
"./obfuscation-rules.txt"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],*/
|
|
20
|
+
"targets": [
|
|
21
|
+
{
|
|
22
|
+
"name": "default",
|
|
23
|
+
"runtimeOS": "HarmonyOS"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
|
5
|
-
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
|
6
|
-
}
|
|
1
|
+
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
|
5
|
+
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
|
6
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# Define project specific obfuscation rules here.
|
|
2
|
-
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
|
3
|
-
#
|
|
4
|
-
# For more details, see
|
|
5
|
-
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
|
|
6
|
-
|
|
7
|
-
# Obfuscation options:
|
|
8
|
-
# -disable-obfuscation: disable all obfuscations
|
|
9
|
-
# -enable-property-obfuscation: obfuscate the property names
|
|
10
|
-
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
|
11
|
-
# -compact: remove unnecessary blank spaces and all line feeds
|
|
12
|
-
# -remove-log: remove all console.* statements
|
|
13
|
-
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
|
14
|
-
# -apply-namecache: reuse the given cache file
|
|
15
|
-
|
|
16
|
-
# Keep options:
|
|
17
|
-
# -keep-property-name: specifies property names that you want to keep
|
|
1
|
+
# Define project specific obfuscation rules here.
|
|
2
|
+
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
|
3
|
+
#
|
|
4
|
+
# For more details, see
|
|
5
|
+
# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5
|
|
6
|
+
|
|
7
|
+
# Obfuscation options:
|
|
8
|
+
# -disable-obfuscation: disable all obfuscations
|
|
9
|
+
# -enable-property-obfuscation: obfuscate the property names
|
|
10
|
+
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
|
11
|
+
# -compact: remove unnecessary blank spaces and all line feeds
|
|
12
|
+
# -remove-log: remove all console.* statements
|
|
13
|
+
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
|
14
|
+
# -apply-namecache: reuse the given cache file
|
|
15
|
+
|
|
16
|
+
# Keep options:
|
|
17
|
+
# -keep-property-name: specifies property names that you want to keep
|
|
18
18
|
# -keep-global-name: specifies names that you want to keep in the global scope
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-native-ohos/react-native-default-preference",
|
|
3
|
-
"version": "1.4.5-rc.
|
|
4
|
-
"description": "Keep the screen from going to sleep",
|
|
5
|
-
"main": "Index.ets",
|
|
6
|
-
"author": "",
|
|
7
|
-
"license": "Apache-2.0",
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@rnoh/react-native-openharmony": 'file:../react_native_openharmony'
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/react-native-default-preference",
|
|
3
|
+
"version": "1.4.5-rc.2",
|
|
4
|
+
"description": "Keep the screen from going to sleep",
|
|
5
|
+
"main": "Index.ets",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@rnoh/react-native-openharmony": 'file:../react_native_openharmony'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
@@ -5,5 +5,5 @@ set(rnoh_default_preference_generated_dir "${CMAKE_CURRENT_SOURCE_DIR}/generated
|
|
|
5
5
|
file(GLOB_RECURSE rnoh_default_preference_generated_SRC "${rnoh_default_preference_generated_dir}/**/*.cpp")
|
|
6
6
|
file(GLOB rnoh_default_preference_SRC CONFIGURE_DEPENDS *.cpp)
|
|
7
7
|
add_library(rnoh_default_preference SHARED ${rnoh_default_preference_SRC} ${rnoh_default_preference_generated_SRC})
|
|
8
|
-
target_include_directories(rnoh_default_preference PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_default_preference_generated_dir}
|
|
8
|
+
target_include_directories(rnoh_default_preference PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_default_preference_generated_dir})
|
|
9
9
|
target_link_libraries(rnoh_default_preference PUBLIC rnoh)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Huawei Device Co., Ltd.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
#ifndef RNDEFAULTPREFERENCEPACKAGE_H
|
|
25
|
+
#define RNDEFAULTPREFERENCEPACKAGE_H
|
|
26
|
+
|
|
27
|
+
#include "generated/RNOH/generated/BaseReactNativeDefaultPreferencePackage.h"
|
|
28
|
+
#pragma once
|
|
29
|
+
|
|
30
|
+
namespace rnoh {
|
|
31
|
+
class RNDefaultPreferencePackage : public BaseReactNativeDefaultPreferencePackage {
|
|
32
|
+
using Super = BaseReactNativeDefaultPreferencePackage;
|
|
33
|
+
using Super::Super;
|
|
34
|
+
};
|
|
35
|
+
} // namespace rnoh
|
|
36
|
+
#endif
|