cobrowse-sdk-react-native 2.12.0 → 2.14.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/.github/workflows/lint.yaml +20 -0
- package/.github/workflows/release.yml +23 -0
- package/DEPLOYMENT.md +7 -0
- package/README.md +6 -33
- package/android/src/main/java/io/cobrowse/reactnative/CobrowseIOCommonDelegates.java +14 -0
- package/android/src/main/java/io/cobrowse/reactnative/CobrowseIOModule.java +210 -346
- package/android/src/main/java/io/cobrowse/reactnative/CommonDelegates.java +196 -0
- package/android/src/main/java/io/cobrowse/reactnative/Conversion.java +73 -42
- package/android/src/main/java/io/cobrowse/reactnative/DynamicSessionControlInvocationHandler.java +31 -0
- package/cobrowse-sdk-react-native.podspec +2 -2
- package/ios/CBIOBroadcastPickerView.h +5 -0
- package/ios/CBIOBroadcastPickerView.m +52 -0
- package/ios/CBIORCTUtil.h +1 -0
- package/ios/CBIORCTUtil.m +10 -0
- package/ios/CBIOSession+Bridging.m +1 -0
- package/ios/RCTCobrowseIO.m +18 -3
- package/js/CBIOBroadcastPickerView.js +11 -0
- package/js/CobrowseIO.js +18 -1
- package/js/CobrowseView.js +1 -0
- package/js/Session.js +4 -0
- package/js/Unredacted.js +2 -2
- package/js/index.js +2 -0
- package/js/useSession.js +33 -0
- package/package.json +10 -9
- package/ts/CBIOBroadcastPickerView.d.ts +8 -0
- package/ts/Redacted.d.ts +3 -3
- package/ts/Session.d.ts +3 -1
- package/ts/Unredacted.d.ts +2 -2
- package/ts/index.d.ts +1 -0
- package/ts/useSession.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cobrowse-sdk-react-native",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Cobrowse SDK for React Native",
|
|
5
5
|
"main": "js/index.js",
|
|
6
6
|
"types": "ts/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"lint
|
|
8
|
+
"lint": "ts-standard ts/*.d.ts",
|
|
9
|
+
"lint:fix": "ts-standard ts/*.d.ts --fix",
|
|
9
10
|
"start:dev": "nodemon --exec ./scripts/copy.sh"
|
|
10
11
|
},
|
|
11
12
|
"author": {
|
|
@@ -27,17 +28,17 @@
|
|
|
27
28
|
],
|
|
28
29
|
"license": "Apache-2.0",
|
|
29
30
|
"optionalDependencies": {
|
|
30
|
-
"@types/react": "^18.0.
|
|
31
|
-
"@types/react-native": "^0.
|
|
31
|
+
"@types/react": "^18.0.24",
|
|
32
|
+
"@types/react-native": "^0.70.6"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"lodash": "^4.17.21"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@types/react": "^18.0.
|
|
38
|
-
"@types/react-native": "^0.
|
|
39
|
-
"nodemon": "^2.0.
|
|
40
|
-
"ts-standard": "^
|
|
41
|
-
"typescript": "^4.8.
|
|
38
|
+
"@types/react": "^18.0.24",
|
|
39
|
+
"@types/react-native": "^0.70.6",
|
|
40
|
+
"nodemon": "^2.0.20",
|
|
41
|
+
"ts-standard": "^12.0.1",
|
|
42
|
+
"typescript": "^4.8.4"
|
|
42
43
|
}
|
|
43
44
|
}
|
package/ts/Redacted.d.ts
CHANGED
package/ts/Session.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export type SessionState = 'active' | 'authorizing' | 'ended' | 'pending'
|
|
|
7
7
|
|
|
8
8
|
export type RemoteControlState = 'on' | 'requested' | 'rejected' | 'off'
|
|
9
9
|
|
|
10
|
+
export type FullDeviceState = 'on' | 'requested' | 'rejected' | 'off'
|
|
11
|
+
|
|
10
12
|
export interface Agent {
|
|
11
13
|
id: string
|
|
12
14
|
name: string
|
|
@@ -50,7 +52,7 @@ export default class Session {
|
|
|
50
52
|
|
|
51
53
|
isEnded (): boolean
|
|
52
54
|
|
|
53
|
-
setFullDevice (state: boolean): Promise<void>
|
|
55
|
+
setFullDevice (state: boolean | FullDeviceState): Promise<void>
|
|
54
56
|
|
|
55
57
|
setRemoteControl (state: RemoteControlState): Promise<void>
|
|
56
58
|
}
|
package/ts/Unredacted.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { View, ScrollView, Text, Image, FlatList, SectionList } from 'react-nati
|
|
|
3
3
|
|
|
4
4
|
export function useUnredaction<
|
|
5
5
|
T = View | ScrollView | Text | Image | FlatList | SectionList
|
|
6
|
-
>(shouldWarnUnhandledRefs?: boolean
|
|
6
|
+
> (shouldWarnUnhandledRefs?: boolean, componentName?: string): (elem: T) => void
|
|
7
7
|
|
|
8
8
|
type ForwardedRefType<T, P> = typeof React.forwardRef
|
|
9
9
|
|
|
10
10
|
// HOC for adding unredaction to a whole component class
|
|
11
|
-
export function unredact(Component: ReactElement): ForwardedRefType<View, Record<string, unknown>>
|
|
11
|
+
export function unredact (Component: ReactElement): ForwardedRefType<View, Record<string, unknown>>
|
|
12
12
|
|
|
13
13
|
// also expose a basic Component based on a View
|
|
14
14
|
declare const Unredacted: ForwardRefRenderFunction<View, Record<string, unknown>>
|
package/ts/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { default as Redacted } from './Redacted'
|
|
|
4
4
|
export { default as SessionControl } from './SessionControl'
|
|
5
5
|
export { default as Unredacted, unredact, useUnredaction } from './Unredacted'
|
|
6
6
|
export { default as CobrowseAccessibilityService } from './CobrowseAccessibilityService'
|
|
7
|
+
export { useSession } from './useSession'
|