@janiscommerce/ui-native 1.0.4 → 1.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 (69) hide show
  1. package/README.md +35 -0
  2. package/dist/android/app/_BUCK +55 -0
  3. package/dist/android/app/build.gradle +230 -0
  4. package/dist/android/app/build_defs.bzl +19 -0
  5. package/dist/android/app/debug.keystore +0 -0
  6. package/dist/android/app/proguard-rules.pro +10 -0
  7. package/dist/android/app/src/debug/AndroidManifest.xml +13 -0
  8. package/dist/android/app/src/debug/java/com/myapp/ReactNativeFlipper.java +72 -0
  9. package/dist/android/app/src/main/AndroidManifest.xml +25 -0
  10. package/dist/android/app/src/main/assets/fonts/janis-font-icon.ttf +0 -0
  11. package/dist/android/app/src/main/java/com/myapp/MainActivity.java +15 -0
  12. package/dist/android/app/src/main/java/com/myapp/MainApplication.java +80 -0
  13. package/dist/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  14. package/dist/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  15. package/dist/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  16. package/dist/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  17. package/dist/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  18. package/dist/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  19. package/dist/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  20. package/dist/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  21. package/dist/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  22. package/dist/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  23. package/dist/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  24. package/dist/android/app/src/main/res/values/strings.xml +3 -0
  25. package/dist/android/app/src/main/res/values/styles.xml +9 -0
  26. package/dist/android/build.gradle +42 -0
  27. package/dist/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/dist/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  29. package/dist/android/gradle.properties +28 -0
  30. package/dist/android/gradlew +185 -0
  31. package/dist/android/gradlew.bat +89 -0
  32. package/dist/android/settings.gradle +6 -0
  33. package/dist/components/Carousel/index.d.ts +19 -0
  34. package/dist/components/Carousel/index.js +35 -0
  35. package/dist/components/Carousel/utils/index.d.ts +13 -0
  36. package/dist/components/Carousel/utils/index.js +102 -0
  37. package/dist/components/Icon/assets/fonts/selection.json +1 -0
  38. package/dist/components/Icon/index.d.ts +8 -0
  39. package/dist/components/Icon/index.js +12 -0
  40. package/dist/components/Select/Components/Dropdown/index.d.ts +13 -0
  41. package/dist/components/Select/Components/Dropdown/index.js +73 -0
  42. package/dist/components/Select/Components/Icons/Chevron/index.d.ts +18 -0
  43. package/dist/components/Select/Components/Icons/Chevron/index.js +19 -0
  44. package/dist/components/Select/Components/Icons/Delete/index.d.ts +18 -0
  45. package/dist/components/Select/Components/Icons/Delete/index.js +19 -0
  46. package/dist/components/Select/index.d.ts +41 -0
  47. package/dist/components/Select/index.js +149 -0
  48. package/dist/components/Select/utils/index.d.ts +2 -0
  49. package/dist/components/Select/utils/index.js +8 -0
  50. package/dist/components/SwipeUp/childComponents/index.d.ts +11 -0
  51. package/dist/components/SwipeUp/childComponents/index.js +22 -0
  52. package/dist/components/SwipeUp/index.d.ts +10 -0
  53. package/dist/components/SwipeUp/index.js +11 -0
  54. package/dist/index.d.ts +6 -1
  55. package/dist/index.js +6 -1
  56. package/dist/ios/MyApp/AppDelegate.h +8 -0
  57. package/dist/ios/MyApp/AppDelegate.m +58 -0
  58. package/dist/ios/MyApp/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
  59. package/dist/ios/MyApp/Images.xcassets/Contents.json +6 -0
  60. package/dist/ios/MyApp/Info.plist +55 -0
  61. package/dist/ios/MyApp/LaunchScreen.storyboard +58 -0
  62. package/dist/ios/MyApp/main.m +9 -0
  63. package/dist/ios/MyApp.xcodeproj/project.pbxproj +791 -0
  64. package/dist/ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp-tvOS.xcscheme +88 -0
  65. package/dist/ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp.xcscheme +88 -0
  66. package/dist/ios/MyAppTests/Info.plist +24 -0
  67. package/dist/ios/MyAppTests/MyAppTests.m +65 -0
  68. package/dist/ios/Podfile +33 -0
  69. package/package.json +10 -4
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "1130"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
18
+ BuildableName = "ui-native-tvOS.app"
19
+ BlueprintName = "ui-native-tvOS"
20
+ ReferencedContainer = "container:ui-native.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ <TestableReference
32
+ skipped = "NO">
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
36
+ BuildableName = "ui-native-tvOSTests.xctest"
37
+ BlueprintName = "ui-native-tvOSTests"
38
+ ReferencedContainer = "container:ui-native.xcodeproj">
39
+ </BuildableReference>
40
+ </TestableReference>
41
+ </Testables>
42
+ </TestAction>
43
+ <LaunchAction
44
+ buildConfiguration = "Debug"
45
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47
+ launchStyle = "0"
48
+ useCustomWorkingDirectory = "NO"
49
+ ignoresPersistentStateOnLaunch = "NO"
50
+ debugDocumentVersioning = "YES"
51
+ debugServiceExtension = "internal"
52
+ allowLocationSimulation = "YES">
53
+ <BuildableProductRunnable
54
+ runnableDebuggingMode = "0">
55
+ <BuildableReference
56
+ BuildableIdentifier = "primary"
57
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
58
+ BuildableName = "ui-native-tvOS.app"
59
+ BlueprintName = "ui-native-tvOS"
60
+ ReferencedContainer = "container:ui-native.xcodeproj">
61
+ </BuildableReference>
62
+ </BuildableProductRunnable>
63
+ </LaunchAction>
64
+ <ProfileAction
65
+ buildConfiguration = "Release"
66
+ shouldUseLaunchSchemeArgsEnv = "YES"
67
+ savedToolIdentifier = ""
68
+ useCustomWorkingDirectory = "NO"
69
+ debugDocumentVersioning = "YES">
70
+ <BuildableProductRunnable
71
+ runnableDebuggingMode = "0">
72
+ <BuildableReference
73
+ BuildableIdentifier = "primary"
74
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
75
+ BuildableName = "ui-native-tvOS.app"
76
+ BlueprintName = "ui-native-tvOS"
77
+ ReferencedContainer = "container:ui-native.xcodeproj">
78
+ </BuildableReference>
79
+ </BuildableProductRunnable>
80
+ </ProfileAction>
81
+ <AnalyzeAction
82
+ buildConfiguration = "Debug">
83
+ </AnalyzeAction>
84
+ <ArchiveAction
85
+ buildConfiguration = "Release"
86
+ revealArchiveInOrganizer = "YES">
87
+ </ArchiveAction>
88
+ </Scheme>
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "1210"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
18
+ BuildableName = "ui-native.app"
19
+ BlueprintName = "ui-native"
20
+ ReferencedContainer = "container:ui-native.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ <TestableReference
32
+ skipped = "NO">
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "00E356ED1AD99517003FC87E"
36
+ BuildableName = "MyAppTests.xctest"
37
+ BlueprintName = "MyAppTests"
38
+ ReferencedContainer = "container:ui-native.xcodeproj">
39
+ </BuildableReference>
40
+ </TestableReference>
41
+ </Testables>
42
+ </TestAction>
43
+ <LaunchAction
44
+ buildConfiguration = "Debug"
45
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47
+ launchStyle = "0"
48
+ useCustomWorkingDirectory = "NO"
49
+ ignoresPersistentStateOnLaunch = "NO"
50
+ debugDocumentVersioning = "YES"
51
+ debugServiceExtension = "internal"
52
+ allowLocationSimulation = "YES">
53
+ <BuildableProductRunnable
54
+ runnableDebuggingMode = "0">
55
+ <BuildableReference
56
+ BuildableIdentifier = "primary"
57
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
58
+ BuildableName = "ui-native.app"
59
+ BlueprintName = "ui-native"
60
+ ReferencedContainer = "container:ui-native.xcodeproj">
61
+ </BuildableReference>
62
+ </BuildableProductRunnable>
63
+ </LaunchAction>
64
+ <ProfileAction
65
+ buildConfiguration = "Release"
66
+ shouldUseLaunchSchemeArgsEnv = "YES"
67
+ savedToolIdentifier = ""
68
+ useCustomWorkingDirectory = "NO"
69
+ debugDocumentVersioning = "YES">
70
+ <BuildableProductRunnable
71
+ runnableDebuggingMode = "0">
72
+ <BuildableReference
73
+ BuildableIdentifier = "primary"
74
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
75
+ BuildableName = "ui-native.app"
76
+ BlueprintName = "ui-native"
77
+ ReferencedContainer = "container:ui-native.xcodeproj">
78
+ </BuildableReference>
79
+ </BuildableProductRunnable>
80
+ </ProfileAction>
81
+ <AnalyzeAction
82
+ buildConfiguration = "Debug">
83
+ </AnalyzeAction>
84
+ <ArchiveAction
85
+ buildConfiguration = "Release"
86
+ revealArchiveInOrganizer = "YES">
87
+ </ArchiveAction>
88
+ </Scheme>
@@ -0,0 +1,24 @@
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>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>BNDL</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1</string>
23
+ </dict>
24
+ </plist>
@@ -0,0 +1,65 @@
1
+ #import <UIKit/UIKit.h>
2
+ #import <XCTest/XCTest.h>
3
+
4
+ #import <React/RCTLog.h>
5
+ #import <React/RCTRootView.h>
6
+
7
+ #define TIMEOUT_SECONDS 600
8
+ #define TEXT_TO_LOOK_FOR @"Welcome to React"
9
+
10
+ @interface MyAppTests : XCTestCase
11
+
12
+ @end
13
+
14
+ @implementation MyAppTests
15
+
16
+ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
17
+ {
18
+ if (test(view)) {
19
+ return YES;
20
+ }
21
+ for (UIView *subview in [view subviews]) {
22
+ if ([self findSubviewInView:subview matching:test]) {
23
+ return YES;
24
+ }
25
+ }
26
+ return NO;
27
+ }
28
+
29
+ - (void)testRendersWelcomeScreen
30
+ {
31
+ UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32
+ NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33
+ BOOL foundElement = NO;
34
+
35
+ __block NSString *redboxError = nil;
36
+ #ifdef DEBUG
37
+ RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
38
+ if (level >= RCTLogLevelError) {
39
+ redboxError = message;
40
+ }
41
+ });
42
+ #endif
43
+
44
+ while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
45
+ [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
46
+ [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47
+
48
+ foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
49
+ if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
50
+ return YES;
51
+ }
52
+ return NO;
53
+ }];
54
+ }
55
+
56
+ #ifdef DEBUG
57
+ RCTSetLogFunction(RCTDefaultLogFunction);
58
+ #endif
59
+
60
+ XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
61
+ XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
62
+ }
63
+
64
+
65
+ @end
@@ -0,0 +1,33 @@
1
+ require_relative '../node_modules/react-native/scripts/react_native_pods'
2
+ require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3
+
4
+ platform :ios, '10.0'
5
+
6
+ target 'ui-native' do
7
+ config = use_native_modules!
8
+
9
+ use_react_native!(:path => config["reactNativePath"])
10
+
11
+ target 'MyAppTests' do
12
+ inherit! :complete
13
+ # Pods for testing
14
+ end
15
+
16
+ # Enables Flipper.
17
+ #
18
+ # Note that if you have use_frameworks! enabled, Flipper will not work and
19
+ # you should disable these next few lines.
20
+ use_flipper!
21
+ post_install do |installer|
22
+ flipper_post_install(installer)
23
+ end
24
+ end
25
+
26
+ target 'ui-native-tvOS' do
27
+ # Pods for ui-native-tvOS
28
+
29
+ target 'ui-native-tvOSTests' do
30
+ inherit! :search_paths
31
+ # Pods for testing
32
+ end
33
+ end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janiscommerce/ui-native",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "description": "components library for Janis app",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -16,8 +16,8 @@
16
16
  "prepare": "husky install",
