react-native-timezone 2.3.0 → 3.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 (57) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +44 -25
  3. package/android/build.gradle +64 -80
  4. package/android/generated/java/com/samitha/timezone/NativeTimezoneSpec.java +50 -0
  5. package/android/generated/jni/CMakeLists.txt +36 -0
  6. package/android/generated/jni/RNTimezoneSpec-generated.cpp +50 -0
  7. package/android/generated/jni/RNTimezoneSpec.h +31 -0
  8. package/android/generated/jni/react/renderer/components/RNTimezoneSpec/RNTimezoneSpecJSI-generated.cpp +48 -0
  9. package/android/generated/jni/react/renderer/components/RNTimezoneSpec/RNTimezoneSpecJSI.h +94 -0
  10. package/android/src/main/AndroidManifest.xml +1 -2
  11. package/android/src/main/AndroidManifestNew.xml +2 -0
  12. package/android/src/main/java/com/samitha/timezone/TimezoneModule.kt +86 -0
  13. package/android/src/main/java/com/samitha/timezone/TimezonePackage.kt +34 -0
  14. package/ios/Timezone.h +1 -7
  15. package/ios/Timezone.mm +42 -18
  16. package/ios/generated/RNTimezoneSpec/RNTimezoneSpec-generated.mm +60 -0
  17. package/ios/generated/RNTimezoneSpec/RNTimezoneSpec.h +62 -0
  18. package/ios/generated/RNTimezoneSpecJSI-generated.cpp +48 -0
  19. package/ios/generated/RNTimezoneSpecJSI.h +94 -0
  20. package/lib/commonjs/NativeTimezone.js +9 -0
  21. package/lib/commonjs/NativeTimezone.js.map +1 -0
  22. package/lib/commonjs/index.js +12 -10
  23. package/lib/commonjs/index.js.map +1 -1
  24. package/lib/module/NativeTimezone.js +5 -0
  25. package/lib/module/NativeTimezone.js.map +1 -0
  26. package/lib/module/index.js +14 -10
  27. package/lib/module/index.js.map +1 -1
  28. package/lib/typescript/commonjs/package.json +1 -0
  29. package/lib/typescript/commonjs/src/NativeTimezone.d.ts +10 -0
  30. package/lib/typescript/commonjs/src/NativeTimezone.d.ts.map +1 -0
  31. package/lib/typescript/commonjs/src/index.d.ts +8 -0
  32. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  33. package/lib/typescript/module/package.json +1 -0
  34. package/lib/typescript/module/src/NativeTimezone.d.ts +10 -0
  35. package/lib/typescript/module/src/NativeTimezone.d.ts.map +1 -0
  36. package/lib/typescript/module/src/index.d.ts +8 -0
  37. package/lib/typescript/module/src/index.d.ts.map +1 -0
  38. package/package.json +87 -48
  39. package/react-native-timezone.podspec +23 -16
  40. package/react-native.config.js +12 -0
  41. package/src/NativeTimezone.ts +11 -0
  42. package/src/index.tsx +15 -0
  43. package/android/src/main/java/com/samitha/rn/timezone/TimezoneModule.java +0 -41
  44. package/android/src/main/java/com/samitha/rn/timezone/TimezonePackage.java +0 -28
  45. package/ios/Timezone.xcodeproj/project.pbxproj +0 -274
  46. package/ios/Timezone.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  47. package/ios/Timezone.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  48. package/ios/Timezone.xcodeproj/project.xcworkspace/xcuserdata/samitha.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  49. package/ios/Timezone.xcodeproj/xcuserdata/samitha.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  50. package/lib/commonjs/index.d.js +0 -6
  51. package/lib/commonjs/index.d.js.map +0 -1
  52. package/lib/module/index.d.js +0 -2
  53. package/lib/module/index.d.js.map +0 -1
  54. package/lib/typescript/index.test.d.ts +0 -1
  55. package/lib/typescript/index.test.d.ts.map +0 -1
  56. package/src/index.d.ts +0 -5
  57. package/src/index.js +0 -20
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>Timezone.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=index.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.d.ts"],"mappings":""}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/index.test.tsx"],"names":[],"mappings":""}
package/src/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- declare const _default: {
2
- getTimeZone(): Promise<string | null>;
3
- };
4
-
5
- export default _default;
package/src/index.js DELETED
@@ -1,20 +0,0 @@
1
- import { NativeModules, Platform } from 'react-native';
2
-
3
- const LINKING_ERROR =
4
- `The package 'react-native-timezone' doesn't seem to be linked. Make sure: \n\n` +
5
- Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
6
- '- You rebuilt the app after installing the package\n' +
7
- '- You are not using Expo Go\n';
8
-
9
- const Timezone = NativeModules.Timezone
10
- ? NativeModules.Timezone
11
- : new Proxy(
12
- {},
13
- {
14
- get() {
15
- throw new Error(LINKING_ERROR);
16
- },
17
- }
18
- );
19
-
20
- export default Timezone;