generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from GSM-MSG/23-feat-signin-page
- Loading branch information
Showing
40 changed files
with
549 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.17.0 | ||
3.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
excluded: | ||
- "**/*/NeedleGenerated.swift" | ||
- "Tuist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import NeedleFoundation | ||
import SwiftUI | ||
import AuthDomainInterface | ||
import AuthDomain | ||
import SigninFeature | ||
import SigninFeatureInterface | ||
import BaseDomain | ||
import JwtStore | ||
import JwtStoreInterface | ||
import KeychainModule | ||
import KeychainModuleInterface | ||
|
||
final class AppComponent: BootstrapComponent { | ||
func makeRootView() -> some View { | ||
signinBuildable.makeView().eraseToAnyView() | ||
} | ||
|
||
var signinBuildable: any SigninBuildable { | ||
SigninComponent(parent: self) | ||
} | ||
|
||
var authDomainBuildable: any AuthDomainBuildable { | ||
AuthDomainComponent(parent: self) | ||
} | ||
|
||
var jwtStoreBuildable: any JwtStoreBuildable { | ||
JwtStoreComponent(parent: self) | ||
} | ||
|
||
var keychainBuildable: any KeychainBuildable { | ||
KeychainComponent(parent: self) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
|
||
|
||
import AuthDomain | ||
import AuthDomainInterface | ||
import BaseDomain | ||
import BaseFeature | ||
import JwtStore | ||
import JwtStoreInterface | ||
import KeychainModule | ||
import KeychainModuleInterface | ||
import NeedleFoundation | ||
import SigninFeature | ||
import SigninFeatureInterface | ||
import SwiftUI | ||
|
||
// swiftlint:disable unused_declaration | ||
private let needleDependenciesHash : String? = nil | ||
|
||
// MARK: - Traversal Helpers | ||
|
||
private func parent1(_ component: NeedleFoundation.Scope) -> NeedleFoundation.Scope { | ||
return component.parent | ||
} | ||
|
||
// MARK: - Providers | ||
|
||
#if !NEEDLE_DYNAMIC | ||
|
||
private class JwtStoreDependency5613ee3d4fea5093f6faProvider: JwtStoreDependency { | ||
var keychainBuildable: any KeychainBuildable { | ||
return appComponent.keychainBuildable | ||
} | ||
private let appComponent: AppComponent | ||
init(appComponent: AppComponent) { | ||
self.appComponent = appComponent | ||
} | ||
} | ||
/// ^->AppComponent->JwtStoreComponent | ||
private func factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject { | ||
return JwtStoreDependency5613ee3d4fea5093f6faProvider(appComponent: parent1(component) as! AppComponent) | ||
} | ||
private class SigninDependencyde06a9d0b22764487733Provider: SigninDependency { | ||
var authDomainBuildable: any AuthDomainBuildable { | ||
return appComponent.authDomainBuildable | ||
} | ||
private let appComponent: AppComponent | ||
init(appComponent: AppComponent) { | ||
self.appComponent = appComponent | ||
} | ||
} | ||
/// ^->AppComponent->SigninComponent | ||
private func factory2882a056d84a613debccf47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject { | ||
return SigninDependencyde06a9d0b22764487733Provider(appComponent: parent1(component) as! AppComponent) | ||
} | ||
private class AuthDomainDependency4518b8977185a5c9ff71Provider: AuthDomainDependency { | ||
var jwtStoreBuildable: any JwtStoreBuildable { | ||
return appComponent.jwtStoreBuildable | ||
} | ||
private let appComponent: AppComponent | ||
init(appComponent: AppComponent) { | ||
self.appComponent = appComponent | ||
} | ||
} | ||
/// ^->AppComponent->AuthDomainComponent | ||
private func factoryc9b20c320bb79402d4c1f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject { | ||
return AuthDomainDependency4518b8977185a5c9ff71Provider(appComponent: parent1(component) as! AppComponent) | ||
} | ||
|
||
#else | ||
extension JwtStoreComponent: Registration { | ||
public func registerItems() { | ||
keyPathToName[\JwtStoreDependency.keychainBuildable] = "keychainBuildable-any KeychainBuildable" | ||
} | ||
} | ||
extension AppComponent: Registration { | ||
public func registerItems() { | ||
|
||
|
||
} | ||
} | ||
extension KeychainComponent: Registration { | ||
public func registerItems() { | ||
|
||
} | ||
} | ||
extension SigninComponent: Registration { | ||
public func registerItems() { | ||
keyPathToName[\SigninDependency.authDomainBuildable] = "authDomainBuildable-any AuthDomainBuildable" | ||
} | ||
} | ||
extension AuthDomainComponent: Registration { | ||
public func registerItems() { | ||
keyPathToName[\AuthDomainDependency.jwtStoreBuildable] = "jwtStoreBuildable-any JwtStoreBuildable" | ||
} | ||
} | ||
|
||
|
||
#endif | ||
|
||
private func factoryEmptyDependencyProvider(_ component: NeedleFoundation.Scope) -> AnyObject { | ||
return EmptyDependencyProvider(component: component) | ||
} | ||
|
||
// MARK: - Registration | ||
private func registerProviderFactory(_ componentPath: String, _ factory: @escaping (NeedleFoundation.Scope) -> AnyObject) { | ||
__DependencyProviderRegistry.instance.registerDependencyProviderFactory(for: componentPath, factory) | ||
} | ||
|
||
#if !NEEDLE_DYNAMIC | ||
|
||
private func register1() { | ||
registerProviderFactory("^->AppComponent->JwtStoreComponent", factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5) | ||
registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider) | ||
registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider) | ||
registerProviderFactory("^->AppComponent->SigninComponent", factory2882a056d84a613debccf47b58f8f304c97af4d5) | ||
registerProviderFactory("^->AppComponent->AuthDomainComponent", factoryc9b20c320bb79402d4c1f47b58f8f304c97af4d5) | ||
} | ||
#endif | ||
|
||
public func registerProviderFactories() { | ||
#if !NEEDLE_DYNAMIC | ||
register1() | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import BaseFeature | ||
import DesignSystem | ||
import SwiftUI | ||
|
||
@main | ||
struct SMSApp: App { | ||
init() { | ||
registerProviderFactories() | ||
} | ||
|
||
var body: some Scene { | ||
WindowGroup { | ||
AppComponent().makeRootView() | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+119 KB
...signSystem/Resources/Image/Images.xcassets/Background.imageset/Background 1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...signSystem/Resources/Image/Images.xcassets/Background.imageset/Background 2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+119 KB
...DesignSystem/Resources/Image/Images.xcassets/Background.imageset/Background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
Projects/Core/DesignSystem/Resources/Image/Images.xcassets/Background.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Background.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Background 1.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Background 2.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Projects/Core/DesignSystem/Resources/Image/Images.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import SwiftUI | ||
|
||
public struct SMSImage: View { | ||
public enum Image { | ||
case background | ||
} | ||
|
||
private var image: Image | ||
private var renderingMode: SwiftUI.Image.TemplateRenderingMode | ||
|
||
public init( | ||
_ image: Image, | ||
renderingMode: SwiftUI.Image.TemplateRenderingMode = .original | ||
) { | ||
self.image = image | ||
self.renderingMode = renderingMode | ||
} | ||
|
||
public var body: some View { | ||
smsImageToImage() | ||
.resizable() | ||
.renderingMode(renderingMode) | ||
} | ||
|
||
private func smsImageToImage() -> SwiftUI.Image { | ||
switch image { | ||
case .background: | ||
return DesignSystemAsset.Images.background.swiftUIImage | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import NeedleFoundation | ||
|
||
public protocol JwtStoreBuildable { | ||
var jwtStore: any JwtStore { get } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import JwtStoreInterface | ||
import KeychainModuleInterface | ||
import NeedleFoundation | ||
|
||
public protocol JwtStoreDependency: Dependency { | ||
var keychainBuildable: any KeychainBuildable { get } | ||
} | ||
|
||
public final class JwtStoreComponent: Component<JwtStoreDependency>, JwtStoreBuildable { | ||
public var jwtStore: any JwtStore { | ||
KeychainJwtStore(keychain: dependency.keychainBuildable.keychain) | ||
} | ||
} |
Oops, something went wrong.