17
17
  "validate:code": "npm run lint -- --fix && tsc --noEmit && npm t",
18
18
  "test:commit": "jest --colors --bail --findRelatedTests",
19
- "test:coverage": "tsc --noEmit && jest --collectCoverage",
20
- "build": "rm -rf dist && tsc",
19
+ "test:coverage": "tsc --noEmit && jest --collectCoverage --detectOpenHandles",
20
+ "build": "rm -rf dist && tsc && cp -r android ios dist",
21
21
  "storybook": "react-native-storybook-server",
22
22
  "storybook-watcher": "sb-rn-watcher --config-path .ondevice",
23
23
  "update-stories": "sb-rn-get-stories --config-path .ondevice",
@@ -42,12 +42,13 @@
42
42
  "homepage": "https://github.com/janis-commerce/ui-native#readme",
43
43
  "peerDependencies": {
44
44
  "react": ">=17.0.2 <=18.2.0",
45
- "react-native": ">=0.67.5 <=0.71.5"
45
+ "react-native": ">=0.67.5 <=0.71.7"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/core": "^7.12.9",
49
49
  "@babel/preset-env": "^7.22.7",
50
50
  "@babel/runtime": "^7.22.6",
51
+ "@gorhom/bottom-sheet": "^4.5.1",
51
52
  "@react-native-community/eslint-config": "^2.0.0",
52
53
  "@storybook/addon-actions": "^6.5.4",
53
54
  "@storybook/addon-controls": "^6.5.4",
@@ -60,10 +61,12 @@
60
61
  "@storybook/react": "^6.5.4",
61
62
  "@storybook/react-native": "^6.5.4",
62
63
  "@storybook/react-native-server": "^6.5.4",
64
+ "@testing-library/react-hooks": "^8.0.1",
63
65
  "@testing-library/react-native": "^7.2.0",
64
66
  "@types/jest": "^25.2.3",
65
67
  "@types/react": "^17.0.2",
66
68
  "@types/react-native": "^0.63.2",
69
+ "@types/react-native-vector-icons": "^6.4.14",
67
70
  "@types/react-test-renderer": "^16.9.2",
68
71
  "@typescript-eslint/eslint-plugin": "^5.45.0",
69
72
  "@typescript-eslint/parser": "^5.32.0",
@@ -87,6 +90,8 @@
87
90
  "react": "17.0.2",
88
91
  "react-dom": "^17.0.2",
89
92
  "react-native": "0.67.5",
93
+ "react-native-gesture-handler": "^2.9.0",
94
+ "react-native-reanimated": "^2.17.0",
90
95
  "react-native-svg-transformer": "^1.0.0",
91
96
  "react-test-renderer": "17.0.2",
92
97
  "setup-env": "^2.0.0",
@@ -116,6 +121,7 @@
116
121
  "@storybook/cli": "^6.5.4",
117
122
  "react-native-safe-area-context": "^4.6.4",
118
123
  "react-native-svg": "12.1.1",
124
+ "react-native-vector-icons": "^9.2.0",
119
125
  "react-native-web": "^0.15.0"
120
126
  }
121
127
  }