react-native-salespanda 0.7.2 → 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
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // Bottom Tab Icons
3
4
  export const homeIcon = require('./bottomtabs/home.png');
4
5
  export const homeIconActive = require('./bottomtabs/homeactive.png');
5
6
  export const analyticsIcon = require('./bottomtabs/analytics.png');
@@ -10,26 +11,4 @@ export const diaryIcon = require('./bottomtabs/diary.png');
10
11
  export const diaryIconActive = require('./bottomtabs/diaryactive.png');
11
12
  export const notificationIcon = require('./bottomtabs/notification.png');
12
13
  export const notificationIconActive = require('./bottomtabs/notificationactive.png');
13
- export const bottomTabIcons = {
14
- home: {
15
- default: homeIcon,
16
- active: homeIconActive
17
- },
18
- analytics: {
19
- default: analyticsIcon,
20
- active: analyticsIconActive
21
- },
22
- crm: {
23
- default: crmIcon,
24
- active: crmIconActive
25
- },
26
- diary: {
27
- default: diaryIcon,
28
- active: diaryIconActive
29
- },
30
- notification: {
31
- default: notificationIcon,
32
- active: notificationIconActive
33
- }
34
- };
35
14
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-salespanda",
3
- "version": "0.7.2",
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": "lib/module",
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,13 +1,10 @@
1
1
  module.exports = {
2
2
  dependency: {
3
3
  platforms: {
4
- ios: {},
5
4
  android: {
6
5
  sourceDir: './android',
7
6
  },
7
+ ios: {},
8
8
  },
9
9
  },
10
- codegen: {
11
- jsSrcsDir: 'lib/module',
12
- },
13
10
  };