global-input-react
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -252,5 +252,11 @@ "use strict"; | ||
}, | ||
onInputPermission: (permissionMessage, senders, deny) => { | ||
onInputPermission: (permissionMessage, senders, allow, deny) => { | ||
if (options && options.onInputPermission) { | ||
options.onInputPermission(permissionMessage, senders, deny); | ||
options.onInputPermission(permissionMessage, senders, allow, deny); | ||
} else { | ||
if (mobileData.sender && mobileData.sender.client !== permissionMessage.client) { | ||
deny(" only one sender (mobile app instance) is allowed for each session. You need to restart the session to allow for a new client to connect. If you are the application developer, you can override this behaviour."); | ||
} else { | ||
allow(); | ||
} | ||
} | ||
@@ -257,0 +263,0 @@ }, |
import React from 'react'; | ||
import { InitData, FormField, FieldValue, Sender, PermissionRequestMessage } from 'global-input-message'; | ||
import { InitData, FormField, FieldValue, Sender } from 'global-input-message'; | ||
export * from 'global-input-message'; | ||
@@ -18,3 +18,2 @@ export function useGlobalInputApp(config: ConfigData | (() => ConfigData)): GlobalInputData; | ||
securityGroup?: string; | ||
client?: string; | ||
onRegistered?: (connectionCode: string) => void; | ||
@@ -24,3 +23,3 @@ onRegisterFailed?: () => void; | ||
onSenderDisconnected?: (sender: Sender, senders: Sender[]) => void; | ||
onInputPermission?: (permissionMessage: PermissionRequestMessage, senders: Sender[], deny: (reason?: string) => void) => void; | ||
onInputPermission?: (permissionMessage: PermissionRequestMessage, senders: Sender[], allow: () => void, deny: (reason?: string) => void) => void; | ||
onError?: (message: string) => void; | ||
@@ -27,0 +26,0 @@ } |
{ | ||
"name": "global-input-react", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "global input react component", | ||
@@ -72,5 +72,5 @@ "main": "./dist/index", | ||
"dependencies": { | ||
"global-input-message": "^2.1.0", | ||
"global-input-message": "^2.1.1", | ||
"qrcode.react": "^1.0.0" | ||
} | ||
} |
@@ -206,6 +206,14 @@ | ||
}, | ||
onInputPermission: (permissionMessage, senders, deny) => { | ||
onInputPermission: (permissionMessage, senders, allow, deny) => { | ||
if (options && options.onInputPermission) { | ||
options.onInputPermission(permissionMessage, senders, deny); | ||
options.onInputPermission(permissionMessage, senders, allow, deny); | ||
} | ||
else { | ||
if (mobileData.sender && mobileData.sender.client !== permissionMessage.client) { | ||
deny(" only one sender (mobile app instance) is allowed for each session. You need to restart the session to allow for a new client to connect. If you are the application developer, you can override this behaviour."); | ||
} | ||
else { | ||
allow(); | ||
} | ||
} | ||
}, | ||
@@ -212,0 +220,0 @@ onError: errorMessage => { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1250648
37380
Updatedglobal-input-message@^2.1.1