@convep_mobilogy/react-native-qms-plugin 0.1.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.
Files changed (49) hide show
  1. package/LICENSE +20 -0
  2. package/QmsPlugin.podspec +32 -0
  3. package/README.md +3 -0
  4. package/android/build.gradle +85 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/libs/qmsplugin-release.aar +0 -0
  7. package/android/src/main/AndroidManifest.xml +9 -0
  8. package/android/src/main/java/com/qmsplugin/QmsPluginModule.kt +38 -0
  9. package/android/src/main/java/com/qmsplugin/QmsPluginPackage.kt +16 -0
  10. package/ios/QmsPlugin/QmsDashboardViewManager.mm +50 -0
  11. package/ios/QmsPlugin/QmsPluginBridge.mm +83 -0
  12. package/ios/QmsPluginFramework.xcframework/Info.plist +44 -0
  13. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Assets.car +0 -0
  14. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Headers/QmsPlugin.h +13 -0
  15. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Headers/QmsPluginFramework.h +17 -0
  16. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Info.plist +0 -0
  17. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Modules/module.modulemap +6 -0
  18. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework +0 -0
  19. package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/_CodeSignature/CodeResources +146 -0
  20. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Assets.car +0 -0
  21. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Headers/QmsPlugin.h +13 -0
  22. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Headers/QmsPluginFramework.h +17 -0
  23. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Info.plist +0 -0
  24. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Modules/module.modulemap +6 -0
  25. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework +0 -0
  26. package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/_CodeSignature/CodeResources +146 -0
  27. package/lib/module/NativeQmsPlugin.js +6 -0
  28. package/lib/module/NativeQmsPlugin.js.map +1 -0
  29. package/lib/module/QmsDashboardView.js +13 -0
  30. package/lib/module/QmsDashboardView.js.map +1 -0
  31. package/lib/module/QmsPluginDashboard.js +13 -0
  32. package/lib/module/QmsPluginDashboard.js.map +1 -0
  33. package/lib/module/index.js +34 -0
  34. package/lib/module/index.js.map +1 -0
  35. package/lib/module/package.json +1 -0
  36. package/lib/typescript/package.json +1 -0
  37. package/lib/typescript/src/NativeQmsPlugin.d.ts +7 -0
  38. package/lib/typescript/src/NativeQmsPlugin.d.ts.map +1 -0
  39. package/lib/typescript/src/QmsDashboardView.d.ts +8 -0
  40. package/lib/typescript/src/QmsDashboardView.d.ts.map +1 -0
  41. package/lib/typescript/src/QmsPluginDashboard.d.ts +14 -0
  42. package/lib/typescript/src/QmsPluginDashboard.d.ts.map +1 -0
  43. package/lib/typescript/src/index.d.ts +3 -0
  44. package/lib/typescript/src/index.d.ts.map +1 -0
  45. package/package.json +875 -0
  46. package/src/NativeQmsPlugin.tsx +8 -0
  47. package/src/QmsDashboardView.tsx +16 -0
  48. package/src/QmsPluginDashboard.tsx +24 -0
  49. package/src/index.tsx +33 -0
@@ -0,0 +1,8 @@
1
+ // src/NativeQmsPlugin.tsx
2
+ import { TurboModuleRegistry, type TurboModule } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ showPluginUI(): void;
6
+ }
7
+
8
+ export default TurboModuleRegistry.getEnforcing<Spec>('QmsPlugin');
@@ -0,0 +1,16 @@
1
+ // src/QmsDashboardView.tsx
2
+ import React from 'react';
3
+ import { requireNativeComponent,Platform } from 'react-native';
4
+ import type { ViewStyle } from 'react-native';
5
+
6
+ type Props = {
7
+ style?: ViewStyle;
8
+ };
9
+
10
+ const NativeQmsDashboardView = requireNativeComponent<Props>(
11
+ Platform.OS === 'ios' ? 'QmsDashboardView' : 'QmsDashboard'
12
+ );
13
+
14
+ export const QmsDashboardView: React.FC<Props> = (props) => {
15
+ return <NativeQmsDashboardView {...props} />;
16
+ };
@@ -0,0 +1,24 @@
1
+ // src/QmsPluginDashboard.tsx
2
+ import type { ReactNode } from 'react';
3
+ import { requireNativeComponent, Platform } from 'react-native';
4
+ import type { ViewProps } from 'react-native';
5
+
6
+ export type QmsPluginDashboardProps = ViewProps & {
7
+ token?: string;
8
+ companyCode?: string;
9
+ /**
10
+ * Optional payload you might want to supply to the native dashboard.
11
+ * Use `ReadonlyArray` so TypeScript enforces immutability.
12
+ */
13
+ payload?: ReadonlyArray<Record<string, unknown>>;
14
+ children?: ReactNode;
15
+ };
16
+
17
+ const NativeDashboard = requireNativeComponent<QmsPluginDashboardProps>(
18
+ Platform.OS === 'ios' ? 'QmsDashboardView' : 'QmsDashboard'
19
+ );
20
+
21
+
22
+ export default function QmsPluginDashboard(props: QmsPluginDashboardProps) {
23
+ return <NativeDashboard {...props} />;
24
+ }
package/src/index.tsx ADDED
@@ -0,0 +1,33 @@
1
+ // import { NativeModules, Platform } from 'react-native';
2
+
3
+ // type Native = {
4
+ // openDashboard(): Promise<boolean>;
5
+ // };
6
+
7
+ // const { QmsPlugin } = NativeModules as { QmsPlugin?: Native };
8
+
9
+ // if (Platform.OS === 'android' && !QmsPlugin) {
10
+ // throw new Error(
11
+ // 'QmsPlugin native module not found. Did autolinking fail? Make sure android builds and the package name is com.convep.qmsplugin.'
12
+ // );
13
+ // }
14
+
15
+ // export { default as QmsPluginDashboard } from './QmsPluginDashboard';
16
+ // export type { QmsPluginDashboardProps } from './QmsPluginDashboard';
17
+ // export default {
18
+ // // Keep your methods too if you like
19
+ // openDashboard: () => (NativeModules as any).QmsPlugin.openDashboard?.(),
20
+ // };
21
+
22
+
23
+ import QmsPlugin from './NativeQmsPlugin';
24
+ export { QmsDashboardView } from './QmsDashboardView';
25
+
26
+ export function showPluginUI(): void {
27
+ QmsPlugin.showPluginUI();
28
+ }
29
+
30
+ // export default {
31
+ // showPluginUI,
32
+ // QmsDashboardView,
33
+ // };