quivio-transaction-processor 1.21.0-beta → 1.21.1-beta
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/dist/index.d.ts +6 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/usb/USBDeviceContext.d.ts +2 -5
- package/dist/usb/USBDeviceContext.js.map +1 -1
- package/dist/usb/types.d.ts +6 -8
- package/dist/usb/types.js +1 -0
- package/dist/usb/useUSBDevice.d.ts +1 -4
- package/dist/usb/useUSBDeviceListener.d.ts +9 -0
- package/dist/usb/useUSBDeviceListener.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +14 -0
- package/src/usb/USBDeviceContext.tsx +1 -7
- package/src/usb/types.ts +4 -9
- package/src/usb/useUSBDeviceListener.ts +11 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EMVPaymentProvider } from './emvPaymentProvider/EMVPaymentProvider';
|
|
2
|
+
import { useEMVPayment } from './emvPaymentProvider/useEMVPayment';
|
|
3
|
+
import { USBDeviceProvider } from './usb/USBDeviceContext';
|
|
4
|
+
import { useUSBDevice } from './usb/useUSBDevice';
|
|
5
|
+
export type { EMVEventName, CallbackLog, EMVPaymentHook, EMVConfig } from './emvPaymentProvider/types';
|
|
6
|
+
export { EMVPaymentProvider, useEMVPayment, USBDeviceProvider, useUSBDevice };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useUSBDevice = exports.USBDeviceProvider = exports.useEMVPayment = exports.EMVPaymentProvider = void 0;
|
|
4
|
+
var EMVPaymentProvider_1 = require("./emvPaymentProvider/EMVPaymentProvider");
|
|
5
|
+
Object.defineProperty(exports, "EMVPaymentProvider", { enumerable: true, get: function () { return EMVPaymentProvider_1.EMVPaymentProvider; } });
|
|
6
|
+
var useEMVPayment_1 = require("./emvPaymentProvider/useEMVPayment");
|
|
7
|
+
Object.defineProperty(exports, "useEMVPayment", { enumerable: true, get: function () { return useEMVPayment_1.useEMVPayment; } });
|
|
8
|
+
var USBDeviceContext_1 = require("./usb/USBDeviceContext");
|
|
9
|
+
Object.defineProperty(exports, "USBDeviceProvider", { enumerable: true, get: function () { return USBDeviceContext_1.USBDeviceProvider; } });
|
|
10
|
+
var useUSBDevice_1 = require("./usb/useUSBDevice");
|
|
11
|
+
Object.defineProperty(exports, "useUSBDevice", { enumerable: true, get: function () { return useUSBDevice_1.useUSBDevice; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8EAA6E;AASzE,mGATK,uCAAkB,OASL;AARtB,oEAAmE;AAS/D,8FATK,6BAAa,OASL;AAPjB,2DAA2D;AAQvD,kGARK,oCAAiB,OAQL;AAPrB,mDAAkD;AAQ9C,6FARK,2BAAY,OAQL"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
deviceInfo: any | null;
|
|
5
|
-
};
|
|
6
|
-
declare const USBDeviceContext: React.Context<USBDeviceState | undefined>;
|
|
2
|
+
import { USBDeviceContextType } from './types';
|
|
3
|
+
declare const USBDeviceContext: React.Context<USBDeviceContextType | undefined>;
|
|
7
4
|
declare const USBDeviceProvider: React.FC<{
|
|
8
5
|
children: React.ReactNode;
|
|
9
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"USBDeviceContext.js","sourceRoot":"","sources":["../../src/usb/USBDeviceContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,+DAA8D;
|
|
1
|
+
{"version":3,"file":"USBDeviceContext.js","sourceRoot":"","sources":["../../src/usb/USBDeviceContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,+DAA8D;AAG9D,IAAM,gBAAgB,GAAG,IAAA,qBAAa,EAAmC,SAAS,CAAC,CAAC;AA2B3E,4CAAgB;AAzBzB,IAAM,iBAAiB,GAA4C,UAAC,EAAY;QAAV,QAAQ,cAAA;IACtE,IAAA,KAA8B,IAAA,gBAAQ,EAAa,IAAI,CAAC,EAAvD,UAAU,QAAA,EAAE,aAAa,QAA8B,CAAC;IAE/D,IAAA,2CAAoB,EAAC;QACnB,QAAQ,EAAE,UAAA,MAAM;YACd,aAAa,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,QAAQ,EAAE;YACR,aAAa,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,CACL,8BAAC,gBAAgB,CAAC,QAAQ,IACxB,KAAK,EAAE;YACL,iBAAiB,EAAE,CAAC,CAAC,UAAU;YAC/B,UAAU,YAAA;SACX,IAEA,QAAQ,CACiB,CAC7B,CAAC;AACJ,CAAC,CAAC;AAEO,8CAAiB"}
|
package/dist/usb/types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
type USBEvent = {
|
|
6
|
-
vendorId: number;
|
|
7
|
-
productId: number;
|
|
8
|
-
deviceName?: string;
|
|
1
|
+
type USBDeviceState = {
|
|
2
|
+
isDeviceConnected: boolean;
|
|
3
|
+
deviceInfo: any | null;
|
|
9
4
|
};
|
|
5
|
+
export interface USBDeviceContextType extends USBDeviceState {
|
|
6
|
+
}
|
|
7
|
+
export {};
|
package/dist/usb/types.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
type ListenerParams = {
|
|
2
|
+
onAttach?: (device: USBEvent) => void;
|
|
3
|
+
onDetach?: (device: USBEvent) => void;
|
|
4
|
+
};
|
|
5
|
+
type USBEvent = {
|
|
6
|
+
vendorId: number;
|
|
7
|
+
productId: number;
|
|
8
|
+
deviceName?: string;
|
|
9
|
+
};
|
|
1
10
|
declare function useUSBDeviceListener({ onAttach, onDetach }: ListenerParams): void;
|
|
2
11
|
export { useUSBDeviceListener };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUSBDeviceListener.js","sourceRoot":"","sources":["../../src/usb/useUSBDeviceListener.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAClC,6CAAiE;AAEzD,IAAA,uBAAuB,GAAK,4BAAa,wBAAlB,CAAmB;AAClD,IAAM,OAAO,GAAG,IAAI,iCAAkB,CAAC,uBAAuB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useUSBDeviceListener.js","sourceRoot":"","sources":["../../src/usb/useUSBDeviceListener.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAClC,6CAAiE;AAEzD,IAAA,uBAAuB,GAAK,4BAAa,wBAAlB,CAAmB;AAClD,IAAM,OAAO,GAAG,IAAI,iCAAkB,CAAC,uBAAuB,CAAC,CAAC;AAahE,IAAM,mBAAmB,GAAG;IAC1B,mBAAmB,EAAE,qBAAqB;IAC1C,mBAAmB,EAAE,qBAAqB;CAClC,CAAC;AAEX,SAAS,oBAAoB,CAAC,EAGb;QAFf,QAAQ,cAAA,EACR,QAAQ,cAAA;IAGR,IAAA,iBAAS,EAAC;QACR,IAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CACnC,mBAAmB,CAAC,mBAAmB,EACvC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,cAAO,CAAC,CAAC,CACvB,CAAC;QAEF,IAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CACnC,mBAAmB,CAAC,mBAAmB,EACvC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,cAAO,CAAC,CAAC,CACvB,CAAC;QAEF,OAAO;YACL,SAAS,CAAC,MAAM,EAAE,CAAC;YACnB,SAAS,CAAC,MAAM,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAEQ,oDAAoB"}
|
package/package.json
CHANGED
package/src/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EMVPaymentProvider } from './emvPaymentProvider/EMVPaymentProvider';
|
|
2
|
+
import { useEMVPayment } from './emvPaymentProvider/useEMVPayment';
|
|
3
|
+
|
|
4
|
+
import { USBDeviceProvider } from './usb/USBDeviceContext';
|
|
5
|
+
import { useUSBDevice } from './usb/useUSBDevice';
|
|
6
|
+
|
|
7
|
+
export type { EMVEventName, CallbackLog, EMVPaymentHook, EMVConfig } from './emvPaymentProvider/types';
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
EMVPaymentProvider,
|
|
11
|
+
useEMVPayment,
|
|
12
|
+
USBDeviceProvider,
|
|
13
|
+
useUSBDevice
|
|
14
|
+
};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React, { createContext, useState } from 'react';
|
|
2
2
|
import { useUSBDeviceListener } from './useUSBDeviceListener';
|
|
3
|
-
|
|
4
|
-
type USBDeviceState = {
|
|
5
|
-
isDeviceConnected: boolean;
|
|
6
|
-
deviceInfo: any | null;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type USBDeviceContextType = USBDeviceState;
|
|
3
|
+
import { USBDeviceContextType } from './types';
|
|
10
4
|
|
|
11
5
|
const USBDeviceContext = createContext<USBDeviceContextType | undefined>(undefined);
|
|
12
6
|
|
package/src/usb/types.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onDetach?: (device: USBEvent) => void;
|
|
1
|
+
type USBDeviceState = {
|
|
2
|
+
isDeviceConnected: boolean;
|
|
3
|
+
deviceInfo: any | null;
|
|
5
4
|
};
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
vendorId: number;
|
|
9
|
-
productId: number;
|
|
10
|
-
deviceName?: string;
|
|
11
|
-
};
|
|
6
|
+
export interface USBDeviceContextType extends USBDeviceState { }
|
|
@@ -4,6 +4,17 @@ import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
|
4
4
|
const { NativeUsbDeviceListener } = NativeModules;
|
|
5
5
|
const emitter = new NativeEventEmitter(NativeUsbDeviceListener);
|
|
6
6
|
|
|
7
|
+
type ListenerParams = {
|
|
8
|
+
onAttach?: (device: USBEvent) => void;
|
|
9
|
+
onDetach?: (device: USBEvent) => void;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
type USBEvent = {
|
|
13
|
+
vendorId: number;
|
|
14
|
+
productId: number;
|
|
15
|
+
deviceName?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
7
18
|
const USBConnectionEvents = {
|
|
8
19
|
USB_DEVICE_ATTACHED: 'USB_DEVICE_ATTACHED',
|
|
9
20
|
USB_DEVICE_DETACHED: 'USB_DEVICE_DETACHED',
|