@convep_mobilogy/react-native-qms-plugin 0.8.0 → 0.9.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/README.md +3 -0
- package/android/build.gradle +1 -1
- package/ios/QmsPluginFramework.xcframework/Info.plist +5 -5
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework +0 -0
- package/lib/module/QmsDashboardView.android.js +7 -1
- package/lib/module/QmsDashboardView.android.js.map +1 -1
- package/lib/typescript/src/QmsDashboardView.android.d.ts.map +1 -1
- package/lib/typescript/src/QmsDashboardView.types.d.ts +1 -0
- package/lib/typescript/src/QmsDashboardView.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/QmsDashboardView.android.tsx +10 -1
- package/src/QmsDashboardView.types.ts +1 -0
package/README.md
CHANGED
|
@@ -104,6 +104,9 @@ export default function App() {
|
|
|
104
104
|
clientID= {clientID}
|
|
105
105
|
clientCode={clientCode}
|
|
106
106
|
userToken={userToken}
|
|
107
|
+
onClose={() => {
|
|
108
|
+
// Android: unmount the SDK view or navigate back when the SDK exits
|
|
109
|
+
}}
|
|
107
110
|
/>
|
|
108
111
|
</View>
|
|
109
112
|
</SafeAreaView>
|
package/android/build.gradle
CHANGED
|
@@ -75,7 +75,7 @@ dependencies {
|
|
|
75
75
|
implementation "com.facebook.react:react-android"
|
|
76
76
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
77
77
|
implementation 'com.facebook.react:react-native:+'
|
|
78
|
-
implementation "com.convep.qms:qms-plugin:1.
|
|
78
|
+
implementation "com.convep.qms:qms-plugin:1.9.5"
|
|
79
79
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
80
80
|
|
|
81
81
|
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>QmsPluginFramework.framework/QmsPluginFramework</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>QmsPluginFramework.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
-
<string>x86_64</string>
|
|
18
17
|
</array>
|
|
19
18
|
<key>SupportedPlatform</key>
|
|
20
19
|
<string>ios</string>
|
|
21
|
-
<key>SupportedPlatformVariant</key>
|
|
22
|
-
<string>simulator</string>
|
|
23
20
|
</dict>
|
|
24
21
|
<dict>
|
|
25
22
|
<key>BinaryPath</key>
|
|
26
23
|
<string>QmsPluginFramework.framework/QmsPluginFramework</string>
|
|
27
24
|
<key>LibraryIdentifier</key>
|
|
28
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
29
26
|
<key>LibraryPath</key>
|
|
30
27
|
<string>QmsPluginFramework.framework</string>
|
|
31
28
|
<key>SupportedArchitectures</key>
|
|
32
29
|
<array>
|
|
33
30
|
<string>arm64</string>
|
|
31
|
+
<string>x86_64</string>
|
|
34
32
|
</array>
|
|
35
33
|
<key>SupportedPlatform</key>
|
|
36
34
|
<string>ios</string>
|
|
35
|
+
<key>SupportedPlatformVariant</key>
|
|
36
|
+
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useEffect } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { DeviceEventEmitter, NativeModules, View } from 'react-native';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
const {
|
|
7
7
|
QmsModule
|
|
8
8
|
} = NativeModules;
|
|
9
9
|
export const QmsDashboardView = ({
|
|
10
10
|
style,
|
|
11
|
+
onClose,
|
|
11
12
|
clientID,
|
|
12
13
|
clientCode,
|
|
13
14
|
ClientID,
|
|
@@ -26,6 +27,11 @@ export const QmsDashboardView = ({
|
|
|
26
27
|
QmsModule.showQms(resolvedToken, resolvedClientID, resolvedClientCode);
|
|
27
28
|
}
|
|
28
29
|
}, [clientID, clientCode, ClientID, ClientCode, user_token, token, userToken, autoShow]);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!onClose) return;
|
|
32
|
+
const subscription = DeviceEventEmitter.addListener('QmsSdkOnClose', () => onClose());
|
|
33
|
+
return () => subscription.remove();
|
|
34
|
+
}, [onClose]);
|
|
29
35
|
|
|
30
36
|
// Android doesn’t need to show native UI as a "view" here,
|
|
31
37
|
// we just render an empty container so JSX stays consistent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","
|
|
1
|
+
{"version":3,"names":["React","useEffect","DeviceEventEmitter","NativeModules","View","jsx","_jsx","QmsModule","QmsDashboardView","style","onClose","clientID","clientCode","ClientID","ClientCode","user_token","token","userToken","autoShow","resolvedClientID","resolvedClientCode","resolvedToken","showQms","subscription","addListener","remove"],"sourceRoot":"../../src","sources":["QmsDashboardView.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,kBAAkB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGvE,MAAM;EAAEC;AAAU,CAAC,GAAGJ,aAQrB;AAED,OAAO,MAAMK,gBAAiD,GAAGA,CAAC;EAChEC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVC,UAAU;EACVC,KAAK;EACLC,SAAS;EACTC,QAAQ,GAAG;AACb,CAAC,KAAK;EACJjB,SAAS,CAAC,MAAM;IACd,MAAMkB,gBAAgB,GAAGR,QAAQ,IAAIE,QAAQ,IAAI,EAAE;IACnD,MAAMO,kBAAkB,GAAGR,UAAU,IAAIE,UAAU,IAAI,EAAE;IACzD,MAAMO,aAAa,GAAGN,UAAU,IAAIC,KAAK,IAAIC,SAAS,IAAI,EAAE;IAE5D,IAAIC,QAAQ,IAAIX,SAAS,EAAEe,OAAO,EAAE;MAClC;MACAf,SAAS,CAACe,OAAO,CAACD,aAAa,EAAEF,gBAAgB,EAAEC,kBAAkB,CAAC;IACxE;EACF,CAAC,EAAE,CACDT,QAAQ,EACRC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,SAAS,EACTC,QAAQ,CACT,CAAC;EAEFjB,SAAS,CAAC,MAAM;IACd,IAAI,CAACS,OAAO,EAAE;IACd,MAAMa,YAAY,GAAGrB,kBAAkB,CAACsB,WAAW,CAAC,eAAe,EAAE,MACnEd,OAAO,CAAC,CACV,CAAC;IACD,OAAO,MAAMa,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACf,OAAO,CAAC,CAAC;;EAEb;EACA;EACA,oBAAOJ,IAAA,CAACF,IAAI;IAACK,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QmsDashboardView.android.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAYtE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"QmsDashboardView.android.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAYtE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA2C5D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
2
|
export type QmsDashboardViewProps = {
|
|
3
3
|
style?: StyleProp<ViewStyle>;
|
|
4
|
+
onClose?: (event?: unknown) => void;
|
|
4
5
|
/**
|
|
5
6
|
* Preferred camelCase props. Uppercase variants are kept for backwards compatibility
|
|
6
7
|
* with the native iOS view manager prop names.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QmsDashboardView.types.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"QmsDashboardView.types.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DeviceEventEmitter, NativeModules, View } from 'react-native';
|
|
3
3
|
import type { QmsDashboardViewProps } from './QmsDashboardView.types';
|
|
4
4
|
|
|
5
5
|
const { QmsModule } = NativeModules as {
|
|
@@ -14,6 +14,7 @@ const { QmsModule } = NativeModules as {
|
|
|
14
14
|
|
|
15
15
|
export const QmsDashboardView: React.FC<QmsDashboardViewProps> = ({
|
|
16
16
|
style,
|
|
17
|
+
onClose,
|
|
17
18
|
clientID,
|
|
18
19
|
clientCode,
|
|
19
20
|
ClientID,
|
|
@@ -43,6 +44,14 @@ export const QmsDashboardView: React.FC<QmsDashboardViewProps> = ({
|
|
|
43
44
|
autoShow,
|
|
44
45
|
]);
|
|
45
46
|
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (!onClose) return;
|
|
49
|
+
const subscription = DeviceEventEmitter.addListener('QmsSdkOnClose', () =>
|
|
50
|
+
onClose()
|
|
51
|
+
);
|
|
52
|
+
return () => subscription.remove();
|
|
53
|
+
}, [onClose]);
|
|
54
|
+
|
|
46
55
|
// Android doesn’t need to show native UI as a "view" here,
|
|
47
56
|
// we just render an empty container so JSX stays consistent.
|
|
48
57
|
return <View style={style} />;
|
|
@@ -2,6 +2,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
2
2
|
|
|
3
3
|
export type QmsDashboardViewProps = {
|
|
4
4
|
style?: StyleProp<ViewStyle>;
|
|
5
|
+
onClose?: (event?: unknown) => void;
|
|
5
6
|
/**
|
|
6
7
|
* Preferred camelCase props. Uppercase variants are kept for backwards compatibility
|
|
7
8
|
* with the native iOS view manager prop names.
|