@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.
- package/LICENSE +20 -0
- package/QmsPlugin.podspec +32 -0
- package/README.md +3 -0
- package/android/build.gradle +85 -0
- package/android/gradle.properties +5 -0
- package/android/libs/qmsplugin-release.aar +0 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/java/com/qmsplugin/QmsPluginModule.kt +38 -0
- package/android/src/main/java/com/qmsplugin/QmsPluginPackage.kt +16 -0
- package/ios/QmsPlugin/QmsDashboardViewManager.mm +50 -0
- package/ios/QmsPlugin/QmsPluginBridge.mm +83 -0
- package/ios/QmsPluginFramework.xcframework/Info.plist +44 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Assets.car +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Headers/QmsPlugin.h +13 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Headers/QmsPluginFramework.h +17 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Info.plist +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/Modules/module.modulemap +6 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/QmsPluginFramework +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64/QmsPluginFramework.framework/_CodeSignature/CodeResources +146 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Assets.car +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Headers/QmsPlugin.h +13 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Headers/QmsPluginFramework.h +17 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Info.plist +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/Modules/module.modulemap +6 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/QmsPluginFramework +0 -0
- package/ios/QmsPluginFramework.xcframework/ios-arm64_x86_64-simulator/QmsPluginFramework.framework/_CodeSignature/CodeResources +146 -0
- package/lib/module/NativeQmsPlugin.js +6 -0
- package/lib/module/NativeQmsPlugin.js.map +1 -0
- package/lib/module/QmsDashboardView.js +13 -0
- package/lib/module/QmsDashboardView.js.map +1 -0
- package/lib/module/QmsPluginDashboard.js +13 -0
- package/lib/module/QmsPluginDashboard.js.map +1 -0
- package/lib/module/index.js +34 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeQmsPlugin.d.ts +7 -0
- package/lib/typescript/src/NativeQmsPlugin.d.ts.map +1 -0
- package/lib/typescript/src/QmsDashboardView.d.ts +8 -0
- package/lib/typescript/src/QmsDashboardView.d.ts.map +1 -0
- package/lib/typescript/src/QmsPluginDashboard.d.ts +14 -0
- package/lib/typescript/src/QmsPluginDashboard.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +875 -0
- package/src/NativeQmsPlugin.tsx +8 -0
- package/src/QmsDashboardView.tsx +16 -0
- package/src/QmsPluginDashboard.tsx +24 -0
- package/src/index.tsx +33 -0
|
@@ -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
|
+
// };
|