@react-native-ohos/react-native-sensitive-info 6.0.1-rc.1 → 6.0.1-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.
- package/LICENSE +21 -21
- package/README.OpenSource +10 -10
- package/README.md +12 -12
- package/harmony/react_native_sensitive_info/build-profile.json5 +27 -27
- package/harmony/react_native_sensitive_info/hvigorfile.ts +6 -6
- package/harmony/react_native_sensitive_info/index.ets +9 -7
- package/harmony/react_native_sensitive_info/obfuscation-rules.txt +17 -17
- package/harmony/react_native_sensitive_info/oh-package.json5 +13 -13
- package/harmony/react_native_sensitive_info/src/main/cpp/CMakeLists.txt +2 -2
- package/harmony/react_native_sensitive_info/src/main/cpp/SensitiveInfoPackage.h +24 -7
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/RNOH/generated/BaseReactNativeSensitiveInfoPackage.h +65 -72
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/RNOH/generated/turbo_modules/SensitiveInfoNativeModule.cpp +24 -24
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/RNOH/generated/turbo_modules/SensitiveInfoNativeModule.h +16 -16
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/ComponentDescriptors.h +22 -24
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/EventEmitters.cpp +18 -16
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/EventEmitters.h +19 -17
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/Props.cpp +21 -19
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/Props.h +20 -18
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/ShadowNodes.cpp +19 -17
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/ShadowNodes.h +25 -23
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/States.cpp +18 -16
- package/harmony/react_native_sensitive_info/src/main/cpp/generated/react/renderer/components/react_native_sensitive_info/States.h +23 -19
- package/harmony/react_native_sensitive_info/src/main/ets/Logger.ts +63 -63
- package/harmony/react_native_sensitive_info/src/main/ets/{RNSensitiveInfoPackage.ts → RNSensitiveInfoPackage.ets} +46 -45
- package/harmony/react_native_sensitive_info/src/main/ets/RNSensitiveInfoTurboModule.ts +229 -229
- package/harmony/react_native_sensitive_info/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/react_native_sensitive_info/src/main/ets/generated/index.ets +5 -5
- package/harmony/react_native_sensitive_info/src/main/ets/generated/ts.ts +6 -6
- package/harmony/react_native_sensitive_info/src/main/ets/generated/turboModules/SensitiveInfoNativeModule.ts +34 -34
- package/harmony/react_native_sensitive_info/src/main/ets/generated/turboModules/ts.ts +5 -5
- package/harmony/react_native_sensitive_info/src/main/ets/pages/index.ets +25 -25
- package/harmony/react_native_sensitive_info/src/main/ets/tools.ts +59 -59
- package/harmony/react_native_sensitive_info/src/main/ets/utils/Calc.ets +8 -8
- package/harmony/react_native_sensitive_info/src/main/module.json5 +10 -10
- package/harmony/react_native_sensitive_info/src/main/resources/base/element/color.json +7 -7
- package/harmony/react_native_sensitive_info/src/main/resources/base/element/string.json +15 -15
- package/harmony/react_native_sensitive_info/src/main/resources/base/media/layered_image.json +6 -6
- package/harmony/react_native_sensitive_info/src/main/resources/base/profile/main_pages.json +5 -5
- package/harmony/react_native_sensitive_info/src/main/resources/en_US/element/string.json +15 -15
- package/harmony/react_native_sensitive_info/src/main/resources/zh_CN/element/string.json +15 -15
- package/harmony/react_native_sensitive_info/src/mock/mock-config.json5 +1 -1
- package/harmony/react_native_sensitive_info/src/ohosTest/ets/test/Ability.test.ets +40 -40
- package/harmony/react_native_sensitive_info/src/ohosTest/ets/test/List.test.ets +10 -10
- package/harmony/react_native_sensitive_info/src/ohosTest/ets/testability/TestAbility.ets +60 -60
- package/harmony/react_native_sensitive_info/src/ohosTest/ets/testability/pages/Index.ets +22 -22
- package/harmony/react_native_sensitive_info/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets +97 -97
- package/harmony/react_native_sensitive_info/src/ohosTest/module.json5 +28 -28
- package/harmony/react_native_sensitive_info/src/ohosTest/resources/base/element/color.json +7 -7
- package/harmony/react_native_sensitive_info/src/ohosTest/resources/base/element/string.json +15 -15
- package/harmony/react_native_sensitive_info/src/ohosTest/resources/base/profile/test_pages.json +5 -5
- package/harmony/react_native_sensitive_info/src/test/List.test.ets +10 -10
- package/harmony/react_native_sensitive_info/src/test/LocalUnit.test.ets +38 -38
- package/harmony/react_native_sensitive_info/{ts.ts → ts.ets} +9 -9
- package/harmony/react_native_sensitive_info.har +0 -0
- package/index.d.ts +74 -74
- package/package.json +83 -70
- package/react-native-sensitive-info.podspec +19 -19
- package/harmony/react_native_sensitive_info/BuildProfile.ets +0 -17
- package/src/NativeSensitiveInfo.ts +0 -81
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016 ClassApp
|
|
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
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 ClassApp
|
|
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/README.OpenSource
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"Name": "react-native-sensitive-info",
|
|
4
|
-
"License": "MIT License",
|
|
5
|
-
"License File": "https://github.com/mCodex/react-native-sensitive-info/blob/master/LICENSE",
|
|
6
|
-
"Version Number": "6.0.0-alpha.9",
|
|
7
|
-
"Owner" : "xiafeng@huawei.com",
|
|
8
|
-
"Upstream URL": "https://github.com/mCodex/react-native-sensitive-info",
|
|
9
|
-
"Description": "react-native-sensitive-info manages all data stored in Android Shared Preferences and iOS Keychain. You can set, get and delete keys/values using simple methods."
|
|
10
|
-
}
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"Name": "react-native-sensitive-info",
|
|
4
|
+
"License": "MIT License",
|
|
5
|
+
"License File": "https://github.com/mCodex/react-native-sensitive-info/blob/master/LICENSE",
|
|
6
|
+
"Version Number": "6.0.0-alpha.9",
|
|
7
|
+
"Owner" : "xiafeng@huawei.com",
|
|
8
|
+
"Upstream URL": "https://github.com/mCodex/react-native-sensitive-info",
|
|
9
|
+
"Description": "react-native-sensitive-info manages all data stored in Android Shared Preferences and iOS Keychain. You can set, get and delete keys/values using simple methods."
|
|
10
|
+
}
|
|
11
11
|
]
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# @react-native-ohos/react-native-sensitive-info
|
|
2
|
-
|
|
3
|
-
This project is based on [react-native-sensitive-info ](https://github.com/mCodex/react-native-sensitive-info)
|
|
4
|
-
|
|
5
|
-
## Documentation
|
|
6
|
-
|
|
7
|
-
[中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-sensitive-info.md)
|
|
8
|
-
|
|
9
|
-
[English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-sensitive-info.md)
|
|
10
|
-
|
|
11
|
-
## License
|
|
12
|
-
|
|
1
|
+
# @react-native-ohos/react-native-sensitive-info
|
|
2
|
+
|
|
3
|
+
This project is based on [react-native-sensitive-info ](https://github.com/mCodex/react-native-sensitive-info)@5.6.2
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
[中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-sensitive-info.md)
|
|
8
|
+
|
|
9
|
+
[English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-sensitive-info.md)
|
|
10
|
+
|
|
11
|
+
## License
|
|
12
|
+
|
|
13
13
|
This library is licensed under [The MIT License (MIT)](https://github.com/mCodex/react-native-sensitive-info/blob/master/LICENSE).
|
|
@@ -1,28 +1,28 @@
|
|
|
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
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "ohosTest",
|
|
26
|
-
}
|
|
27
|
-
]
|
|
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
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "ohosTest",
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
28
|
}
|
|
@@ -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,7 +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
|
-
|
|
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 { RNSensitiveInfoPackage as SensitiveInfoPackage } from './src/main/ets/RNSensitiveInfoPackage'
|
|
8
|
+
export * from "./ts"
|
|
9
|
+
export default SensitiveInfoPackage
|
|
@@ -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://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
|
|
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://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
|
|
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,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-native-ohos/
|
|
3
|
-
"version": "6.0.1-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
|
-
|
|
13
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/react-native-sensitive-info",
|
|
3
|
+
"version": "6.0.1-rc.3",
|
|
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
|
+
|
|
13
|
+
|
|
@@ -5,5 +5,5 @@ set(rnoh_sensitive_info_generated_dir "${CMAKE_CURRENT_SOURCE_DIR}/generated")
|
|
|
5
5
|
file(GLOB_RECURSE rnoh_sensitive_info_generated_SRC "${rnoh_sensitive_info_generated_dir}/**/*.cpp")
|
|
6
6
|
file(GLOB rnoh_sensitive_info_SRC CONFIGURE_DEPENDS *.cpp)
|
|
7
7
|
add_library(rnoh_sensitive_info SHARED ${rnoh_sensitive_info_SRC} ${rnoh_sensitive_info_generated_SRC})
|
|
8
|
-
target_include_directories(rnoh_sensitive_info PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_sensitive_info_generated_dir}
|
|
9
|
-
target_link_libraries(rnoh_sensitive_info PUBLIC rnoh)
|
|
8
|
+
target_include_directories(rnoh_sensitive_info PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_sensitive_info_generated_dir})
|
|
9
|
+
target_link_libraries(rnoh_sensitive_info PUBLIC rnoh)
|
|
@@ -1,19 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
*/
|
|
5
24
|
#ifndef SENSITIVEINFOPACKAGE_H
|
|
6
25
|
#define SENSITIVEINFOPACKAGE_H
|
|
7
26
|
|
|
8
|
-
|
|
9
27
|
#include "generated/RNOH/generated/BaseReactNativeSensitiveInfoPackage.h"
|
|
10
28
|
#pragma once
|
|
11
29
|
|
|
12
|
-
|
|
13
30
|
namespace rnoh {
|
|
14
31
|
class SensitiveInfoPackage : public BaseReactNativeSensitiveInfoPackage {
|
|
15
32
|
using Super = BaseReactNativeSensitiveInfoPackage;
|
|
16
33
|
using Super::Super;
|
|
17
34
|
};
|
|
18
35
|
} // namespace rnoh
|
|
19
|
-
#endif //SENSITIVEINFOPACKAGE_H
|
|
36
|
+
#endif // SENSITIVEINFOPACKAGE_H
|
|
@@ -1,72 +1,65 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#pragma once
|
|
6
|
-
|
|
7
|
-
#include "RNOH/Package.h"
|
|
8
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
9
|
-
#include "RNOH/generated/turbo_modules/SensitiveInfoNativeModule.h"
|
|
10
|
-
|
|
11
|
-
namespace rnoh {
|
|
12
|
-
|
|
13
|
-
class BaseReactNativeSensitiveInfoPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
14
|
-
public:
|
|
15
|
-
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
|
16
|
-
if (name == "SensitiveInfoNativeModule") {
|
|
17
|
-
return std::make_shared<SensitiveInfoNativeModule>(ctx, name);
|
|
18
|
-
}
|
|
19
|
-
return nullptr;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
class BaseReactNativeSensitiveInfoPackageEventEmitRequestHandler : public EventEmitRequestHandler {
|
|
24
|
-
public:
|
|
25
|
-
void handleEvent(Context const &ctx) override {
|
|
26
|
-
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
std::
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
std::make_shared<BaseReactNativeSensitiveInfoPackageEventEmitRequestHandler>(),
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include "RNOH/Package.h"
|
|
8
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
9
|
+
#include "RNOH/generated/turbo_modules/SensitiveInfoNativeModule.h"
|
|
10
|
+
|
|
11
|
+
namespace rnoh {
|
|
12
|
+
|
|
13
|
+
class BaseReactNativeSensitiveInfoPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
14
|
+
public:
|
|
15
|
+
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
|
16
|
+
if (name == "SensitiveInfoNativeModule") {
|
|
17
|
+
return std::make_shared<SensitiveInfoNativeModule>(ctx, name);
|
|
18
|
+
}
|
|
19
|
+
return nullptr;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
class BaseReactNativeSensitiveInfoPackageEventEmitRequestHandler : public EventEmitRequestHandler {
|
|
24
|
+
public:
|
|
25
|
+
void handleEvent(Context const &ctx) override {
|
|
26
|
+
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
|
|
27
|
+
if (eventEmitter == nullptr) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
std::vector<std::string> supportedEventNames = {
|
|
32
|
+
};
|
|
33
|
+
if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
|
|
34
|
+
eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class BaseReactNativeSensitiveInfoPackage : public Package {
|
|
41
|
+
public:
|
|
42
|
+
BaseReactNativeSensitiveInfoPackage(Package::Context ctx) : Package(ctx){};
|
|
43
|
+
|
|
44
|
+
std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
|
|
45
|
+
return std::make_unique<BaseReactNativeSensitiveInfoPackageTurboModuleFactoryDelegate>();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
|
|
49
|
+
return {
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
ComponentJSIBinderByString createComponentJSIBinderByName() override {
|
|
54
|
+
return {
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
EventEmitRequestHandlers createEventEmitRequestHandlers() override {
|
|
59
|
+
return {
|
|
60
|
+
std::make_shared<BaseReactNativeSensitiveInfoPackageEventEmitRequestHandler>(),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace rnoh
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#include "SensitiveInfoNativeModule.h"
|
|
6
|
-
|
|
7
|
-
namespace rnoh {
|
|
8
|
-
using namespace facebook;
|
|
9
|
-
|
|
10
|
-
SensitiveInfoNativeModule::SensitiveInfoNativeModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
-
methodMap_ = {
|
|
12
|
-
ARK_ASYNC_METHOD_METADATA(setItem, 3),
|
|
13
|
-
ARK_ASYNC_METHOD_METADATA(getItem, 2),
|
|
14
|
-
ARK_ASYNC_METHOD_METADATA(hasItem, 2),
|
|
15
|
-
ARK_ASYNC_METHOD_METADATA(getAllItems, 1),
|
|
16
|
-
ARK_ASYNC_METHOD_METADATA(deleteItem, 2),
|
|
17
|
-
ARK_ASYNC_METHOD_METADATA(isSensorAvailable, 0),
|
|
18
|
-
ARK_ASYNC_METHOD_METADATA(hasEnrolledFingerprints, 0),
|
|
19
|
-
ARK_METHOD_METADATA(cancelFingerprintAuth, 0),
|
|
20
|
-
ARK_METHOD_METADATA(setInvalidatedByBiometricEnrollment, 1),
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#include "SensitiveInfoNativeModule.h"
|
|
6
|
+
|
|
7
|
+
namespace rnoh {
|
|
8
|
+
using namespace facebook;
|
|
9
|
+
|
|
10
|
+
SensitiveInfoNativeModule::SensitiveInfoNativeModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
+
methodMap_ = {
|
|
12
|
+
ARK_ASYNC_METHOD_METADATA(setItem, 3),
|
|
13
|
+
ARK_ASYNC_METHOD_METADATA(getItem, 2),
|
|
14
|
+
ARK_ASYNC_METHOD_METADATA(hasItem, 2),
|
|
15
|
+
ARK_ASYNC_METHOD_METADATA(getAllItems, 1),
|
|
16
|
+
ARK_ASYNC_METHOD_METADATA(deleteItem, 2),
|
|
17
|
+
ARK_ASYNC_METHOD_METADATA(isSensorAvailable, 0),
|
|
18
|
+
ARK_ASYNC_METHOD_METADATA(hasEnrolledFingerprints, 0),
|
|
19
|
+
ARK_METHOD_METADATA(cancelFingerprintAuth, 0),
|
|
20
|
+
ARK_METHOD_METADATA(setInvalidatedByBiometricEnrollment, 1),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
} // namespace rnoh
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#pragma once
|
|
6
|
-
|
|
7
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
-
|
|
9
|
-
namespace rnoh {
|
|
10
|
-
|
|
11
|
-
class JSI_EXPORT SensitiveInfoNativeModule : public ArkTSTurboModule {
|
|
12
|
-
public:
|
|
13
|
-
SensitiveInfoNativeModule(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
+
|
|
9
|
+
namespace rnoh {
|
|
10
|
+
|
|
11
|
+
class JSI_EXPORT SensitiveInfoNativeModule : public ArkTSTurboModule {
|
|
12
|
+
public:
|
|
13
|
+
SensitiveInfoNativeModule(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
} // namespace rnoh
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include
|
|
14
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
namespace
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/react_native_sensitive_info/ShadowNodes.h>
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook {
|
|
17
|
+
namespace react {
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
} // namespace react
|
|
22
|
+
} // namespace facebook
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/react_native_sensitive_info/EventEmitters.h>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
namespace facebook
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|