From 99aa30e968d4a7da851fdce417134569f47e05d2 Mon Sep 17 00:00:00 2001 From: SangEun Date: Mon, 6 Nov 2023 01:49:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=B4=ED=81=AC=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EB=A9=94=EC=9D=B8=ED=99=94=EB=A9=B4=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 4 +- presentation/checklist/build.gradle.kts | 1 + .../presentation/checklist/CheckList.kt | 2 + .../checklist/ChecklistContract.kt | 35 +++- .../presentation/checklist/ChecklistScreen.kt | 127 +++++++++++++- .../checklist/ChecklistViewModel.kt | 10 +- .../checklist/component/ChecklistTopBar.kt | 44 +++++ .../checklist/component/CountryInfo.kt | 155 ++++++++++++++++++ .../contents/CategoryEmptyContents.kt | 50 ++++++ .../contents/CategoryListContents.kt | 107 ++++++++++++ .../category/{Category.kt => CategoryType.kt} | 2 +- presentation/resource/build.gradle.kts | 3 + .../resource/icon/IconArrowDownLine.kt | 40 +++++ .../resource/icon/IconArrowUpLine.kt | 37 +++++ .../resource/icon/TemplateCheckOff.kt | 48 ++++++ .../resource/icon/TemplateCheckOn.kt | 48 ++++++ .../icon/{ => category}/CategoryBaby.kt | 3 +- .../{ => category}/CategoryBeautyProducts.kt | 5 +- .../icon/{ => category}/CategoryBusiness.kt | 3 +- .../icon/{ => category}/CategoryCamping.kt | 3 +- .../icon/{ => category}/CategoryClothes.kt | 3 +- .../{ => category}/CategoryCompanionAnimal.kt | 3 +- .../{ => category}/CategoryElectronics.kt | 5 +- .../CategoryEmergencyMedicine.kt | 5 +- .../icon/{ => category}/CategoryEtc.kt | 3 +- .../icon/{ => category}/CategoryExercise.kt | 3 +- .../icon/{ => category}/CategoryMountain.kt | 3 +- .../icon/{ => category}/CategoryPhoto.kt | 3 +- .../icon/{ => category}/CategoryRequires.kt | 3 +- .../icon/{ => category}/CategorySwimming.kt | 3 +- .../icon/{ => category}/CategoryToiletries.kt | 3 +- .../presentation/resource/util/IconUtil.kt | 40 +++++ .../drawable/ic_empty_checklist_template.png | Bin 0 -> 5245 bytes 33 files changed, 772 insertions(+), 32 deletions(-) create mode 100644 presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/component/ChecklistTopBar.kt create mode 100644 presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/component/CountryInfo.kt create mode 100644 presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/contents/CategoryEmptyContents.kt create mode 100644 presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/contents/CategoryListContents.kt rename presentation/common/src/main/java/com/dkin/chevit/presentation/common/category/{Category.kt => CategoryType.kt} (91%) create mode 100644 presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/IconArrowDownLine.kt create mode 100644 presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/IconArrowUpLine.kt create mode 100644 presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/TemplateCheckOff.kt create mode 100644 presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/TemplateCheckOn.kt rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryBaby.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryBeautyProducts.kt (87%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryBusiness.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryCamping.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryClothes.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryCompanionAnimal.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryElectronics.kt (87%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryEmergencyMedicine.kt (87%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryEtc.kt (90%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryExercise.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryMountain.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryPhoto.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryRequires.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategorySwimming.kt (91%) rename presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/icon/{ => category}/CategoryToiletries.kt (91%) create mode 100644 presentation/resource/src/main/java/com/dkin/chevit/presentation/resource/util/IconUtil.kt create mode 100644 presentation/resource/src/main/res/drawable/ic_empty_checklist_template.png diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9530fb2..e534860 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -43,6 +43,7 @@ chucker = "3.5.2" # Coil coil = "2.4.0" +coil-compose = "2.4.0" # Lottie lottie-compose = "6.1.0" @@ -132,6 +133,7 @@ hilt-ext-work = { group = "androidx.hilt", name = "hilt-work", version.ref = "hi #Coil coil-core = { group = "io.coil-kt", name = "coil", version.ref = "coil" } +coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil-compose" } #Lottie lottie-compose = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "lottie-compose" } @@ -216,7 +218,7 @@ compose = [ "compose-test-uiManifest", "compose-test-ui", "compose-viewModel", - "compose-hiltViewModel" + "compose-hiltViewModel", ] okhttp = [ diff --git a/presentation/checklist/build.gradle.kts b/presentation/checklist/build.gradle.kts index 78ff53c..a78e2fd 100644 --- a/presentation/checklist/build.gradle.kts +++ b/presentation/checklist/build.gradle.kts @@ -20,4 +20,5 @@ dependencies { implementation(project(":presentation:resource")) implementation(project(":presentation:common")) implementation(project(":presentation:deeplink")) + implementation(libs.coil.compose) } diff --git a/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/CheckList.kt b/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/CheckList.kt index 5af984a..898c3c6 100644 --- a/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/CheckList.kt +++ b/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/CheckList.kt @@ -21,6 +21,8 @@ class CheckList : MVIComposeFragment {} + is ChecklistEffect.NavigateToLink -> {} + is ChecklistEffect.NavigateToCategory -> {} } } diff --git a/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/ChecklistContract.kt b/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/ChecklistContract.kt index 8a3b1b4..7efd887 100644 --- a/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/ChecklistContract.kt +++ b/presentation/checklist/src/main/java/com/dkin/chevit/presentation/checklist/ChecklistContract.kt @@ -4,9 +4,10 @@ import androidx.compose.runtime.Stable import com.dkin.chevit.core.mvi.ViewEffect import com.dkin.chevit.core.mvi.ViewIntent import com.dkin.chevit.core.mvi.ViewState -import com.dkin.chevit.presentation.common.category.Category +import com.dkin.chevit.presentation.common.category.CategoryType sealed interface ChecklistIntent : ViewIntent { + data class ChangeTemplateOpenSetting(val isOpen: Boolean) : ChecklistIntent } @Stable @@ -15,7 +16,9 @@ data class ChecklistState( val date: String, val notice: Notice, val weathers: List, - val templates: List