@convep_mobilogy/react-native-qms-plugin 0.10.2 → 0.10.4

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.
@@ -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.12.1"
78
+ implementation "com.convep.qms:qms-plugin:1.12.17"
79
79
 
80
80
  implementation 'androidx.appcompat:appcompat:1.6.1'
81
81
 
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ import { NativeModules } from 'react-native';
4
+ const {
5
+ QmsModule
6
+ } = NativeModules;
7
+ export const QmsPlugin = {
8
+ emitInAppNotification(payload) {
9
+ if (QmsModule?.emitInAppNotificationWithPayload) {
10
+ QmsModule.emitInAppNotificationWithPayload(payload.title ?? 'Notification', payload.body ?? '', payload.data ?? null);
11
+ return;
12
+ }
13
+ QmsModule?.emitInAppNotification?.(payload.title ?? 'Notification', payload.body ?? '');
14
+ }
15
+ };
16
+ //# sourceMappingURL=QmsPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeModules","QmsModule","QmsPlugin","emitInAppNotification","payload","emitInAppNotificationWithPayload","title","body","data"],"sourceRoot":"../../src","sources":["QmsPlugin.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AAQ5C,MAAM;EAAEC;AAAU,CAAC,GAAGD,aASrB;AAED,OAAO,MAAME,SAAS,GAAG;EACvBC,qBAAqBA,CAACC,OAAiC,EAAQ;IAC7D,IAAIH,SAAS,EAAEI,gCAAgC,EAAE;MAC/CJ,SAAS,CAACI,gCAAgC,CACxCD,OAAO,CAACE,KAAK,IAAI,cAAc,EAC/BF,OAAO,CAACG,IAAI,IAAI,EAAE,EAClBH,OAAO,CAACI,IAAI,IAAI,IAClB,CAAC;MACD;IACF;IACAP,SAAS,EAAEE,qBAAqB,GAC9BC,OAAO,CAACE,KAAK,IAAI,cAAc,EAC/BF,OAAO,CAACG,IAAI,IAAI,EAClB,CAAC;EACH;AACF,CAAC","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  export { QmsDashboardView } from "./QmsDashboardView.js";
4
+ export { QmsPlugin } from "./QmsPlugin.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["QmsDashboardView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["QmsDashboardView","QmsPlugin"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,uBAAoB;AAErD,SAASC,SAAS,QAAQ,gBAAa","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ export type InAppNotificationPayload = {
2
+ title?: string;
3
+ body?: string;
4
+ data?: Record<string, unknown>;
5
+ };
6
+ export declare const QmsPlugin: {
7
+ emitInAppNotification(payload: InAppNotificationPayload): void;
8
+ };
9
+ //# sourceMappingURL=QmsPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QmsPlugin.d.ts","sourceRoot":"","sources":["../../../src/QmsPlugin.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,CAAC;AAaF,eAAO,MAAM,SAAS;mCACW,wBAAwB,GAAG,IAAI;CAc/D,CAAC"}
@@ -1,3 +1,5 @@
1
1
  export { QmsDashboardView } from './QmsDashboardView';
2
2
  export type { QmsDashboardViewProps } from './QmsDashboardView.types';
3
+ export { QmsPlugin } from './QmsPlugin';
4
+ export type { InAppNotificationPayload } from './QmsPlugin';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@convep_mobilogy/react-native-qms-plugin",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "To handle defect managment",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -0,0 +1,35 @@
1
+ import { NativeModules } from 'react-native';
2
+
3
+ export type InAppNotificationPayload = {
4
+ title?: string;
5
+ body?: string;
6
+ data?: Record<string, unknown>;
7
+ };
8
+
9
+ const { QmsModule } = NativeModules as {
10
+ QmsModule?: {
11
+ emitInAppNotification?: (title?: string, body?: string) => void;
12
+ emitInAppNotificationWithPayload?: (
13
+ title?: string,
14
+ body?: string,
15
+ data?: Record<string, unknown> | null
16
+ ) => void;
17
+ };
18
+ };
19
+
20
+ export const QmsPlugin = {
21
+ emitInAppNotification(payload: InAppNotificationPayload): void {
22
+ if (QmsModule?.emitInAppNotificationWithPayload) {
23
+ QmsModule.emitInAppNotificationWithPayload(
24
+ payload.title ?? 'Notification',
25
+ payload.body ?? '',
26
+ payload.data ?? null
27
+ );
28
+ return;
29
+ }
30
+ QmsModule?.emitInAppNotification?.(
31
+ payload.title ?? 'Notification',
32
+ payload.body ?? ''
33
+ );
34
+ },
35
+ };
package/src/index.tsx CHANGED
@@ -1,2 +1,4 @@
1
1
  export { QmsDashboardView } from './QmsDashboardView';
2
2
  export type { QmsDashboardViewProps } from './QmsDashboardView.types';
3
+ export { QmsPlugin } from './QmsPlugin';
4
+ export type { InAppNotificationPayload } from './QmsPlugin';