@convep_mobilogy/react-native-qms-plugin 0.4.3 → 0.5.1

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 CHANGED
@@ -35,7 +35,37 @@ pod install
35
35
 
36
36
  # Android Setup
37
37
 
38
- Autolinking should set up everything automatically.
38
+ Autolinking should set up everything automatically, but you need to add our private Maven repo and enable core library desugaring.
39
+
40
+ 1. In your **android/build.gradle**, add the Maven repo with your credentials:
41
+
42
+ ```gradle
43
+ allprojects {
44
+ repositories {
45
+ google()
46
+ mavenCentral()
47
+ maven { url = uri("https://www.jitpack.io") } // keep JitPack if RN needs it
48
+
49
+ maven {
50
+ url = uri("https://raw.githubusercontent.com/alepmustaqim03-sudo/aarPublish/main/maven-repo")
51
+ credentials {
52
+ // prefer gradle.properties/env so the token isn’t hardcoded
53
+ username = "alepmustaqim03-sudo"
54
+ password = "<clientToken>"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ 2. In **android/app/build.gradle**, enable core library desugaring (inside `dependencies`):
62
+
63
+ ```gradle
64
+ dependencies {
65
+ // ...
66
+ coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
67
+ }
68
+ ```
39
69
 
40
70
  ---
41
71
 
@@ -67,19 +67,19 @@ android {
67
67
  repositories {
68
68
  mavenCentral()
69
69
  google()
70
- flatDir { dirs 'libs' }
71
70
  }
72
71
 
73
72
  def kotlin_version = getExtOrDefault("kotlinVersion")
74
73
 
75
74
  dependencies {
76
- implementation "com.facebook.react:react-android"
77
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
78
- implementation 'com.facebook.react:react-native:+'
79
- compileOnly(name: 'Qms_plugin-release', ext: 'aar')
80
- implementation 'androidx.appcompat:appcompat:1.6.1'
75
+ implementation "com.facebook.react:react-android"
76
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
+ implementation 'com.facebook.react:react-native:+'
78
+ implementation "com.convep.qms:qms-plugin:1.0.0"
79
+ // implementation files('libs/Qms_plugin-release.aar')
80
+ implementation 'androidx.appcompat:appcompat:1.6.1'
81
81
 
82
- implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
82
+ implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
83
83
  implementation 'com.google.android.material:material:1.9.0'
84
84
  implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
85
85
  implementation 'com.kizitonwose.calendar:view:2.3.0'
@@ -95,5 +95,10 @@ dependencies {
95
95
  implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
96
96
  implementation 'com.github.bumptech.glide:glide:4.15.1'
97
97
  implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
98
+
99
+ // Room components (Local Database)
100
+ def room_version = "2.6.1"
101
+ implementation "androidx.room:room-runtime:$room_version"
102
+ annotationProcessor "androidx.room:room-compiler:$room_version"
98
103
 
99
104
  }
@@ -8,17 +8,24 @@ const {
8
8
  } = NativeModules;
9
9
  export const QmsDashboardView = ({
10
10
  style,
11
+ clientID,
12
+ clientCode,
11
13
  ClientID,
12
14
  ClientCode,
13
15
  user_token,
16
+ token,
17
+ userToken,
14
18
  autoShow = true
15
19
  }) => {
16
20
  useEffect(() => {
21
+ const resolvedClientID = clientID ?? ClientID ?? '';
22
+ const resolvedClientCode = clientCode ?? ClientCode ?? '';
23
+ const resolvedToken = user_token ?? token ?? userToken ?? '';
17
24
  if (autoShow && QmsModule?.showQms) {
18
25
  // map props to native method args
19
- QmsModule.showQms(user_token, ClientID, ClientCode);
26
+ QmsModule.showQms(resolvedToken, resolvedClientID, resolvedClientCode);
20
27
  }
21
- }, [ClientID, ClientCode, user_token, autoShow]);
28
+ }, [clientID, clientCode, ClientID, ClientCode, user_token, token, userToken, autoShow]);
22
29
 
23
30
  // Android doesn’t need to show native UI as a "view" here,
24
31
  // we just render an empty container so JSX stays consistent.
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","View","NativeModules","jsx","_jsx","QmsModule","QmsDashboardView","style","ClientID","ClientCode","user_token","autoShow","showQms"],"sourceRoot":"../../src","sources":["QmsDashboardView.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,aAAa,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGnD,MAAM;EAAEC;AAAU,CAAC,GAAGH,aAQrB;AAED,OAAO,MAAMI,gBAAiD,GAAGA,CAAC;EAChEC,KAAK;EACLC,QAAQ;EACRC,UAAU;EACVC,UAAU;EACVC,QAAQ,GAAG;AACb,CAAC,KAAK;EACJX,SAAS,CAAC,MAAM;IACd,IAAIW,QAAQ,IAAIN,SAAS,EAAEO,OAAO,EAAE;MAClC;MACAP,SAAS,CAACO,OAAO,CAACF,UAAU,EAAEF,QAAQ,EAAEC,UAAU,CAAC;IACrD;EACF,CAAC,EAAE,CAACD,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,QAAQ,CAAC,CAAC;;EAEhD;EACA;EACA,oBAAOP,IAAA,CAACH,IAAI;IAACM,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC/B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","View","NativeModules","jsx","_jsx","QmsModule","QmsDashboardView","style","clientID","clientCode","ClientID","ClientCode","user_token","token","userToken","autoShow","resolvedClientID","resolvedClientCode","resolvedToken","showQms"],"sourceRoot":"../../src","sources":["QmsDashboardView.android.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,aAAa,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGnD,MAAM;EAAEC;AAAU,CAAC,GAAGH,aAQrB;AAED,OAAO,MAAMI,gBAAiD,GAAGA,CAAC;EAChEC,KAAK;EACLC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EACRC,UAAU;EACVC,UAAU;EACVC,KAAK;EACLC,SAAS;EACTC,QAAQ,GAAG;AACb,CAAC,KAAK;EACJf,SAAS,CAAC,MAAM;IACd,MAAMgB,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,IAAIV,SAAS,EAAEc,OAAO,EAAE;MAClC;MACAd,SAAS,CAACc,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;;EAEF;EACA;EACA,oBAAOX,IAAA,CAACH,IAAI;IAACM,KAAK,EAAEA;EAAM,CAAE,CAAC;AAC/B,CAAC","ignoreList":[]}
@@ -6,8 +6,25 @@ import { jsx as _jsx } from "react/jsx-runtime";
6
6
  // Make sure your iOS native view manager is exported as "QmsDashboardView"
7
7
  const NativeQmsDashboardView = requireNativeComponent('QmsDashboardView');
8
8
  export const QmsDashboardView = props => {
9
+ const {
10
+ clientID,
11
+ clientCode,
12
+ ClientID,
13
+ ClientCode,
14
+ user_token,
15
+ userToken,
16
+ token,
17
+ // autoShow is Android-only; ignored on iOS
18
+ ...rest
19
+ } = props;
20
+ const resolvedClientID = clientID ?? ClientID ?? '';
21
+ const resolvedClientCode = clientCode ?? ClientCode ?? '';
22
+ const resolvedToken = user_token ?? token ?? userToken ?? '';
9
23
  return /*#__PURE__*/_jsx(NativeQmsDashboardView, {
10
- ...props
24
+ ...rest,
25
+ ClientID: resolvedClientID,
26
+ ClientCode: resolvedClientCode,
27
+ user_token: resolvedToken
11
28
  });
12
29
  };
13
30
  //# sourceMappingURL=QmsDashboardView.ios.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","requireNativeComponent","jsx","_jsx","NativeQmsDashboardView","QmsDashboardView","props"],"sourceRoot":"../../src","sources":["QmsDashboardView.ios.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,sBAAsB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtD;AACA,MAAMC,sBAAsB,GAC1BH,sBAAsB,CAAwB,kBAAkB,CAAC;AAEnE,OAAO,MAAMI,gBAAiD,GAAIC,KAAK,IAAK;EAC1E,oBAAOH,IAAA,CAACC,sBAAsB;IAAA,GAAKE;EAAK,CAAG,CAAC;AAC9C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","requireNativeComponent","jsx","_jsx","NativeQmsDashboardView","QmsDashboardView","props","clientID","clientCode","ClientID","ClientCode","user_token","userToken","token","rest","resolvedClientID","resolvedClientCode","resolvedToken"],"sourceRoot":"../../src","sources":["QmsDashboardView.ios.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,sBAAsB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtD;AACA,MAAMC,sBAAsB,GAC1BH,sBAAsB,CAAwB,kBAAkB,CAAC;AAEnE,OAAO,MAAMI,gBAAiD,GAAIC,KAAK,IAAK;EAC1E,MAAM;IACJC,QAAQ;IACRC,UAAU;IACVC,QAAQ;IACRC,UAAU;IACVC,UAAU;IACVC,SAAS;IACTC,KAAK;IACL;IACA,GAAGC;EACL,CAAC,GAAGR,KAAK;EAET,MAAMS,gBAAgB,GAAGR,QAAQ,IAAIE,QAAQ,IAAI,EAAE;EACnD,MAAMO,kBAAkB,GAAGR,UAAU,IAAIE,UAAU,IAAI,EAAE;EACzD,MAAMO,aAAa,GAAGN,UAAU,IAAIE,KAAK,IAAID,SAAS,IAAI,EAAE;EAE5D,oBACET,IAAA,CAACC,sBAAsB;IAAA,GACjBU,IAAI;IACRL,QAAQ,EAAEM,gBAAiB;IAC3BL,UAAU,EAAEM,kBAAmB;IAC/BL,UAAU,EAAEM;EAAc,CAC3B,CAAC;AAEN,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,CAiB5D,CAAC"}
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,CAkC5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"QmsDashboardView.ios.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAMtE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAE5D,CAAC"}
1
+ {"version":3,"file":"QmsDashboardView.ios.d.ts","sourceRoot":"","sources":["../../../src/QmsDashboardView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAMtE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyB5D,CAAC"}
@@ -1,9 +1,17 @@
1
1
  import type { StyleProp, ViewStyle } from 'react-native';
2
2
  export type QmsDashboardViewProps = {
3
3
  style?: StyleProp<ViewStyle>;
4
+ /**
5
+ * Preferred camelCase props. Uppercase variants are kept for backwards compatibility
6
+ * with the native iOS view manager prop names.
7
+ */
8
+ clientID?: string;
9
+ clientCode?: string;
4
10
  ClientID?: string;
5
11
  ClientCode?: string;
6
12
  user_token?: string;
13
+ userToken?: string;
14
+ token?: string;
7
15
  autoShow?: boolean;
8
16
  };
9
17
  //# sourceMappingURL=QmsDashboardView.types.d.ts.map
@@ -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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,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;;;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,6 +1,6 @@
1
1
  {
2
2
  "name": "@convep_mobilogy/react-native-qms-plugin",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "description": "To handle defect managment",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -148,14 +148,6 @@
148
148
  ]
149
149
  ]
150
150
  },
151
- "codegenConfig": {
152
- "name": "QmsPluginSpec",
153
- "type": "modules",
154
- "jsSrcsDir": "src",
155
- "android": {
156
- "javaPackageName": "com.qmsplugin"
157
- }
158
- },
159
151
  "create-react-native-library": {
160
152
  "languages": "kotlin-objc",
161
153
  "type": "turbo-module",
@@ -14,17 +14,34 @@ const { QmsModule } = NativeModules as {
14
14
 
15
15
  export const QmsDashboardView: React.FC<QmsDashboardViewProps> = ({
16
16
  style,
17
+ clientID,
18
+ clientCode,
17
19
  ClientID,
18
20
  ClientCode,
19
21
  user_token,
22
+ token,
23
+ userToken,
20
24
  autoShow = true,
21
25
  }) => {
22
26
  useEffect(() => {
27
+ const resolvedClientID = clientID ?? ClientID ?? '';
28
+ const resolvedClientCode = clientCode ?? ClientCode ?? '';
29
+ const resolvedToken = user_token ?? token ?? userToken ?? '';
30
+
23
31
  if (autoShow && QmsModule?.showQms) {
24
32
  // map props to native method args
25
- QmsModule.showQms(user_token, ClientID, ClientCode);
33
+ QmsModule.showQms(resolvedToken, resolvedClientID, resolvedClientCode);
26
34
  }
27
- }, [ClientID, ClientCode, user_token, autoShow]);
35
+ }, [
36
+ clientID,
37
+ clientCode,
38
+ ClientID,
39
+ ClientCode,
40
+ user_token,
41
+ token,
42
+ userToken,
43
+ autoShow,
44
+ ]);
28
45
 
29
46
  // Android doesn’t need to show native UI as a "view" here,
30
47
  // we just render an empty container so JSX stays consistent.
@@ -7,5 +7,28 @@ const NativeQmsDashboardView =
7
7
  requireNativeComponent<QmsDashboardViewProps>('QmsDashboardView');
8
8
 
9
9
  export const QmsDashboardView: React.FC<QmsDashboardViewProps> = (props) => {
10
- return <NativeQmsDashboardView {...props} />;
10
+ const {
11
+ clientID,
12
+ clientCode,
13
+ ClientID,
14
+ ClientCode,
15
+ user_token,
16
+ userToken,
17
+ token,
18
+ // autoShow is Android-only; ignored on iOS
19
+ ...rest
20
+ } = props;
21
+
22
+ const resolvedClientID = clientID ?? ClientID ?? '';
23
+ const resolvedClientCode = clientCode ?? ClientCode ?? '';
24
+ const resolvedToken = user_token ?? token ?? userToken ?? '';
25
+
26
+ return (
27
+ <NativeQmsDashboardView
28
+ {...rest}
29
+ ClientID={resolvedClientID}
30
+ ClientCode={resolvedClientCode}
31
+ user_token={resolvedToken}
32
+ />
33
+ );
11
34
  };
@@ -2,8 +2,16 @@ import type { StyleProp, ViewStyle } from 'react-native';
2
2
 
3
3
  export type QmsDashboardViewProps = {
4
4
  style?: StyleProp<ViewStyle>;
5
+ /**
6
+ * Preferred camelCase props. Uppercase variants are kept for backwards compatibility
7
+ * with the native iOS view manager prop names.
8
+ */
9
+ clientID?: string;
10
+ clientCode?: string;
5
11
  ClientID?: string;
6
12
  ClientCode?: string;
7
13
  user_token?: string;
14
+ userToken?: string;
15
+ token?: string;
8
16
  autoShow?: boolean; // optional: Android uses this, iOS can ignore
9
17
  };
Binary file