From 75f73164aab91065396b51df82f144e02f19679c Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 26 Aug 2024 19:09:37 +0200 Subject: [PATCH] Moved to package config --- .../src/commonMain/kotlin/net/codinux/banking/ui/App.kt | 4 ++-- .../codinux/banking/ui/composables/TransactionListItem.kt | 2 +- .../net/codinux/banking/ui/composables/TransactionsList.kt | 4 ++-- .../net/codinux/banking/ui/{service => config}/Colors.kt | 2 +- .../kotlin/net/codinux/banking/ui/{service => config}/DI.kt | 5 ++++- .../net/codinux/banking/ui/{service => config}/Style.kt | 2 +- .../net/codinux/banking/ui/dialogs/AddAccountDialog.kt | 6 +++--- .../kotlin/net/codinux/banking/ui/dialogs/ErrorDialog.kt | 4 ++-- .../net/codinux/banking/ui/forms/AutocompleteTextField.kt | 2 +- .../net/codinux/banking/ui/forms/OutlinedTextField.kt | 2 +- .../kotlin/net/codinux/banking/ui/service/FormatUtil.kt | 1 + 11 files changed, 19 insertions(+), 15 deletions(-) rename composeApp/src/commonMain/kotlin/net/codinux/banking/ui/{service => config}/Colors.kt (92%) rename composeApp/src/commonMain/kotlin/net/codinux/banking/ui/{service => config}/DI.kt (64%) rename composeApp/src/commonMain/kotlin/net/codinux/banking/ui/{service => config}/Style.kt (90%) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt index c43d2dd..f9737e7 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/App.kt @@ -18,8 +18,8 @@ import net.codinux.banking.client.model.AccountTransaction import net.codinux.banking.ui.composables.StateHandler import net.codinux.banking.ui.composables.TransactionsList import net.codinux.banking.ui.dialogs.AddAccountDialog -import net.codinux.banking.ui.service.Colors -import net.codinux.banking.ui.service.DI +import net.codinux.banking.ui.config.Colors +import net.codinux.banking.ui.config.DI import org.jetbrains.compose.ui.tooling.preview.Preview private val typography = Typography( diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionListItem.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionListItem.kt index 2fbc002..9015050 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionListItem.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionListItem.kt @@ -10,7 +10,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import net.codinux.banking.client.model.AccountTransaction -import net.codinux.banking.ui.service.DI +import net.codinux.banking.ui.config.DI private val formatUtil = DI.formatUtil diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionsList.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionsList.kt index 6512e23..99a6f69 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionsList.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/composables/TransactionsList.kt @@ -22,8 +22,8 @@ import net.codinux.banking.client.model.AccountTransaction import net.codinux.banking.client.model.Amount import net.codinux.banking.ui.extensions.toBigDecimal import net.codinux.banking.ui.forms.RoundedCornersCard -import net.codinux.banking.ui.service.Colors -import net.codinux.banking.ui.service.DI +import net.codinux.banking.ui.config.Colors +import net.codinux.banking.ui.config.DI import org.jetbrains.compose.ui.tooling.preview.Preview private val formatUtil = DI.formatUtil diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/Colors.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/Colors.kt similarity index 92% rename from composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/Colors.kt rename to composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/Colors.kt index 430787e..2b8b526 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/Colors.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/Colors.kt @@ -1,4 +1,4 @@ -package net.codinux.banking.ui.service +package net.codinux.banking.ui.config import androidx.compose.ui.graphics.Color diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/DI.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/DI.kt similarity index 64% rename from composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/DI.kt rename to composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/DI.kt index ba54628..64f6779 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/DI.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/DI.kt @@ -1,7 +1,10 @@ -package net.codinux.banking.ui.service +package net.codinux.banking.ui.config import net.codinux.banking.ui.Platform import net.codinux.banking.ui.getPlatform +import net.codinux.banking.ui.service.BankFinder +import net.codinux.banking.ui.service.BankingService +import net.codinux.banking.ui.service.FormatUtil import net.codinux.banking.ui.state.UiState object DI { diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/Style.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/Style.kt similarity index 90% rename from composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/Style.kt rename to composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/Style.kt index 962591d..24d185a 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/Style.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/config/Style.kt @@ -1,4 +1,4 @@ -package net.codinux.banking.ui.service +package net.codinux.banking.ui.config import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/AddAccountDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/AddAccountDialog.kt index 6e51cd8..6b687a8 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/AddAccountDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/AddAccountDialog.kt @@ -16,9 +16,9 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import net.codinux.banking.ui.forms.* import net.codinux.banking.ui.model.BankInfo -import net.codinux.banking.ui.service.Colors -import net.codinux.banking.ui.service.DI -import net.codinux.banking.ui.service.Style +import net.codinux.banking.ui.config.Colors +import net.codinux.banking.ui.config.DI +import net.codinux.banking.ui.config.Style private val bankingService = DI.bankingService diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/ErrorDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/ErrorDialog.kt index ed5bb5f..01058d9 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/ErrorDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/ErrorDialog.kt @@ -8,8 +8,8 @@ import androidx.compose.material.TextButton import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign -import net.codinux.banking.ui.service.Colors -import net.codinux.banking.ui.service.Style +import net.codinux.banking.ui.config.Colors +import net.codinux.banking.ui.config.Style @Composable fun ErrorDialog( diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/AutocompleteTextField.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/AutocompleteTextField.kt index f439fb1..3e41190 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/AutocompleteTextField.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/AutocompleteTextField.kt @@ -21,7 +21,7 @@ import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.toSize import kotlinx.coroutines.launch -import net.codinux.banking.ui.service.Colors +import net.codinux.banking.ui.config.Colors @Composable fun AutocompleteTextField( diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/OutlinedTextField.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/OutlinedTextField.kt index 6280fea..9a06b34 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/OutlinedTextField.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/forms/OutlinedTextField.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Shape import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.input.VisualTransformation -import net.codinux.banking.ui.service.Colors +import net.codinux.banking.ui.config.Colors @Composable fun OutlinedTextField( diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/FormatUtil.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/FormatUtil.kt index 28d5e21..9393b5f 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/FormatUtil.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/FormatUtil.kt @@ -4,6 +4,7 @@ import androidx.compose.ui.graphics.Color import kotlinx.datetime.LocalDate import kotlinx.datetime.Month import net.codinux.banking.client.model.Amount +import net.codinux.banking.ui.config.Colors class FormatUtil {