diff --git a/Plugin/DependencyPlugin/ProjectDescriptionHelpers/ModulePaths.swift b/Plugin/DependencyPlugin/ProjectDescriptionHelpers/ModulePaths.swift index 3fef4d47..8ffda2d9 100644 --- a/Plugin/DependencyPlugin/ProjectDescriptionHelpers/ModulePaths.swift +++ b/Plugin/DependencyPlugin/ProjectDescriptionHelpers/ModulePaths.swift @@ -25,7 +25,7 @@ public extension ModulePaths { public extension ModulePaths { enum Feature: String, MicroTargetPathConvertable { - case MyViolationHistoryFeature + case MyViolationListFeature case SplashFeature case ConfirmationDialogFeature case MusicFeature diff --git a/Projects/Feature/HomeFeature/Project.swift b/Projects/Feature/HomeFeature/Project.swift index 9921acc0..2016eba6 100644 --- a/Projects/Feature/HomeFeature/Project.swift +++ b/Projects/Feature/HomeFeature/Project.swift @@ -10,7 +10,7 @@ let project = Project.module( dependencies: [ .feature(target: .BaseFeature), .feature(target: .ConfirmationDialogFeature), - .feature(target: .MyViolationHistoryFeature), + .feature(target: .MyViolationListFeature), .domain(target: .SelfStudyDomain, type: .interface), .domain(target: .MassageDomain, type: .interface), .domain(target: .MealDomain, type: .interface), diff --git a/Projects/Feature/MyViolationHistoryFeature/Project.swift b/Projects/Feature/MyViolationHistoryFeature/Project.swift deleted file mode 100644 index 839fbf19..00000000 --- a/Projects/Feature/MyViolationHistoryFeature/Project.swift +++ /dev/null @@ -1,21 +0,0 @@ -import ProjectDescription -import ProjectDescriptionHelpers -import DependencyPlugin - -let project = Project.module( - name: ModulePaths.Feature.MyViolationHistoryFeature.rawValue, - targets: [ - .implements(module: .feature(.MyViolationHistoryFeature), dependencies: [ - .feature(target: .BaseFeature), - .domain(target: .ViolationDomain, type: .interface) - ]), - .tests(module: .feature(.MyViolationHistoryFeature), dependencies: [ - .feature(target: .MyViolationHistoryFeature), - .domain(target: .ViolationDomain, type: .testing) - ]), - .demo(module: .feature(.MyViolationHistoryFeature), dependencies: [ - .feature(target: .MyViolationHistoryFeature), - .domain(target: .ViolationDomain, type: .testing) - ]) - ] -) diff --git a/Projects/Feature/MyViolationHistoryFeature/Demo/Resources/LaunchScreen.storyboard b/Projects/Feature/MyViolationListFeature/Demo/Resources/LaunchScreen.storyboard similarity index 100% rename from Projects/Feature/MyViolationHistoryFeature/Demo/Resources/LaunchScreen.storyboard rename to Projects/Feature/MyViolationListFeature/Demo/Resources/LaunchScreen.storyboard diff --git a/Projects/Feature/MyViolationHistoryFeature/Demo/Sources/AppDelegate.swift b/Projects/Feature/MyViolationListFeature/Demo/Sources/AppDelegate.swift similarity index 78% rename from Projects/Feature/MyViolationHistoryFeature/Demo/Sources/AppDelegate.swift rename to Projects/Feature/MyViolationListFeature/Demo/Sources/AppDelegate.swift index 3fd76a3b..c70ef276 100644 --- a/Projects/Feature/MyViolationHistoryFeature/Demo/Sources/AppDelegate.swift +++ b/Projects/Feature/MyViolationListFeature/Demo/Sources/AppDelegate.swift @@ -1,6 +1,6 @@ import Inject import UIKit -@testable import MyViolationHistoryFeature +@testable import MyViolationListFeature @main final class AppDelegate: UIResponder, UIApplicationDelegate { @@ -11,9 +11,9 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil ) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) - let store = MyViolationHistoryStore() + let store = MyViolationListStore() let viewController = Inject.ViewControllerHost( - MyViolationHistoryViewController(store: store) + MyViolationListViewController(store: store) ) window?.rootViewController = viewController window?.makeKeyAndVisible() diff --git a/Projects/Feature/MyViolationListFeature/Project.swift b/Projects/Feature/MyViolationListFeature/Project.swift new file mode 100644 index 00000000..7694daec --- /dev/null +++ b/Projects/Feature/MyViolationListFeature/Project.swift @@ -0,0 +1,21 @@ +import ProjectDescription +import ProjectDescriptionHelpers +import DependencyPlugin + +let project = Project.module( + name: ModulePaths.Feature.MyViolationListFeature.rawValue, + targets: [ + .implements(module: .feature(.MyViolationListFeature), dependencies: [ + .feature(target: .BaseFeature), + .domain(target: .ViolationDomain, type: .interface) + ]), + .tests(module: .feature(.MyViolationListFeature), dependencies: [ + .feature(target: .MyViolationListFeature), + .domain(target: .ViolationDomain, type: .testing) + ]), + .demo(module: .feature(.MyViolationListFeature), dependencies: [ + .feature(target: .MyViolationListFeature), + .domain(target: .ViolationDomain, type: .testing) + ]) + ] +) diff --git a/Projects/Feature/MyViolationListFeature/Sources/Factory/MyViolationListFactory.swift b/Projects/Feature/MyViolationListFeature/Sources/Factory/MyViolationListFactory.swift new file mode 100644 index 00000000..6946e066 --- /dev/null +++ b/Projects/Feature/MyViolationListFeature/Sources/Factory/MyViolationListFactory.swift @@ -0,0 +1,5 @@ +import BaseFeature + +public protocol MyViolationListFactory { + func makeViewController() -> any StoredViewControllable +} diff --git a/Projects/Feature/MyViolationHistoryFeature/Sources/Scene/MyViolationHistoryViewController.swift b/Projects/Feature/MyViolationListFeature/Sources/Scene/MyViolationListController.swift similarity index 95% rename from Projects/Feature/MyViolationHistoryFeature/Sources/Scene/MyViolationHistoryViewController.swift rename to Projects/Feature/MyViolationListFeature/Sources/Scene/MyViolationListController.swift index f198b34e..49d42d7a 100644 --- a/Projects/Feature/MyViolationHistoryFeature/Sources/Scene/MyViolationHistoryViewController.swift +++ b/Projects/Feature/MyViolationListFeature/Sources/Scene/MyViolationListController.swift @@ -7,7 +7,7 @@ import MSGLayout import UIKit import UIKitUtil -final class MyViolationHistoryViewController: BaseStoredModalViewController { +final class MyViolationListViewController: BaseStoredModalViewController { private enum Metric { static let padding: CGFloat = 24 } diff --git a/Projects/Feature/MyViolationHistoryFeature/Sources/Scene/MyViolationHistoryStore.swift b/Projects/Feature/MyViolationListFeature/Sources/Scene/MyViolationListStore.swift similarity index 83% rename from Projects/Feature/MyViolationHistoryFeature/Sources/Scene/MyViolationHistoryStore.swift rename to Projects/Feature/MyViolationListFeature/Sources/Scene/MyViolationListStore.swift index 17a4991e..171b0676 100644 --- a/Projects/Feature/MyViolationHistoryFeature/Sources/Scene/MyViolationHistoryStore.swift +++ b/Projects/Feature/MyViolationListFeature/Sources/Scene/MyViolationListStore.swift @@ -3,7 +3,7 @@ import Combine import Store import Moordinator -final class MyViolationHistoryStore: BaseStore { +final class MyViolationListStore: BaseStore { var route: PassthroughSubject = .init() var subscription: Set = .init() var initialState: State @@ -19,13 +19,13 @@ final class MyViolationHistoryStore: BaseStore { enum Mutation {} } -extension MyViolationHistoryStore { +extension MyViolationListStore { func mutate(state: State, action: Action) -> SideEffect { .none } } -extension MyViolationHistoryStore { +extension MyViolationListStore { func reduce(state: State, mutate: Mutation) -> State { state } diff --git a/Projects/Feature/MyViolationHistoryFeature/Sources/Scene/View/ViolationCell.swift b/Projects/Feature/MyViolationListFeature/Sources/Scene/View/ViolationCell.swift similarity index 100% rename from Projects/Feature/MyViolationHistoryFeature/Sources/Scene/View/ViolationCell.swift rename to Projects/Feature/MyViolationListFeature/Sources/Scene/View/ViolationCell.swift diff --git a/Projects/Feature/MyViolationHistoryFeature/Tests/MyViolationHistoryFeatureTest.swift b/Projects/Feature/MyViolationListFeature/Tests/MyViolationHistoryFeatureTest.swift similarity index 100% rename from Projects/Feature/MyViolationHistoryFeature/Tests/MyViolationHistoryFeatureTest.swift rename to Projects/Feature/MyViolationListFeature/Tests/MyViolationHistoryFeatureTest.swift