react-native-salespanda 0.7.1 → 0.7.3

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.
@@ -1,20 +1,16 @@
1
1
  package com.salespanda
2
2
 
3
- import com.facebook.react.bridge.ReactApplicationContext
4
- import com.facebook.react.module.annotations.ReactModule
3
+ import com.facebook.react.bridge.*
5
4
 
6
- @ReactModule(name = SalespandaModule.NAME)
7
- class SalespandaModule(reactContext: ReactApplicationContext) :
8
- NativeSalespandaSpec(reactContext) {
5
+ class SalespandaModule(
6
+ reactContext: ReactApplicationContext
7
+ ) : ReactContextBaseJavaModule(reactContext) {
9
8
 
10
- override fun getName(): String {
11
- return NAME
12
- }
9
+ override fun getName(): String = NAME
13
10
 
14
- // Example method
15
- // See https://reactnative.dev/docs/native-modules-android
16
- override fun multiply(a: Double, b: Double): Double {
17
- return a * b
11
+ @ReactMethod
12
+ fun multiply(a: Double, b: Double, promise: Promise) {
13
+ promise.resolve(a * b)
18
14
  }
19
15
 
20
16
  companion object {
package/ios/Salespanda.h CHANGED
@@ -1,5 +1,4 @@
1
- #import <SalespandaSpec/SalespandaSpec.h>
2
-
3
- @interface Salespanda : NSObject <NativeSalespandaSpec>
1
+ #import <React/RCTBridgeModule.h>
4
2
 
3
+ @interface Salespanda : NSObject <RCTBridgeModule>
5
4
  @end
package/ios/Salespanda.mm CHANGED
@@ -1,21 +1,15 @@
1
1
  #import "Salespanda.h"
2
2
 
3
3
  @implementation Salespanda
4
- - (NSNumber *)multiply:(double)a b:(double)b {
5
- NSNumber *result = @(a * b);
6
4
 
7
- return result;
8
- }
9
-
10
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
11
- (const facebook::react::ObjCTurboModule::InitParams &)params
12
- {
13
- return std::make_shared<facebook::react::NativeSalespandaSpecJSI>(params);
14
- }
5
+ RCT_EXPORT_MODULE();
15
6
 
16
- + (NSString *)moduleName
7
+ RCT_EXPORT_METHOD(multiply:(double)a
8
+ b:(double)b
9
+ resolver:(RCTPromiseResolveBlock)resolve
10
+ rejecter:(RCTPromiseRejectBlock)reject)
17
11
  {
18
- return @"Salespanda";
12
+ resolve(@(a * b));
19
13
  }
20
14
 
21
15
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-salespanda",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "React Native SDK for multi-tenant enterprise applications with product flavors support",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -175,14 +175,6 @@
175
175
  ]
176
176
  ]
177
177
  },
178
- "codegenConfig": {
179
- "name": "SalespandaSpec",
180
- "type": "modules",
181
- "jsSrcsDir": "src",
182
- "android": {
183
- "javaPackageName": "com.salespanda"
184
- }
185
- },
186
178
  "create-react-native-library": {
187
179
  "languages": "kotlin-objc",
188
180
  "type": "turbo-module",
@@ -1,12 +1,10 @@
1
1
  module.exports = {
2
2
  dependency: {
3
3
  platforms: {
4
- ios: {
5
- podspecPath: 'Salespanda.podspec',
6
- },
7
4
  android: {
8
5
  sourceDir: './android',
9
6
  },
7
+ ios: {},
10
8
  },
11
9
  },
12
10
  };