diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d0032e2..969f1a1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ on: jobs: build: runs-on: ubuntu-latest + if: false timeout-minutes: 30 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index f10e16f4..1a2543ad 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -8,6 +8,7 @@ jobs: build: name: Deploy docs runs-on: ubuntu-latest + if: false steps: - name: Checkout add-docs uses: actions/checkout@v2 diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 00000000..589769e6 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,26 @@ +name: Publish Release + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + + - name: Publish release + run: ./gradlew publishAllPublicationsToMavenCentralRepository -x lint -x lintVitalRelease + env: + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3841134a..1ea42ec6 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ bin/ gen/ out/ release/ +.kotlin/ # Gradle files .gradle/ diff --git a/README.md b/README.md index c1f31257..7655e724 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,6 @@ In your app `build.gradle` file: ```gradle dependencies { ... - // Implementing the `core` module is mandatory for using other use cases. - implementation 'com.maxkeppeler.sheets-compose-dialogs:core:' implementation 'com.maxkeppeler.sheets-compose-dialogs::' } ``` diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 819badae..566eebe7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,8 +14,19 @@ * limitations under the License. */ plugins { - id(Plugins.APPLICATION.id) - id(Plugins.KOTLIN.id) + alias(libs.plugins.android.application) + alias(libs.plugins.multiplatform) +} + +kotlin { + androidTarget { + compilations.all { + kotlinOptions { + jvmTarget = "${JavaVersion.VERSION_11}" + freeCompilerArgs += "-Xjdk-release=${JavaVersion.VERSION_11}" + } + } + } } android { @@ -46,14 +57,11 @@ android { // Flag to enable support for the new language APIs isCoreLibraryDesugaringEnabled = true } - kotlinOptions { - jvmTarget = "1.8" - } buildFeatures { compose = true } composeOptions { - kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER + kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } packagingOptions { resources { @@ -67,7 +75,7 @@ dependencies { // Modules Modules.values().forEach { module -> - apis(project(module.path)) + api(project(module.path)) } // Dependencies of sheets-compose-dialogs @@ -88,49 +96,25 @@ dependencies { // implementation("com.maxkeppeler.sheets-compose-dialogs:emoji:$sheetsVersion") - coreLibraryDesugaring(Dependencies.DESUGAR) - - // Kotlin libs - - implementations(Dependencies.Kotlin.KOTLIN_STD) + coreLibraryDesugaring(libs.desugar) // AndroidX libs - - implementations( - Dependencies.AndroidX.CORE_KTX, - Dependencies.AndroidX.LIFECYCLE_KTX, - Dependencies.AndroidX.ACTIVITY_COMPOSE, - Dependencies.AndroidX.NAVIGATION_COMPOSE, - ) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.navigation.compose) // Compose libs - implementations( - platform(Dependencies.Compose.BOM), - Dependencies.Compose.UI, - Dependencies.Compose.UI_TOOLING, - Dependencies.Compose.ANIMATION, - Dependencies.Compose.RUNTIME, - Dependencies.Compose.MATERIAL_2, - Dependencies.Compose.MATERIAL_3, - Dependencies.Compose.ICONS_EXTENDED, - ) - // Test libs - - androidTestImplementations( - Dependencies.AndroidX.Test.TEST_CORE, - Dependencies.AndroidX.Test.TEST_RUNNER, - Dependencies.AndroidX.Test.JUNIT, - Dependencies.AndroidX.Test.ESPRESSO_CORE, - Dependencies.Compose.Test.JUNIT, - project(":test") - ) - debugImplementations( - Dependencies.Compose.Test.TOOLING, - Dependencies.Compose.Test.MANIFEST - ) - testImplementation(Dependencies.Test.JUNIT) + androidTestImplementation(libs.androidx.test.core) + androidTestImplementation(libs.androidx.runner) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(project(":test")) + debugImplementation(libs.androidx.ui.tooling) + debugImplementation(libs.androidx.ui.test.manifest) + testImplementation(libs.junit) } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index bb37e4ec..e346c019 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,26 +13,26 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import com.android.build.gradle.LibraryExtension +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id(Plugins.SPOTLESS.id) version (Plugins.SPOTLESS.version) - id(Plugins.DOKKA.id) version (Plugins.DOKKA.version) + alias(libs.plugins.android) apply false + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.compose) apply false + alias(libs.plugins.compose.compiler) apply false + alias(libs.plugins.multiplatform) apply false + alias(libs.plugins.publish) apply false } buildscript { - repositories { google() mavenCentral() - maven("https://plugins.gradle.org/m2/") - } - - dependencies { - classpath(Dependencies.Kotlin.GRADLE_PLUGIN) - classpath(Dependencies.Gradle.BUILD) - classpath(Dependencies.MAVEN_PUBLISH) - classpath(Dependencies.DOKKA) + gradlePluginPortal() + maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") + maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental") } } @@ -40,101 +40,14 @@ allprojects { repositories { google() mavenCentral() + gradlePluginPortal() + maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") + maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental") } -} - -tasks.dokkaHtmlMultiModule.configure { - outputDirectory.set(projectDir.resolve("docs/api")) -} - -subprojects { - plugins.apply(Plugins.SPOTLESS.id) - project.plugins.applyBaseConfig(project) - spotless { - kotlin { - target("**/*.kt") -// ktlint(Versions.KT_LINT) - } - kotlin { - target("**/*.kt") - targetExclude("**/core/icons/**/*.*") - licenseHeaderFile(rootProject.file("copyright.kt")) - } - kotlinGradle { - target("*.gradle.kts", "gradle/*.gradle.kts", "buildSrc/*.gradle.kts") - licenseHeaderFile( - rootProject.file("copyright.kt"), - "import|tasks|apply|plugins|rootProject" - ) - } - } -} - -/** - * Apply base configurations to the subjects that include specific custom plugins. - */ -fun PluginContainer.applyBaseConfig(project: Project) { - whenPluginAdded { - when (this) { - is LibraryModulePlugin -> { - project.extensions - .getByType() - .apply { - baseLibraryConfig() - } - } + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) } } } - -/** - * Apply base library configurations to the subprojects that include the plugin [LibraryModulePlugin]. - */ -fun com.android.build.gradle.BaseExtension.baseLibraryConfig() { - - compileSdkVersion(App.COMPILE_SDK) - - defaultConfig { - minSdk = App.MIN_SDK - targetSdk = App.TARGET_SDK - testInstrumentationRunner = App.TEST_INSTRUMENTATION_RUNNER - - javaCompileOptions { - annotationProcessorOptions { - arguments += mapOf("module" to "${App.ID}-$name") - } - } - } - - compileOptions.apply { - sourceCompatibility(JavaVersion.VERSION_1_8) - targetCompatibility(JavaVersion.VERSION_1_8) - } - - buildFeatures.compose = true - composeOptions.kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER - - packagingOptions.resources.excludes += listOf( - "META-INF/DEPENDENCIES.txt", - "META-INF/LICENSE", - "META-INF/LICENSE.txt", - "META-INF/NOTICE", - "META-INF/NOTICE.txt", - "META-INF/AL2.0", - "META-INF/LGPL2.1" - ) - - tasks.withType { - kotlinOptions { - jvmTarget = "1.8" - freeCompilerArgs = freeCompilerArgs + listOf( - "-Xopt-in=androidx.compose.material.ExperimentalMaterial3Api", - "-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi", - "-Xopt-in=androidx.compose.ui.test.ExperimentalTestApi", - "-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi", - "-Xopt-in=androidx.compose.ui.ExperimentalComposeUiApi", - ) - } - } -} \ No newline at end of file diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt deleted file mode 100644 index 27a5df3a..00000000 --- a/buildSrc/src/main/java/Dependencies.kt +++ /dev/null @@ -1,66 +0,0 @@ -object Dependencies { - - object AndroidX { - - const val CORE_KTX = "androidx.core:core-ktx:${Versions.CORE}" - const val LIFECYCLE_KTX = "androidx.lifecycle:lifecycle-runtime-ktx:${Versions.RUNTIME}" - const val ACTIVITY_COMPOSE = "androidx.activity:activity-compose:${Versions.COMPOSE_ACTIVITY}" - const val NAVIGATION_COMPOSE = "androidx.navigation:navigation-compose:${Versions.COMPOSE_NAVIGATION}" - - object Test { - const val TEST_CORE = "androidx.test:core:${Versions.TEST_CORE}" - const val TEST_RUNNER = "androidx.test:runner:${Versions.TEST_RUNNER}" - const val JUNIT = "androidx.test.ext:junit:1.1.5" - const val ESPRESSO_CORE = "androidx.test.espresso:espresso-core:${Versions.ESPRESSO_CORE}" - } - } - - object Compose { - - const val BOM = "androidx.compose:compose-bom:${Versions.COMPOSE_BOM}" - const val UI = "androidx.compose.ui:ui" - const val RUNTIME = "androidx.compose.runtime:runtime" - const val MATERIAL_2 = "androidx.compose.material:material" - const val MATERIAL_3 = "androidx.compose.material3:material3" - const val UI_TOOLING = "androidx.compose.ui:ui-tooling-preview" - const val ICONS_EXTENDED = "androidx.compose.material:material-icons-extended" - const val ANIMATION = "androidx.compose.animation:animation" - const val ANIMATION_GRAPHICS = "androidx.compose.animation:animation-graphics" - - object Test { - const val JUNIT = "androidx.compose.ui:ui-test-junit4:${Versions.COMPOSE}" - const val TOOLING = "androidx.compose.ui:ui-tooling" - const val MANIFEST = "androidx.compose.ui:ui-test-manifest" - } - } - - object Vanniktech { - - const val EMOJI_GOOGLE = "com.vanniktech:emoji-google:0.15.0" - const val EMOJI_IOS = "com.vanniktech:emoji-ios:0.15.0" - const val EMOJI_FACEBOOK = "com.vanniktech:emoji-facebook:0.15.0" - const val EMOJI_TWITTER = "com.vanniktech:emoji-twitter:0.15.0" - } - - object Test { - - const val JUNIT = "junit:junit:${Versions.JUNIT}" - } - - object Kotlin { - - const val GRADLE_PLUGIN = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}" - const val KOTLIN_STD = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${Versions.KOTLIN}" - } - - object Gradle { - - const val BUILD = "com.android.tools.build:gradle:${Versions.GRADLE}" - } - - const val DOKKA = "org.jetbrains.dokka:dokka-gradle-plugin:${Versions.DOKKA}" - const val SNAPPER = "dev.chrisbanes.snapper:snapper:${Versions.SNAPPER}" - const val DESUGAR = "com.android.tools:desugar_jdk_libs:${Versions.DESUGAR}" - - const val MAVEN_PUBLISH = "com.vanniktech:gradle-maven-publish-plugin:${Versions.MAVEN_PUBLISH}" -} \ No newline at end of file diff --git a/buildSrc/src/main/java/LibraryModulePlugin.kt b/buildSrc/src/main/java/LibraryModulePlugin.kt deleted file mode 100644 index 79292066..00000000 --- a/buildSrc/src/main/java/LibraryModulePlugin.kt +++ /dev/null @@ -1,69 +0,0 @@ -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.kotlin.dsl.project - -class LibraryModulePlugin : Plugin { - - override fun apply(project: Project) { - with(project) { - applyPlugins() - applyDependencies() - } - } - - private fun Project.applyPlugins() { - plugins.run { - apply(Plugins.LIBRARY.id) - apply(Plugins.KOTLIN.id) - apply(Plugins.DOKKA.id) - apply(Plugins.MAVEN_PUBLISH.id) - } - } - - private fun Project.applyDependencies() { - - dependencies.apply { - - // All modules require the core module - - if (name != Modules.CORE.moduleName) { - apis(project(Modules.CORE.path)) - } - - - // AndroidX & Kotlin libs - - implementations(Dependencies.Kotlin.KOTLIN_STD) - implementations(Dependencies.AndroidX.CORE_KTX) - - - // Compose libs - - implementations( - platform(Dependencies.Compose.BOM), - Dependencies.Compose.UI, - Dependencies.Compose.UI_TOOLING, - Dependencies.Compose.ANIMATION, - Dependencies.Compose.ANIMATION_GRAPHICS, - Dependencies.Compose.RUNTIME, - Dependencies.Compose.MATERIAL_3, - ) - - - // Test libs - - androidTestImplementations( - Dependencies.AndroidX.Test.JUNIT, - Dependencies.AndroidX.Test.ESPRESSO_CORE, - Dependencies.Compose.Test.JUNIT, - project(":test") - ) - - debugImplementations( - Dependencies.Compose.Test.TOOLING, - Dependencies.Compose.Test.MANIFEST - ) - testImplementations(Dependencies.Test.JUNIT) - } - } -} \ No newline at end of file diff --git a/buildSrc/src/main/java/Plugins.kt b/buildSrc/src/main/java/Plugins.kt deleted file mode 100644 index 5c74e2f7..00000000 --- a/buildSrc/src/main/java/Plugins.kt +++ /dev/null @@ -1,13 +0,0 @@ -import models.Plugin - -object Plugins { - - val APPLICATION = Plugin("com.android.application", "7.2.2") - val LIBRARY = Plugin("com.android.library", "7.2.2") - val KOTLIN = Plugin("org.jetbrains.kotlin.android", Versions.KOTLIN) - val SPOTLESS = Plugin("com.diffplug.spotless", "6.10.0") - val MAVEN_PUBLISH = Plugin("com.vanniktech.maven.publish") - val DOKKA = Plugin("org.jetbrains.dokka", Versions.DOKKA) - - val CUSTOM_LIBRARY_MODULE = Plugin("library-module") -} \ No newline at end of file diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt deleted file mode 100644 index 1cf65792..00000000 --- a/buildSrc/src/main/java/Versions.kt +++ /dev/null @@ -1,30 +0,0 @@ -object Versions { - - // Kotlin - const val KOTLIN = "1.8.10" - - // Compose - const val COMPOSE_BOM = "2024.02.00" - const val COMPOSE = "1.6.1" - const val COMPOSE_COMPILER = "1.4.3" - - // AndroidX - const val CORE = "1.9.0" - const val RUNTIME = "2.5.1" - const val COMPOSE_ACTIVITY = "1.5.0" - const val COMPOSE_NAVIGATION = "2.7.6" - - // Misc - const val GRADLE = "7.4.2" - const val DESUGAR = "1.1.5" - const val MAVEN_PUBLISH = "0.21.0" - const val SNAPPER = "0.3.0" - const val DOKKA = "1.8.10" - const val KT_LINT = "0.47.1" - - // Test - const val JUNIT = "4.13.2" - const val ESPRESSO_CORE = "3.5.1" - const val TEST_CORE = "1.5.0" - const val TEST_RUNNER = "1.5.2" -} \ No newline at end of file diff --git a/buildSrc/src/main/java/models/Plugin.kt b/buildSrc/src/main/java/models/Plugin.kt deleted file mode 100644 index 957caa0f..00000000 --- a/buildSrc/src/main/java/models/Plugin.kt +++ /dev/null @@ -1,6 +0,0 @@ -package models - -data class Plugin( - val id: String, - val version: String? = "" -) \ No newline at end of file diff --git a/buildSrc/src/main/java/utils/DependencyExt.kt b/buildSrc/src/main/java/utils/DependencyExt.kt deleted file mode 100644 index 4461f116..00000000 --- a/buildSrc/src/main/java/utils/DependencyExt.kt +++ /dev/null @@ -1,32 +0,0 @@ -import org.gradle.api.artifacts.ProjectDependency -import org.gradle.api.artifacts.dsl.DependencyHandler - -fun DependencyHandler.apis(vararg list: ProjectDependency) { - list.forEach { dependency -> - add("api", dependency) - } -} - -fun DependencyHandler.implementations(vararg list: Any) { - list.forEach { dependency -> - add("implementation", dependency) - } -} - -fun DependencyHandler.debugImplementations(vararg list: Any) { - list.forEach { dependency -> - add("debugImplementation", dependency) - } -} - -fun DependencyHandler.androidTestImplementations(vararg list: Any) { - list.forEach { dependency -> - add("androidTestImplementation", dependency) - } -} - -fun DependencyHandler.testImplementations(vararg list: Any) { - list.forEach { dependency -> - add("testImplementation", dependency) - } -} \ No newline at end of file diff --git a/calendar/build.gradle.kts b/calendar/build.gradle.kts index 97d592bf..28847012 100644 --- a/calendar/build.gradle.kts +++ b/calendar/build.gradle.kts @@ -1,3 +1,5 @@ +import com.vanniktech.maven.publish.SonatypeHost + /* * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) * @@ -14,23 +16,84 @@ * limitations under the License. */ plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.CALENDAR.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } compileOptions { - // Flag to enable support for the new language APIs isCoreLibraryDesugaringEnabled = true + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.CALENDAR.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.materialIconsExtended) + implementation(compose.components.resources) + implementation(compose.animation) + implementation(compose.animationGraphics) + + implementation(libs.datetime) + implementation(libs.serialization) + + api(project(":core")) + } + + val nonJvmMain by creating { + dependsOn(commonMain.get()) + + nativeMain.orNull?.dependsOn(this) + jsMain.orNull?.dependsOn(this) + } } } dependencies { - implementations(Dependencies.SNAPPER) - coreLibraryDesugaring(Dependencies.DESUGAR) + coreLibraryDesugaring(libs.desugar) } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/calendar/src/androidMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.android.kt b/calendar/src/androidMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.android.kt new file mode 100644 index 00000000..80a8ed82 --- /dev/null +++ b/calendar/src/androidMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.android.kt @@ -0,0 +1,83 @@ +package com.maxkeppeler.sheets.calendar.models + +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.LocalDate +import kotlinx.datetime.toJavaLocalDate +import java.time.format.DateTimeFormatter +import java.time.format.TextStyle +import java.time.temporal.WeekFields +import java.util.Locale + +actual sealed class FormatLocale(private val locale: Locale) { + + actual open val firstDayOfWeek: DayOfWeek + get() = WeekFields.of(locale).firstDayOfWeek + + actual open fun getDayOfWeekLabels(): Map { + return when (this) { + is CHINESE -> getSimplifiedChineseDayOfWeekLabels() + is JAPANESE -> getJapaneseDayOfWeekLabels() + else -> { + DayOfWeek.entries.associateWith { dayOfWeek -> + dayOfWeek.getDisplayName(TextStyle.NARROW, locale) + } + } + } + } + + actual open fun getMonthShort(date: LocalDate): String { + return date.toJavaLocalDate().format(DateTimeFormatter.ofPattern("MMM")) + } + + internal fun getSimplifiedChineseDayOfWeekLabels(): Map = mapOf( + DayOfWeek.MONDAY to "\u4e00", + DayOfWeek.TUESDAY to "\u4e8c", + DayOfWeek.WEDNESDAY to "\u4e09", + DayOfWeek.THURSDAY to "\u56db", + DayOfWeek.FRIDAY to "\u4e94", + DayOfWeek.SATURDAY to "\u516d", + DayOfWeek.SUNDAY to "\u65e5", + ) + + internal fun getJapaneseDayOfWeekLabels(): Map = mapOf( + DayOfWeek.MONDAY to "\u6708", + DayOfWeek.TUESDAY to "\u706b", + DayOfWeek.WEDNESDAY to "\u6c34", + DayOfWeek.THURSDAY to "\u6728", + DayOfWeek.FRIDAY to "\u91d1", + DayOfWeek.SATURDAY to "\u571f", + DayOfWeek.SUNDAY to "\u65e5", + ) + + actual data class CHINESE(private val locale: Locale) : FormatLocale(locale) { + override fun getDayOfWeekLabels(): Map { + return getSimplifiedChineseDayOfWeekLabels() + } + } + + actual data class JAPANESE(private val locale: Locale) : FormatLocale(locale) { + override fun getDayOfWeekLabels(): Map { + return getJapaneseDayOfWeekLabels() + } + } + + actual data class Default(private val locale: Locale) : FormatLocale(locale) + + actual companion object { + actual fun getDefault(): FormatLocale { + val defaultLocale = Locale.getDefault() + + return when { + Locale.SIMPLIFIED_CHINESE.let { + defaultLocale.language == it.language + } -> CHINESE(defaultLocale) + + Locale.JAPANESE.let { + defaultLocale.language == it.language + } -> JAPANESE(defaultLocale) + + else -> Default(defaultLocale) + } + } + } +} \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-bg/strings.xml b/calendar/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..3593307d --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,9 @@ + + Изберете месец + Следващият месец + Следващият месец + Следващата седмица + Миналата седмица + Изберете година + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-cs/strings.xml b/calendar/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..17c3afef --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,9 @@ + + Vyberte měsíc + Příští měsíc + Příští měsíc + Příští týden + Předchozí týden + Vyberte rok + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-da/strings.xml b/calendar/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..648831a8 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,9 @@ + + Vælg måned + Næste måned + Næste måned + Næste uge + Sidste uge + Vælg år + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-de-rDE/strings.xml b/calendar/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 93% rename from calendar/src/main/res/values-de-rDE/strings.xml rename to calendar/src/commonMain/composeResources/values-de-rDE/strings.xml index ec315453..b52d702e 100644 --- a/calendar/src/main/res/values-de-rDE/strings.xml +++ b/calendar/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -1,4 +1,3 @@ - Monat auswählen Jahr auswählen diff --git a/calendar/src/commonMain/composeResources/values-el/strings.xml b/calendar/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..f6fce78c --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,9 @@ + + Επιλέξτε μήνα + Επόμενος μήνας + Επόμενος μήνας + Επόμενη εβδομάδα + Προηγούμενη εβδομάδα + Επιλέξτε έτος + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-eo/strings.xml b/calendar/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..4dca1dbd --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,9 @@ + + Elektu monaton + Venonta monato. + Venonta monato. + La venonta semajno + Precedonta semajno + Elekti jaron + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-es/strings.xml b/calendar/src/commonMain/composeResources/values-es/strings.xml similarity index 86% rename from calendar/src/main/res/values-es/strings.xml rename to calendar/src/commonMain/composeResources/values-es/strings.xml index 47c8914f..acf4ba2b 100644 --- a/calendar/src/main/res/values-es/strings.xml +++ b/calendar/src/commonMain/composeResources/values-es/strings.xml @@ -5,5 +5,5 @@ Siguiente semana Semana anterior Seleccionar año - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-et/strings.xml b/calendar/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..59e9c1bc --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,9 @@ + + Vali kuu + Järgmine kuu + Järgmine kuu + Järgmisel nädalal + Eelmine nädal + Vali aasta + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-fa/strings.xml b/calendar/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..41447c1f --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,9 @@ + + انتخاب ماه + ماه آینده + ماه آینده + هفته آینده + هفته گذشته + سال را انتخاب کنید + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-fi/strings.xml b/calendar/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..030e8eec --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,9 @@ + + Valitse kuukausi + Seuraava kuukausi + Seuraava kuukausi + Ensi viikko + Edellinen viikko + Valitse vuosi + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-fr/strings.xml b/calendar/src/commonMain/composeResources/values-fr/strings.xml similarity index 86% rename from calendar/src/main/res/values-fr/strings.xml rename to calendar/src/commonMain/composeResources/values-fr/strings.xml index 51981fbf..9e19ed1b 100644 --- a/calendar/src/main/res/values-fr/strings.xml +++ b/calendar/src/commonMain/composeResources/values-fr/strings.xml @@ -5,5 +5,5 @@ Semaine suivante Semaine précédente "Sélectionner l'année" - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-ga/strings.xml b/calendar/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..caa3db4d --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,9 @@ + + Roghnaigh mí + An mhí seo chugainn + An mhí seo chugainn + An chéad seachtain eile. + Seachtain roimhe + Roghnaigh bliain + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-gd/strings.xml b/calendar/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..23ecf0f2 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,9 @@ + + Tagh mìos + An ath-mhìos + An-ath-mhìos + An ath sheachdain + Seachdain a dh\'fhalbh. + Tagh bliadhna + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-hi/strings.xml b/calendar/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..3593e818 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,9 @@ + + महीना चुनें + अगले महीने + अगले महीने + अगले हफ़्ते + पिछला सप्ताह + साल चुनें + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-hr/strings.xml b/calendar/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..46629759 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,9 @@ + + Odaberite mjesec + Sljedeći mjesec + Sljedeći mjesec + Sljedeći tjedan + Prošli tjedan + Odaberite godinu + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-hu/strings.xml b/calendar/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..bf70b13d --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,9 @@ + + Hónap kiválasztása + Jövő hónap + Jövő hónap + Következő hét + Előző héten + Év kiválasztása + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-in-rID/strings.xml b/calendar/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..9060db09 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,9 @@ + + Pilih bulan + Bulan depan + Bulan depan + Minggu depan + Minggu sebelumnya + Pilih tahun + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-is/strings.xml b/calendar/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..fcada9d4 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,9 @@ + + Velja mánuð + Næst komandi mánuði + Næsti mánuður + Næstu viku + Síðasta viku + Veldu árið + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-it/strings.xml b/calendar/src/commonMain/composeResources/values-it/strings.xml similarity index 86% rename from calendar/src/main/res/values-it/strings.xml rename to calendar/src/commonMain/composeResources/values-it/strings.xml index 55bc5ff5..4cb1904f 100644 --- a/calendar/src/main/res/values-it/strings.xml +++ b/calendar/src/commonMain/composeResources/values-it/strings.xml @@ -5,5 +5,5 @@ Settimana successiva Settimana precedente Seleziona anno - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-iw/strings.xml b/calendar/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..9b12cf80 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,9 @@ + + בחר חודש + בחודש הבא + בחודש הבא + שבוע הבא + השבוע קודם + בחר שנה + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-ja/strings.xml b/calendar/src/commonMain/composeResources/values-ja/strings.xml similarity index 85% rename from calendar/src/main/res/values-ja/strings.xml rename to calendar/src/commonMain/composeResources/values-ja/strings.xml index 87a31c99..54c95c97 100644 --- a/calendar/src/main/res/values-ja/strings.xml +++ b/calendar/src/commonMain/composeResources/values-ja/strings.xml @@ -5,5 +5,5 @@ 来週 前週 年を選択 - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-jv/strings.xml b/calendar/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..e0ee914b --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,9 @@ + + Pilih sasi + Sasih ngandika. + Sasih ngandika. + Minggu depan + Minggu keseloro + Pilih tahun + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-kk/strings.xml b/calendar/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..dadf186f --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,9 @@ + + Айды таңдау + Келесі ай + Келесі ай + Желкегі аптаның келесі қызығы. + Өткен апта + Жылды таңдау + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-ko/strings.xml b/calendar/src/commonMain/composeResources/values-ko/strings.xml similarity index 85% rename from calendar/src/main/res/values-ko/strings.xml rename to calendar/src/commonMain/composeResources/values-ko/strings.xml index 777a36c3..dbbd1dcc 100644 --- a/calendar/src/main/res/values-ko/strings.xml +++ b/calendar/src/commonMain/composeResources/values-ko/strings.xml @@ -5,5 +5,5 @@ 다음 주 이전 주 연도 선택 - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-ku/strings.xml b/calendar/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..27561bcd --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,9 @@ + + مانگ دیاری بکه + مانگای داهاتەوە + مانگێکتە ئاگادارم + هەفتای داهاتووبوو + Hefta pêşîn. + سال هەڵبژێرە + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-lb/strings.xml b/calendar/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..f980937d --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,9 @@ + + Wiel Monat auswielen + Nächst Meecheden + Nächst Mount + Nächste Woch + Lescht Woch + Joer auswielen + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-lo/strings.xml b/calendar/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..ef14c80f --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,9 @@ + + ເລືອກເດືອນ + ເດືອນຕໍ່ໄປ + ເດືອນຕໍ່ໄປ + ອີກມື້ນີ້ + ອີກດິນເດືອນ + ເລືອກປີ + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-lt/strings.xml b/calendar/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..592f8f45 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,9 @@ + + Pasirinkite mėnesį. + Kitą mėnesį + Kitą mėnesį + Kitą savaitę + Praeita savaitė + Pasirinkite metus. + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-lv/strings.xml b/calendar/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..e5f65860 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,9 @@ + + Izvēlieties mēnesi + Nākamajā mēnesī + Nākamajā mēnesī + Nākamā nedēļa + Iepriekšējā nedēļā. + Izvēlieties gadu + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-ms/strings.xml b/calendar/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..e0e020be --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,9 @@ + + Pilih bulan + Bulan depan + Bulan depan + Minggu depan + Minggu lepas + Pilih tahun + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-ne/strings.xml b/calendar/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..cf499d61 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,9 @@ + + महिना छान्नुहोस् + अर्को महिना + अगाडीको महिना + अर्को हप्ता + अघिल्लो हप्ता + वर्ष छान्नुहोस् + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-nl/strings.xml b/calendar/src/commonMain/composeResources/values-nl/strings.xml similarity index 86% rename from calendar/src/main/res/values-nl/strings.xml rename to calendar/src/commonMain/composeResources/values-nl/strings.xml index e2653e77..9c1ede9c 100644 --- a/calendar/src/main/res/values-nl/strings.xml +++ b/calendar/src/commonMain/composeResources/values-nl/strings.xml @@ -5,5 +5,5 @@ Volgende week Vorige week Selecteer jaar - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-no/strings.xml b/calendar/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..50d2a807 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,9 @@ + + Velg måned + Neste måned + Neste måned + Neste uke + Forrige uke + Velg år + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-pl/strings.xml b/calendar/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..350f30d7 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,9 @@ + + Wybierz miesiąc + W przyszłym miesiącu + W przyszłym miesiącu + Następny tydzień + Poprzedni tydzień + Wybierz rok + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-pt/strings.xml b/calendar/src/commonMain/composeResources/values-pt/strings.xml similarity index 86% rename from calendar/src/main/res/values-pt/strings.xml rename to calendar/src/commonMain/composeResources/values-pt/strings.xml index c3c6c144..9d3620d7 100644 --- a/calendar/src/main/res/values-pt/strings.xml +++ b/calendar/src/commonMain/composeResources/values-pt/strings.xml @@ -5,5 +5,5 @@ Próxima semana Semana anterior Selecionar ano - CW + CW \ No newline at end of file diff --git a/calendar/src/main/res/values-ru/strings.xml b/calendar/src/commonMain/composeResources/values-ru/strings.xml similarity index 88% rename from calendar/src/main/res/values-ru/strings.xml rename to calendar/src/commonMain/composeResources/values-ru/strings.xml index 9472ff92..2df0669c 100644 --- a/calendar/src/main/res/values-ru/strings.xml +++ b/calendar/src/commonMain/composeResources/values-ru/strings.xml @@ -5,5 +5,5 @@ Следующая неделя Предыдущая неделя Выбрать год - CW + CW \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-sk/strings.xml b/calendar/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..7839f71d --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,9 @@ + + Vybrať mesiac + Budúci mesiac + Budúci mesiac + Budúci týždeň + Prešlý týždeň + Vyberte rok + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-sl/strings.xml b/calendar/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..b3e715dc --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,9 @@ + + Izberi mesec + Prihodnji mesec + Naslednji mesec + Naslednji teden + Pretekli teden + Izberi leto. + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-sr/strings.xml b/calendar/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..6226e950 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,9 @@ + + Odaberi mesec + Sledeći mesec + Sledećeg meseca + Sledeće nedelje + Prošle nedelje + Izaberite godinu + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-sv/strings.xml b/calendar/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..09cf8252 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,9 @@ + + Välj månad + Nästa månad + Nästa månad + Nästa vecka + Föregående vecka + Välj år + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-th/strings.xml b/calendar/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..02ccf347 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,9 @@ + + เลือกเดือน + เดือนหน้า + เดือนถัดไป + อาทิตย์หน้า + สัปดาห์ที่แล้ว + เลือกปี + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-tr/strings.xml b/calendar/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..1fe692a1 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,9 @@ + + Ay seçin + Gelecek ay + Gelecek ay + Önümüzdeki hafta + Geçen hafta + Yıl seçin. + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-uk/strings.xml b/calendar/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..e7c67e4c --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,9 @@ + + Вибрати місяць + Наступний місяць + Наступного місяця + Наступного тижня + Минулий тиждень + Виберіть рік + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-vi/strings.xml b/calendar/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..c52c53eb --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,9 @@ + + Chọn tháng + Tháng sau + Tháng sau + Tuần tới + Tuần trước + Chọn năm + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-zh-rCN/strings.xml b/calendar/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..bbb1fdb7 --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,9 @@ + + 选择月份 + 下个月 + 下个月 + 下周 + 上个星期 + 选择年份 + CW + \ No newline at end of file diff --git a/calendar/src/commonMain/composeResources/values-zh-rTW/strings.xml b/calendar/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..a3a3747f --- /dev/null +++ b/calendar/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,9 @@ + + 選擇月份 + 下個月 + 下個月 + 下周 + Prev week (上週) + 選擇年份 + CW + \ No newline at end of file diff --git a/calendar/src/main/res/values-zh/strings.xml b/calendar/src/commonMain/composeResources/values-zh/strings.xml similarity index 92% rename from calendar/src/main/res/values-zh/strings.xml rename to calendar/src/commonMain/composeResources/values-zh/strings.xml index 4e37f23a..37289269 100644 --- a/calendar/src/main/res/values-zh/strings.xml +++ b/calendar/src/commonMain/composeResources/values-zh/strings.xml @@ -1,4 +1,3 @@ - 选择月份 下个月 diff --git a/calendar/src/commonMain/composeResources/values/strings.xml b/calendar/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..3f105d6f --- /dev/null +++ b/calendar/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,9 @@ + + Select month + Next month + Next month + Next week + Prev week + Select year + CW + \ No newline at end of file diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarDialog.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarDialog.kt similarity index 100% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarDialog.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarDialog.kt diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarPopup.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarPopup.kt similarity index 100% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarPopup.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarPopup.kt diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarState.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarState.kt similarity index 92% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarState.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarState.kt index 92f886fd..3f476022 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarState.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarState.kt @@ -22,6 +22,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import com.maxkeppeker.sheets.core.utils.JvmSerializable import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.calendar.models.CalendarConfig import com.maxkeppeler.sheets.calendar.models.CalendarData @@ -29,6 +30,7 @@ import com.maxkeppeler.sheets.calendar.models.CalendarDisplayMode import com.maxkeppeler.sheets.calendar.models.CalendarMonthData import com.maxkeppeler.sheets.calendar.models.CalendarSelection import com.maxkeppeler.sheets.calendar.models.CalendarStyle +import com.maxkeppeler.sheets.calendar.utils.* import com.maxkeppeler.sheets.calendar.utils.Constants import com.maxkeppeler.sheets.calendar.utils.calcCalendarData import com.maxkeppeler.sheets.calendar.utils.calcMonthData @@ -39,17 +41,14 @@ import com.maxkeppeler.sheets.calendar.utils.endOfWeek import com.maxkeppeler.sheets.calendar.utils.endValue import com.maxkeppeler.sheets.calendar.utils.getInitialCameraDate import com.maxkeppeler.sheets.calendar.utils.getInitialCustomCameraDate -import com.maxkeppeler.sheets.calendar.utils.jumpNext -import com.maxkeppeler.sheets.calendar.utils.jumpPrev import com.maxkeppeler.sheets.calendar.utils.rangeValue import com.maxkeppeler.sheets.calendar.utils.startOfMonth import com.maxkeppeler.sheets.calendar.utils.startOfWeek -import com.maxkeppeler.sheets.calendar.utils.startOfWeekOrMonth import com.maxkeppeler.sheets.calendar.utils.startValue -import java.io.Serializable -import java.time.DayOfWeek -import java.time.LocalDate -import java.time.Month +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.LocalDate +import kotlinx.datetime.Month +import kotlinx.serialization.Serializable /** * Handles the calendar state. @@ -61,7 +60,7 @@ internal class CalendarState( val selection: CalendarSelection, val config: CalendarConfig, stateData: CalendarStateData? = null, -) : BaseTypeState() { +) : BaseTypeState(), JvmSerializable { val today by mutableStateOf(LocalDate.now()) var mode by mutableStateOf(stateData?.mode ?: CalendarDisplayMode.CALENDAR) @@ -174,7 +173,7 @@ internal class CalendarState( val cells: Int get() = when (mode) { - CalendarDisplayMode.CALENDAR -> DayOfWeek.values().size + if (config.displayCalendarWeeks) 1 else 0 + CalendarDisplayMode.CALENDAR -> DayOfWeek.entries.size + if (config.displayCalendarWeeks) 1 else 0 CalendarDisplayMode.YEAR -> Constants.YEAR_GRID_COLUMNS CalendarDisplayMode.MONTH -> Constants.MONTH_GRID_COLUMNS } @@ -209,22 +208,22 @@ internal class CalendarState( } fun onMonthClick(month: Month) { - cameraDate = cameraDate.withMonth(month.value).startOfWeekOrMonth + cameraDate = LocalDate(cameraDate.year, month, cameraDate.dayOfMonth).startOfWeekOrMonth mode = CalendarDisplayMode.CALENDAR refreshData() } fun onYearClick(year: Int) { - var newDate = cameraDate.withYear(year) + var newDate = LocalDate(year, cameraDate.month, cameraDate.dayOfMonth) // Check if current new date would be within the boundary otherwise reset to month within boundary newDate = when { - newDate.isBefore(config.boundary.start) -> - newDate.withMonth(config.boundary.start.monthValue) - .withDayOfMonth(config.boundary.start.dayOfMonth) + newDate.isBefore(config.boundary.start) -> { + LocalDate(newDate.year, config.boundary.start.month, config.boundary.start.dayOfMonth) + } - newDate.isAfter(config.boundary.endInclusive) -> - newDate.withMonth(config.boundary.endInclusive.monthValue) - .withDayOfMonth(config.boundary.endInclusive.dayOfMonth) + newDate.isAfter(config.boundary.endInclusive) -> { + LocalDate(newDate.year, config.boundary.endInclusive.month, config.boundary.endInclusive.dayOfMonth) + } else -> newDate } @@ -328,6 +327,7 @@ internal class CalendarState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class CalendarStateData( val mode: CalendarDisplayMode, val cameraDate: LocalDate, @@ -335,11 +335,12 @@ internal class CalendarState( val dates: Array, val range: Array, val rangeSelectionStart: Boolean - ) : Serializable { + ) : JvmSerializable { override fun equals(other: Any?): Boolean { if (this === other) return true - if (javaClass != other?.javaClass) return false + if (other == null) return false + if (this::class != other::class) return false other as CalendarStateData diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarView.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarView.kt similarity index 96% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarView.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarView.kt index a409c350..746f1271 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/CalendarView.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/CalendarView.kt @@ -22,13 +22,7 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.setValue +import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.layout.onGloballyPositioned @@ -54,7 +48,7 @@ import com.maxkeppeler.sheets.calendar.views.CalendarTopLandscapeComponent import com.maxkeppeler.sheets.calendar.views.setupCalendarSelectionView import com.maxkeppeler.sheets.calendar.views.setupMonthSelectionView import com.maxkeppeler.sheets.calendar.views.setupYearSelectionView -import java.time.LocalDate +import kotlinx.datetime.LocalDate /** * Calendar dialog for the use-case to select a date or period in a typical calendar-view. @@ -141,6 +135,7 @@ fun CalendarView( }, onMonthView = { setupMonthSelectionView( + locale = config.locale, monthsData = calendarState.monthsData, onMonthClick = calendarState::onMonthClick ) @@ -158,7 +153,7 @@ fun CalendarView( layoutLandscape = when (config.style) { CalendarStyle.MONTH -> { { - var calendarHeight by remember { mutableStateOf(0) } + var calendarHeight by remember { mutableIntStateOf(0) } CalendarTopLandscapeComponent( modifier = Modifier .weight(0.3f) @@ -205,6 +200,7 @@ fun CalendarView( }, onMonthView = { setupMonthSelectionView( + locale = config.locale, monthsData = calendarState.monthsData, onMonthClick = calendarState::onMonthClick ) diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarConfig.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarConfig.kt similarity index 93% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarConfig.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarConfig.kt index e14f5cb0..624bf7fa 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarConfig.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarConfig.kt @@ -19,12 +19,10 @@ import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.BaseConfigs import com.maxkeppeker.sheets.core.utils.BaseConstants.DEFAULT_ICON_STYLE import com.maxkeppeler.sheets.calendar.utils.Constants -import java.time.LocalDate -import java.util.Locale +import kotlinx.datetime.LocalDate /** * The general configuration for the calendar dialog. - * @param locale The locale of the calendar. * @param style The style of the calendar. * @param cameraDate The date that is initially displayed when the calendar is opened. * @param monthSelection Allow the direct selection of a month. @@ -34,7 +32,7 @@ import java.util.Locale * @param icons The style of icons that are used for dialog/ view-specific icons. */ class CalendarConfig( - val locale: Locale = Locale.getDefault(), + val locale: FormatLocale = FormatLocale.getDefault(), val style: CalendarStyle = CalendarStyle.MONTH, val cameraDate: LocalDate? = null, val displayCalendarWeeks: Boolean = Constants.DEFAULT_DISPLAY_CALENDAR_WEEKS, diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarData.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarData.kt similarity index 97% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarData.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarData.kt index 708a0fae..b179d92a 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarData.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarData.kt @@ -15,7 +15,8 @@ */ package com.maxkeppeler.sheets.calendar.models -import java.time.LocalDate +import kotlinx.datetime.LocalDate + /** * Defines all calculated information for the current view. diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarDateData.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarDateData.kt similarity index 97% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarDateData.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarDateData.kt index 17ef6fb2..1a140972 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarDateData.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarDateData.kt @@ -15,7 +15,8 @@ */ package com.maxkeppeler.sheets.calendar.models -import java.time.LocalDate +import kotlinx.datetime.LocalDate + /** * Defines all calculated information for a specific date. diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarDisplayMode.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarDisplayMode.kt similarity index 85% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarDisplayMode.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarDisplayMode.kt index 6588b6e0..87427ef3 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarDisplayMode.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarDisplayMode.kt @@ -15,10 +15,14 @@ */ package com.maxkeppeler.sheets.calendar.models +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable + /** * Defined display modes for the calendar. */ -internal enum class CalendarDisplayMode { +@Serializable +internal enum class CalendarDisplayMode : JvmSerializable { /** * The default calendar view. diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarMonthData.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarMonthData.kt similarity index 86% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarMonthData.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarMonthData.kt index cf7a4514..0153a61d 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarMonthData.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarMonthData.kt @@ -15,7 +15,10 @@ */ package com.maxkeppeler.sheets.calendar.models -import java.time.Month +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.datetime.Month +import kotlinx.serialization.Serializable + /** * Defines information for the months selection. @@ -23,8 +26,9 @@ import java.time.Month * @param selected the month that is selected. * @param thisMonth the current month. */ +@Serializable internal data class CalendarMonthData( val selected: Month, val disabled: List, val thisMonth: Month, -) \ No newline at end of file +) : JvmSerializable \ No newline at end of file diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarSelection.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarSelection.kt similarity index 97% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarSelection.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarSelection.kt index 7c329fcf..2fc1cb83 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarSelection.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarSelection.kt @@ -17,11 +17,11 @@ package com.maxkeppeler.sheets.calendar.models -import android.util.Range import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants -import java.time.LocalDate +import com.maxkeppeler.sheets.calendar.utils.LocalDateRange +import kotlinx.datetime.LocalDate /** * The selection configuration for the calendar dialog. @@ -88,7 +88,7 @@ sealed class CalendarSelection : BaseSelection() { override val negativeButton: SelectionButton? = BaseConstants.DEFAULT_NEGATIVE_BUTTON, override val onNegativeClick: (() -> Unit)? = null, override val positiveButton: SelectionButton = BaseConstants.DEFAULT_POSITIVE_BUTTON, - val selectedRange: Range? = null, + val selectedRange: LocalDateRange? = null, val onSelectRange: (startDate: LocalDate, endDate: LocalDate) -> Unit ) : CalendarSelection() } \ No newline at end of file diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarStyle.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarStyle.kt similarity index 100% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarStyle.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarStyle.kt diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarSwipeAction.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarSwipeAction.kt similarity index 100% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarSwipeAction.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarSwipeAction.kt diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarViewType.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarViewType.kt similarity index 100% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/models/CalendarViewType.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/CalendarViewType.kt diff --git a/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.kt new file mode 100644 index 00000000..1af5c696 --- /dev/null +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.kt @@ -0,0 +1,21 @@ +package com.maxkeppeler.sheets.calendar.models + +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.LocalDate +import kotlinx.datetime.Month + +expect sealed class FormatLocale { + + val firstDayOfWeek: DayOfWeek + + fun getDayOfWeekLabels(): Map + fun getMonthShort(date: LocalDate): String + + class CHINESE : FormatLocale + class JAPANESE : FormatLocale + class Default : FormatLocale + + companion object { + fun getDefault(): FormatLocale + } +} \ No newline at end of file diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/Constants.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/Constants.kt similarity index 88% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/Constants.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/Constants.kt index 24b351cc..5a5d2b36 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/Constants.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/Constants.kt @@ -15,7 +15,9 @@ */ package com.maxkeppeler.sheets.calendar.utils -import java.time.LocalDate +import kotlinx.datetime.DateTimeUnit +import kotlinx.datetime.LocalDate +import kotlinx.datetime.plus /** * Calendar dialog specific constants. @@ -28,8 +30,8 @@ internal object Constants { internal const val DEFAULT_MONTH_SELECTION = false internal const val DEFAULT_YEAR_SELECTION = false - private val DEFAULT_RANGE_START_DATE = LocalDate.of(1980, 3, 15) - private const val DEFAULT_RANGE_END_YEAR_OFFSET = 20L + private val DEFAULT_RANGE_START_DATE = LocalDate(1980, 3, 15) + private const val DEFAULT_RANGE_END_YEAR_OFFSET = 20 private val DEFAULT_RANGE_END_DATE = LocalDate.now().plusYears(DEFAULT_RANGE_END_YEAR_OFFSET) .withMonth(1) .withDayOfMonth(15) diff --git a/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/DayOfWeekUtils.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/DayOfWeekUtils.kt new file mode 100644 index 00000000..2a230547 --- /dev/null +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/DayOfWeekUtils.kt @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.maxkeppeler.sheets.calendar.utils + +import com.maxkeppeler.sheets.calendar.models.FormatLocale +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.isoDayNumber + +/** + * Adjusts the ordering of DayOfWeek values based on the locale's first day of the week. + * + * @param locale the locale to adjust for + * @return an ordered list of DayOfWeek values starting with the locale's first day of the week + */ +internal fun getOrderedDaysOfWeek(locale: FormatLocale): List { + val firstDayOfWeek = locale.firstDayOfWeek + val daysOfWeek = DayOfWeek.entries + val orderedDays = daysOfWeek.sortedBy { (it.isoDayNumber - firstDayOfWeek.isoDayNumber + 7) % 7 } + return orderedDays +} + +/** + * Integrates the ordered days of the week with their corresponding labels. + * + * @param locale the locale to get labels and order for + * @return a linked map of ordered day of week labels + */ +internal fun getOrderedDayOfWeekLabels(locale: FormatLocale): LinkedHashMap { + val dayLabels = locale.getDayOfWeekLabels() + val orderedDays = getOrderedDaysOfWeek(locale) + return linkedMapOf().apply { + orderedDays.forEach { day -> + this[day] = dayLabels[day] ?: "" + } + } +} diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/Utils.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/ExtendDateTime.kt similarity index 55% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/Utils.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/ExtendDateTime.kt index 4c40f0e3..3c57ba52 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/Utils.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/utils/ExtendDateTime.kt @@ -1,68 +1,85 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package com.maxkeppeler.sheets.calendar.utils -import androidx.annotation.RestrictTo -import com.maxkeppeler.sheets.calendar.models.CalendarConfig -import com.maxkeppeler.sheets.calendar.models.CalendarData -import com.maxkeppeler.sheets.calendar.models.CalendarDateData +import com.maxkeppeler.sheets.calendar.models.* import com.maxkeppeler.sheets.calendar.models.CalendarMonthData -import com.maxkeppeler.sheets.calendar.models.CalendarSelection -import com.maxkeppeler.sheets.calendar.models.CalendarStyle -import com.maxkeppeler.sheets.calendar.models.CalendarViewType -import java.time.DayOfWeek -import java.time.LocalDate -import java.time.Month -import java.time.format.DateTimeFormatter -import java.time.temporal.TemporalAdjusters -import java.time.temporal.WeekFields -import java.util.Locale +import kotlinx.datetime.* +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern -/** - * Returns the week of the week-based-year for this [LocalDate]. - * - * The week of the week-based-year is defined using the [Locale.getDefault] locale's [WeekFields]. - * - * @return an `Int` representing the week of the week-based-year for this [LocalDate]. - */ -internal val LocalDate.weekOfWeekBasedYear: Int - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = get(WeekFields.of(Locale.getDefault()).weekOfWeekBasedYear()) +internal fun LocalDate.Companion.now(): LocalDate { + return Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).date +} + +class LocalDateRange( + override val start: LocalDate, + override val endInclusive: LocalDate +) : ClosedRange, OpenEndRange { + + override val endExclusive: LocalDate + get() = endInclusive.plus(1, DateTimeUnit.DAY) + + override fun contains(value: LocalDate): Boolean { + return value in start..endInclusive + } + + override fun isEmpty(): Boolean { + return start > endInclusive + } + +} + +internal fun LocalDate.withYear(value: Int): LocalDate = LocalDate( + year = value, + month = this.month, + dayOfMonth = this.dayOfMonth +) + +internal fun LocalDate.withMonth(value: Month): LocalDate = LocalDate( + year = this.year, + month = value, + dayOfMonth = this.dayOfMonth, +) + +internal fun LocalDate.withMonth(value: Int): LocalDate = LocalDate( + year = this.year, + monthNumber = value, + dayOfMonth = this.dayOfMonth, +) + +internal fun LocalDate.withDayOfMonth(value: Int): LocalDate = LocalDate( + year = this.year, + month = this.month, + dayOfMonth = value +) + +internal fun LocalDate.plusYears(value: Int) = this.plus(value, DateTimeUnit.YEAR) + +internal fun LocalDate.minusYears(value: Int) = this.minus(value, DateTimeUnit.YEAR) + +internal fun LocalDate.plusMonths(value: Int) = this.plus(value, DateTimeUnit.MONTH) + +internal fun LocalDate.minusMonths(value: Int) = this.minus(value, DateTimeUnit.MONTH) + +internal fun LocalDate.plusWeeks(value: Int) = this.plus(value, DateTimeUnit.WEEK) + +internal fun LocalDate.minusWeeks(value: Int) = this.minus(value, DateTimeUnit.WEEK) + +internal fun LocalDate.plusDays(value: Int) = this.plus(value, DateTimeUnit.DAY) + +internal fun LocalDate.minusDays(value: Int) = this.minus(value, DateTimeUnit.DAY) -/** - * Returns the date for the first day of the week (Monday) for this [LocalDate]. - */ internal val LocalDate.startOfWeek: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = minusDays(dayOfWeek.value - 1L) + get() = minusDays(dayOfWeek.isoDayNumber - 1) -/** - * Returns the date for the last day of the week (Sunday) for this [LocalDate]. - */ internal val LocalDate.endOfWeek: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = plusDays(7L - dayOfWeek.value) + get() = plusDays(7 - dayOfWeek.isoDayNumber) /** - * Extension function that jumps to the first day of the same week (Monday) or the first day of the month, whichever comes first. + * Extension function that jumps to the first day of the month. * - * @return [LocalDate] representing the first day of the week or the month, whichever is earliest + * @return [LocalDate] representing the first day of the month */ internal val LocalDate.startOfWeekOrMonth: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) get() { var result = this while (result.dayOfMonth > 1 && result.dayOfWeek != DayOfWeek.MONDAY) { @@ -71,14 +88,66 @@ internal val LocalDate.startOfWeekOrMonth: LocalDate return result } +internal val LocalDate.startOfMonth: LocalDate + get() = withDayOfMonth(1) + /** - * Extension function that jumps to the first day of the month. + * Extension function that checks if year is a leap year. * - * @return [LocalDate] representing the first day of the month + * Example: 2016, 2020, 2024, etc + * + * @return [Boolean] whether year is a leap year */ -internal val LocalDate.startOfMonth: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = withDayOfMonth(1) +internal val LocalDate.isLeapYear: Boolean + get() { + var isLeapYear = year % 4 == 0 + isLeapYear = isLeapYear && (year % 100 != 0 || year % 400 == 0) + + return isLeapYear + } + +/** + * Extension function that gets the maximum days of month + * + * @return [Int] of days in month + */ +internal fun Month.length(leapYear: Boolean): Int = when (this) { + Month.JANUARY -> 31 + Month.FEBRUARY -> { + if (leapYear) { + 29 + } else { + 28 + } + } + Month.MARCH -> 31 + Month.APRIL -> 30 + Month.MAY -> 31 + Month.JUNE -> 30 + Month.JULY -> 31 + Month.AUGUST -> 31 + Month.SEPTEMBER -> 30 + Month.OCTOBER -> 31 + Month.NOVEMBER -> 30 + Month.DECEMBER -> 31 + else -> 30 +} + +internal fun LocalDate.with(dayOfWeek: DayOfWeek): LocalDate { + var result = this + while (result.dayOfWeek != dayOfWeek) { + result = result.minusDays(1) + } + return result +} + +/** + * Extension function that gets the maximum days of month + * + * @return [Int] of days in month + */ +internal val LocalDate.lengthOfMonth: Int + get() = month.length(isLeapYear) /** @@ -86,8 +155,7 @@ Extension function that jumps to the last day of the month. @return [LocalDate] representing the last day of the month */ internal val LocalDate.endOfMonth: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = with(TemporalAdjusters.lastDayOfMonth()) + get() = withDayOfMonth(lengthOfMonth) /** * Get the first day of the previous week from the current date. @@ -98,19 +166,17 @@ internal val LocalDate.endOfMonth: LocalDate * @return The first day of the previous week as a `LocalDate` object. */ internal val LocalDate.previousWeek: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) get() = when { dayOfMonth == Constants.FIRST_DAY_IN_MONTH && dayOfWeek != DayOfWeek.MONDAY -> with(DayOfWeek.MONDAY) - dayOfMonth >= Constants.DAYS_IN_WEEK || - dayOfMonth == Constants.FIRST_DAY_IN_MONTH + dayOfMonth >= Constants.DAYS_IN_WEEK + || dayOfMonth == Constants.FIRST_DAY_IN_MONTH && dayOfWeek == DayOfWeek.MONDAY -> minusWeeks(1) else -> withDayOfMonth(Constants.FIRST_DAY_IN_MONTH) } - /** * Get the date of the next week from the current date. * @@ -120,10 +186,9 @@ internal val LocalDate.previousWeek: LocalDate * @return The first day of the next week as a `LocalDate` object. */ internal val LocalDate.nextWeek: LocalDate - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) get() = when { - dayOfMonth == Constants.FIRST_DAY_IN_MONTH -> plusDays((7 - dayOfWeek.value) + 1L) - lengthOfMonth() - dayOfMonth >= Constants.DAYS_IN_WEEK -> plusWeeks(1) + dayOfMonth == Constants.FIRST_DAY_IN_MONTH -> plusDays((7 - dayOfWeek.isoDayNumber) + 1) + lengthOfMonth - dayOfMonth >= Constants.DAYS_IN_WEEK -> plusWeeks(1) else -> plusMonths(1).withDayOfMonth(Constants.FIRST_DAY_IN_MONTH) } @@ -136,8 +201,7 @@ internal val LocalDate.nextWeek: LocalDate * @param config The `CalendarConfig` to determine the jump step. * @return A new `LocalDate` instance representing the previous date based on the `CalendarConfig`. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) -fun LocalDate.jumpPrev(config: CalendarConfig): LocalDate = when (config.style) { +internal fun LocalDate.jumpPrev(config: CalendarConfig): LocalDate = when (config.style) { CalendarStyle.MONTH -> this.minusMonths(1).withDayOfMonth(1) CalendarStyle.WEEK -> this.previousWeek } @@ -151,8 +215,7 @@ fun LocalDate.jumpPrev(config: CalendarConfig): LocalDate = when (config.style) * @param config The `CalendarConfig` to determine the jump step. * @return A new `LocalDate` instance representing the next date based on the `CalendarConfig`. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) -fun LocalDate.jumpNext(config: CalendarConfig): LocalDate = when (config.style) { +internal fun LocalDate.jumpNext(config: CalendarConfig): LocalDate = when (config.style) { CalendarStyle.MONTH -> this.plusMonths(1).withDayOfMonth(1) CalendarStyle.WEEK -> this.nextWeek } @@ -170,7 +233,7 @@ internal fun getInitialCameraDate( val cameraDateBasedOnMode = when (selection) { is CalendarSelection.Date -> selection.selectedDate is CalendarSelection.Dates -> selection.selectedDates?.firstOrNull() - is CalendarSelection.Period -> selection.selectedRange?.lower + is CalendarSelection.Period -> selection.selectedRange?.start } ?: run { val now = LocalDate.now() if (now in boundary) now else boundary.start @@ -194,134 +257,125 @@ internal fun getInitialCustomCameraDate( * Get selection value of date. */ internal val CalendarSelection.dateValue: LocalDate? - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) get() = if (this is CalendarSelection.Date) selectedDate else null /** * Get selection value of dates. */ internal val CalendarSelection.datesValue: Array - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() { - val value = if (this is CalendarSelection.Dates) selectedDates?.toMutableList() - ?: mutableListOf() else mutableListOf() - return value.toTypedArray() - } + get() = if (this is CalendarSelection.Dates) selectedDates.orEmpty().toTypedArray() else emptyArray() /** * Get selection value of range. */ internal val CalendarSelection.rangeValue: Array - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() { - val value = if (this is CalendarSelection.Period) selectedRange else null - return mutableListOf(value?.lower, value?.upper).toTypedArray() + get() = if (this is CalendarSelection.Period) { + arrayOf(selectedRange?.start, selectedRange?.endInclusive) + } else { + emptyArray() } /** * Get range start value. */ -internal val List.startValue: LocalDate? - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = this.getOrNull(Constants.RANGE_START) +internal val Iterable.startValue: LocalDate? + get() = this.toList().getOrNull(Constants.RANGE_START) /** * Get range end value. */ -internal val List.endValue: LocalDate? - @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) - get() = this.getOrNull(Constants.RANGE_END) +internal val Iterable.endValue: LocalDate? + get() = this.toList().getOrNull(Constants.RANGE_END) + +internal fun LocalDate.isAfter(other: LocalDate): Boolean = this > other + +internal fun LocalDate.isBefore(other: LocalDate): Boolean = this < other /** * Calculate the month data based on the camera date and the restrictions. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun calcMonthData( config: CalendarConfig, cameraDate: LocalDate, - today: LocalDate = LocalDate.now() + today: LocalDate = LocalDate.now(), ): CalendarMonthData { - val months = Month.values().toMutableList() + val months = Month.entries - // Check that months are within the boundary val boundaryFilteredMonths = months.filter { month -> - val maxDayOfMonth = month.length(cameraDate.isLeapYear) - val startDay = minOf(config.boundary.start.dayOfMonth, maxDayOfMonth) - val endDay = minOf(config.boundary.endInclusive.dayOfMonth, maxDayOfMonth) - val cameraDateWithMonth = cameraDate.withMonth(month.value).withDayOfMonth(startDay) + val maxDaysOfMonth = month.length(cameraDate.isLeapYear) + val startDay = minOf(config.boundary.start.dayOfMonth, maxDaysOfMonth) + val endDay = minOf(config.boundary.endInclusive.dayOfMonth, maxDaysOfMonth) + val cameraDateWithMonth = cameraDate.withMonth(month).withDayOfMonth(startDay) cameraDateWithMonth in config.boundary || cameraDateWithMonth.withDayOfMonth(endDay) in config.boundary } return CalendarMonthData( selected = cameraDate.month, thisMonth = today.month, - disabled = months.minus(boundaryFilteredMonths.toSet()), + disabled = months.minus(boundaryFilteredMonths.toSet()) ) } /** * Calculate the calendar data based on the camera-date. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) -internal fun calcCalendarData(config: CalendarConfig, cameraDate: LocalDate): CalendarData { +@OptIn(FormatStringsInDatetimeFormats::class) +internal fun calcCalendarData( + config: CalendarConfig, + cameraDate: LocalDate, +): CalendarData { var weekCameraDate = cameraDate - val firstDayOfWeek = WeekFields.of(config.locale).firstDayOfWeek + val firstDayOfWeek = config.locale.firstDayOfWeek val dayOfWeek = cameraDate.dayOfWeek - val diff = (dayOfWeek.value - firstDayOfWeek.value + 7) % 7 + val diff = (dayOfWeek.isoDayNumber - firstDayOfWeek.isoDayNumber + 7) % 7 val offsetStart = when (config.style) { CalendarStyle.MONTH -> diff CalendarStyle.WEEK -> { - // Calculate the difference in days to the first day of the week from the camera date - val dayOfWeekInMonth = cameraDate.with(TemporalAdjusters.firstDayOfMonth()).dayOfWeek - val dayDiff = (dayOfWeekInMonth.value - firstDayOfWeek.value + 7) % 7 - - // Adjust weekCameraDate to the start of the week if necessary - val adjustedWeekCameraDate = - if (cameraDate.dayOfMonth <= Constants.DAYS_IN_WEEK && dayDiff > 0) { - cameraDate.minusDays((cameraDate.dayOfWeek.value - firstDayOfWeek.value + 7) % 7.toLong()) - } else { - weekCameraDate - } + val dayOfWeekInMonth = cameraDate.startOfMonth.dayOfWeek + val dayDiff = (dayOfWeekInMonth.isoDayNumber - firstDayOfWeek.isoDayNumber + 7) % 7 + + val adjustedWeekCameraDate = if (cameraDate.dayOfMonth <= Constants.DAYS_IN_WEEK && dayDiff > 0) { + cameraDate.minusDays((cameraDate.dayOfWeek.isoDayNumber - firstDayOfWeek.isoDayNumber + 7) % 7) + } else { + weekCameraDate + } - // Calculate the offset based on the adjustedWeekCameraDate - ((adjustedWeekCameraDate.dayOfWeek.value - firstDayOfWeek.value + 7) % 7).also { - // Update weekCameraDate if it was adjusted + ((adjustedWeekCameraDate.dayOfWeek.isoDayNumber - firstDayOfWeek.isoDayNumber + 7) % 7).also { weekCameraDate = adjustedWeekCameraDate } } } val days = when (config.style) { - CalendarStyle.MONTH -> cameraDate.lengthOfMonth() - CalendarStyle.WEEK -> DayOfWeek.values().size + CalendarStyle.MONTH -> cameraDate.lengthOfMonth + CalendarStyle.WEEK -> DayOfWeek.entries.size } - val rangedDays = (1..days.plus(offsetStart)).toMutableList() - .map { dayIndex -> - val date = when (config.style) { - CalendarStyle.MONTH -> cameraDate - .withDayOfMonth(1) - .plusDays(dayIndex.toLong().minus(1)) - .minusDays(offsetStart.toLong()) - - CalendarStyle.WEEK -> weekCameraDate - .plusDays(dayIndex.toLong().minus(1)) - .minusDays(offsetStart.toLong()) - } - Pair(CalendarViewType.DAY, date) - }.drop( - when (config.style) { - CalendarStyle.MONTH -> offsetStart - CalendarStyle.WEEK -> 0 - } - ).dropLast( - when (config.style) { - CalendarStyle.MONTH -> 0 - CalendarStyle.WEEK -> offsetStart - } - ).toMutableList() + val rangedDays = (1..days.plus(offsetStart)).map { dayIndex -> + val date = when (config.style) { + CalendarStyle.MONTH -> cameraDate + .withDayOfMonth(1) + .plusDays(dayIndex.minus(1)) + .minusDays(offsetStart) + + CalendarStyle.WEEK -> weekCameraDate + .plusDays(dayIndex.minus(1)) + .minusDays(offsetStart) + } + Pair(CalendarViewType.DAY, date) + }.drop( + when (config.style) { + CalendarStyle.MONTH -> offsetStart + CalendarStyle.WEEK -> 0 + } + ).dropLast( + when (config.style) { + CalendarStyle.MONTH -> 0 + CalendarStyle.WEEK -> offsetStart + } + ).toMutableList() val isMonthStartOffset = weekCameraDate.dayOfMonth <= 7 if (isMonthStartOffset) { @@ -330,15 +384,15 @@ internal fun calcCalendarData(config: CalendarConfig, cameraDate: LocalDate): Ca } } - val chunkedDays: List>> = - rangedDays.chunked(Constants.DAYS_IN_WEEK) + val chunkedDays: List>> = rangedDays.chunked(Constants.DAYS_IN_WEEK) val weekDays: List>> = chunkedDays.map { week -> if (config.displayCalendarWeeks) { val newWeek = week.toMutableList().apply { - val firstDateCalendarWeek = - week.first { it.first == CalendarViewType.DAY }.second as LocalDate - val formatter = DateTimeFormatter.ofPattern("w").withLocale(config.locale) + val firstDateCalendarWeek = week.first { it.first == CalendarViewType.DAY }.second as LocalDate + val formatter = LocalDate.Format { + byUnicodePattern("w") + } val calendarWeek = formatter.format(firstDateCalendarWeek) add(0, Pair(CalendarViewType.CW, calendarWeek)) } @@ -350,14 +404,13 @@ internal fun calcCalendarData(config: CalendarConfig, cameraDate: LocalDate): Ca offsetStart = offsetStart, weekCameraDate = weekCameraDate, cameraDate = cameraDate, - days = weekDays, + days = weekDays ) } /** * Calculate the calendar date-data based on the date. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun calcCalendarDateData( date: LocalDate, calendarViewData: CalendarData, @@ -368,7 +421,7 @@ internal fun calcCalendarDateData( selectedRange: Pair ): CalendarDateData? { - if (date.monthValue != calendarViewData.cameraDate.monthValue) return null + if (date.monthNumber != calendarViewData.cameraDate.monthNumber) return null var selectedStartInit = false var selectedEnd = false @@ -378,7 +431,6 @@ internal fun calcCalendarDateData( is CalendarSelection.Dates -> { selectedDates?.contains(date) ?: false } - is CalendarSelection.Period -> { val selectedStart = selectedRange.first == date selectedStartInit = selectedStart && selectedRange.second != null @@ -398,9 +450,6 @@ internal fun calcCalendarDateData( selected = selected, selectedBetween = selectedBetween, selectedStart = selectedStartInit, - selectedEnd = selectedEnd, + selectedEnd = selectedEnd ) } - - - diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarBaseSelectionComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarBaseSelectionComponent.kt similarity index 85% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarBaseSelectionComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarBaseSelectionComponent.kt index cefb7e94..1e309883 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarBaseSelectionComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarBaseSelectionComponent.kt @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(ExperimentalSnapperApi::class) package com.maxkeppeler.sheets.calendar.views +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.foundation.lazy.LazyListState @@ -34,17 +35,15 @@ import androidx.compose.ui.graphics.BlendMode import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeker.sheets.core.utils.BaseConstants -import com.maxkeppeler.sheets.calendar.R import com.maxkeppeler.sheets.calendar.models.CalendarDisplayMode -import dev.chrisbanes.snapper.ExperimentalSnapperApi -import dev.chrisbanes.snapper.SnapOffsets -import dev.chrisbanes.snapper.rememberSnapperFlingBehavior -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.calendar.generated.resources.Res +import sheets_compose_dialogs.calendar.generated.resources.scd_calendar_dialog_select_month +import sheets_compose_dialogs.calendar.generated.resources.scd_calendar_dialog_select_year /** * The main component for the selection of the use-case as well as the selection of month and year within the dialog. @@ -56,6 +55,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param onMonthView The content that will be displayed if the [CalendarDisplayMode] is in [CalendarDisplayMode.MONTH]. * @param onYearView The content that will be displayed if the [CalendarDisplayMode] is in [CalendarDisplayMode.YEAR]. */ +@OptIn(ExperimentalFoundationApi::class, ExperimentalResourceApi::class) @Composable internal fun CalendarBaseSelectionComponent( modifier: Modifier, @@ -70,7 +70,7 @@ internal fun CalendarBaseSelectionComponent( val baseModifier = modifier.then( when (orientation) { - LibOrientation.PORTRAIT -> Modifier.padding(top = dimensionResource(RC.dimen.scd_normal_100)) + LibOrientation.PORTRAIT -> Modifier.padding(top = 16.dp) LibOrientation.LANDSCAPE -> Modifier.sizeIn( maxHeight = BaseConstants.DYNAMIC_SIZE_MAX, maxWidth = BaseConstants.DYNAMIC_SIZE_MAX @@ -83,13 +83,13 @@ internal fun CalendarBaseSelectionComponent( .wrapContentHeight() .then( when (orientation) { - LibOrientation.PORTRAIT -> Modifier.padding(top = dimensionResource(RC.dimen.scd_normal_150)) + LibOrientation.PORTRAIT -> Modifier.padding(top = 24.dp) LibOrientation.LANDSCAPE -> Modifier } ) val baseViewModifier = Modifier - .padding(top = dimensionResource(RC.dimen.scd_normal_100)) + .padding(top = 16.dp) val gridYearModifier = baseViewModifier .graphicsLayer { alpha = 0.99F } @@ -107,11 +107,6 @@ internal fun CalendarBaseSelectionComponent( ) } - val behavior = rememberSnapperFlingBehavior( - lazyListState = yearListState, - snapOffsetForItem = SnapOffsets.Center, - ) - when (mode) { CalendarDisplayMode.CALENDAR -> { LazyVerticalGrid( @@ -129,7 +124,7 @@ internal fun CalendarBaseSelectionComponent( horizontalAlignment = Alignment.CenterHorizontally ) { Text( - text = stringResource(R.string.scd_calendar_dialog_select_month), + text = stringResource(Res.string.scd_calendar_dialog_select_month), style = MaterialTheme.typography.titleMedium, ) LazyVerticalGrid( @@ -149,15 +144,15 @@ internal fun CalendarBaseSelectionComponent( horizontalAlignment = Alignment.CenterHorizontally ) { Text( - text = stringResource(R.string.scd_calendar_dialog_select_year), + text = stringResource(Res.string.scd_calendar_dialog_select_year), style = MaterialTheme.typography.titleMedium, ) LazyRow( modifier = gridYearModifier, state = yearListState, - flingBehavior = behavior, - contentPadding = PaddingValues(horizontal = dimensionResource(RC.dimen.scd_large_100)), - horizontalArrangement = Arrangement.spacedBy(dimensionResource(RC.dimen.scd_small_50)), + flingBehavior = rememberSnapFlingBehavior(yearListState), + contentPadding = PaddingValues(horizontal = 32.dp), + horizontalArrangement = Arrangement.spacedBy(4.dp), content = onYearView ) } diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarDateItemComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarDateItemComponent.kt similarity index 87% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarDateItemComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarDateItemComponent.kt index 8725e429..92137fe3 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarDateItemComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarDateItemComponent.kt @@ -27,11 +27,11 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp @@ -41,9 +41,12 @@ import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.calendar.models.CalendarDateData import com.maxkeppeler.sheets.calendar.models.CalendarSelection import com.maxkeppeler.sheets.calendar.utils.Constants -import java.time.LocalDate -import java.time.format.DateTimeFormatter -import com.maxkeppeler.sheets.core.R as RC +import com.maxkeppeler.sheets.calendar.utils.now +import kotlinx.datetime.LocalDate +import kotlinx.datetime.format +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern +import kotlinx.datetime.isoDayNumber /** * The date item component of the calendar view. @@ -51,6 +54,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param selection The selection configuration for the dialog view. * @param onDateClick The listener that is invoked when a date is clicked. */ +@OptIn(FormatStringsInDatetimeFormats::class) @Composable internal fun CalendarDateItemComponent( orientation: LibOrientation, @@ -119,12 +123,12 @@ internal fun CalendarDateItemComponent( } val parentModifier = when (selection) { - is CalendarSelection.Date -> Modifier.padding(dimensionResource(RC.dimen.scd_small_25)) - is CalendarSelection.Dates -> Modifier.padding(dimensionResource(RC.dimen.scd_small_25)) - is CalendarSelection.Period -> Modifier.padding(vertical = dimensionResource(RC.dimen.scd_small_25)) + is CalendarSelection.Date -> Modifier.padding(2.dp) + is CalendarSelection.Dates -> Modifier.padding(2.dp) + is CalendarSelection.Period -> Modifier.padding(vertical = 2.dp) }.testTags( TestTags.CALENDAR_DATE, - data.date?.format(DateTimeFormatter.ISO_DATE) ?: "" + data.date?.toString() ?: "" ) val cellModifier = when { @@ -139,6 +143,12 @@ internal fun CalendarDateItemComponent( else -> Constants.DATE_ITEM_OPACITY } + val formatter = remember { + LocalDate.Format { + byUnicodePattern("d") + } + } + Column(modifier = parentModifier) { Row( modifier = cellModifier, @@ -149,8 +159,7 @@ internal fun CalendarDateItemComponent( modifier = Modifier .weight(1f) .alpha(textAlpha), - text = data.date?.format(DateTimeFormatter.ofPattern("d")) - ?.takeUnless { data.otherMonth } ?: "", + text = data.date?.format(formatter)?.takeUnless { data.otherMonth } ?: "", style = textStyle, textAlign = TextAlign.Center ) diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarHeaderItemComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarHeaderItemComponent.kt similarity index 92% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarHeaderItemComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarHeaderItemComponent.kt index e191d9b4..427a77c6 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarHeaderItemComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarHeaderItemComponent.kt @@ -25,11 +25,10 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** * Composable function that represents a calendar header item with the given [label]. @@ -42,7 +41,7 @@ internal fun CalendarHeaderItemComponent(label: String) { modifier = Modifier .testTags(TestTags.CALENDAR_HEADER_DAY, label) .aspectRatio(1f, true) - .padding(dimensionResource(RC.dimen.scd_small_50)) + .padding(4.dp) .clip(MaterialTheme.shapes.extraSmall), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.Center diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarSelectionView.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarSelectionView.kt similarity index 95% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarSelectionView.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarSelectionView.kt index 61abb442..7f6f6209 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarSelectionView.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarSelectionView.kt @@ -21,7 +21,7 @@ import androidx.compose.foundation.lazy.grid.GridItemSpan import androidx.compose.foundation.lazy.grid.LazyGridScope import androidx.compose.foundation.lazy.grid.items import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeler.sheets.calendar.models.CalendarConfig import com.maxkeppeler.sheets.calendar.models.CalendarData @@ -29,9 +29,8 @@ import com.maxkeppeler.sheets.calendar.models.CalendarDateData import com.maxkeppeler.sheets.calendar.models.CalendarSelection import com.maxkeppeler.sheets.calendar.models.CalendarViewType import com.maxkeppeler.sheets.calendar.utils.calcCalendarDateData -import java.time.DayOfWeek -import java.time.LocalDate -import com.maxkeppeler.sheets.core.R as RC +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.LocalDate /** * The view that displays all relevant calendar information. @@ -63,7 +62,7 @@ internal fun LazyGridScope.setupCalendarSelectionView( val label = dayOfWeekLabels.values.toList().getOrNull(cell - offset) label?.let { CalendarHeaderItemComponent(label) } ?: CalendarWeekHeaderItemComponent() } - item(span = { GridItemSpan(cells) }) { Spacer(modifier = Modifier.height(dimensionResource(RC.dimen.scd_small_50))) } + item(span = { GridItemSpan(cells) }) { Spacer(modifier = Modifier.height(4.dp)) } data.days.forEach { weekDays -> diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarTopComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarTopComponent.kt similarity index 77% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarTopComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarTopComponent.kt index 689c8241..2d6905a1 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarTopComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarTopComponent.kt @@ -18,13 +18,11 @@ package com.maxkeppeler.sheets.calendar.views import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.core.animateIntAsState import androidx.compose.animation.expandIn import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi -import androidx.compose.animation.graphics.res.animatedVectorResource -import androidx.compose.animation.graphics.res.rememberAnimatedVectorPainter -import androidx.compose.animation.graphics.vector.AnimatedImageVector import androidx.compose.animation.shrinkOut import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -37,35 +35,45 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.wrapContentWidth +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.KeyboardArrowDown +import androidx.compose.material.icons.filled.KeyboardArrowUp import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FilledIconButton import androidx.compose.material3.Icon import androidx.compose.material3.IconButtonDefaults import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue +import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource +import androidx.compose.ui.draw.rotate import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.calendar.R import com.maxkeppeler.sheets.calendar.models.CalendarConfig import com.maxkeppeler.sheets.calendar.models.CalendarDisplayMode import com.maxkeppeler.sheets.calendar.models.CalendarStyle -import java.time.LocalDate -import java.time.format.DateTimeFormatter -import com.maxkeppeler.sheets.core.R as RC +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.delay +import kotlinx.coroutines.withContext +import kotlinx.datetime.LocalDate +import kotlinx.datetime.format +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern +import kotlinx.datetime.number +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.calendar.generated.resources.* +import sheets_compose_dialogs.calendar.generated.resources.Res +import sheets_compose_dialogs.calendar.generated.resources.scd_calendar_dialog_prev_month +import sheets_compose_dialogs.calendar.generated.resources.scd_calendar_dialog_prev_week +import sheets_compose_dialogs.calendar.generated.resources.scd_calendar_dialog_select_month +import kotlin.math.max +import kotlin.math.min /** * Top header component of the calendar dialog. @@ -80,6 +88,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param onMonthClick The listener that is invoked when the month selection was clicked. * @param onYearClick The listener that is invoked when the year selection was clicked. */ +@OptIn(ExperimentalResourceApi::class, FormatStringsInDatetimeFormats::class) @ExperimentalMaterial3Api @Composable internal fun CalendarTopComponent( @@ -101,7 +110,6 @@ internal fun CalendarTopComponent( val enterTransition = expandIn(expandFrom = Alignment.Center, clip = false) + fadeIn() val exitTransition = shrinkOut(shrinkTowards = Alignment.Center, clip = false) + fadeOut() - val chevronAVD = AnimatedImageVector.animatedVectorResource(R.drawable.avd_chevron_down_up) var chevronMonthAtEnd by remember { mutableStateOf(false) } var chevronYearAtEnd by remember { mutableStateOf(false) } @@ -119,9 +127,9 @@ internal fun CalendarTopComponent( val selectableContainerModifier = Modifier.clip(MaterialTheme.shapes.extraSmall) val selectableItemModifier = Modifier - .padding(start = dimensionResource(RC.dimen.scd_small_100)) - .padding(vertical = dimensionResource(RC.dimen.scd_small_50)) - .padding(end = dimensionResource(RC.dimen.scd_small_50)) + .padding(start = 8.dp) + .padding(vertical = 4.dp) + .padding(end = 4.dp) Box(modifier = modifier) { @@ -136,17 +144,17 @@ internal fun CalendarTopComponent( colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer), modifier = Modifier .testTags(TestTags.CALENDAR_PREVIOUS_ACTION) - .size(dimensionResource(RC.dimen.scd_size_200)), + .size(32.dp), enabled = !navigationDisabled && !prevDisabled, onClick = onPrev ) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), + modifier = Modifier.size(48.dp), imageVector = config.icons.ChevronLeft, contentDescription = stringResource( when (config.style) { - CalendarStyle.MONTH -> R.string.scd_calendar_dialog_prev_month - CalendarStyle.WEEK -> R.string.scd_calendar_dialog_prev_week + CalendarStyle.MONTH -> Res.string.scd_calendar_dialog_prev_month + CalendarStyle.WEEK -> Res.string.scd_calendar_dialog_prev_week } ) ) @@ -173,16 +181,16 @@ internal fun CalendarTopComponent( ) { Text( modifier = selectableItemModifier - .testTags(TestTags.CALENDAR_MONTH_TITLE, cameraDate.month.value), - text = cameraDate.format(DateTimeFormatter.ofPattern("MMM")), + .testTags(TestTags.CALENDAR_MONTH_TITLE, cameraDate.month.number), + text = config.locale.getMonthShort(cameraDate), style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.Bold), textAlign = TextAlign.Center ) if (config.monthSelection && monthSelectionEnabled) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), - painter = rememberAnimatedVectorPainter(chevronAVD, chevronMonthAtEnd), - contentDescription = stringResource(R.string.scd_calendar_dialog_select_month), + modifier = Modifier.size(24.dp), + imageVector = Icons.Filled.KeyboardArrowUp, + contentDescription = stringResource(Res.string.scd_calendar_dialog_select_month), tint = MaterialTheme.colorScheme.primary ) } @@ -198,18 +206,24 @@ internal fun CalendarTopComponent( }, verticalAlignment = Alignment.CenterVertically ) { + val formatter = remember { + LocalDate.Format { + byUnicodePattern("yyyy") + } + } + Text( modifier = selectableItemModifier .testTags(TestTags.CALENDAR_YEAR_TITLE, cameraDate.year), - text = cameraDate.format(DateTimeFormatter.ofPattern("yyyy")), + text = cameraDate.format(formatter), style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.Bold), textAlign = TextAlign.Center ) if (config.yearSelection && yearSelectionEnabled) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), - painter = rememberAnimatedVectorPainter(chevronAVD, chevronYearAtEnd), - contentDescription = stringResource(id = R.string.scd_calendar_dialog_select_year), + modifier = Modifier.size(24.dp), + imageVector = Icons.Filled.KeyboardArrowUp, + contentDescription = stringResource(Res.string.scd_calendar_dialog_select_year), tint = MaterialTheme.colorScheme.primary ) } @@ -227,17 +241,17 @@ internal fun CalendarTopComponent( colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer), modifier = Modifier .testTags(TestTags.CALENDAR_NEXT_ACTION) - .size(dimensionResource(RC.dimen.scd_size_200)), + .size(32.dp), enabled = !navigationDisabled && !nextDisabled, onClick = onNext ) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), + modifier = Modifier.size(48.dp), imageVector = config.icons.ChevronRight, contentDescription = stringResource( when (config.style) { - CalendarStyle.MONTH -> R.string.scd_calendar_dialog_next_month - CalendarStyle.WEEK -> R.string.scd_calendar_dialog_next_week + CalendarStyle.MONTH -> Res.string.scd_calendar_dialog_next_month + CalendarStyle.WEEK -> Res.string.scd_calendar_dialog_next_week } ) ) @@ -260,6 +274,7 @@ internal fun CalendarTopComponent( * @param onMonthClick The listener that is invoked when the month selection was clicked. * @param onYearClick The listener that is invoked when the year selection was clicked. */ +@OptIn(ExperimentalResourceApi::class, FormatStringsInDatetimeFormats::class) @ExperimentalMaterial3Api @Composable internal fun CalendarTopLandscapeComponent( @@ -279,7 +294,6 @@ internal fun CalendarTopLandscapeComponent( val enterTransition = expandIn(expandFrom = Alignment.Center, clip = false) + fadeIn() val exitTransition = shrinkOut(shrinkTowards = Alignment.Center, clip = false) + fadeOut() - val chevronAVD = AnimatedImageVector.animatedVectorResource(R.drawable.avd_chevron_down_up) var chevronMonthAtEnd by remember { mutableStateOf(false) } var chevronYearAtEnd by remember { mutableStateOf(false) } @@ -300,9 +314,9 @@ internal fun CalendarTopLandscapeComponent( .clip(MaterialTheme.shapes.extraSmall) val selectableItemModifier = Modifier - .padding(start = dimensionResource(RC.dimen.scd_small_100)) - .padding(vertical = dimensionResource(RC.dimen.scd_small_50)) - .padding(end = dimensionResource(RC.dimen.scd_small_50)) + .padding(start = 8.dp) + .padding(vertical = 4.dp) + .padding(end = 4.dp) Column( modifier = modifier, @@ -319,17 +333,23 @@ internal fun CalendarTopLandscapeComponent( }, verticalAlignment = Alignment.CenterVertically ) { + val formatter = remember { + LocalDate.Format { + byUnicodePattern("yyyy") + } + } + Text( modifier = selectableItemModifier.weight(1f), - text = cameraDate.format(DateTimeFormatter.ofPattern("yyyy")), + text = cameraDate.format(formatter), style = MaterialTheme.typography.titleSmall.copy(fontWeight = FontWeight.Bold), textAlign = TextAlign.Start ) if (config.yearSelection) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), - painter = rememberAnimatedVectorPainter(chevronAVD, chevronYearAtEnd), - contentDescription = stringResource(id = R.string.scd_calendar_dialog_select_year), + modifier = Modifier.size(24.dp), + imageVector = Icons.Filled.KeyboardArrowUp, + contentDescription = stringResource(Res.string.scd_calendar_dialog_select_year), tint = MaterialTheme.colorScheme.primary ) } @@ -349,15 +369,15 @@ internal fun CalendarTopLandscapeComponent( ) { Text( modifier = selectableItemModifier.weight(1f), - text = cameraDate.format(DateTimeFormatter.ofPattern("MMM")), + text = config.locale.getMonthShort(cameraDate), style = MaterialTheme.typography.titleSmall.copy(fontWeight = FontWeight.Bold), textAlign = TextAlign.Start ) if (config.monthSelection) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), - painter = rememberAnimatedVectorPainter(chevronAVD, chevronMonthAtEnd), - contentDescription = stringResource(R.string.scd_calendar_dialog_select_month), + modifier = Modifier.size(24.dp), + imageVector = Icons.Filled.KeyboardArrowUp, + contentDescription = stringResource(Res.string.scd_calendar_dialog_select_month), tint = MaterialTheme.colorScheme.primary ) } @@ -379,17 +399,17 @@ internal fun CalendarTopLandscapeComponent( FilledIconButton( colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer), modifier = Modifier - .size(dimensionResource(RC.dimen.scd_size_200)), + .size(32.dp), enabled = !navigationDisabled && !prevDisabled, onClick = onPrev ) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), + modifier = Modifier.size(48.dp), imageVector = config.icons.ChevronLeft, contentDescription = stringResource( when (config.style) { - CalendarStyle.MONTH -> R.string.scd_calendar_dialog_prev_month - CalendarStyle.WEEK -> R.string.scd_calendar_dialog_prev_week + CalendarStyle.MONTH -> Res.string.scd_calendar_dialog_prev_month + CalendarStyle.WEEK -> Res.string.scd_calendar_dialog_prev_week } ) ) @@ -407,17 +427,17 @@ internal fun CalendarTopLandscapeComponent( Column(Modifier.align(Alignment.CenterVertically)) { FilledIconButton( colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.secondaryContainer), - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_200)), + modifier = Modifier.size(32.dp), enabled = !navigationDisabled && !nextDisabled, onClick = onNext ) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), + modifier = Modifier.size(48.dp), imageVector = config.icons.ChevronRight, contentDescription = stringResource( when (config.style) { - CalendarStyle.MONTH -> R.string.scd_calendar_dialog_next_month - CalendarStyle.WEEK -> R.string.scd_calendar_dialog_next_week + CalendarStyle.MONTH -> Res.string.scd_calendar_dialog_next_month + CalendarStyle.WEEK -> Res.string.scd_calendar_dialog_next_week } ) ) diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarWeekHeaderItemComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarWeekHeaderItemComponent.kt similarity index 82% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarWeekHeaderItemComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarWeekHeaderItemComponent.kt index d6aa1343..7f472588 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarWeekHeaderItemComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarWeekHeaderItemComponent.kt @@ -25,31 +25,33 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.calendar.R -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.calendar.generated.resources.Res +import sheets_compose_dialogs.calendar.generated.resources.scd_calendar_dialog_cw /** * Composable function that represents a calendar week header item with the given [label]. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun CalendarWeekHeaderItemComponent() { Row( modifier = Modifier .testTags(TestTags.CALENDAR_HEADER_CW) .aspectRatio(1f, true) - .padding(dimensionResource(RC.dimen.scd_small_50)) + .padding(4.dp) .clip(MaterialTheme.shapes.extraSmall), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.Center ) { Text( - text = stringResource(R.string.scd_calendar_dialog_cw), + text = stringResource(Res.string.scd_calendar_dialog_cw), style = MaterialTheme.typography.labelSmall.copy(fontSize = 9.sp), textAlign = TextAlign.Center, color = MaterialTheme.colorScheme.primary diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarWeekItemComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarWeekItemComponent.kt similarity index 88% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarWeekItemComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarWeekItemComponent.kt index 22d09f01..7c72518a 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/CalendarWeekItemComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/CalendarWeekItemComponent.kt @@ -25,13 +25,12 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.calendar.models.CalendarSelection -import com.maxkeppeler.sheets.core.R as RC /** * The calendar week item component of the calendar view. @@ -46,9 +45,9 @@ internal fun CalendarWeekItemComponent( val normalModifier = Modifier.aspectRatio(1f, true) val textStyle = MaterialTheme.typography.labelSmall.copy(fontSize = 9.sp) val parentModifier = when (selection) { - is CalendarSelection.Date -> Modifier.padding(dimensionResource(RC.dimen.scd_small_25)) - is CalendarSelection.Dates -> Modifier.padding(dimensionResource(RC.dimen.scd_small_25)) - is CalendarSelection.Period -> Modifier.padding(vertical = dimensionResource(RC.dimen.scd_small_25)) + is CalendarSelection.Date -> Modifier.padding(2.dp) + is CalendarSelection.Dates -> Modifier.padding(2.dp) + is CalendarSelection.Period -> Modifier.padding(vertical = 2.dp) }.testTags(TestTags.CALENDAR_CW, value) Column(modifier = parentModifier) { Row( diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/MonthItemComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/MonthItemComponent.kt similarity index 85% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/MonthItemComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/MonthItemComponent.kt index 734b81cc..6c059f3c 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/MonthItemComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/MonthItemComponent.kt @@ -28,13 +28,15 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import com.maxkeppeler.sheets.calendar.models.FormatLocale import com.maxkeppeler.sheets.calendar.utils.Constants -import java.time.LocalDate -import java.time.Month -import java.time.format.DateTimeFormatter -import com.maxkeppeler.sheets.core.R as RC +import com.maxkeppeler.sheets.calendar.utils.now +import com.maxkeppeler.sheets.calendar.utils.withMonth +import kotlinx.datetime.LocalDate +import kotlinx.datetime.Month +import kotlinx.datetime.format /** * The item component of the month selection view. @@ -45,6 +47,7 @@ import com.maxkeppeler.sheets.core.R as RC */ @Composable internal fun MonthItemComponent( + locale: FormatLocale, month: Month, thisMonth: Boolean = false, disabled: Boolean = false, @@ -60,7 +63,7 @@ internal fun MonthItemComponent( val baseModifier = Modifier .wrapContentWidth() - .padding(dimensionResource(RC.dimen.scd_small_50)) + .padding(4.dp) .clickable(!disabled) { onMonthClick() } val normalModifier = baseModifier @@ -87,13 +90,12 @@ internal fun MonthItemComponent( Text( modifier = Modifier .alpha(textAlpha) - .padding(horizontal = dimensionResource(RC.dimen.scd_small_150)) - .padding(vertical = dimensionResource(RC.dimen.scd_small_100)), - text = LocalDate.now().withMonth(month.value) - .format(DateTimeFormatter.ofPattern("MMM")), + .padding(horizontal = 12.dp) + .padding(vertical = 8.dp), + text = locale.getMonthShort(LocalDate.now().withMonth(month)), style = textStyle, textAlign = TextAlign.Center, maxLines = 1, ) } -} \ No newline at end of file +} diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/MonthSelectionView.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/MonthSelectionView.kt similarity index 89% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/MonthSelectionView.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/MonthSelectionView.kt index 28dd2094..7512ae72 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/MonthSelectionView.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/MonthSelectionView.kt @@ -18,7 +18,8 @@ package com.maxkeppeler.sheets.calendar.views import androidx.compose.foundation.lazy.grid.LazyGridScope import androidx.compose.foundation.lazy.grid.items import com.maxkeppeler.sheets.calendar.models.CalendarMonthData -import java.time.Month +import com.maxkeppeler.sheets.calendar.models.FormatLocale +import kotlinx.datetime.Month /** * The view that displays all relevant year information. @@ -26,14 +27,16 @@ import java.time.Month * @param onMonthClick The listener that is invoked when a month is selected. */ internal fun LazyGridScope.setupMonthSelectionView( + locale: FormatLocale, monthsData: CalendarMonthData, onMonthClick: (Month) -> Unit, ) { - items(Month.values()) { month -> + items(Month.entries.toTypedArray()) { month -> val selected = monthsData.selected == month val disabled = monthsData.disabled.contains(month) val thisMonth = monthsData.thisMonth == month MonthItemComponent( + locale = locale, month = month, selected = selected, disabled = disabled, diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/YearItemComponent.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/YearItemComponent.kt similarity index 91% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/YearItemComponent.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/YearItemComponent.kt index 2d576445..34e19528 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/YearItemComponent.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/YearItemComponent.kt @@ -27,9 +27,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.style.TextAlign -import com.maxkeppeler.sheets.core.R as RC +import androidx.compose.ui.unit.dp /** * The item component of the year selection view. @@ -68,8 +67,8 @@ internal fun YearItemComponent( ) { Text( modifier = Modifier - .padding(horizontal = dimensionResource(RC.dimen.scd_small_150)) - .padding(vertical = dimensionResource(RC.dimen.scd_small_100)), + .padding(horizontal = 12.dp) + .padding(vertical = 8.dp), text = year.toString(), style = textStyle, textAlign = TextAlign.Center diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/YearSelectionView.kt b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/YearSelectionView.kt similarity index 94% rename from calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/YearSelectionView.kt rename to calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/YearSelectionView.kt index c2dcd8e7..abe387e1 100644 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/views/YearSelectionView.kt +++ b/calendar/src/commonMain/kotlin/com/maxkeppeler/sheets/calendar/views/YearSelectionView.kt @@ -16,7 +16,8 @@ package com.maxkeppeler.sheets.calendar.views import androidx.compose.foundation.lazy.LazyListScope -import java.time.LocalDate +import com.maxkeppeler.sheets.calendar.utils.now +import kotlinx.datetime.LocalDate /** * The view that displays all relevant year information. diff --git a/calendar/src/jvmMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.jvm.kt b/calendar/src/jvmMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.jvm.kt new file mode 100644 index 00000000..ce0fd607 --- /dev/null +++ b/calendar/src/jvmMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.jvm.kt @@ -0,0 +1,83 @@ +package com.maxkeppeler.sheets.calendar.models + +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.LocalDate +import kotlinx.datetime.toJavaLocalDate +import java.time.format.DateTimeFormatter +import java.time.format.TextStyle +import java.time.temporal.WeekFields +import java.util.Locale + +actual sealed class FormatLocale(private val locale: Locale) { + + actual val firstDayOfWeek: DayOfWeek + get() = WeekFields.of(locale).firstDayOfWeek + + actual open fun getDayOfWeekLabels(): Map { + return when (this) { + is CHINESE -> getSimplifiedChineseDayOfWeekLabels() + is JAPANESE -> getJapaneseDayOfWeekLabels() + else -> { + DayOfWeek.entries.associateWith { dayOfWeek -> + dayOfWeek.getDisplayName(TextStyle.NARROW, locale) + } + } + } + } + + actual open fun getMonthShort(date: LocalDate): String { + return date.toJavaLocalDate().format(DateTimeFormatter.ofPattern("MMM")) + } + + internal fun getSimplifiedChineseDayOfWeekLabels(): Map = mapOf( + DayOfWeek.MONDAY to "\u4e00", + DayOfWeek.TUESDAY to "\u4e8c", + DayOfWeek.WEDNESDAY to "\u4e09", + DayOfWeek.THURSDAY to "\u56db", + DayOfWeek.FRIDAY to "\u4e94", + DayOfWeek.SATURDAY to "\u516d", + DayOfWeek.SUNDAY to "\u65e5", + ) + + internal fun getJapaneseDayOfWeekLabels(): Map = mapOf( + DayOfWeek.MONDAY to "\u6708", + DayOfWeek.TUESDAY to "\u706b", + DayOfWeek.WEDNESDAY to "\u6c34", + DayOfWeek.THURSDAY to "\u6728", + DayOfWeek.FRIDAY to "\u91d1", + DayOfWeek.SATURDAY to "\u571f", + DayOfWeek.SUNDAY to "\u65e5", + ) + + actual data class CHINESE(private val locale: Locale) : FormatLocale(locale) { + override fun getDayOfWeekLabels(): Map { + return getSimplifiedChineseDayOfWeekLabels() + } + } + + actual data class JAPANESE(private val locale: Locale) : FormatLocale(locale) { + override fun getDayOfWeekLabels(): Map { + return getJapaneseDayOfWeekLabels() + } + } + + actual data class Default(private val locale: Locale) : FormatLocale(locale) + + actual companion object { + actual fun getDefault(): FormatLocale { + val defaultLocale = Locale.getDefault() + + return when { + Locale.SIMPLIFIED_CHINESE.let { + defaultLocale.language == it.language + } -> CHINESE(defaultLocale) + + Locale.JAPANESE.let { + defaultLocale.language == it.language + } -> JAPANESE(defaultLocale) + + else -> Default(defaultLocale) + } + } + } +} \ No newline at end of file diff --git a/calendar/src/main/AndroidManifest.xml b/calendar/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/calendar/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/DayOfWeekUtils.kt b/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/DayOfWeekUtils.kt deleted file mode 100644 index b394291a..00000000 --- a/calendar/src/main/java/com/maxkeppeler/sheets/calendar/utils/DayOfWeekUtils.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.maxkeppeler.sheets.calendar.utils - -import java.time.DayOfWeek -import java.time.format.TextStyle -import java.time.temporal.WeekFields -import java.util.Locale - -/** - * Returns a map of day of week labels in the specified locale. - * - * @param locale the locale to get the labels for - * @return a map of day of week labels - */ -internal fun getDayOfWeekLabels(locale: Locale): Map = when { - Locale.SIMPLIFIED_CHINESE.let { locale.language == it.language && locale.country == it.country } -> getSimplifiedChineseDayOfWeekLabels() - Locale.JAPANESE.let { locale.language == it.language } -> getJapaneseDayOfWeekLabels() - else -> getDefaultDayOfWeekLabels(locale) -} - -/** - * Adjusts the ordering of DayOfWeek values based on the locale's first day of the week. - * - * @param locale the locale to adjust for - * @return an ordered list of DayOfWeek values starting with the locale's first day of the week - */ -internal fun getOrderedDaysOfWeek(locale: Locale): List { - val firstDayOfWeek = WeekFields.of(locale).firstDayOfWeek - val daysOfWeek = DayOfWeek.values() - val orderedDays = daysOfWeek.sortedBy { (it.value - firstDayOfWeek.value + 7) % 7 } - return orderedDays -} - -/** - * Integrates the ordered days of the week with their corresponding labels. - * - * @param locale the locale to get labels and order for - * @return a linked map of ordered day of week labels - */ -internal fun getOrderedDayOfWeekLabels(locale: Locale): LinkedHashMap { - val dayLabels = getDayOfWeekLabels(locale) - val orderedDays = getOrderedDaysOfWeek(locale) - return linkedMapOf().apply { - orderedDays.forEach { day -> - this[day] = dayLabels[day] ?: "" - } - } -} - -/** - * Returns a map of day of week labels in the default locale. - * - * @param locale the locale to get the labels for - * @return a map of day of week labels - */ -private fun getDefaultDayOfWeekLabels(locale: Locale): Map = - DayOfWeek.values() - .associateWith { dayOfWeek -> dayOfWeek.getDisplayName(TextStyle.NARROW, locale) } - -/** - * Returns a map of day of week labels in Simplified Chinese locale. - * - * @return a map of day of week labels - */ -private fun getSimplifiedChineseDayOfWeekLabels(): Map = mapOf( - DayOfWeek.MONDAY to "\u4e00", - DayOfWeek.TUESDAY to "\u4e8c", - DayOfWeek.WEDNESDAY to "\u4e09", - DayOfWeek.THURSDAY to "\u56db", - DayOfWeek.FRIDAY to "\u4e94", - DayOfWeek.SATURDAY to "\u516d", - DayOfWeek.SUNDAY to "\u65e5", -) - -/** - * Returns a map of day of week labels in Japanese locale. - * - * @return a map of day of week labels - */ -private fun getJapaneseDayOfWeekLabels(): Map = mapOf( - DayOfWeek.MONDAY to "\u6708", - DayOfWeek.TUESDAY to "\u706b", - DayOfWeek.WEDNESDAY to "\u6c34", - DayOfWeek.THURSDAY to "\u6728", - DayOfWeek.FRIDAY to "\u91d1", - DayOfWeek.SATURDAY to "\u571f", - DayOfWeek.SUNDAY to "\u65e5", -) \ No newline at end of file diff --git a/calendar/src/main/res/drawable/avd_chevron_down_up.xml b/calendar/src/main/res/drawable/avd_chevron_down_up.xml deleted file mode 100644 index f4c140b7..00000000 --- a/calendar/src/main/res/drawable/avd_chevron_down_up.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - diff --git a/calendar/src/main/res/values-bg/strings.xml b/calendar/src/main/res/values-bg/strings.xml deleted file mode 100644 index 54ea828b..00000000 --- a/calendar/src/main/res/values-bg/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Изберете месец - Следващият месец - Следващият месец - Следващата седмица - Миналата седмица - Изберете година - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-cs/strings.xml b/calendar/src/main/res/values-cs/strings.xml deleted file mode 100644 index c2c480d3..00000000 --- a/calendar/src/main/res/values-cs/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Vyberte měsíc - Příští měsíc - Příští měsíc - Příští týden - Předchozí týden - Vyberte rok - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-da/strings.xml b/calendar/src/main/res/values-da/strings.xml deleted file mode 100644 index 09435bf0..00000000 --- a/calendar/src/main/res/values-da/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Vælg måned - Næste måned - Næste måned - Næste uge - Sidste uge - Vælg år - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-el/strings.xml b/calendar/src/main/res/values-el/strings.xml deleted file mode 100644 index 1d746ef3..00000000 --- a/calendar/src/main/res/values-el/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Επιλέξτε μήνα - Επόμενος μήνας - Επόμενος μήνας - Επόμενη εβδομάδα - Προηγούμενη εβδομάδα - Επιλέξτε έτος - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-eo/strings.xml b/calendar/src/main/res/values-eo/strings.xml deleted file mode 100644 index 5be54045..00000000 --- a/calendar/src/main/res/values-eo/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Elektu monaton - Venonta monato. - Venonta monato. - La venonta semajno - Precedonta semajno - Elekti jaron - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-et/strings.xml b/calendar/src/main/res/values-et/strings.xml deleted file mode 100644 index 5a06e3a5..00000000 --- a/calendar/src/main/res/values-et/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Vali kuu - Järgmine kuu - Järgmine kuu - Järgmisel nädalal - Eelmine nädal - Vali aasta - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-fa/strings.xml b/calendar/src/main/res/values-fa/strings.xml deleted file mode 100644 index 5c315d23..00000000 --- a/calendar/src/main/res/values-fa/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - انتخاب ماه - ماه آینده - ماه آینده - هفته آینده - هفته گذشته - سال را انتخاب کنید - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-fi/strings.xml b/calendar/src/main/res/values-fi/strings.xml deleted file mode 100644 index 321c792d..00000000 --- a/calendar/src/main/res/values-fi/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Valitse kuukausi - Seuraava kuukausi - Seuraava kuukausi - Ensi viikko - Edellinen viikko - Valitse vuosi - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-ga/strings.xml b/calendar/src/main/res/values-ga/strings.xml deleted file mode 100644 index e5f34a07..00000000 --- a/calendar/src/main/res/values-ga/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Roghnaigh mí - An mhí seo chugainn - An mhí seo chugainn - An chéad seachtain eile. - Seachtain roimhe - Roghnaigh bliain - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-gd/strings.xml b/calendar/src/main/res/values-gd/strings.xml deleted file mode 100644 index bab2d86e..00000000 --- a/calendar/src/main/res/values-gd/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Tagh mìos - An ath-mhìos - An-ath-mhìos - An ath sheachdain - Seachdain a dh\'fhalbh. - Tagh bliadhna - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-hi/strings.xml b/calendar/src/main/res/values-hi/strings.xml deleted file mode 100644 index 74913ba8..00000000 --- a/calendar/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - महीना चुनें - अगले महीने - अगले महीने - अगले हफ़्ते - पिछला सप्ताह - साल चुनें - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-hr/strings.xml b/calendar/src/main/res/values-hr/strings.xml deleted file mode 100644 index 784796af..00000000 --- a/calendar/src/main/res/values-hr/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Odaberite mjesec - Sljedeći mjesec - Sljedeći mjesec - Sljedeći tjedan - Prošli tjedan - Odaberite godinu - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-hu/strings.xml b/calendar/src/main/res/values-hu/strings.xml deleted file mode 100644 index b89bdddc..00000000 --- a/calendar/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Hónap kiválasztása - Jövő hónap - Jövő hónap - Következő hét - Előző héten - Év kiválasztása - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-in-rID/strings.xml b/calendar/src/main/res/values-in-rID/strings.xml deleted file mode 100644 index 2bd7f25b..00000000 --- a/calendar/src/main/res/values-in-rID/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Pilih bulan - Bulan depan - Bulan depan - Minggu depan - Minggu sebelumnya - Pilih tahun - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-is/strings.xml b/calendar/src/main/res/values-is/strings.xml deleted file mode 100644 index 50e37231..00000000 --- a/calendar/src/main/res/values-is/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Velja mánuð - Næst komandi mánuði - Næsti mánuður - Næstu viku - Síðasta viku - Veldu árið - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-iw/strings.xml b/calendar/src/main/res/values-iw/strings.xml deleted file mode 100644 index 860f9f05..00000000 --- a/calendar/src/main/res/values-iw/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - בחר חודש - בחודש הבא - בחודש הבא - שבוע הבא - השבוע קודם - בחר שנה - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-jv/strings.xml b/calendar/src/main/res/values-jv/strings.xml deleted file mode 100644 index 73bae0eb..00000000 --- a/calendar/src/main/res/values-jv/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Pilih sasi - Sasih ngandika. - Sasih ngandika. - Minggu depan - Minggu keseloro - Pilih tahun - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-kk/strings.xml b/calendar/src/main/res/values-kk/strings.xml deleted file mode 100644 index 23649738..00000000 --- a/calendar/src/main/res/values-kk/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Айды таңдау - Келесі ай - Келесі ай - Желкегі аптаның келесі қызығы. - Өткен апта - Жылды таңдау - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-ku/strings.xml b/calendar/src/main/res/values-ku/strings.xml deleted file mode 100644 index 353079d0..00000000 --- a/calendar/src/main/res/values-ku/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - مانگ دیاری بکه - مانگای داهاتەوە - مانگێکتە ئاگادارم - هەفتای داهاتووبوو - Hefta pêşîn. - سال هەڵبژێرە - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-lb/strings.xml b/calendar/src/main/res/values-lb/strings.xml deleted file mode 100644 index 57f06f40..00000000 --- a/calendar/src/main/res/values-lb/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Wiel Monat auswielen - Nächst Meecheden - Nächst Mount - Nächste Woch - Lescht Woch - Joer auswielen - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-lo/strings.xml b/calendar/src/main/res/values-lo/strings.xml deleted file mode 100644 index 02ea1e88..00000000 --- a/calendar/src/main/res/values-lo/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - ເລືອກເດືອນ - ເດືອນຕໍ່ໄປ - ເດືອນຕໍ່ໄປ - ອີກມື້ນີ້ - ອີກດິນເດືອນ - ເລືອກປີ - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-lt/strings.xml b/calendar/src/main/res/values-lt/strings.xml deleted file mode 100644 index 88fb54ec..00000000 --- a/calendar/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Pasirinkite mėnesį. - Kitą mėnesį - Kitą mėnesį - Kitą savaitę - Praeita savaitė - Pasirinkite metus. - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-lv/strings.xml b/calendar/src/main/res/values-lv/strings.xml deleted file mode 100644 index 2daa35ff..00000000 --- a/calendar/src/main/res/values-lv/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Izvēlieties mēnesi - Nākamajā mēnesī - Nākamajā mēnesī - Nākamā nedēļa - Iepriekšējā nedēļā. - Izvēlieties gadu - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-ms/strings.xml b/calendar/src/main/res/values-ms/strings.xml deleted file mode 100644 index 76e49bf0..00000000 --- a/calendar/src/main/res/values-ms/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Pilih bulan - Bulan depan - Bulan depan - Minggu depan - Minggu lepas - Pilih tahun - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-ne/strings.xml b/calendar/src/main/res/values-ne/strings.xml deleted file mode 100644 index 1b4598f2..00000000 --- a/calendar/src/main/res/values-ne/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - महिना छान्नुहोस् - अर्को महिना - अगाडीको महिना - अर्को हप्ता - अघिल्लो हप्ता - वर्ष छान्नुहोस् - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-no/strings.xml b/calendar/src/main/res/values-no/strings.xml deleted file mode 100644 index 3ba8113a..00000000 --- a/calendar/src/main/res/values-no/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Velg måned - Neste måned - Neste måned - Neste uke - Forrige uke - Velg år - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-pl/strings.xml b/calendar/src/main/res/values-pl/strings.xml deleted file mode 100644 index 7d96b142..00000000 --- a/calendar/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Wybierz miesiąc - W przyszłym miesiącu - W przyszłym miesiącu - Następny tydzień - Poprzedni tydzień - Wybierz rok - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-sk/strings.xml b/calendar/src/main/res/values-sk/strings.xml deleted file mode 100644 index 70d58255..00000000 --- a/calendar/src/main/res/values-sk/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Vybrať mesiac - Budúci mesiac - Budúci mesiac - Budúci týždeň - Prešlý týždeň - Vyberte rok - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-sl/strings.xml b/calendar/src/main/res/values-sl/strings.xml deleted file mode 100644 index 82f90485..00000000 --- a/calendar/src/main/res/values-sl/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Izberi mesec - Prihodnji mesec - Naslednji mesec - Naslednji teden - Pretekli teden - Izberi leto. - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-sr/strings.xml b/calendar/src/main/res/values-sr/strings.xml deleted file mode 100644 index f7223c47..00000000 --- a/calendar/src/main/res/values-sr/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Odaberi mesec - Sledeći mesec - Sledećeg meseca - Sledeće nedelje - Prošle nedelje - Izaberite godinu - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-sv/strings.xml b/calendar/src/main/res/values-sv/strings.xml deleted file mode 100644 index fd01d5a1..00000000 --- a/calendar/src/main/res/values-sv/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Välj månad - Nästa månad - Nästa månad - Nästa vecka - Föregående vecka - Välj år - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-th/strings.xml b/calendar/src/main/res/values-th/strings.xml deleted file mode 100644 index 86c903d3..00000000 --- a/calendar/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - เลือกเดือน - เดือนหน้า - เดือนถัดไป - อาทิตย์หน้า - สัปดาห์ที่แล้ว - เลือกปี - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-tr/strings.xml b/calendar/src/main/res/values-tr/strings.xml deleted file mode 100644 index 50fcad1c..00000000 --- a/calendar/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Ay seçin - Gelecek ay - Gelecek ay - Önümüzdeki hafta - Geçen hafta - Yıl seçin. - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-uk/strings.xml b/calendar/src/main/res/values-uk/strings.xml deleted file mode 100644 index f80191d1..00000000 --- a/calendar/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Вибрати місяць - Наступний місяць - Наступного місяця - Наступного тижня - Минулий тиждень - Виберіть рік - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-vi/strings.xml b/calendar/src/main/res/values-vi/strings.xml deleted file mode 100644 index 8c66b91f..00000000 --- a/calendar/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Chọn tháng - Tháng sau - Tháng sau - Tuần tới - Tuần trước - Chọn năm - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-zh-rCN/strings.xml b/calendar/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index 59ea69fa..00000000 --- a/calendar/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - 选择月份 - 下个月 - 下个月 - 下周 - 上个星期 - 选择年份 - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values-zh-rTW/strings.xml b/calendar/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index 17217bc3..00000000 --- a/calendar/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - 選擇月份 - 下個月 - 下個月 - 下周 - Prev week (上週) - 選擇年份 - CW - \ No newline at end of file diff --git a/calendar/src/main/res/values/strings.xml b/calendar/src/main/res/values/strings.xml deleted file mode 100644 index f5cb590c..00000000 --- a/calendar/src/main/res/values/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Select month - Next month - Next month - Next week - Prev week - Select year - CW - \ No newline at end of file diff --git a/calendar/src/nonJvmMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.nonJvm.kt b/calendar/src/nonJvmMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.nonJvm.kt new file mode 100644 index 00000000..80d4e3b9 --- /dev/null +++ b/calendar/src/nonJvmMain/kotlin/com/maxkeppeler/sheets/calendar/models/FormatLocale.nonJvm.kt @@ -0,0 +1,79 @@ +package com.maxkeppeler.sheets.calendar.models + +import kotlinx.datetime.DayOfWeek +import kotlinx.datetime.LocalDate +import kotlinx.datetime.Month + +actual sealed class FormatLocale { + + actual val firstDayOfWeek: DayOfWeek + get() = DayOfWeek.MONDAY + + actual fun getDayOfWeekLabels(): Map { + return when (this) { + is CHINESE -> getSimplifiedChineseDayOfWeekLabels() + is JAPANESE -> getJapaneseDayOfWeekLabels() + else -> DayOfWeek.entries.associateWith { dayOfWeek -> dayOfWeek.displayName() } + } + } + + // ToDo("wait for kotlin datetime with locale parser") + actual fun getMonthShort(date: LocalDate): String { + return when (date.month) { + Month.JANUARY -> "Jan" + Month.FEBRUARY -> "Feb" + Month.MARCH -> "Mar" + Month.APRIL -> "Apr" + Month.MAY -> "May" + Month.JUNE -> "Jun" + Month.JULY -> "Jul" + Month.AUGUST -> "Aug" + Month.SEPTEMBER -> "Sep" + Month.OCTOBER -> "Oct" + Month.NOVEMBER -> "Nov" + Month.DECEMBER -> "Dec" + else -> date.month.name + } + } + + internal fun getSimplifiedChineseDayOfWeekLabels(): Map = mapOf( + DayOfWeek.MONDAY to "\u4e00", + DayOfWeek.TUESDAY to "\u4e8c", + DayOfWeek.WEDNESDAY to "\u4e09", + DayOfWeek.THURSDAY to "\u56db", + DayOfWeek.FRIDAY to "\u4e94", + DayOfWeek.SATURDAY to "\u516d", + DayOfWeek.SUNDAY to "\u65e5", + ) + + internal fun getJapaneseDayOfWeekLabels(): Map = mapOf( + DayOfWeek.MONDAY to "\u6708", + DayOfWeek.TUESDAY to "\u706b", + DayOfWeek.WEDNESDAY to "\u6c34", + DayOfWeek.THURSDAY to "\u6728", + DayOfWeek.FRIDAY to "\u91d1", + DayOfWeek.SATURDAY to "\u571f", + DayOfWeek.SUNDAY to "\u65e5", + ) + + private fun DayOfWeek.displayName(): String { + return when (this) { + DayOfWeek.MONDAY -> "M" + DayOfWeek.TUESDAY -> "T" + DayOfWeek.WEDNESDAY -> "W" + DayOfWeek.THURSDAY -> "T" + DayOfWeek.FRIDAY -> "F" + DayOfWeek.SATURDAY -> "S" + DayOfWeek.SUNDAY -> "S" + else -> this.name + } + } + + actual data object CHINESE : FormatLocale() + actual data object JAPANESE : FormatLocale() + actual data object Default : FormatLocale() + + actual companion object { + actual fun getDefault(): FormatLocale = Default + } +} \ No newline at end of file diff --git a/clock/build.gradle.kts b/clock/build.gradle.kts index e4e2e004..02b95b82 100644 --- a/clock/build.gradle.kts +++ b/clock/build.gradle.kts @@ -1,3 +1,5 @@ +import com.vanniktech.maven.publish.SonatypeHost + /* * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) * @@ -14,22 +16,74 @@ * limitations under the License. */ plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.CLOCK.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } compileOptions { - // Flag to enable support for the new language APIs isCoreLibraryDesugaringEnabled = true + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.CLOCK.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.datetime) + implementation(libs.serialization) + + api(project(":core")) + } } } dependencies { - coreLibraryDesugaring(Dependencies.DESUGAR) + coreLibraryDesugaring(libs.desugar) } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/clock/src/androidMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.android.kt b/clock/src/androidMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.android.kt new file mode 100644 index 00000000..af9a8d59 --- /dev/null +++ b/clock/src/androidMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.android.kt @@ -0,0 +1,10 @@ +package com.maxkeppeler.sheets.clock + +import android.text.format.DateFormat +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalContext + +@Composable +internal actual fun is24HourFormat(): Boolean { + return DateFormat.is24HourFormat(LocalContext.current) +} \ No newline at end of file diff --git a/clock/src/androidMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.android.kt b/clock/src/androidMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.android.kt new file mode 100644 index 00000000..2e7bce2d --- /dev/null +++ b/clock/src/androidMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.android.kt @@ -0,0 +1,31 @@ +package com.maxkeppeler.sheets.clock.views + +import com.maxkeppeler.sheets.clock.utils.FormatStyle +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format.DateTimeFormat +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern +import java.time.chrono.Chronology +import java.time.format.DateTimeFormatterBuilder +import java.util.Locale + +internal fun FormatStyle.toJava(): java.time.format.FormatStyle { + return when (this) { + FormatStyle.FULL -> java.time.format.FormatStyle.FULL + FormatStyle.LONG -> java.time.format.FormatStyle.LONG + FormatStyle.MEDIUM -> java.time.format.FormatStyle.MEDIUM + FormatStyle.SHORT -> java.time.format.FormatStyle.SHORT + } +} + +@OptIn(FormatStringsInDatetimeFormats::class) +internal actual fun getTimeFormatter(style: FormatStyle): DateTimeFormat { + val locale = Locale.getDefault() + val pattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern( + null, style.toJava(), Chronology.ofLocale(locale), locale + ).toString() + + return LocalTime.Format { + byUnicodePattern(pattern) + } +} \ No newline at end of file diff --git a/clock/src/appleMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.apple.kt b/clock/src/appleMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.apple.kt new file mode 100644 index 00000000..68c59a5b --- /dev/null +++ b/clock/src/appleMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.apple.kt @@ -0,0 +1,12 @@ +package com.maxkeppeler.sheets.clock + +import androidx.compose.runtime.Composable +import platform.Foundation.NSDateFormatter +import platform.Foundation.NSLocale +import platform.Foundation.currentLocale + +@Composable +internal actual fun is24HourFormat(): Boolean { + val dateFormat = NSDateFormatter.dateFormatFromTemplate("j", 0u, NSLocale.currentLocale) + return dateFormat?.contains('a')?.not() ?: true +} \ No newline at end of file diff --git a/clock/src/appleMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.apple.kt b/clock/src/appleMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.apple.kt new file mode 100644 index 00000000..f74dd80c --- /dev/null +++ b/clock/src/appleMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.apple.kt @@ -0,0 +1,29 @@ +package com.maxkeppeler.sheets.clock.views + +import com.maxkeppeler.sheets.clock.utils.FormatStyle +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format.DateTimeFormat +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern +import platform.Foundation.* + +internal fun FormatStyle.toSwift(): NSDateFormatterStyle { + return when (this) { + FormatStyle.FULL -> NSDateFormatterFullStyle + FormatStyle.LONG -> NSDateFormatterLongStyle + FormatStyle.MEDIUM -> NSDateFormatterMediumStyle + FormatStyle.SHORT -> NSDateFormatterShortStyle + } +} + +@OptIn(FormatStringsInDatetimeFormats::class) +internal actual fun getTimeFormatter(style: FormatStyle): DateTimeFormat { + val formatter = NSDateFormatter() + formatter.setDateStyle(NSDateFormatterNoStyle) + formatter.setTimeStyle(style.toSwift()) + val pattern = formatter.dateFormat() + + return LocalTime.Format { + byUnicodePattern(pattern) + } +} \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-bg/strings.xml b/clock/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..0b601082 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,16 @@ + + + h + м + s + D + AM + ММ + Следваща стойност + Предишна стойност + Трябва да бъде между %1$s и %2$s. + + Часове + Минути + Секунди + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-cs/strings.xml b/clock/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..daad4ddb --- /dev/null +++ b/clock/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Další hodnota + Předchozí hodnota + Musí být mezi %1$s a %2$s + + Hodiny + Minuty + Sekundy + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-da/strings.xml b/clock/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..294a6152 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Næste værdi + Tidligere værdi + Skal være mellem %1$s og %2$s + + Timer + Minutter + Sekunder + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-de-rDE/strings.xml b/clock/src/commonMain/composeResources/values-de-rDE/strings.xml new file mode 100644 index 00000000..27304ca6 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -0,0 +1,17 @@ + + + h + m + s + D + AM + PM + Nächster Wert + Letzter Wert + Muss zwischen %1$s und %2$s sein + + Stunden + Minuten + Sekunden + + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-de/strings.xml b/clock/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..e7d27380 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Nächster Wert + Vorheriger Wert + Muss zwischen %1$s und %2$s liegen + + Stunden + Minuten + Sekunden + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-el/strings.xml b/clock/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..9f2788ec --- /dev/null +++ b/clock/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + ΚΥ + Επόμενη τιμή + Προηγούμενη τιμή + Πρέπει να είναι ανάμεσα σε %1$s και %2$s + + Ωρες + Λεπτά + Δευτερόλεπτα + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-eo/strings.xml b/clock/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..7ccb7517 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Sekva valoro + Antaŭa valoro + Deviĝas inter %1$s kaj %2$s + + Horoj + Minute + Sekundoj + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-es/strings.xml b/clock/src/commonMain/composeResources/values-es/strings.xml new file mode 100644 index 00000000..02725e3a --- /dev/null +++ b/clock/src/commonMain/composeResources/values-es/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Siguiente valor + Valor anterior + Debe estar entre %1$s y %2$s + + Horas + Minutos. + Segundos + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-et/strings.xml b/clock/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..3768c425 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Järgmine väärtus + Eelmine väärtus + Peab olema vahemikus %1$s ja %2$s + + Tunnid + Minutes + Sekundid + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-fa/strings.xml b/clock/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..c5529ca0 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + نمایندهٔ وزیری + مقدار بعدی + مقدار قبلی + باید بین %1$s و %2$s باشد + + ساعات + دقیقه ها + ثانیه + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-fi/strings.xml b/clock/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..a2d050ed --- /dev/null +++ b/clock/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Seuraava arvo + Edellinen arvo + Pitäisi olla %1$s:n ja %2$s:n välissä + + Tunnit + Pöytäkirja + Sekunnit + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-fr/strings.xml b/clock/src/commonMain/composeResources/values-fr/strings.xml new file mode 100644 index 00000000..40a8e22f --- /dev/null +++ b/clock/src/commonMain/composeResources/values-fr/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Prochaine valeur + Valeur précédente + Doit être compris entre %1$s et %2$s + + Heures + Minutes + Secondes + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ga/strings.xml b/clock/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..56286a90 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Luach Ar Aghaidh + Luach roimhe sin + Caithfidh a bheith idir %1$s agus %2$s + + Uaireanta + Nótaí + Soicind + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-gd/strings.xml b/clock/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..36543bf7 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + Riaghaltas + Luach air ais + Luach roimhe seo + Cuiridh eadar %1$s agus %2$s + + Uairean + No translation needed, \"Minutes\" will remain unchanged. + Geàrr-ùine + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-hi/strings.xml b/clock/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..ac42516a --- /dev/null +++ b/clock/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,16 @@ + + + h + m + + डी + AM + PM + अगला मान्यता + पिछला मान + %1$s और %2$s के बीच होना चाहिए। + + घंटे + मिनट्स + सेकंड + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-hr/strings.xml b/clock/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..940b201e --- /dev/null +++ b/clock/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Sljedeća vrijednost + Prethodna vrijednost + Mora biti između %1$s i %2$s. + + Sati + Minuta + Sekunde + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-hu/strings.xml b/clock/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..a39a4c90 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,18 @@ + + + h + m + s + D + AM + PM + +Miniszterelnök (PM) + Következő érték + Előző érték + A megadott értéknek %1$s és %2$s között kell lennie. + + Órák + Percek + Másodpercek + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-in-rID/strings.xml b/clock/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..cd12c0f8 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM (Singkatan dari Perdana Menteri) + Nilai berikutnya + Nilai sebelumnya + Harus di antara %1$s dan %2$s + + Jam + Menit + Detik + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-is/strings.xml b/clock/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..6ed0b00d --- /dev/null +++ b/clock/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Næsti gildi + Fyrri gildi + Verður að vera á milli %1$s og %2$s + + Klukkustundir + Mínútur + Sekúndur + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-it/strings.xml b/clock/src/commonMain/composeResources/values-it/strings.xml new file mode 100644 index 00000000..174d8d3c --- /dev/null +++ b/clock/src/commonMain/composeResources/values-it/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Prossimo valore + Valore precedente + Deve essere compreso tra %1$s e %2$s + + Ore + Minuti + Secondi + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-iw/strings.xml b/clock/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..281b9c93 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + הערך הבא + הערך הקודם + יש להזין ערך בין %1$s ל-%2$s + + שעות + דקות + שניות + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ja/strings.xml b/clock/src/commonMain/composeResources/values-ja/strings.xml new file mode 100644 index 00000000..e0002437 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ja/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + 次の値 + 前の値 + %1$s と %2$s の間で指定してください + + 営業時間 + Minutes (分) + + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-jv/strings.xml b/clock/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..ad5ba5d1 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + OK. + OK + Nilai berikutnya + Nilai sebelumnya + Mesthi antara %1$s lan %2$s + + Jam + Menit + Detik + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-kk/strings.xml b/clock/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..298186c7 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + OK + Келесі мән + Алдыңғы құндылық. + %1$s жана %2$s аралыгында болуы тиіс. + + Сағаттар + Минуты + Секунд + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ko/strings.xml b/clock/src/commonMain/composeResources/values-ko/strings.xml new file mode 100644 index 00000000..317839df --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ko/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + 다음 값을 + 이전 값 + %1$s와 %2$s 사이여야 합니다. + + 시간 + 분(minutes) + + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ku/strings.xml b/clock/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..de92d897 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,16 @@ + + + ح]]> + m + s + D + ئ ام + PM + بۆ داهاتووری داهێنراوی داهاتووراوە]]> + Hunandina peywendî ya berê + پێویستە لەنێوان %1$s و %2$s بێت + + کاتژمێر + Demjimêr + Saniyeyan + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-lb/strings.xml b/clock/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..c41960c3 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,16 @@ + + + OK + m + s + OK + AM + PM + Nächste Wäert + Fréier Wäert + Muss tëschten %1$s an %2$s liewen. + + Stonnen + Minutten]]> + Sekonnen + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-lo/strings.xml b/clock/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..00c6d65a --- /dev/null +++ b/clock/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,16 @@ + + + ຫມາຍ + m + s + D + AM + PM - ຈຳນວນຜູ້ນຳເຂົ້າງານອາກອນ + ຄ່າຕໍ່ເນື່ອງດ້ວຍຄ່າຕໍ່ຕໍ່ໄປ + ຄ່າເກັບຂໍ້ມູນທີ່ເກົ່າກ່ຽວຂ້ອງ + ຈຳ​ໄດ້​ບໍ່​ຕ້ອງ​ມີ​ຈຳ​ນວນ​ລະ​ຫວ່າງ​ດ້ວຍ %1$s ແລະ %2$s + + ຊົ່ວໂມງ + ນອກຈາກມັນ + ວິນາທີ + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-lt/strings.xml b/clock/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..8354a87c --- /dev/null +++ b/clock/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,16 @@ + + + h + OK + s + D + AM + PM + Kitas reikšmė + Ankstesnė vertė + Turi būti tarp %1$s ir %2$s + + Valandos + Protokolas + Sekundės + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-lv/strings.xml b/clock/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..44ed5730 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,16 @@ + + + OK. + m + s + OK. + AM + PM + Nākamā vērtība + Iepriekšējā vērtība + Jābūt starp %1$s un %2$s + + Stundas + Minūtes + Sekundes + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ms/strings.xml b/clock/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..e396ecfb --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Nilai seterusnya + Nilai terdahulu + Mesti antara %1$s dan %2$s + + Jam + Minit + Saat + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ne/strings.xml b/clock/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..7b0b1722 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,16 @@ + + + + m + + D + सकेसम्म + प्रधानमन्त्री + अर्को मान् + पहिले थियोे मान + %1$s र %2$s को बीचमा हुनुपर्छ। + + घण्टा + मिनेटहरू + सेकेन्ड + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-nl/strings.xml b/clock/src/commonMain/composeResources/values-nl/strings.xml new file mode 100644 index 00000000..4d60473e --- /dev/null +++ b/clock/src/commonMain/composeResources/values-nl/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Volgende waarde + Vorige waarde + Moet tussen %1$s en %2$s zijn + + Uren + Notulen + Seconden + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-no/strings.xml b/clock/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..dd3b14b2 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,16 @@ + + + OK + OK + s + D + OK + PM + Neste verdi + Tidligere verdi + Må være mellom %1$s og %2$s. + + Timer + Minutter + Sekunder + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-pl/strings.xml b/clock/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..8f9c0a55 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Następna wartość + Poprzednia wartość + Musisz podać wartość pomiędzy %1$s a %2$s. + + Godziny + Minuty + Sekundy + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-pt/strings.xml b/clock/src/commonMain/composeResources/values-pt/strings.xml new file mode 100644 index 00000000..429ba843 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-pt/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Próximo valor + Valor anterior + Deve estar entre %1$s e %2$s + + Horas + Minutos + Segundos + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-ru/strings.xml b/clock/src/commonMain/composeResources/values-ru/strings.xml new file mode 100644 index 00000000..d959e0d4 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-ru/strings.xml @@ -0,0 +1,16 @@ + + + т + m + OK + D + AM + PM + Следующее значение + Предыдущее значение + Должно быть между %1$s и %2$s + + Часы + Минуты + Секунды + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-sk/strings.xml b/clock/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..ee937245 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,16 @@ + + + h + m + OK + D + AM + PM + Ďalšia hodnota + Predchádzajúca hodnota + Musí byť medzi %1$s a %2$s + + Hodiny + Minúty + Sekundy + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-sl/strings.xml b/clock/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..8d7a73b6 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + OK + Naslednja vrednost + Prejšnja vrednost + Mora biti med %1$s in %2$s + + Ure + Minute + Sekunde + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-sr/strings.xml b/clock/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..efdb45dd --- /dev/null +++ b/clock/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,16 @@ + + + OK. + m + OK + D + AM + PM + Sledeća vrednost + Prethodna vrednost + Mora biti između %1$s i %2$s. + + Satnici + Minuti + Sekunde + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-sv/strings.xml b/clock/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..481c0de7 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Nästa värde + Tidigare värde + Måste vara mellan %1$s och %2$s. + + Timmar + Minuter + Sekunder + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-th/strings.xml b/clock/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..dcae216a --- /dev/null +++ b/clock/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + นายกรัฐมนตรีท่านสำคัญ + ค่าถัดไป + ค่าก่อนหน้า + ต้องอยู่ระหว่าง %1$s และ %2$s + + รายชั่วโมง + นาที + วินาที + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-tr/strings.xml b/clock/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..a48f0705 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,16 @@ + + + h + metin + s (OK) + Metni çevirmek için yeterli bir bağlam sağlanmadığından dolayı, size yardımcı olabilmem için daha fazla bilgiye ihtiyacım var. Lütfen tam bir cümle veya metin sağlayın. + AM + PM + Sonraki değer + Önceki değer + %1$s ile %2$s arasında olmalıdır. + + Saatler + Dakikalar + Saniyeler + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-uk/strings.xml b/clock/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..1a3d6950 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,16 @@ + + + h + м + s + D + AM + Pm + Наступне значення + Попереднє значення + Має бути від %1$s до %2$s + + Години + Мінути + Секунди + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-vi/strings.xml b/clock/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..82a752f7 --- /dev/null +++ b/clock/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Giá trị kế tiếp + Giá trị trước đó + Phải nằm trong khoảng từ %1$s đến %2$s + + Giờ + Phút + Giây + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-zh-rCN/strings.xml b/clock/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..135a61ca --- /dev/null +++ b/clock/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + 上午 + PM + 下一个值 + 原值 + 必须在%1$s和%2$s之间 + + 小时 + 分钟 + + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values-zh-rTW/strings.xml b/clock/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..274df14b --- /dev/null +++ b/clock/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + 下午 + 晚上 + 下一個數值 + 先前值 + 必須在 %1$s 和 %2$s 之間 + + 小時 + 會議紀錄 + + \ No newline at end of file diff --git a/clock/src/commonMain/composeResources/values/strings.xml b/clock/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..8aa65234 --- /dev/null +++ b/clock/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,16 @@ + + + h + m + s + D + AM + PM + Next value + Previous value + Must be between %1$s and %2$s + + Hours + Minutes + Seconds + \ No newline at end of file diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/ClockDialog.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockDialog.kt similarity index 100% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/ClockDialog.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockDialog.kt diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/ClockPopup.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockPopup.kt similarity index 100% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/ClockPopup.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockPopup.kt diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/ClockState.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.kt similarity index 90% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/ClockState.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.kt index 26bc2aa2..2576fc91 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/ClockState.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.kt @@ -15,8 +15,6 @@ */ package com.maxkeppeler.sheets.clock -import android.content.Context -import android.text.format.DateFormat import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -27,6 +25,7 @@ import com.maxkeppeker.sheets.core.models.base.Debouncer import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.clock.models.ClockConfig import com.maxkeppeler.sheets.clock.models.ClockSelection +import com.maxkeppeler.sheets.clock.utils.* import com.maxkeppeler.sheets.clock.utils.Constants import com.maxkeppeler.sheets.clock.utils.convertTimeIntoTimeTextValues import com.maxkeppeler.sheets.clock.utils.convertTimeTextValuesIntoTime @@ -36,8 +35,9 @@ import com.maxkeppeler.sheets.clock.utils.inputValue import com.maxkeppeler.sheets.clock.utils.isAm import com.maxkeppeler.sheets.clock.utils.moveToNextIndex import com.maxkeppeler.sheets.clock.utils.moveToPreviousIndex -import java.io.Serializable -import java.time.LocalTime +import kotlinx.datetime.LocalTime +import kotlinx.serialization.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable /** * Handles the clock state. @@ -47,9 +47,9 @@ import java.time.LocalTime * @param stateData The data of the state when the state is required to be restored. */ internal class ClockState( - private val context: Context, val selection: ClockSelection, val config: ClockConfig, + private val _is24HourFormat: Boolean, stateData: ClockStateData? = null ) : BaseTypeState() { @@ -79,7 +79,7 @@ internal class ClockState( private fun isValid(): Boolean = config.boundary?.let { time in it } ?: true private fun isInit24HourFormat(): Boolean { - return config.is24HourFormat ?: DateFormat.is24HourFormat(context) + return config.is24HourFormat ?: _is24HourFormat } private fun getInitTime(): LocalTime { @@ -194,9 +194,9 @@ internal class ClockState( * @param config The general configuration for the dialog view. */ fun Saver( - context: Context, selection: ClockSelection, - config: ClockConfig + config: ClockConfig, + is24HourFormat: Boolean ): Saver = Saver( save = { state -> ClockStateData( @@ -207,7 +207,7 @@ internal class ClockState( isAm = state.isAm ) }, - restore = { data -> ClockState(context, selection, config, data) } + restore = { data -> ClockState(selection, config, is24HourFormat, data) } ) } @@ -215,13 +215,14 @@ internal class ClockState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class ClockStateData( val groupIndex: Int, val valueIndex: Int, val is24HourFormat: Boolean, val time: LocalTime, val isAm: Boolean - ) : Serializable + ) : JvmSerializable } /** @@ -232,11 +233,17 @@ internal class ClockState( */ @Composable internal fun rememberClockState( - context: Context, selection: ClockSelection, config: ClockConfig, -): ClockState = rememberSaveable( - inputs = arrayOf(selection, config), - saver = ClockState.Saver(context, selection, config), - init = { ClockState(context, selection, config) } -) \ No newline at end of file +): ClockState { + val is24Hour = is24HourFormat() + + return rememberSaveable( + inputs = arrayOf(selection, config), + saver = ClockState.Saver(selection, config, is24Hour), + init = { ClockState(selection, config, is24Hour) } + ) +} + +@Composable +internal expect fun is24HourFormat(): Boolean \ No newline at end of file diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/ClockView.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockView.kt similarity index 93% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/ClockView.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockView.kt index c3ae8b02..9b55d5a7 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/ClockView.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/ClockView.kt @@ -22,8 +22,6 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.Header import com.maxkeppeker.sheets.core.models.base.LibOrientation @@ -38,7 +36,6 @@ import com.maxkeppeler.sheets.clock.views.KeyboardComponent import com.maxkeppeler.sheets.clock.views.LandscapeTimeValueComponent import com.maxkeppeler.sheets.clock.views.PortraitTimeValueComponent import com.maxkeppeler.sheets.clock.views.TimeHintComponent -import com.maxkeppeler.sheets.core.R /** * Clock view for the use-case to to select a clock time. @@ -55,8 +52,7 @@ fun ClockView( config: ClockConfig = ClockConfig(), header: Header? = null, ) { - val context = LocalContext.current - val clockState = rememberClockState(context, selection, config) + val clockState = rememberClockState(selection, config) StateHandler(useCaseState, clockState) FrameBase( @@ -67,7 +63,7 @@ fun ClockView( PortraitTimeValueComponent( modifier = Modifier .fillMaxWidth() - .padding(bottom = dimensionResource(R.dimen.scd_normal_100)), + .padding(bottom = 16.dp), unitValues = clockState.timeTextValues, isAm = clockState.isAm, is24hourFormat = clockState.is24HourFormat, @@ -79,7 +75,7 @@ fun ClockView( TimeHintComponent( modifier = Modifier .fillMaxWidth() - .padding(bottom = dimensionResource(R.dimen.scd_normal_150)), + .padding(bottom = 24.dp), valid = clockState.valid, boundary = config.boundary, ) diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/models/ClockConfig.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/models/ClockConfig.kt similarity index 95% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/models/ClockConfig.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/models/ClockConfig.kt index 8f69a94e..b4989c0a 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/models/ClockConfig.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/models/ClockConfig.kt @@ -15,11 +15,12 @@ */ package com.maxkeppeler.sheets.clock.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.BaseConfigs import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeker.sheets.core.utils.BaseConstants -import java.time.LocalTime +import kotlinx.datetime.LocalTime /** * The general configuration for the clock dialog. diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/models/ClockSelection.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/models/ClockSelection.kt similarity index 97% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/models/ClockSelection.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/models/ClockSelection.kt index e69ee4f0..0032cdc9 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/models/ClockSelection.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/models/ClockSelection.kt @@ -17,6 +17,7 @@ package com.maxkeppeler.sheets.clock.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants @@ -36,7 +37,7 @@ sealed class ClockSelection : BaseSelection() { * @param positiveButton The button that will be used as a positive button. * @param onPositiveClick The listener that returns the selected hours and minutes. */ - class HoursMinutes( + data class HoursMinutes( override val withButtonView: Boolean = false, override val extraButton: SelectionButton? = null, override val onExtraButtonClick: (() -> Unit)? = null, @@ -56,7 +57,7 @@ sealed class ClockSelection : BaseSelection() { * @param positiveButton The button that will be used as a positive button. * @param onPositiveClick The listener that returns the selected hours, minutes and seconds. */ - class HoursMinutesSeconds( + data class HoursMinutesSeconds( override val withButtonView: Boolean = false, override val extraButton: SelectionButton? = null, override val onExtraButtonClick: (() -> Unit)? = null, diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/utils/Constants.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/Constants.kt similarity index 100% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/utils/Constants.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/Constants.kt diff --git a/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/ExtendAny.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/ExtendAny.kt new file mode 100644 index 00000000..a9f350f6 --- /dev/null +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/ExtendAny.kt @@ -0,0 +1,40 @@ +package com.maxkeppeler.sheets.clock.utils + +import kotlinx.datetime.Clock +import kotlinx.datetime.LocalTime +import kotlinx.datetime.TimeZone +import kotlinx.datetime.toLocalDateTime + +internal fun LocalTime.Companion.now(): LocalTime { + return Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).time +} + +internal val Char.numericValue: Int + get() { + if (this.isDigit()) { + return this.digitToInt() + } + val codePoint = this.code + + if (codePoint < 128) { + if (codePoint >= '0'.code && codePoint <= '9'.code) { + return codePoint - '0'.code + } + if (codePoint >= 'a'.code && codePoint <= 'z'.code) { + return codePoint - ('a'.code - 10) + } + if (codePoint >= 'A'.code && codePoint <= 'Z'.code) { + return codePoint - ('A'.code - 10) + } + return codePoint + } + // Full-width uppercase A-Z. + if (codePoint in 0xff21..0xff3a) { + return codePoint - 0xff17 + } + // Full-width lowercase a-z. + if (codePoint in 0xff41..0xff5a) { + return codePoint - 0xff37 + } + return codePoint + } \ No newline at end of file diff --git a/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/FormatStyle.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/FormatStyle.kt new file mode 100644 index 00000000..fd664432 --- /dev/null +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/FormatStyle.kt @@ -0,0 +1,33 @@ +package com.maxkeppeler.sheets.clock.utils + +/** + * Enumeration of the style of a localized date, time or date-time formatter. + * + * These styles are used when obtaining a date-time style from configuration. + */ +enum class FormatStyle { + // ordered from large to small + /** + * Full text style, with the most detail. + * For example, the format might be 'Tuesday, April 12, 1952 AD' or '3:30:42pm PST'. + */ + FULL, + + /** + * Long text style, with lots of detail. + * For example, the format might be 'January 12, 1952'. + */ + LONG, + + /** + * Medium text style, with some detail. + * For example, the format might be 'Jan 12, 1952'. + */ + MEDIUM, + + /** + * Short text style, typically numeric. + * For example, the format might be '12.13.52' or '3:30pm'. + */ + SHORT +} diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/utils/Utils.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/Utils.kt similarity index 86% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/utils/Utils.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/Utils.kt index c684c0a1..18cf4202 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/utils/Utils.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/utils/Utils.kt @@ -15,16 +15,13 @@ */ package com.maxkeppeler.sheets.clock.utils -import androidx.annotation.RestrictTo import androidx.compose.runtime.MutableState -import java.time.LocalTime +import kotlinx.datetime.LocalTime -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun isAm(currentTime: LocalTime): Boolean { return currentTime.hour < 12 } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun convertTimeIntoTimeTextValues( is24hourFormat: Boolean, allowSeconds: Boolean, @@ -51,7 +48,6 @@ internal fun convertTimeIntoTimeTextValues( return timeTextValues } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun convertTimeTextValuesIntoTime( is24HourFormat: Boolean, isAm: Boolean, @@ -73,10 +69,13 @@ internal fun convertTimeTextValuesIntoTime( } } - return LocalTime.of(actualHour, min, sec) + return LocalTime( + hour = actualHour, + minute = min, + second = sec + ) } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun getInputKeys(): List { return mutableListOf( *(1..9).toList().map { it.toString() }.toTypedArray(), @@ -86,7 +85,6 @@ internal fun getInputKeys(): List { ) } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun getDisabledInputKeys( timeValues: List, is24hourFormat: Boolean, @@ -122,7 +120,6 @@ internal fun getDisabledInputKeys( }?.map { it.toString() } ?: listOf() } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun moveToPreviousIndex( valueIndex: MutableState, groupIndex: MutableState, @@ -141,7 +138,6 @@ internal fun moveToPreviousIndex( } } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun moveToNextIndex( valueIndex: MutableState, groupIndex: MutableState, @@ -160,7 +156,6 @@ internal fun moveToNextIndex( } } -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) internal fun inputValue( is24hourFormat: Boolean, timeValues: List, @@ -182,17 +177,16 @@ internal fun inputValue( onNextIndex() hourBuffer[currentIndex.value] = newValue.toString()[0] } else { - if (currentIndex.value == 0 && newValue != 0 && Character.getNumericValue( - hourBuffer[1] - ) > 3 + + if (currentIndex.value == 0 && newValue != 0 && hourBuffer[1].numericValue > 3 ) { hourBuffer[1] = 0.digitToChar() } hourBuffer[currentIndex.value] = newValue.toString()[0] } - repeat(2) { minBuffer.deleteCharAt(0) } + repeat(2) { minBuffer.deleteAt(0) } repeat(2) { minBuffer.append(0.digitToChar()) } - repeat(2) { secBuffer?.deleteCharAt(0) } + repeat(2) { secBuffer?.deleteAt(0) } repeat(2) { secBuffer?.append(0.digitToChar()) } } else { if (currentIndex.value == 0 && newValue >= 2 && newValue <= 9) { @@ -201,17 +195,17 @@ internal fun inputValue( hourBuffer[currentIndex.value] = newValue.toString()[0] } else { if (currentIndex.value == 0) { - if (newValue != 0 && Character.getNumericValue(hourBuffer[1]) > 2) { + if (newValue != 0 && hourBuffer[1].numericValue > 2) { hourBuffer[1] = 0.digitToChar() - } else if (newValue == 0 && Character.getNumericValue(hourBuffer[1]) == 0) { + } else if (newValue == 0 && hourBuffer[1].numericValue == 0) { hourBuffer[1] = 1.digitToChar() } } hourBuffer[currentIndex.value] = newValue.toString()[0] } - repeat(2) { minBuffer.deleteCharAt(0) } + repeat(2) { minBuffer.deleteAt(0) } repeat(2) { minBuffer.append(0.digitToChar()) } - repeat(2) { secBuffer?.deleteCharAt(0) } + repeat(2) { secBuffer?.deleteAt(0) } repeat(2) { secBuffer?.append(0.digitToChar()) } } } diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/KeyItemComponent.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/KeyItemComponent.kt similarity index 90% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/views/KeyItemComponent.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/KeyItemComponent.kt index 76f0097d..47563f96 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/KeyItemComponent.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/KeyItemComponent.kt @@ -34,17 +34,19 @@ import androidx.compose.ui.draw.alpha import androidx.compose.ui.draw.clip import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.clock.R import com.maxkeppeler.sheets.clock.models.ClockConfig import com.maxkeppeler.sheets.clock.utils.Constants -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.clock.generated.resources.Res +import sheets_compose_dialogs.clock.generated.resources.scd_clock_dialog_next_value +import sheets_compose_dialogs.clock.generated.resources.scd_clock_dialog_previous_value /** * The item component of the keyboard. @@ -56,6 +58,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param onPrevAction The listener that is invoked when [Constants.ACTION_PREV] was clicked. * @param onNextAction The listener that is invoked when [Constants.ACTION_NEXT] was clicked. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun KeyItemComponent( config: ClockConfig, @@ -108,11 +111,11 @@ internal fun KeyItemComponent( verticalAlignment = Alignment.CenterVertically ) { if (isActionNext || isActionPrev) { - val maxSize = dimensionResource(RC.dimen.scd_size_150) - val minSize = dimensionResource(RC.dimen.scd_size_100) + val maxSize = 48.dp + val minSize = 16.dp Icon( modifier = Modifier - .padding(dimensionResource(RC.dimen.scd_small_100)) + .padding(8.dp) .sizeIn( maxWidth = maxSize, maxHeight = maxSize, @@ -121,7 +124,7 @@ internal fun KeyItemComponent( ) .fillMaxSize(), imageVector = if (isActionNext) config.icons.ChevronRight else config.icons.ChevronLeft, - contentDescription = stringResource(if (isActionNext) R.string.scd_clock_dialog_next_value else R.string.scd_clock_dialog_previous_value), + contentDescription = stringResource(if (isActionNext) Res.string.scd_clock_dialog_next_value else Res.string.scd_clock_dialog_previous_value), tint = MaterialTheme.colorScheme.secondary ) } else { diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/KeyboardComponent.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/KeyboardComponent.kt similarity index 100% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/views/KeyboardComponent.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/KeyboardComponent.kt diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeHintComponent.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.kt similarity index 74% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeHintComponent.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.kt index 34fbdbe5..9413f50c 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeHintComponent.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.kt @@ -26,13 +26,16 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.ExperimentalTextApi import androidx.compose.ui.text.style.TextAlign -import com.maxkeppeler.sheets.clock.R -import java.time.LocalTime -import java.time.format.DateTimeFormatter -import java.time.format.FormatStyle +import com.maxkeppeler.sheets.clock.utils.FormatStyle +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format +import kotlinx.datetime.format.DateTimeFormat +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.clock.generated.resources.Res +import sheets_compose_dialogs.clock.generated.resources.scd_clock_dialog_boundary_hint /** * A component that displays a hint that the current time is out of the defined boundary, if set and invalid. @@ -40,6 +43,7 @@ import java.time.format.FormatStyle * @param valid Boolean representing the validity of the time * @param boundary Optional [ClosedRange] of [LocalTime] representing the time boundary */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun TimeHintComponent( modifier: Modifier, @@ -48,7 +52,7 @@ internal fun TimeHintComponent( ) { if (valid || boundary == null) return - val formatter = remember { DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT) } + val formatter = remember { getTimeFormatter(FormatStyle.SHORT) } val startTime = remember(boundary) { boundary.start.format(formatter) } val endTime = remember(boundary) { boundary.endInclusive.format(formatter) } @@ -58,9 +62,11 @@ internal fun TimeHintComponent( verticalAlignment = Alignment.Bottom ) { Text( - text = stringResource(R.string.scd_clock_dialog_boundary_hint, startTime, endTime), + text = stringResource(Res.string.scd_clock_dialog_boundary_hint, startTime, endTime), textAlign = TextAlign.Center, style = MaterialTheme.typography.bodySmall ) } -} \ No newline at end of file +} + +internal expect fun getTimeFormatter(style: FormatStyle): DateTimeFormat \ No newline at end of file diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeTypeItemComponent.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeTypeItemComponent.kt similarity index 93% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeTypeItemComponent.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeTypeItemComponent.kt index 0c53b51f..f7dd4940 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeTypeItemComponent.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeTypeItemComponent.kt @@ -14,6 +14,7 @@ * limitations under the License. */ package com.maxkeppeler.sheets.clock.views + import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Row @@ -24,8 +25,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.dimensionResource -import com.maxkeppeler.sheets.core.R as RC +import androidx.compose.ui.unit.dp /** @@ -57,7 +57,7 @@ internal fun TimeTypeItemComponent( .clip(MaterialTheme.shapes.medium) .background(backgroundColor) .clickable { onClick.invoke() } - .padding(dimensionResource(RC.dimen.scd_small_100)) + .padding(8.dp) ) { Text( text = text, diff --git a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeValueComponent.kt b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeValueComponent.kt similarity index 85% rename from clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeValueComponent.kt rename to clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeValueComponent.kt index eb6cd705..6cd4e1c6 100644 --- a/clock/src/main/java/com/maxkeppeler/sheets/clock/views/TimeValueComponent.kt +++ b/clock/src/commonMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeValueComponent.kt @@ -28,18 +28,23 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.ExperimentalTextApi import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.withStyle +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.clock.R -import com.maxkeppeler.sheets.core.R as RC - +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.clock.generated.resources.* +import sheets_compose_dialogs.clock.generated.resources.Res +import sheets_compose_dialogs.clock.generated.resources.scd_clock_dialog_am +import sheets_compose_dialogs.clock.generated.resources.scd_clock_dialog_hours +import sheets_compose_dialogs.clock.generated.resources.scd_clock_dialog_pm + +@OptIn(ExperimentalResourceApi::class) @Composable internal fun PortraitTimeValueComponent( modifier: Modifier, @@ -77,7 +82,7 @@ internal fun PortraitTimeValueComponent( .clip(MaterialTheme.shapes.medium) .background(if (currentGroupIndex == groupIndex) MaterialTheme.colorScheme.secondaryContainer else Color.Transparent) .clickable { onGroupClick.invoke(currentGroupIndex) } - .padding(horizontal = dimensionResource(RC.dimen.scd_small_75)), + .padding(horizontal = 6.dp), text = buildAnnotatedString { val values = value.toString().toCharArray() val selectedStyle = SpanStyle( @@ -97,7 +102,7 @@ internal fun PortraitTimeValueComponent( Text( modifier = Modifier .wrapContentSize() - .padding(horizontal = dimensionResource(RC.dimen.scd_small_50)), + .padding(horizontal = 4.dp), text = ":", style = textStyle ) @@ -107,20 +112,20 @@ internal fun PortraitTimeValueComponent( if (!is24hourFormat) { Row( Modifier - .padding(top = dimensionResource(RC.dimen.scd_small_50)), + .padding(top = 4.dp), verticalAlignment = Alignment.CenterVertically ) { TimeTypeItemComponent( modifier = Modifier.testTags(TestTags.CLOCK_12_HOUR_FORMAT, 0), selected = isAm, onClick = { onAm.invoke(true) }, - text = stringResource(id = R.string.scd_clock_dialog_am), + text = stringResource(Res.string.scd_clock_dialog_am), ) TimeTypeItemComponent( modifier = Modifier.testTags(TestTags.CLOCK_12_HOUR_FORMAT, 1), selected = !isAm, onClick = { onAm.invoke(false) }, - text = stringResource(id = R.string.scd_clock_dialog_pm), + text = stringResource(Res.string.scd_clock_dialog_pm), ) } } @@ -128,6 +133,7 @@ internal fun PortraitTimeValueComponent( } +@OptIn(ExperimentalResourceApi::class) @Composable internal fun LandscapeTimeValueComponent( modifier: Modifier, @@ -148,9 +154,9 @@ internal fun LandscapeTimeValueComponent( ) { val labelRes = listOf( - R.string.scd_clock_dialog_hours, - R.string.scd_clock_dialog_minutes, - R.string.scd_clock_dialog_seconds, + Res.string.scd_clock_dialog_hours, + Res.string.scd_clock_dialog_minutes, + Res.string.scd_clock_dialog_seconds, ) Column( @@ -174,7 +180,7 @@ internal fun LandscapeTimeValueComponent( .clip(MaterialTheme.shapes.medium) .background(if (currentGroupIndex == groupIndex) MaterialTheme.colorScheme.secondaryContainer else Color.Transparent) .clickable { onGroupClick.invoke(currentGroupIndex) } - .padding(horizontal = dimensionResource(RC.dimen.scd_small_75)), + .padding(horizontal = 6.dp), text = buildAnnotatedString { val values = value.toString().toCharArray() val selectedStyle = SpanStyle( @@ -189,7 +195,7 @@ internal fun LandscapeTimeValueComponent( }, style = textStyle ) - Spacer(modifier = Modifier.width(dimensionResource(RC.dimen.scd_small_150))) + Spacer(modifier = Modifier.width(12.dp)) Text( text = stringResource(labelRes[currentGroupIndex]), @@ -202,20 +208,20 @@ internal fun LandscapeTimeValueComponent( if (!is24hourFormat) { Row( Modifier - .padding(top = dimensionResource(RC.dimen.scd_small_100)), + .padding(top = 8.dp), verticalAlignment = Alignment.CenterVertically ) { TimeTypeItemComponent( modifier = Modifier.testTags(TestTags.CLOCK_12_HOUR_FORMAT, 0), selected = isAm, onClick = { onAm.invoke(true) }, - text = stringResource(id = R.string.scd_clock_dialog_am), + text = stringResource(Res.string.scd_clock_dialog_am), ) TimeTypeItemComponent( modifier = Modifier.testTags(TestTags.CLOCK_12_HOUR_FORMAT, 1), selected = !isAm, onClick = { onAm.invoke(false) }, - text = stringResource(id = R.string.scd_clock_dialog_pm), + text = stringResource(Res.string.scd_clock_dialog_pm), ) } } diff --git a/clock/src/jsMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.js.kt b/clock/src/jsMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.js.kt new file mode 100644 index 00000000..876edaa6 --- /dev/null +++ b/clock/src/jsMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.js.kt @@ -0,0 +1,8 @@ +package com.maxkeppeler.sheets.clock + +import androidx.compose.runtime.Composable + +@Composable +internal actual fun is24HourFormat(): Boolean { + return true +} \ No newline at end of file diff --git a/clock/src/jsMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.js.kt b/clock/src/jsMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.js.kt new file mode 100644 index 00000000..7a5f3998 --- /dev/null +++ b/clock/src/jsMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.js.kt @@ -0,0 +1,21 @@ +package com.maxkeppeler.sheets.clock.views + +import com.maxkeppeler.sheets.clock.utils.FormatStyle +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format.DateTimeFormat +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern + +@OptIn(FormatStringsInDatetimeFormats::class) +internal actual fun getTimeFormatter(style: FormatStyle): DateTimeFormat { + val pattern = when (style) { + FormatStyle.FULL -> "HH:mm:ss zzz" + FormatStyle.LONG -> "HH:mm:ss" + FormatStyle.MEDIUM -> "H:mm:ss" + FormatStyle.SHORT -> "H:m:s" + } + + return LocalTime.Format { + byUnicodePattern(pattern) + } +} \ No newline at end of file diff --git a/clock/src/jvmMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.jvm.kt b/clock/src/jvmMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.jvm.kt new file mode 100644 index 00000000..876edaa6 --- /dev/null +++ b/clock/src/jvmMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.jvm.kt @@ -0,0 +1,8 @@ +package com.maxkeppeler.sheets.clock + +import androidx.compose.runtime.Composable + +@Composable +internal actual fun is24HourFormat(): Boolean { + return true +} \ No newline at end of file diff --git a/clock/src/jvmMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.jvm.kt b/clock/src/jvmMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.jvm.kt new file mode 100644 index 00000000..0caf435d --- /dev/null +++ b/clock/src/jvmMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.jvm.kt @@ -0,0 +1,31 @@ +package com.maxkeppeler.sheets.clock.views + +import com.maxkeppeler.sheets.clock.utils.FormatStyle +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format.DateTimeFormat +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern +import java.time.chrono.Chronology +import java.time.format.DateTimeFormatterBuilder +import java.util.* + +internal fun FormatStyle.toJava(): java.time.format.FormatStyle { + return when (this) { + FormatStyle.FULL -> java.time.format.FormatStyle.FULL + FormatStyle.LONG -> java.time.format.FormatStyle.LONG + FormatStyle.MEDIUM -> java.time.format.FormatStyle.MEDIUM + FormatStyle.SHORT -> java.time.format.FormatStyle.SHORT + } +} + +@OptIn(FormatStringsInDatetimeFormats::class) +internal actual fun getTimeFormatter(style: FormatStyle): DateTimeFormat { + val locale = Locale.getDefault() + val pattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern( + null, style.toJava(), Chronology.ofLocale(locale), locale + ).toString() + + return LocalTime.Format { + byUnicodePattern(pattern) + } +} \ No newline at end of file diff --git a/clock/src/main/AndroidManifest.xml b/clock/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/clock/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/clock/src/main/res/values-bg/strings.xml b/clock/src/main/res/values-bg/strings.xml deleted file mode 100644 index 54916dbf..00000000 --- a/clock/src/main/res/values-bg/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - м - s - D - AM - ММ - Следваща стойност - Предишна стойност - Трябва да бъде между %1$s и %2$s. - - Часове - Минути - Секунди - \ No newline at end of file diff --git a/clock/src/main/res/values-cs/strings.xml b/clock/src/main/res/values-cs/strings.xml deleted file mode 100644 index b0085c7b..00000000 --- a/clock/src/main/res/values-cs/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Další hodnota - Předchozí hodnota - Musí být mezi %1$s a %2$s - - Hodiny - Minuty - Sekundy - \ No newline at end of file diff --git a/clock/src/main/res/values-da/strings.xml b/clock/src/main/res/values-da/strings.xml deleted file mode 100644 index 453f9a40..00000000 --- a/clock/src/main/res/values-da/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Næste værdi - Tidligere værdi - Skal være mellem %1$s og %2$s - - Timer - Minutter - Sekunder - \ No newline at end of file diff --git a/clock/src/main/res/values-de-rDE/strings.xml b/clock/src/main/res/values-de-rDE/strings.xml deleted file mode 100644 index 15c90ef0..00000000 --- a/clock/src/main/res/values-de-rDE/strings.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - h - m - s - D - AM - PM - Nächster Wert - Letzter Wert - Muss zwischen %1$s und %2$s sein - - Stunden - Minuten - Sekunden - - \ No newline at end of file diff --git a/clock/src/main/res/values-de/strings.xml b/clock/src/main/res/values-de/strings.xml deleted file mode 100644 index 42c27856..00000000 --- a/clock/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Nächster Wert - Vorheriger Wert - Muss zwischen %1$s und %2$s liegen - - Stunden - Minuten - Sekunden - \ No newline at end of file diff --git a/clock/src/main/res/values-el/strings.xml b/clock/src/main/res/values-el/strings.xml deleted file mode 100644 index 38b017f1..00000000 --- a/clock/src/main/res/values-el/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - ΚΥ - Επόμενη τιμή - Προηγούμενη τιμή - Πρέπει να είναι ανάμεσα σε %1$s και %2$s - - Ωρες - Λεπτά - Δευτερόλεπτα - \ No newline at end of file diff --git a/clock/src/main/res/values-eo/strings.xml b/clock/src/main/res/values-eo/strings.xml deleted file mode 100644 index 46094fff..00000000 --- a/clock/src/main/res/values-eo/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Sekva valoro - Antaŭa valoro - Deviĝas inter %1$s kaj %2$s - - Horoj - Minute - Sekundoj - \ No newline at end of file diff --git a/clock/src/main/res/values-es/strings.xml b/clock/src/main/res/values-es/strings.xml deleted file mode 100644 index fd29cfa8..00000000 --- a/clock/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Siguiente valor - Valor anterior - Debe estar entre %1$s y %2$s - - Horas - Minutos. - Segundos - \ No newline at end of file diff --git a/clock/src/main/res/values-et/strings.xml b/clock/src/main/res/values-et/strings.xml deleted file mode 100644 index 4ccf081e..00000000 --- a/clock/src/main/res/values-et/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Järgmine väärtus - Eelmine väärtus - Peab olema vahemikus %1$s ja %2$s - - Tunnid - Minutes - Sekundid - \ No newline at end of file diff --git a/clock/src/main/res/values-fa/strings.xml b/clock/src/main/res/values-fa/strings.xml deleted file mode 100644 index 8fc4d916..00000000 --- a/clock/src/main/res/values-fa/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - نمایندهٔ وزیری - مقدار بعدی - مقدار قبلی - باید بین %1$s و %2$s باشد - - ساعات - دقیقه ها - ثانیه - \ No newline at end of file diff --git a/clock/src/main/res/values-fi/strings.xml b/clock/src/main/res/values-fi/strings.xml deleted file mode 100644 index 03590d1f..00000000 --- a/clock/src/main/res/values-fi/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Seuraava arvo - Edellinen arvo - Pitäisi olla %1$s:n ja %2$s:n välissä - - Tunnit - Pöytäkirja - Sekunnit - \ No newline at end of file diff --git a/clock/src/main/res/values-fr/strings.xml b/clock/src/main/res/values-fr/strings.xml deleted file mode 100644 index d34f9c68..00000000 --- a/clock/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Prochaine valeur - Valeur précédente - Doit être compris entre %1$s et %2$s - - Heures - Minutes - Secondes - \ No newline at end of file diff --git a/clock/src/main/res/values-ga/strings.xml b/clock/src/main/res/values-ga/strings.xml deleted file mode 100644 index cfb07755..00000000 --- a/clock/src/main/res/values-ga/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Luach Ar Aghaidh - Luach roimhe sin - Caithfidh a bheith idir %1$s agus %2$s - - Uaireanta - Nótaí - Soicind - \ No newline at end of file diff --git a/clock/src/main/res/values-gd/strings.xml b/clock/src/main/res/values-gd/strings.xml deleted file mode 100644 index 6550123a..00000000 --- a/clock/src/main/res/values-gd/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - Riaghaltas - Luach air ais - Luach roimhe seo - Cuiridh eadar %1$s agus %2$s - - Uairean - No translation needed, \"Minutes\" will remain unchanged. - Geàrr-ùine - \ No newline at end of file diff --git a/clock/src/main/res/values-hi/strings.xml b/clock/src/main/res/values-hi/strings.xml deleted file mode 100644 index 2138d9f8..00000000 --- a/clock/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - - डी - AM - PM - अगला मान्यता - पिछला मान - %1$s और %2$s के बीच होना चाहिए। - - घंटे - मिनट्स - सेकंड - \ No newline at end of file diff --git a/clock/src/main/res/values-hr/strings.xml b/clock/src/main/res/values-hr/strings.xml deleted file mode 100644 index b5ea65f3..00000000 --- a/clock/src/main/res/values-hr/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Sljedeća vrijednost - Prethodna vrijednost - Mora biti između %1$s i %2$s. - - Sati - Minuta - Sekunde - \ No newline at end of file diff --git a/clock/src/main/res/values-hu/strings.xml b/clock/src/main/res/values-hu/strings.xml deleted file mode 100644 index 02ecc90d..00000000 --- a/clock/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - h - m - s - D - AM - PM - -Miniszterelnök (PM) - Következő érték - Előző érték - A megadott értéknek %1$s és %2$s között kell lennie. - - Órák - Percek - Másodpercek - \ No newline at end of file diff --git a/clock/src/main/res/values-in-rID/strings.xml b/clock/src/main/res/values-in-rID/strings.xml deleted file mode 100644 index 16a326de..00000000 --- a/clock/src/main/res/values-in-rID/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM (Singkatan dari Perdana Menteri) - Nilai berikutnya - Nilai sebelumnya - Harus di antara %1$s dan %2$s - - Jam - Menit - Detik - \ No newline at end of file diff --git a/clock/src/main/res/values-is/strings.xml b/clock/src/main/res/values-is/strings.xml deleted file mode 100644 index 8e32c14b..00000000 --- a/clock/src/main/res/values-is/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Næsti gildi - Fyrri gildi - Verður að vera á milli %1$s og %2$s - - Klukkustundir - Mínútur - Sekúndur - \ No newline at end of file diff --git a/clock/src/main/res/values-it/strings.xml b/clock/src/main/res/values-it/strings.xml deleted file mode 100644 index be7e9cac..00000000 --- a/clock/src/main/res/values-it/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Prossimo valore - Valore precedente - Deve essere compreso tra %1$s e %2$s - - Ore - Minuti - Secondi - \ No newline at end of file diff --git a/clock/src/main/res/values-iw/strings.xml b/clock/src/main/res/values-iw/strings.xml deleted file mode 100644 index baa08561..00000000 --- a/clock/src/main/res/values-iw/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - הערך הבא - הערך הקודם - יש להזין ערך בין %1$s ל-%2$s - - שעות - דקות - שניות - \ No newline at end of file diff --git a/clock/src/main/res/values-ja/strings.xml b/clock/src/main/res/values-ja/strings.xml deleted file mode 100644 index ce6b1f2f..00000000 --- a/clock/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - 次の値 - 前の値 - %1$s と %2$s の間で指定してください - - 営業時間 - Minutes (分) - - \ No newline at end of file diff --git a/clock/src/main/res/values-jv/strings.xml b/clock/src/main/res/values-jv/strings.xml deleted file mode 100644 index 45032794..00000000 --- a/clock/src/main/res/values-jv/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - OK. - OK - Nilai berikutnya - Nilai sebelumnya - Mesthi antara %1$s lan %2$s - - Jam - Menit - Detik - \ No newline at end of file diff --git a/clock/src/main/res/values-kk/strings.xml b/clock/src/main/res/values-kk/strings.xml deleted file mode 100644 index 209efd32..00000000 --- a/clock/src/main/res/values-kk/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - OK - Келесі мән - Алдыңғы құндылық. - %1$s жана %2$s аралыгында болуы тиіс. - - Сағаттар - Минуты - Секунд - \ No newline at end of file diff --git a/clock/src/main/res/values-ko/strings.xml b/clock/src/main/res/values-ko/strings.xml deleted file mode 100644 index c6b0f758..00000000 --- a/clock/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - 다음 값을 - 이전 값 - %1$s와 %2$s 사이여야 합니다. - - 시간 - 분(minutes) - - \ No newline at end of file diff --git a/clock/src/main/res/values-ku/strings.xml b/clock/src/main/res/values-ku/strings.xml deleted file mode 100644 index fc6ae919..00000000 --- a/clock/src/main/res/values-ku/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - ح]]> - m - s - D - ئ ام - PM - بۆ داهاتووری داهێنراوی داهاتووراوە]]> - Hunandina peywendî ya berê - پێویستە لەنێوان %1$s و %2$s بێت - - کاتژمێر - Demjimêr - Saniyeyan - \ No newline at end of file diff --git a/clock/src/main/res/values-lb/strings.xml b/clock/src/main/res/values-lb/strings.xml deleted file mode 100644 index 0e252be7..00000000 --- a/clock/src/main/res/values-lb/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - OK - m - s - OK - AM - PM - Nächste Wäert - Fréier Wäert - Muss tëschten %1$s an %2$s liewen. - - Stonnen - Minutten]]> - Sekonnen - \ No newline at end of file diff --git a/clock/src/main/res/values-lo/strings.xml b/clock/src/main/res/values-lo/strings.xml deleted file mode 100644 index e37a5105..00000000 --- a/clock/src/main/res/values-lo/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - ຫມາຍ - m - s - D - AM - PM - ຈຳນວນຜູ້ນຳເຂົ້າງານອາກອນ - ຄ່າຕໍ່ເນື່ອງດ້ວຍຄ່າຕໍ່ຕໍ່ໄປ - ຄ່າເກັບຂໍ້ມູນທີ່ເກົ່າກ່ຽວຂ້ອງ - ຈຳ​ໄດ້​ບໍ່​ຕ້ອງ​ມີ​ຈຳ​ນວນ​ລະ​ຫວ່າງ​ດ້ວຍ %1$s ແລະ %2$s - - ຊົ່ວໂມງ - ນອກຈາກມັນ - ວິນາທີ - \ No newline at end of file diff --git a/clock/src/main/res/values-lt/strings.xml b/clock/src/main/res/values-lt/strings.xml deleted file mode 100644 index dc58ec62..00000000 --- a/clock/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - OK - s - D - AM - PM - Kitas reikšmė - Ankstesnė vertė - Turi būti tarp %1$s ir %2$s - - Valandos - Protokolas - Sekundės - \ No newline at end of file diff --git a/clock/src/main/res/values-lv/strings.xml b/clock/src/main/res/values-lv/strings.xml deleted file mode 100644 index ad909700..00000000 --- a/clock/src/main/res/values-lv/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - OK. - m - s - OK. - AM - PM - Nākamā vērtība - Iepriekšējā vērtība - Jābūt starp %1$s un %2$s - - Stundas - Minūtes - Sekundes - \ No newline at end of file diff --git a/clock/src/main/res/values-ms/strings.xml b/clock/src/main/res/values-ms/strings.xml deleted file mode 100644 index d8eab7d4..00000000 --- a/clock/src/main/res/values-ms/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Nilai seterusnya - Nilai terdahulu - Mesti antara %1$s dan %2$s - - Jam - Minit - Saat - \ No newline at end of file diff --git a/clock/src/main/res/values-ne/strings.xml b/clock/src/main/res/values-ne/strings.xml deleted file mode 100644 index 6a8e6fe4..00000000 --- a/clock/src/main/res/values-ne/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - m - - D - सकेसम्म - प्रधानमन्त्री - अर्को मान् - पहिले थियोे मान - %1$s र %2$s को बीचमा हुनुपर्छ। - - घण्टा - मिनेटहरू - सेकेन्ड - \ No newline at end of file diff --git a/clock/src/main/res/values-nl/strings.xml b/clock/src/main/res/values-nl/strings.xml deleted file mode 100644 index d84cc48d..00000000 --- a/clock/src/main/res/values-nl/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Volgende waarde - Vorige waarde - Moet tussen %1$s en %2$s zijn - - Uren - Notulen - Seconden - \ No newline at end of file diff --git a/clock/src/main/res/values-no/strings.xml b/clock/src/main/res/values-no/strings.xml deleted file mode 100644 index e53463fc..00000000 --- a/clock/src/main/res/values-no/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - OK - OK - s - D - OK - PM - Neste verdi - Tidligere verdi - Må være mellom %1$s og %2$s. - - Timer - Minutter - Sekunder - \ No newline at end of file diff --git a/clock/src/main/res/values-pl/strings.xml b/clock/src/main/res/values-pl/strings.xml deleted file mode 100644 index 0260707a..00000000 --- a/clock/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Następna wartość - Poprzednia wartość - Musisz podać wartość pomiędzy %1$s a %2$s. - - Godziny - Minuty - Sekundy - \ No newline at end of file diff --git a/clock/src/main/res/values-pt/strings.xml b/clock/src/main/res/values-pt/strings.xml deleted file mode 100644 index 269fa2ae..00000000 --- a/clock/src/main/res/values-pt/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Próximo valor - Valor anterior - Deve estar entre %1$s e %2$s - - Horas - Minutos - Segundos - \ No newline at end of file diff --git a/clock/src/main/res/values-ru/strings.xml b/clock/src/main/res/values-ru/strings.xml deleted file mode 100644 index 227e813d..00000000 --- a/clock/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - т - m - OK - D - AM - PM - Следующее значение - Предыдущее значение - Должно быть между %1$s и %2$s - - Часы - Минуты - Секунды - \ No newline at end of file diff --git a/clock/src/main/res/values-sk/strings.xml b/clock/src/main/res/values-sk/strings.xml deleted file mode 100644 index 2e82f14d..00000000 --- a/clock/src/main/res/values-sk/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - OK - D - AM - PM - Ďalšia hodnota - Predchádzajúca hodnota - Musí byť medzi %1$s a %2$s - - Hodiny - Minúty - Sekundy - \ No newline at end of file diff --git a/clock/src/main/res/values-sl/strings.xml b/clock/src/main/res/values-sl/strings.xml deleted file mode 100644 index 4b9d42e1..00000000 --- a/clock/src/main/res/values-sl/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - OK - Naslednja vrednost - Prejšnja vrednost - Mora biti med %1$s in %2$s - - Ure - Minute - Sekunde - \ No newline at end of file diff --git a/clock/src/main/res/values-sr/strings.xml b/clock/src/main/res/values-sr/strings.xml deleted file mode 100644 index 29999ba8..00000000 --- a/clock/src/main/res/values-sr/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - OK. - m - OK - D - AM - PM - Sledeća vrednost - Prethodna vrednost - Mora biti između %1$s i %2$s. - - Satnici - Minuti - Sekunde - \ No newline at end of file diff --git a/clock/src/main/res/values-sv/strings.xml b/clock/src/main/res/values-sv/strings.xml deleted file mode 100644 index 4f9b788b..00000000 --- a/clock/src/main/res/values-sv/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Nästa värde - Tidigare värde - Måste vara mellan %1$s och %2$s. - - Timmar - Minuter - Sekunder - \ No newline at end of file diff --git a/clock/src/main/res/values-th/strings.xml b/clock/src/main/res/values-th/strings.xml deleted file mode 100644 index b56ee687..00000000 --- a/clock/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - นายกรัฐมนตรีท่านสำคัญ - ค่าถัดไป - ค่าก่อนหน้า - ต้องอยู่ระหว่าง %1$s และ %2$s - - รายชั่วโมง - นาที - วินาที - \ No newline at end of file diff --git a/clock/src/main/res/values-tr/strings.xml b/clock/src/main/res/values-tr/strings.xml deleted file mode 100644 index 38374398..00000000 --- a/clock/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - metin - s (OK) - Metni çevirmek için yeterli bir bağlam sağlanmadığından dolayı, size yardımcı olabilmem için daha fazla bilgiye ihtiyacım var. Lütfen tam bir cümle veya metin sağlayın. - AM - PM - Sonraki değer - Önceki değer - %1$s ile %2$s arasında olmalıdır. - - Saatler - Dakikalar - Saniyeler - \ No newline at end of file diff --git a/clock/src/main/res/values-uk/strings.xml b/clock/src/main/res/values-uk/strings.xml deleted file mode 100644 index 818182e2..00000000 --- a/clock/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - м - s - D - AM - Pm - Наступне значення - Попереднє значення - Має бути від %1$s до %2$s - - Години - Мінути - Секунди - \ No newline at end of file diff --git a/clock/src/main/res/values-vi/strings.xml b/clock/src/main/res/values-vi/strings.xml deleted file mode 100644 index 8e81dbbe..00000000 --- a/clock/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - AM - PM - Giá trị kế tiếp - Giá trị trước đó - Phải nằm trong khoảng từ %1$s đến %2$s - - Giờ - Phút - Giây - \ No newline at end of file diff --git a/clock/src/main/res/values-zh-rCN/strings.xml b/clock/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index c0094da9..00000000 --- a/clock/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - 上午 - PM - 下一个值 - 原值 - 必须在%1$s和%2$s之间 - - 小时 - 分钟 - - \ No newline at end of file diff --git a/clock/src/main/res/values-zh-rTW/strings.xml b/clock/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index 0199c072..00000000 --- a/clock/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - h - m - s - D - 下午 - 晚上 - 下一個數值 - 先前值 - 必須在 %1$s 和 %2$s 之間 - - 小時 - 會議紀錄 - - \ No newline at end of file diff --git a/clock/src/main/res/values/strings.xml b/clock/src/main/res/values/strings.xml deleted file mode 100644 index b7027f6e..00000000 --- a/clock/src/main/res/values/strings.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - h - m - s - D - AM - PM - Next value - Previous value - Must be between %1$s and %2$s - - Hours - Minutes - Seconds - \ No newline at end of file diff --git a/clock/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.wasmJs.kt b/clock/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.wasmJs.kt new file mode 100644 index 00000000..876edaa6 --- /dev/null +++ b/clock/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/clock/ClockState.wasmJs.kt @@ -0,0 +1,8 @@ +package com.maxkeppeler.sheets.clock + +import androidx.compose.runtime.Composable + +@Composable +internal actual fun is24HourFormat(): Boolean { + return true +} \ No newline at end of file diff --git a/clock/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.wasmJs.kt b/clock/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.wasmJs.kt new file mode 100644 index 00000000..7a5f3998 --- /dev/null +++ b/clock/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/clock/views/TimeHintComponent.wasmJs.kt @@ -0,0 +1,21 @@ +package com.maxkeppeler.sheets.clock.views + +import com.maxkeppeler.sheets.clock.utils.FormatStyle +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format.DateTimeFormat +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern + +@OptIn(FormatStringsInDatetimeFormats::class) +internal actual fun getTimeFormatter(style: FormatStyle): DateTimeFormat { + val pattern = when (style) { + FormatStyle.FULL -> "HH:mm:ss zzz" + FormatStyle.LONG -> "HH:mm:ss" + FormatStyle.MEDIUM -> "H:mm:ss" + FormatStyle.SHORT -> "H:m:s" + } + + return LocalTime.Format { + byUnicodePattern(pattern) + } +} \ No newline at end of file diff --git a/color/build.gradle.kts b/color/build.gradle.kts index 772b9aa2..0c828378 100644 --- a/color/build.gradle.kts +++ b/color/build.gradle.kts @@ -1,27 +1,68 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.COLOR.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.COLOR.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/color/src/commonMain/composeResources/drawable/scd_color_dialog_transparent_pattern.svg b/color/src/commonMain/composeResources/drawable/scd_color_dialog_transparent_pattern.svg new file mode 100644 index 00000000..9b2d2ed8 --- /dev/null +++ b/color/src/commonMain/composeResources/drawable/scd_color_dialog_transparent_pattern.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-bg/strings.xml b/color/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..ea8138eb --- /dev/null +++ b/color/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Червен + Зелен + Синьо + ARGB + Цвят + Шаблонни цветове + Персонализиран цвят + Няма цвят. + Копирай цвят + Поставяне на цвят + Поставете валиден aRGB код. + Няма какво да поставям + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-cs/strings.xml b/color/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..cc0243c3 --- /dev/null +++ b/color/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Červená + Zelená + Modrá + ARGB + Barva + Barvy šablony + Vlastní barva + Žádná barva + Kopírovat barvu + Vložit barvu + Vložte platný kód pro aRGB. + Není co vložit + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-da/strings.xml b/color/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..7b154bb9 --- /dev/null +++ b/color/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rød + Grøn + Blå + ARGB + Farve + Skabelonfarver + Tilpasset farve + Ingen farve + Kopier farve + Indsæt farve + Indsæt en gyldig aRGB-kode. + Intet at indsætte + + \ No newline at end of file diff --git a/color/src/main/res/values-de-rDE/strings.xml b/color/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 95% rename from color/src/main/res/values-de-rDE/strings.xml rename to color/src/commonMain/composeResources/values-de-rDE/strings.xml index b4a975af..22434210 100644 --- a/color/src/main/res/values-de-rDE/strings.xml +++ b/color/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -1,4 +1,3 @@ - Alpha Red diff --git a/color/src/commonMain/composeResources/values-de/strings.xml b/color/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..2c599546 --- /dev/null +++ b/color/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rot + Grün + Blau + ARGB + Farbe + Vorlage Farben + Benutzerdefinierte Farbe + Keine Farbe + Farbe kopieren + Paste Farbe + Gültigen aRGB-Code einfügen. + Nichts einzufügen + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-el/strings.xml b/color/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..71a543eb --- /dev/null +++ b/color/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,17 @@ + + + Άλφα + Κόκκινο + Πράσινο + Μπλε + ARGB + Χρώμα + Χρώματα προτύπου + Προσαρμοσμένος χρωματισμός + Κανένα χρώμα + Αντιγραφή χρώματος + Επικόλληση χρώματος + Επικολλήστε έναν έγκυρο κωδικό aRGB. + Τίποτα να επικολληθεί + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-eo/strings.xml b/color/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..4f950fe0 --- /dev/null +++ b/color/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Ruĝa + Verda + Blua + ARGB + Koloro + Ŝablona koloroj + Propra koloro + Neniu koloro. + Kopii koloron + Englue ruĝo + Algluu ĝustan aRGB-kodon. + Nenio por alglui + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-es/strings.xml b/color/src/commonMain/composeResources/values-es/strings.xml new file mode 100644 index 00000000..c97b18ae --- /dev/null +++ b/color/src/commonMain/composeResources/values-es/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rojo. + Verde + Azul + ARGB + Color + Colores de la plantilla + Color personalizado + Sin color + Copiar color + Pegar color + Pegar código aRGB válido. + Nada que pegar + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-et/strings.xml b/color/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..3fdddf56 --- /dev/null +++ b/color/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Punane + Roheline + Sinine + ARGB + Värv + Mallis värvid + Erisära + Värv puudub + Kopeeri värv + Värvi kopeerimine + Kleebi kehtiv aRGB-kood. + Midagi kleepida + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-fa/strings.xml b/color/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..fb175051 --- /dev/null +++ b/color/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,18 @@ + + + آلفا + قرمز + سبز + آبی + پارسی + رنگ + رنگ‌های قالب + رنگ سفارشی + هیچ رنگی + رونگ را کپی کنید. + Paste color +رنگ را الصاق کنید + کد aRGB معتبر را الصاق کنید. + چیزی برای جایگزینی وجود ندارد + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-fi/strings.xml b/color/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..b2f12851 --- /dev/null +++ b/color/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Punainen + Vihreä + Sininen + ARGB + Väri + Mallin värit + Kustomoitu väri + Ei väriä + Kopioi väri + Väri liitä + Liitä kelvollinen aRGB-koodi. + Ei mitään liitettävää + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-fr/strings.xml b/color/src/commonMain/composeResources/values-fr/strings.xml new file mode 100644 index 00000000..c5844078 --- /dev/null +++ b/color/src/commonMain/composeResources/values-fr/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rouge + Vert + Bleu + ARGB + Couleur + Couleurs du modèle + Couleur personnalisée + Aucune couleur + Couleur de copie + Couleur collée + Copiez le code aRGB valide. + Rien à coller. + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ga/strings.xml b/color/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..0d5a62b9 --- /dev/null +++ b/color/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Dearg. + Glás + Gorm + ARGB + Dath + Dathanna na gcló-dhuilleoga + Dath arna athrú.Cosúil le ceannacht. + Gan dath + Dath a chóipeáil + Dath greamaigh. + Greamaigh cód aRGB bailí. + Níl aon rud le péiste + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-gd/strings.xml b/color/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..11da3aab --- /dev/null +++ b/color/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Deargh + Glas + Gorm + ARGB + Dath + Dathanna Sgìreadh + Dath a chriathar + Gun dath + Dathan a cheàrradh + Glas a thaghadh + Cuir a-steach còd aRGB-ùr. + Chan eil dad ri phàsadh. + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-hi/strings.xml b/color/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..7c144545 --- /dev/null +++ b/color/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,17 @@ + + + अल्फा + लाल + हरा + नीला + एआरजीबी + रंग + टेम्पलेट रंगों + कस्टम रंग + कोई रंग नहीं + वर्ण की कॉपी + रंग चिपकाएँ + वैध aRGB-कोड पेस्ट करें। + कुछ पेस्ट करने के लिए नहीं + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-hr/strings.xml b/color/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..9e8b201a --- /dev/null +++ b/color/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,17 @@ + + + Alfa + Crvena + Zelena + Plavo + ARGB + Boja + Boje predloška + Prilagođena boja + Nema boje. + Kopiraj boju + Boja zalijepi + Zalijepite valjani aRGB kod. + Ništa za zalijepiti + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-hu/strings.xml b/color/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..1489c5c4 --- /dev/null +++ b/color/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Piros + Zöld + Kék + ARGB + Szín + Sablon színek + Egyéni szín + Nem szín + Szín másolása + Szín beillesztése + Illessze be a helyes aRGB-kódot. + Nincs mit beilleszteni. + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-in-rID/strings.xml b/color/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..0fe68976 --- /dev/null +++ b/color/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Merah + Hijau + Biru + ARGB + Warna + Warna Templat + Warna kustom + Tidak berwarna + Salin warna + Warna tempel + Tempelkan kode aRGB yang valid. + Tidak ada yang bisa ditempelkan + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-is/strings.xml b/color/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..a1318166 --- /dev/null +++ b/color/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rauður + Grænt + Blár + ARGB + Litur + Skjáhnappalitur + Sérsniðinn litur + Engin litur. + Litur afrit + Líma litur + Límið inn gilt aRGB-kóða. + Engin eitthvað til að líma inn + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-it/strings.xml b/color/src/commonMain/composeResources/values-it/strings.xml new file mode 100644 index 00000000..f9d546aa --- /dev/null +++ b/color/src/commonMain/composeResources/values-it/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rosso + Verde + Blu + ARGB + Colore + Colori del modello + Colore personalizzato + Nessun colore + Copia colore + Colore incolla + Incolla un codice aRGB valido. + Niente da incollare + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-iw/strings.xml b/color/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..5cd5dd2e --- /dev/null +++ b/color/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,17 @@ + + + אלפא + אדום + ירוק + כחול + ARGB + צבע + צבעי התבנית + צבע מותאם + אין צבע + העתק צבע + הדבק צבע + הדבק קוד aRGB תקין. + אין דבר להדביק + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ja/strings.xml b/color/src/commonMain/composeResources/values-ja/strings.xml new file mode 100644 index 00000000..a58d6f90 --- /dev/null +++ b/color/src/commonMain/composeResources/values-ja/strings.xml @@ -0,0 +1,17 @@ + + + アルファ + + + + ARGB + カラー + テンプレートの色 + カスタムカラー + カラーなし + テキストを翻訳する:色のコピー + カラーを貼り付ける + 有効なaRGBコードを貼り付けてください。 + 貼り付けるものはありません。 + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-jv/strings.xml b/color/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..e8ac08e9 --- /dev/null +++ b/color/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Merah + Hijau + Biru + ARGB + Warna + Warna-warna template + Warna kustom + Ora warna. + Salin warna + Warna nopasto + Tempelkeun Kode aRGB nu sah. + Ora ana sing bisa dipastèkaké + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-kk/strings.xml b/color/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..44404883 --- /dev/null +++ b/color/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,17 @@ + + + Альфа + Қызыл + Жасыл + Көк + ARGB + Реңк + Көрнекті бойынша түстер + Жеке түс + Өрнекті түссіз + Көшірме реңк + Түс тапсырыныз + Қате арғыб шифрін жайып қойыңыз. + Жабыстар жоқ + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ko/strings.xml b/color/src/commonMain/composeResources/values-ko/strings.xml new file mode 100644 index 00000000..cfbaa7cb --- /dev/null +++ b/color/src/commonMain/composeResources/values-ko/strings.xml @@ -0,0 +1,17 @@ + + + 알파 + 빨간색 + 초록색 + 파란색 + ARGB + 색깔 + 템플릿 색상 + 사용자 설정 색상 + 색 없음 + 색 복사 + 붙여넣기 색상 + 유효한 aRGB 코드를 붙여넣어주세요. + 붙일 것이 없습니다. + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ku/strings.xml b/color/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..442313dc --- /dev/null +++ b/color/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Sor + Sor + Şînêqêşîn + ARGB + Reng + رەنگی ڕووکار + ڕەنگی تایبەتین + هاوڕێیەکی ناوەنگاری. + ڕەنگ بنەڕەت بکەن. + ڕەنگ بکەوە + Codeyek aRGB-ek derbasdar peyveki binivîse. + چیزێک بۆ لکاندن نییە + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-lb/strings.xml b/color/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..f0a43023 --- /dev/null +++ b/color/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rout + Gréng + Blau + ARGB + Farw + Template Farwen + Eegen Faarf + Keng Faarf + Kopéier Farf + Past Dirwéng + Validen aRGB-Codeen aginn. + Näischt ze elegantéieren. + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-lo/strings.xml b/color/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..52aba23b --- /dev/null +++ b/color/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + ສີເດດ + ສີຂຽວ + ປານີ້ + ARGB + ສີ + ສີຊອງທາງຂອງຕົວຢ່າງ + ສີພື້ນທີ່ກຳນົດເພື່ອຕັ້ງຄ່າໂດຍອັງກິດ + ບໍ່ມີສີ + ຍອມຮັບສີ + ນຳບາງສີ + ອອກ aRGB-Code ທີ່ຖືກຕັ້ງຕໍ່ໄປໃນຖານຂໍ້ມູນແມ່ນ OK. + ບໍ່ມີຫຍັງເລີ່ມເຮັດໄດ້ + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-lt/strings.xml b/color/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..e6487925 --- /dev/null +++ b/color/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,17 @@ + + + Alfa + Raudona + Žalia + Mėlyna + ARGB + Spalva + Šablonų spalvos + Pasirinktinė spalva + Joks spalvos + Kopijuoti spalvą. + Įklijuoti spalvą + Įklijuokite galiojantį aRGB kodą. + Nieko neįklijuoti + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-lv/strings.xml b/color/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..f722d8a2 --- /dev/null +++ b/color/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,17 @@ + + + Alfa. + Sarkanā + Zaļš + Zils + ARGB + Krāsa + Veidnes krāsas + Pielāgota krāsa + Bez krāsas + Kopēt krāsu + Ielīmēt krāsu + Ielīmējiet derīgu aRGB kodu. + Nav ko ielīmēt + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ms/strings.xml b/color/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..7526f2bf --- /dev/null +++ b/color/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Merah + Hijau + Biru + ARGB + Warna + Warna-warna template + Warna tersuai + Tiada warna. + Salin warna + Warna tampal + Tampal Kod aRGB yang sah. + Tiada yang boleh diletakkan + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ne/strings.xml b/color/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..69186dbc --- /dev/null +++ b/color/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + रातो + हरियो + नीलो + ARGB + रङ्ग + तालिका रंगहरू + रोचक रङ निर्माण + रङ पर्दैन + रंग प्रतिलिपि + रंग चिपाउनुहोस् + वैध aRGB-कोड पेस्ट गर्नुहोस्। + कुनै कुरा पेष्ट गर्ने कुरा छैन। + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-nl/strings.xml b/color/src/commonMain/composeResources/values-nl/strings.xml new file mode 100644 index 00000000..58b8e760 --- /dev/null +++ b/color/src/commonMain/composeResources/values-nl/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rood + Groen + Blauw + ARGB + Kleur + Template kleuren + Aangepaste kleur + Geen kleur + Kopieer kleur + Plak kleur + Plak een geldige aRGB-code. + Niets om te plakken + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-no/strings.xml b/color/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..2914754c --- /dev/null +++ b/color/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rød + Grønn + Blå + ARGB + Farge + Mal farger + Egendefinert farge + Ingen farge + Kopier farge + Lim inn farge + Lim inn gyldig aRGB-kode. + Ingenting å lime inn + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-pl/strings.xml b/color/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..7e59290b --- /dev/null +++ b/color/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Czerwony + Zielony + Niebieski. + ARGB + Kolor + Kolory szablonu + Kolor niestandardowy + Brak koloru + Kopiuj kolor + Kolor wklej + Wklej poprawny kod aRGB. + Nic do wklejenia + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-pt/strings.xml b/color/src/commonMain/composeResources/values-pt/strings.xml new file mode 100644 index 00000000..fa0e630c --- /dev/null +++ b/color/src/commonMain/composeResources/values-pt/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Vermelho + Verde + Azul + ARGB + Cor + Cores do modelo + Cor personalizada + Sem cor. + Copiar cor + Cor da pasta + Cole um código aRGB válido. + Nada para colar + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-ru/strings.xml b/color/src/commonMain/composeResources/values-ru/strings.xml new file mode 100644 index 00000000..8002b9fd --- /dev/null +++ b/color/src/commonMain/composeResources/values-ru/strings.xml @@ -0,0 +1,17 @@ + + + Альфа + Красный + Зеленый + Синий + ARGB + Цвет + Цвета шаблона. + Custom color (Пользовательский цвет) + Без цвета + Копировать цвет + Цвет вставки + Вставьте действительный aRGB-код. + Нет текста для вставки + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-sk/strings.xml b/color/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..5f13a778 --- /dev/null +++ b/color/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Červená + Zelená + Modrý + ARGB + Farba + Farby šablóny + Vlastná farba + Bez farby + Skopírovať farbu + Vložiť farbu + Vložte platný aRGB kód. + Nič na vloženie + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-sl/strings.xml b/color/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..9c83555b --- /dev/null +++ b/color/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Rdeča + Zelena + Modra + ARGB + Barva + Barve predloge + Prilagojena barva + Brez barve + Kopiraj barvo + Barva vstavi + Prilepite veljaven aRGB-kodo. + Nič za prilepiti + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-sr/strings.xml b/color/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..528b1ed5 --- /dev/null +++ b/color/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,17 @@ + + + Alfa + Crvena + Zelena + Plavo. + ARGB + Boja + Boje predloška + Prilagođena boja + Bez boje + Kopiraj boju + Boja nalepljena + Nalepite validan aRGB kod. + Ništa za nalepiti + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-sv/strings.xml b/color/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..641b9256 --- /dev/null +++ b/color/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Röd + Grön + Blå + ARGB + Färg + Färger på mallen + Anpassad färg + Ingen färg + Kopiera färg + Klistra in färg + Klistra in giltig aRGB-kod. + Inget att klistra in + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-th/strings.xml b/color/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..2622112e --- /dev/null +++ b/color/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,18 @@ + + + Alpha + สีแดง + เขียว + สีน้ำเงิน + ARGB + สี + สีของเทมเพลต + สีที่กำหนดเอง + ไม่มีสี + สำเนาสี + Paste color +วางสี + วางรหัส aRGB ที่ถูกต้อง + ไม่มีอะไรที่จะวาง + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-tr/strings.xml b/color/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..03a84bcb --- /dev/null +++ b/color/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Kırmızı + Yeşil + Mavi + ARGB + Renk + Şablon renkleri + Özel renk + Renksiz + Renk kopyala + Renk yapıştır + Geçerli bir aRGB Kodu yapıştırın. + Yapıştırılacak bir şey yok. + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-uk/strings.xml b/color/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..98bba0b5 --- /dev/null +++ b/color/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,17 @@ + + + Альфа + Червоний + Зелений + Синій + ARGB + Колір + Кольори шаблону + Спеціальний колір + Без кольору + Копіювати колір + Вставити колір + Вставте дійсний aRGB-код. + Нічого немає для вставки + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-vi/strings.xml b/color/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..8fa994b8 --- /dev/null +++ b/color/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Đỏ + Màu xanh + Màu xanh + ARGB + Màu sắc + Màu sắc mẫu (OK) + Tùy chỉnh màu sắc + Không màu sắc. + Sao chép màu sắc + Màu dán + Dán mã aRGB hợp lệ. + Không có gì để dán + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-zh-rCN/strings.xml b/color/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..f7a71279 --- /dev/null +++ b/color/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + 红色 + 绿色 + 蓝色 + ARGB + 颜色 + 模板颜色 + 自定义颜色 + 没有颜色 + 复制颜色 + 粘贴颜色 + 请粘贴有效的aRGB代码。 + 无可粘贴 + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values-zh-rTW/strings.xml b/color/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..77683b0f --- /dev/null +++ b/color/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + 紅色 + 綠色 + 藍色 + ARGB + 顏色 + 模板顏色 + 自訂顏色 + 無色 + 複製顏色 + 貼上顏色 + 請貼上有效的aRGB代碼。 + 無內容可貼上 + + \ No newline at end of file diff --git a/color/src/commonMain/composeResources/values/strings.xml b/color/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..851f202f --- /dev/null +++ b/color/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,17 @@ + + + Alpha + Red + Green + Blue + ARGB + Color + Template colors + Custom color + No color + Copy color + Paste color + Paste valid aRGB-Code. + Nothing to paste + + diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/ColorDialog.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorDialog.kt similarity index 100% rename from color/src/main/java/com/maxkeppeler/sheets/color/ColorDialog.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorDialog.kt diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/ColorPopup.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorPopup.kt similarity index 100% rename from color/src/main/java/com/maxkeppeler/sheets/color/ColorPopup.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorPopup.kt diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/ColorState.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorState.kt similarity index 89% rename from color/src/main/java/com/maxkeppeler/sheets/color/ColorState.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorState.kt index f921c9e9..0d196da3 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/ColorState.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorState.kt @@ -15,18 +15,18 @@ */ package com.maxkeppeler.sheets.color -import android.content.Context import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import com.maxkeppeker.sheets.core.utils.JvmSerializable import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.color.models.ColorConfig import com.maxkeppeler.sheets.color.models.ColorSelection import com.maxkeppeler.sheets.color.models.ColorSelectionMode -import java.io.Serializable +import kotlinx.serialization.Serializable /** * Handles the color state. @@ -36,7 +36,6 @@ import java.io.Serializable * @param stateData The data of the state when the state is required to be restored. */ internal class ColorState( - private val context: Context, val selection: ColorSelection, val config: ColorConfig = ColorConfig(), stateData: ColorStateData? = null, @@ -48,10 +47,10 @@ internal class ColorState( var valid by mutableStateOf(isValid()) private fun getInitColor(): Int? = - selection.selectedColor?.colorInInt(context) + selection.selectedColor?.colorInInt() private fun getInitColors(): List = - config.templateColors.getColorsAsInt(context) + config.templateColors.getColorsAsInt() private fun getInitDisplayMode(): ColorSelectionMode = config.defaultDisplayMode.takeUnless { @@ -86,12 +85,11 @@ internal class ColorState( * @param config The general configuration for the dialog view. */ fun Saver( - context: Context, selection: ColorSelection, config: ColorConfig ): Saver = Saver( save = { state -> ColorStateData(state.color, state.displayMode) }, - restore = { data -> ColorState(context, selection, config, data) } + restore = { data -> ColorState(selection, config, data) } ) } @@ -99,10 +97,11 @@ internal class ColorState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class ColorStateData( val color: Int?, val displayMode: ColorSelectionMode - ) : Serializable + ) : JvmSerializable } /** @@ -113,11 +112,10 @@ internal class ColorState( */ @Composable internal fun rememberColorState( - context: Context, selection: ColorSelection, config: ColorConfig, ): ColorState = rememberSaveable( inputs = arrayOf(selection, config), - saver = ColorState.Saver(context, selection, config), - init = { ColorState(context, selection, config) } + saver = ColorState.Saver(selection, config), + init = { ColorState(selection, config) } ) \ No newline at end of file diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/ColorView.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorView.kt similarity index 96% rename from color/src/main/java/com/maxkeppeler/sheets/color/ColorView.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorView.kt index 322d6cd5..5b404721 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/ColorView.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/ColorView.kt @@ -22,7 +22,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.platform.LocalContext import com.maxkeppeker.sheets.core.models.base.* import com.maxkeppeker.sheets.core.views.ButtonsComponent import com.maxkeppeker.sheets.core.views.base.FrameBase @@ -48,8 +47,7 @@ fun ColorView( config: ColorConfig = ColorConfig(), header: Header? = null, ) { - val context = LocalContext.current - val colorState = rememberColorState(context, selection, config) + val colorState = rememberColorState(selection, config) StateHandler(useCaseState, colorState) val coroutine = rememberCoroutineScope() diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/models/ColorConfig.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorConfig.kt similarity index 97% rename from color/src/main/java/com/maxkeppeler/sheets/color/models/ColorConfig.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorConfig.kt index e950319f..0dac9420 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/models/ColorConfig.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorConfig.kt @@ -15,6 +15,7 @@ */ package com.maxkeppeler.sheets.color.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.BaseConfigs import com.maxkeppeker.sheets.core.utils.BaseConstants.DEFAULT_ICON_STYLE diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/models/ColorSelection.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorSelection.kt similarity index 98% rename from color/src/main/java/com/maxkeppeler/sheets/color/models/ColorSelection.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorSelection.kt index b48393e6..0bf0c814 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/models/ColorSelection.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorSelection.kt @@ -17,6 +17,7 @@ package com.maxkeppeler.sheets.color.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/models/ColorSelectionMode.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorSelectionMode.kt similarity index 90% rename from color/src/main/java/com/maxkeppeler/sheets/color/models/ColorSelectionMode.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorSelectionMode.kt index 4712b108..efdc70f7 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/models/ColorSelectionMode.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/ColorSelectionMode.kt @@ -15,9 +15,13 @@ */ package com.maxkeppeler.sheets.color.models +import androidx.compose.runtime.Stable +import kotlinx.serialization.Serializable + /** * Defined display modes for the calendar. */ +@Serializable enum class ColorSelectionMode { /** diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/models/MultipleColors.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/MultipleColors.kt similarity index 65% rename from color/src/main/java/com/maxkeppeler/sheets/color/models/MultipleColors.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/MultipleColors.kt index f65d78a6..48c9951f 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/models/MultipleColors.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/MultipleColors.kt @@ -17,11 +17,8 @@ package com.maxkeppeler.sheets.color.models -import android.content.Context -import android.graphics.Color -import androidx.annotation.ColorInt -import androidx.annotation.ColorRes -import androidx.core.content.ContextCompat +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb /** * Holds various colors of a specific type. @@ -30,29 +27,10 @@ import androidx.core.content.ContextCompat * @param colorsHex color as String value, #RRGGBB or #AARRGGBB. */ sealed class MultipleColors( - @ColorInt private var colorsInt: Array? = null, - @ColorRes private var colorsRes: Array? = null, + private var colorsInt: Array? = null, private var colorsHex: Array? = null, ) { - /** - * Define a variety of color integers. - */ - class ColorsRes : MultipleColors { - - /** - * Define dynamic amount of colors. - * @param colors The color integers - */ - constructor(@ColorRes vararg colors: Int) : super(colorsRes = colors.toTypedArray()) - - /** - * Define a list of colors. - * @param colors The color integers - */ - constructor(@ColorRes colors: List) : super(colorsRes = colors.toTypedArray()) - } - /** * Define a variety of color resource references. */ @@ -62,13 +40,13 @@ sealed class MultipleColors( * Define dynamic amount of colors. * @param colors The color resource references */ - constructor(@ColorInt vararg colors: Int) : super(colorsInt = colors.toTypedArray()) + constructor(vararg colors: Int) : super(colorsInt = colors.toTypedArray()) /** * Define an array of colors. * @param colors The color resource references */ - constructor(@ColorInt colors: List) : super(colorsInt = colors.toTypedArray()) + constructor(colors: List) : super(colorsInt = colors.toTypedArray()) } /** @@ -93,10 +71,12 @@ sealed class MultipleColors( * Resolve the defined colors as color integers. * @param context the Context to resolve the colors. */ - fun getColorsAsInt(context: Context): List { + @OptIn(ExperimentalStdlibApi::class) + fun getColorsAsInt(): List { return colorsInt?.toList() - ?: colorsRes?.map { ContextCompat.getColor(context, it) } - ?: colorsHex?.map { Color.parseColor(it) } + ?: colorsHex?.map { + Color(it.substringAfter('#').hexToLong()).toArgb() + } ?: throw IllegalStateException("No colors available for color templates view. Either disabled template view or add colors.") } } diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/models/SingleColor.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/SingleColor.kt similarity index 68% rename from color/src/main/java/com/maxkeppeler/sheets/color/models/SingleColor.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/SingleColor.kt index f9b4cbcf..3c501d39 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/models/SingleColor.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/models/SingleColor.kt @@ -15,11 +15,10 @@ */ package com.maxkeppeler.sheets.color.models -import android.content.Context -import android.graphics.Color -import androidx.annotation.ColorInt -import androidx.annotation.ColorRes -import androidx.core.content.ContextCompat +import androidx.compose.runtime.Stable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb + /** * Helper class to simplify passing colors. @@ -28,11 +27,12 @@ import androidx.core.content.ContextCompat * @param colorHex Color value as Hex-String. */ data class SingleColor( - @ColorInt val colorInt: Int? = null, - @ColorRes val colorRes: Int? = null, + val colorInt: Int? = null, val colorHex: String? = null, ) { - fun colorInInt(context: Context): Int? = colorInt - ?: colorRes?.let { ContextCompat.getColor(context, it) } - ?: colorHex?.let { Color.parseColor(it) } + @OptIn(ExperimentalStdlibApi::class) + fun colorInInt(): Int? = colorInt + ?: colorHex?.let { + Color(it.substringAfter('#').hexToLong()).toArgb() + } } diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/utils/Constants.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/utils/Constants.kt similarity index 100% rename from color/src/main/java/com/maxkeppeler/sheets/color/utils/Constants.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/utils/Constants.kt diff --git a/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/utils/Utils.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/utils/Utils.kt new file mode 100644 index 00000000..9d3cf41e --- /dev/null +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/utils/Utils.kt @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.maxkeppeler.sheets.color.utils + +/** Receive the clipboard data. */ +@OptIn(ExperimentalStdlibApi::class) +internal fun getFormattedColor(color: Int): String { + return "#" + (0xFFFFFFFF and color.toLong()).toHexString() +} diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomComponent.kt similarity index 100% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomComponent.kt diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomControlComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomControlComponent.kt similarity index 70% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomControlComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomControlComponent.kt index 8b7efb7d..42c8e661 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomControlComponent.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomControlComponent.kt @@ -21,20 +21,19 @@ import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import androidx.core.graphics.alpha -import androidx.core.graphics.blue -import androidx.core.graphics.green -import androidx.core.graphics.red import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testSequenceTagOf import com.maxkeppeker.sheets.core.views.Grid -import com.maxkeppeler.sheets.color.R import com.maxkeppeler.sheets.color.models.ColorConfig -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.color.generated.resources.* +import sheets_compose_dialogs.color.generated.resources.Res +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_alpha +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_blue +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_green /** * The control component to build up a custom color. @@ -42,6 +41,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param color The color that is currently selected. * @param onColorChange The listener that returns a selected color. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun ColorCustomControlComponent( config: ColorConfig, @@ -50,13 +50,18 @@ internal fun ColorCustomControlComponent( onColorChange: (Int) -> Unit ) { + val composeColor = Color(color) val alphaValue = remember(color) { - val value = if (config.allowCustomColorAlphaValues) color.alpha else 255 + val value = if (config.allowCustomColorAlphaValues) { + composeColor.alpha + } else { + 1F + } mutableStateOf(value) } - val redValue = remember(color) { mutableStateOf(color.red) } - val greenValue = remember(color) { mutableStateOf(color.green) } - val blueValue = remember(color) { mutableStateOf(color.blue) } + val redValue = remember(color) { mutableStateOf(composeColor.red) } + val greenValue = remember(color) { mutableStateOf(composeColor.green) } + val blueValue = remember(color) { mutableStateOf(composeColor.blue) } val newColor by remember(alphaValue.value, redValue.value, greenValue.value, blueValue.value) { mutableStateOf(Color(redValue.value, greenValue.value, blueValue.value, alphaValue.value)) @@ -68,15 +73,15 @@ internal fun ColorCustomControlComponent( val colorValueLabelWidth = remember { mutableStateOf(null) } val colorItems = mutableListOf( - if (config.allowCustomColorAlphaValues) stringResource(R.string.scd_color_dialog_alpha) to alphaValue else null, - stringResource(R.string.scd_color_dialog_red) to redValue, - stringResource(R.string.scd_color_dialog_green) to greenValue, - stringResource(R.string.scd_color_dialog_blue) to blueValue + if (config.allowCustomColorAlphaValues) stringResource(Res.string.scd_color_dialog_alpha) to alphaValue else null, + stringResource(Res.string.scd_color_dialog_red) to redValue, + stringResource(Res.string.scd_color_dialog_green) to greenValue, + stringResource(Res.string.scd_color_dialog_blue) to blueValue ).filterNotNull() Grid( modifier = Modifier.padding( - top = dimensionResource(RC.dimen.scd_normal_100) + top = 16.dp ), items = colorItems, columns = when (orientation) { @@ -87,7 +92,9 @@ internal fun ColorCustomControlComponent( columnSpacing = 24.dp ) { entry -> val index = colorItems.indexOf(entry) - val onValueChange: (Int) -> Unit = { entry.second.value = it } + val onValueChange: (Int) -> Unit = { + entry.second.value = it.toFloat() + } val sliderTestTag = testSequenceTagOf( TestTags.COLOR_CUSTOM_VALUE_SLIDER, index.toString() @@ -96,7 +103,7 @@ internal fun ColorCustomControlComponent( LibOrientation.PORTRAIT -> ColorCustomControlListItemComponent( label = entry.first, - value = entry.second.value, + value = entry.second.value.toInt(), onValueChange = onValueChange, colorItemLabelWidth = colorItemLabelWidth, colorValueLabelWidth = colorValueLabelWidth, @@ -105,7 +112,7 @@ internal fun ColorCustomControlComponent( LibOrientation.LANDSCAPE -> ColorCustomControlGridItemComponent( label = entry.first, - value = entry.second.value, + value = entry.second.value.toInt(), onValueChange = onValueChange, sliderTestTag = sliderTestTag, ) diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomControlGridItemComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomControlGridItemComponent.kt similarity index 96% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomControlGridItemComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomControlGridItemComponent.kt index 1e29fc8a..7bc47625 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomControlGridItemComponent.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomControlGridItemComponent.kt @@ -27,9 +27,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.testTag -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.style.TextAlign -import com.maxkeppeler.sheets.core.R +import androidx.compose.ui.unit.dp /** * The control item component to build up a value of a custom color. @@ -124,7 +123,7 @@ internal fun ColorCustomControlListItemComponent( modifier = Modifier .testTag(sliderTestTag) .weight(1f) - .padding(horizontal = dimensionResource(R.dimen.scd_normal_100)), + .padding(horizontal = 16.dp), valueRange = 0f..255f, value = value.toFloat(), onValueChange = { onValueChange(it.toInt()) }, diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomInfoComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomInfoComponent.kt similarity index 58% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomInfoComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomInfoComponent.kt index 5239b7c2..a4804a8d 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorCustomInfoComponent.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorCustomInfoComponent.kt @@ -26,19 +26,17 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.color.R import com.maxkeppeler.sheets.color.models.ColorConfig import com.maxkeppeler.sheets.color.utils.Constants -import com.maxkeppeler.sheets.color.utils.copyColorIntoClipboard import com.maxkeppeler.sheets.color.utils.getFormattedColor -import com.maxkeppeler.sheets.color.utils.pasteColorFromClipboard import kotlinx.coroutines.delay -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.color.generated.resources.Res +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_argb /** * A information view for the custom color picker. @@ -46,28 +44,14 @@ import com.maxkeppeler.sheets.core.R as RC * @param color The color that is currently selected. * @param onColorChange The listener that returns a selected color. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun ColorCustomInfoComponent( config: ColorConfig, color: Int, onColorChange: (Int) -> Unit, ) { - val context = LocalContext.current val colorPasteError = rememberSaveable { mutableStateOf(null) } - val onCopyCustomColor = { - copyColorIntoClipboard( - ctx = context, - label = context.getString(R.string.scd_color_dialog_color), - value = getFormattedColor(color) - ) - } - val onPasteCustomColor = { - pasteColorFromClipboard( - ctx = context, - onPastedColor = { onColorChange(it) }, - onPastedColorFailure = { colorPasteError.value = it }, - ) - } LaunchedEffect(colorPasteError.value) { delay(3000) colorPasteError.value = null @@ -92,13 +76,13 @@ internal fun ColorCustomInfoComponent( modifier = Modifier .height(Constants.COLOR_CUSTOM_ITEM_SIZE) .fillMaxWidth() - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) + .padding(start = 16.dp) ) { Row( modifier = Modifier .fillMaxSize() - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) - .padding(end = dimensionResource(RC.dimen.scd_small_100)), + .padding(start = 16.dp) + .padding(end = 8.dp), verticalAlignment = Alignment.CenterVertically ) { Column { @@ -110,12 +94,12 @@ internal fun ColorCustomInfoComponent( ) } else { Text( - text = stringResource(R.string.scd_color_dialog_argb), + text = stringResource(Res.string.scd_color_dialog_argb), style = MaterialTheme.typography.titleSmall, maxLines = 1 ) Text( - modifier = Modifier.padding(top = dimensionResource(RC.dimen.scd_small_25)), + modifier = Modifier.padding(top = 2.dp), text = getFormattedColor(color), style = MaterialTheme.typography.labelSmall, maxLines = 1 @@ -124,30 +108,6 @@ internal fun ColorCustomInfoComponent( } if (colorPasteError.value == null) { Spacer(modifier = Modifier.weight(1f)) - FilledIconButton( - colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.background), - modifier = Modifier, - onClick = onCopyCustomColor - ) { - Icon( - modifier = Modifier - .size(dimensionResource(RC.dimen.scd_size_125)), - imageVector = config.icons.ContentCopy, - contentDescription = stringResource(R.string.scd_color_dialog_copy_color), - ) - } - FilledIconButton( - colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.background), - modifier = Modifier, - onClick = onPasteCustomColor - ) { - Icon( - modifier = Modifier - .size(dimensionResource(RC.dimen.scd_size_125)), - imageVector = config.icons.ContentPaste, - contentDescription = stringResource(R.string.scd_color_dialog_paste_color), - ) - } } } } diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorSelectionModeComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorSelectionModeComponent.kt similarity index 72% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorSelectionModeComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorSelectionModeComponent.kt index 6874a4e5..32fa4e70 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorSelectionModeComponent.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorSelectionModeComponent.kt @@ -27,13 +27,16 @@ import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource -import com.maxkeppeler.sheets.color.R +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.color.models.ColorConfig import com.maxkeppeler.sheets.color.models.ColorSelection import com.maxkeppeler.sheets.color.models.ColorSelectionMode -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.color.generated.resources.Res +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_custom_color +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_no_color +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_template_colors /** * The color selection mode component that allows the user to switch between template colors, custom color and no color. @@ -43,6 +46,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param onModeChange The listener that returns the new color selection mode. * @param onNoColorClick The listener that is invoked when no color is selected. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun ColorSelectionModeComponent( selection: ColorSelection, @@ -51,7 +55,7 @@ internal fun ColorSelectionModeComponent( onModeChange: (ColorSelectionMode) -> Unit, onNoColorClick: () -> Unit ) { - Row(modifier = Modifier.padding(bottom = dimensionResource(RC.dimen.scd_small_100))) { + Row(modifier = Modifier.padding(bottom = 8.dp)) { if (config.displayMode == null) { TextButton( @@ -63,25 +67,25 @@ internal fun ColorSelectionModeComponent( }, modifier = Modifier, contentPadding = PaddingValues( - vertical = dimensionResource(id = RC.dimen.scd_small_100), - horizontal = dimensionResource(id = RC.dimen.scd_small_100) + vertical = 8.dp, + horizontal = 8.dp ), shape = RoundedCornerShape(50) ) { val text = stringResource( when (mode) { - ColorSelectionMode.CUSTOM -> R.string.scd_color_dialog_template_colors - ColorSelectionMode.TEMPLATE -> R.string.scd_color_dialog_custom_color + ColorSelectionMode.CUSTOM -> Res.string.scd_color_dialog_template_colors + ColorSelectionMode.TEMPLATE -> Res.string.scd_color_dialog_custom_color } ) Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), + modifier = Modifier.size(48.dp), imageVector = if (mode != ColorSelectionMode.TEMPLATE) config.icons.Apps else config.icons.Tune, contentDescription = text, tint = MaterialTheme.colorScheme.primary ) Text( - modifier = Modifier.padding(horizontal = dimensionResource(RC.dimen.scd_small_100)), + modifier = Modifier.padding(horizontal = 8.dp), text = text, ) } @@ -92,20 +96,20 @@ internal fun ColorSelectionModeComponent( onClick = onNoColorClick, modifier = Modifier, contentPadding = PaddingValues( - vertical = dimensionResource(id = RC.dimen.scd_small_100), - horizontal = dimensionResource(id = RC.dimen.scd_small_100) + vertical = 8.dp, + horizontal = 8.dp ), shape = RoundedCornerShape(50) ) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_size_150)), + modifier = Modifier.size(48.dp), imageVector = config.icons.NotInterested, - contentDescription = stringResource(R.string.scd_color_dialog_no_color), + contentDescription = stringResource(Res.string.scd_color_dialog_no_color), tint = MaterialTheme.colorScheme.primary ) Text( - modifier = Modifier.padding(horizontal = dimensionResource(RC.dimen.scd_small_100)), - text = stringResource(R.string.scd_color_dialog_no_color), + modifier = Modifier.padding(horizontal = 8.dp), + text = stringResource(Res.string.scd_color_dialog_no_color), ) } } diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorTemplateComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorTemplateComponent.kt similarity index 95% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorTemplateComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorTemplateComponent.kt index 39ed1380..bc21541c 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorTemplateComponent.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorTemplateComponent.kt @@ -30,13 +30,12 @@ import androidx.compose.ui.graphics.BlendMode import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.BaseConstants import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.color.models.ColorConfig import com.maxkeppeler.sheets.color.utils.Constants -import com.maxkeppeler.sheets.core.R as RC /** * The template mode that displays a list of colors to choose from. @@ -83,7 +82,7 @@ internal fun ColorTemplateComponent( config = config, modifier = Modifier .testTags(TestTags.COLOR_TEMPLATE_SELECTION, color) - .padding(dimensionResource(RC.dimen.scd_small_50)), + .padding(4.dp), color = color, selected = selected, inputDisabled = inputDisabled, diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorTemplateItemComponent.kt b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorTemplateItemComponent.kt similarity index 84% rename from color/src/main/java/com/maxkeppeler/sheets/color/views/ColorTemplateItemComponent.kt rename to color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorTemplateItemComponent.kt index 41ae2871..c2e4b8b3 100644 --- a/color/src/main/java/com/maxkeppeler/sheets/color/views/ColorTemplateItemComponent.kt +++ b/color/src/commonMain/kotlin/com/maxkeppeler/sheets/color/views/ColorTemplateItemComponent.kt @@ -28,13 +28,13 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextOverflow -import androidx.core.graphics.alpha -import com.maxkeppeler.sheets.color.R +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.color.models.ColorConfig -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.painterResource +import sheets_compose_dialogs.color.generated.resources.Res +import sheets_compose_dialogs.color.generated.resources.scd_color_dialog_transparent_pattern /** * The template item component that represents one color. @@ -45,6 +45,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param inputDisabled If input is disabled. * @param onColorClick The listener that returns the selected color. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun ColorTemplateItemComponent( config: ColorConfig, @@ -68,7 +69,7 @@ internal fun ColorTemplateItemComponent( Box(modifier = Modifier.fillMaxSize()) { Image( modifier = Modifier.fillMaxSize(), - painter = painterResource(id = R.drawable.scd_color_dialog_transparent_pattern), + painter = painterResource(Res.drawable.scd_color_dialog_transparent_pattern), contentDescription = null, ) Row( @@ -84,27 +85,27 @@ internal fun ColorTemplateItemComponent( colors = IconButtonDefaults.filledIconButtonColors(containerColor = MaterialTheme.colorScheme.background), modifier = Modifier .align(Alignment.Center) - .size(dimensionResource(RC.dimen.scd_size_150)), + .size(48.dp), onClick = {} ) { Icon( modifier = Modifier - .size(dimensionResource(RC.dimen.scd_size_100)), + .size(16.dp), imageVector = config.icons.Check, contentDescription = null, tint = MaterialTheme.colorScheme.primary ) } - } else if (color.alpha < 255) { + } else if (Color(color).alpha < 1F) { Text( modifier = Modifier .clip(RoundedCornerShape(50)) .background(MaterialTheme.colorScheme.background) - .padding(dimensionResource(id = RC.dimen.scd_small_25)), + .padding(2.dp), overflow = TextOverflow.Ellipsis, maxLines = 1, style = MaterialTheme.typography.labelSmall, - text = "${color.alpha.toFloat().div(255).times(100).toInt()}%" + text = "${Color(color).alpha.times(100).toInt()}%" ) } } diff --git a/color/src/main/AndroidManifest.xml b/color/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/color/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/color/src/main/java/com/maxkeppeler/sheets/color/utils/Utils.kt b/color/src/main/java/com/maxkeppeler/sheets/color/utils/Utils.kt deleted file mode 100644 index 6050cd90..00000000 --- a/color/src/main/java/com/maxkeppeler/sheets/color/utils/Utils.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.maxkeppeler.sheets.color.utils - -import android.content.ClipData -import android.content.ClipboardManager -import android.content.Context -import android.graphics.Color -import androidx.annotation.RestrictTo -import com.maxkeppeler.sheets.color.R - -/** Save a text into the clipboard. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) -internal fun copyColorIntoClipboard(ctx: Context, label: String, value: String) { - val clipboard = ctx.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager - val clip = ClipData.newPlainText(label, value) - clipboard.setPrimaryClip(clip) -} - -/** Receive the clipboard data. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) -internal fun pasteColorFromClipboard( - ctx: Context, - onPastedColor: (Int) -> Unit, - onPastedColorFailure: (String) -> Unit, -) { - val clipboard = ctx.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager - val item = clipboard.primaryClip?.getItemAt(0) - val text = item?.text?.toString() - text?.let { - runCatching { - // Color detected - onPastedColor(Color.parseColor(it)) - }.getOrElse { - // Clipboard information can not be parsed to color - onPastedColorFailure(ctx.getString(R.string.scd_color_dialog_clipboard_paste_invalid_color_code)) - } - } ?: run { - // Clipboard was empty - onPastedColorFailure(ctx.getString(R.string.scd_color_dialog_clipboard_paste_invalid_empty)) - } -} - -/** Receive the clipboard data. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) -internal fun getFormattedColor(color: Int): String = - String.format("#%08X", (0xFFFFFFFF and color.toLong())) diff --git a/color/src/main/res/drawable/scd_color_dialog_transparent_pattern.xml b/color/src/main/res/drawable/scd_color_dialog_transparent_pattern.xml deleted file mode 100644 index 41179bbd..00000000 --- a/color/src/main/res/drawable/scd_color_dialog_transparent_pattern.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file diff --git a/color/src/main/res/values-bg/strings.xml b/color/src/main/res/values-bg/strings.xml deleted file mode 100644 index 0b14cdc4..00000000 --- a/color/src/main/res/values-bg/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Червен - Зелен - Синьо - ARGB - Цвят - Шаблонни цветове - Персонализиран цвят - Няма цвят. - Копирай цвят - Поставяне на цвят - Поставете валиден aRGB код. - Няма какво да поставям - - \ No newline at end of file diff --git a/color/src/main/res/values-cs/strings.xml b/color/src/main/res/values-cs/strings.xml deleted file mode 100644 index 9ba77169..00000000 --- a/color/src/main/res/values-cs/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Červená - Zelená - Modrá - ARGB - Barva - Barvy šablony - Vlastní barva - Žádná barva - Kopírovat barvu - Vložit barvu - Vložte platný kód pro aRGB. - Není co vložit - - \ No newline at end of file diff --git a/color/src/main/res/values-da/strings.xml b/color/src/main/res/values-da/strings.xml deleted file mode 100644 index 53357ac0..00000000 --- a/color/src/main/res/values-da/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rød - Grøn - Blå - ARGB - Farve - Skabelonfarver - Tilpasset farve - Ingen farve - Kopier farve - Indsæt farve - Indsæt en gyldig aRGB-kode. - Intet at indsætte - - \ No newline at end of file diff --git a/color/src/main/res/values-de/strings.xml b/color/src/main/res/values-de/strings.xml deleted file mode 100644 index 15d74239..00000000 --- a/color/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rot - Grün - Blau - ARGB - Farbe - Vorlage Farben - Benutzerdefinierte Farbe - Keine Farbe - Farbe kopieren - Paste Farbe - Gültigen aRGB-Code einfügen. - Nichts einzufügen - - \ No newline at end of file diff --git a/color/src/main/res/values-el/strings.xml b/color/src/main/res/values-el/strings.xml deleted file mode 100644 index 8a685488..00000000 --- a/color/src/main/res/values-el/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Άλφα - Κόκκινο - Πράσινο - Μπλε - ARGB - Χρώμα - Χρώματα προτύπου - Προσαρμοσμένος χρωματισμός - Κανένα χρώμα - Αντιγραφή χρώματος - Επικόλληση χρώματος - Επικολλήστε έναν έγκυρο κωδικό aRGB. - Τίποτα να επικολληθεί - - \ No newline at end of file diff --git a/color/src/main/res/values-eo/strings.xml b/color/src/main/res/values-eo/strings.xml deleted file mode 100644 index f54a9012..00000000 --- a/color/src/main/res/values-eo/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Ruĝa - Verda - Blua - ARGB - Koloro - Ŝablona koloroj - Propra koloro - Neniu koloro. - Kopii koloron - Englue ruĝo - Algluu ĝustan aRGB-kodon. - Nenio por alglui - - \ No newline at end of file diff --git a/color/src/main/res/values-es/strings.xml b/color/src/main/res/values-es/strings.xml deleted file mode 100644 index bb3cba37..00000000 --- a/color/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rojo. - Verde - Azul - ARGB - Color - Colores de la plantilla - Color personalizado - Sin color - Copiar color - Pegar color - Pegar código aRGB válido. - Nada que pegar - - \ No newline at end of file diff --git a/color/src/main/res/values-et/strings.xml b/color/src/main/res/values-et/strings.xml deleted file mode 100644 index 11743e5b..00000000 --- a/color/src/main/res/values-et/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Punane - Roheline - Sinine - ARGB - Värv - Mallis värvid - Erisära - Värv puudub - Kopeeri värv - Värvi kopeerimine - Kleebi kehtiv aRGB-kood. - Midagi kleepida - - \ No newline at end of file diff --git a/color/src/main/res/values-fa/strings.xml b/color/src/main/res/values-fa/strings.xml deleted file mode 100644 index d5c7e77d..00000000 --- a/color/src/main/res/values-fa/strings.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - آلفا - قرمز - سبز - آبی - پارسی - رنگ - رنگ‌های قالب - رنگ سفارشی - هیچ رنگی - رونگ را کپی کنید. - Paste color -رنگ را الصاق کنید - کد aRGB معتبر را الصاق کنید. - چیزی برای جایگزینی وجود ندارد - - \ No newline at end of file diff --git a/color/src/main/res/values-fi/strings.xml b/color/src/main/res/values-fi/strings.xml deleted file mode 100644 index c1df80d0..00000000 --- a/color/src/main/res/values-fi/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Punainen - Vihreä - Sininen - ARGB - Väri - Mallin värit - Kustomoitu väri - Ei väriä - Kopioi väri - Väri liitä - Liitä kelvollinen aRGB-koodi. - Ei mitään liitettävää - - \ No newline at end of file diff --git a/color/src/main/res/values-fr/strings.xml b/color/src/main/res/values-fr/strings.xml deleted file mode 100644 index 058a8a33..00000000 --- a/color/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rouge - Vert - Bleu - ARGB - Couleur - Couleurs du modèle - Couleur personnalisée - Aucune couleur - Couleur de copie - Couleur collée - Copiez le code aRGB valide. - Rien à coller. - - \ No newline at end of file diff --git a/color/src/main/res/values-ga/strings.xml b/color/src/main/res/values-ga/strings.xml deleted file mode 100644 index 9e3b0042..00000000 --- a/color/src/main/res/values-ga/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Dearg. - Glás - Gorm - ARGB - Dath - Dathanna na gcló-dhuilleoga - Dath arna athrú.Cosúil le ceannacht. - Gan dath - Dath a chóipeáil - Dath greamaigh. - Greamaigh cód aRGB bailí. - Níl aon rud le péiste - - \ No newline at end of file diff --git a/color/src/main/res/values-gd/strings.xml b/color/src/main/res/values-gd/strings.xml deleted file mode 100644 index 69679cad..00000000 --- a/color/src/main/res/values-gd/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Deargh - Glas - Gorm - ARGB - Dath - Dathanna Sgìreadh - Dath a chriathar - Gun dath - Dathan a cheàrradh - Glas a thaghadh - Cuir a-steach còd aRGB-ùr. - Chan eil dad ri phàsadh. - - \ No newline at end of file diff --git a/color/src/main/res/values-hi/strings.xml b/color/src/main/res/values-hi/strings.xml deleted file mode 100644 index 8babdfae..00000000 --- a/color/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - अल्फा - लाल - हरा - नीला - एआरजीबी - रंग - टेम्पलेट रंगों - कस्टम रंग - कोई रंग नहीं - वर्ण की कॉपी - रंग चिपकाएँ - वैध aRGB-कोड पेस्ट करें। - कुछ पेस्ट करने के लिए नहीं - - \ No newline at end of file diff --git a/color/src/main/res/values-hr/strings.xml b/color/src/main/res/values-hr/strings.xml deleted file mode 100644 index 73b3bb87..00000000 --- a/color/src/main/res/values-hr/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alfa - Crvena - Zelena - Plavo - ARGB - Boja - Boje predloška - Prilagođena boja - Nema boje. - Kopiraj boju - Boja zalijepi - Zalijepite valjani aRGB kod. - Ništa za zalijepiti - - \ No newline at end of file diff --git a/color/src/main/res/values-hu/strings.xml b/color/src/main/res/values-hu/strings.xml deleted file mode 100644 index eaaa9e00..00000000 --- a/color/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Piros - Zöld - Kék - ARGB - Szín - Sablon színek - Egyéni szín - Nem szín - Szín másolása - Szín beillesztése - Illessze be a helyes aRGB-kódot. - Nincs mit beilleszteni. - - \ No newline at end of file diff --git a/color/src/main/res/values-in-rID/strings.xml b/color/src/main/res/values-in-rID/strings.xml deleted file mode 100644 index fc29409c..00000000 --- a/color/src/main/res/values-in-rID/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Merah - Hijau - Biru - ARGB - Warna - Warna Templat - Warna kustom - Tidak berwarna - Salin warna - Warna tempel - Tempelkan kode aRGB yang valid. - Tidak ada yang bisa ditempelkan - - \ No newline at end of file diff --git a/color/src/main/res/values-is/strings.xml b/color/src/main/res/values-is/strings.xml deleted file mode 100644 index 62ddf4bc..00000000 --- a/color/src/main/res/values-is/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rauður - Grænt - Blár - ARGB - Litur - Skjáhnappalitur - Sérsniðinn litur - Engin litur. - Litur afrit - Líma litur - Límið inn gilt aRGB-kóða. - Engin eitthvað til að líma inn - - \ No newline at end of file diff --git a/color/src/main/res/values-it/strings.xml b/color/src/main/res/values-it/strings.xml deleted file mode 100644 index 38783a16..00000000 --- a/color/src/main/res/values-it/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rosso - Verde - Blu - ARGB - Colore - Colori del modello - Colore personalizzato - Nessun colore - Copia colore - Colore incolla - Incolla un codice aRGB valido. - Niente da incollare - - \ No newline at end of file diff --git a/color/src/main/res/values-iw/strings.xml b/color/src/main/res/values-iw/strings.xml deleted file mode 100644 index 0de33291..00000000 --- a/color/src/main/res/values-iw/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - אלפא - אדום - ירוק - כחול - ARGB - צבע - צבעי התבנית - צבע מותאם - אין צבע - העתק צבע - הדבק צבע - הדבק קוד aRGB תקין. - אין דבר להדביק - - \ No newline at end of file diff --git a/color/src/main/res/values-ja/strings.xml b/color/src/main/res/values-ja/strings.xml deleted file mode 100644 index 863d904f..00000000 --- a/color/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - アルファ - - - - ARGB - カラー - テンプレートの色 - カスタムカラー - カラーなし - テキストを翻訳する:色のコピー - カラーを貼り付ける - 有効なaRGBコードを貼り付けてください。 - 貼り付けるものはありません。 - - \ No newline at end of file diff --git a/color/src/main/res/values-jv/strings.xml b/color/src/main/res/values-jv/strings.xml deleted file mode 100644 index e0c2f553..00000000 --- a/color/src/main/res/values-jv/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Merah - Hijau - Biru - ARGB - Warna - Warna-warna template - Warna kustom - Ora warna. - Salin warna - Warna nopasto - Tempelkeun Kode aRGB nu sah. - Ora ana sing bisa dipastèkaké - - \ No newline at end of file diff --git a/color/src/main/res/values-kk/strings.xml b/color/src/main/res/values-kk/strings.xml deleted file mode 100644 index fe9fb962..00000000 --- a/color/src/main/res/values-kk/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Альфа - Қызыл - Жасыл - Көк - ARGB - Реңк - Көрнекті бойынша түстер - Жеке түс - Өрнекті түссіз - Көшірме реңк - Түс тапсырыныз - Қате арғыб шифрін жайып қойыңыз. - Жабыстар жоқ - - \ No newline at end of file diff --git a/color/src/main/res/values-ko/strings.xml b/color/src/main/res/values-ko/strings.xml deleted file mode 100644 index 01ecf15b..00000000 --- a/color/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - 알파 - 빨간색 - 초록색 - 파란색 - ARGB - 색깔 - 템플릿 색상 - 사용자 설정 색상 - 색 없음 - 색 복사 - 붙여넣기 색상 - 유효한 aRGB 코드를 붙여넣어주세요. - 붙일 것이 없습니다. - - \ No newline at end of file diff --git a/color/src/main/res/values-ku/strings.xml b/color/src/main/res/values-ku/strings.xml deleted file mode 100644 index 4bfcdf7e..00000000 --- a/color/src/main/res/values-ku/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Sor - Sor - Şînêqêşîn - ARGB - Reng - رەنگی ڕووکار - ڕەنگی تایبەتین - هاوڕێیەکی ناوەنگاری. - ڕەنگ بنەڕەت بکەن. - ڕەنگ بکەوە - Codeyek aRGB-ek derbasdar peyveki binivîse. - چیزێک بۆ لکاندن نییە - - \ No newline at end of file diff --git a/color/src/main/res/values-lb/strings.xml b/color/src/main/res/values-lb/strings.xml deleted file mode 100644 index d1cde8cb..00000000 --- a/color/src/main/res/values-lb/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rout - Gréng - Blau - ARGB - Farw - Template Farwen - Eegen Faarf - Keng Faarf - Kopéier Farf - Past Dirwéng - Validen aRGB-Codeen aginn. - Näischt ze elegantéieren. - - \ No newline at end of file diff --git a/color/src/main/res/values-lo/strings.xml b/color/src/main/res/values-lo/strings.xml deleted file mode 100644 index 9a2c4c11..00000000 --- a/color/src/main/res/values-lo/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - ສີເດດ - ສີຂຽວ - ປານີ້ - ARGB - ສີ - ສີຊອງທາງຂອງຕົວຢ່າງ - ສີພື້ນທີ່ກຳນົດເພື່ອຕັ້ງຄ່າໂດຍອັງກິດ - ບໍ່ມີສີ - ຍອມຮັບສີ - ນຳບາງສີ - ອອກ aRGB-Code ທີ່ຖືກຕັ້ງຕໍ່ໄປໃນຖານຂໍ້ມູນແມ່ນ OK. - ບໍ່ມີຫຍັງເລີ່ມເຮັດໄດ້ - - \ No newline at end of file diff --git a/color/src/main/res/values-lt/strings.xml b/color/src/main/res/values-lt/strings.xml deleted file mode 100644 index d01741dd..00000000 --- a/color/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alfa - Raudona - Žalia - Mėlyna - ARGB - Spalva - Šablonų spalvos - Pasirinktinė spalva - Joks spalvos - Kopijuoti spalvą. - Įklijuoti spalvą - Įklijuokite galiojantį aRGB kodą. - Nieko neįklijuoti - - \ No newline at end of file diff --git a/color/src/main/res/values-lv/strings.xml b/color/src/main/res/values-lv/strings.xml deleted file mode 100644 index 8d04215c..00000000 --- a/color/src/main/res/values-lv/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alfa. - Sarkanā - Zaļš - Zils - ARGB - Krāsa - Veidnes krāsas - Pielāgota krāsa - Bez krāsas - Kopēt krāsu - Ielīmēt krāsu - Ielīmējiet derīgu aRGB kodu. - Nav ko ielīmēt - - \ No newline at end of file diff --git a/color/src/main/res/values-ms/strings.xml b/color/src/main/res/values-ms/strings.xml deleted file mode 100644 index ccb95c57..00000000 --- a/color/src/main/res/values-ms/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Merah - Hijau - Biru - ARGB - Warna - Warna-warna template - Warna tersuai - Tiada warna. - Salin warna - Warna tampal - Tampal Kod aRGB yang sah. - Tiada yang boleh diletakkan - - \ No newline at end of file diff --git a/color/src/main/res/values-ne/strings.xml b/color/src/main/res/values-ne/strings.xml deleted file mode 100644 index 412cb72c..00000000 --- a/color/src/main/res/values-ne/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - रातो - हरियो - नीलो - ARGB - रङ्ग - तालिका रंगहरू - रोचक रङ निर्माण - रङ पर्दैन - रंग प्रतिलिपि - रंग चिपाउनुहोस् - वैध aRGB-कोड पेस्ट गर्नुहोस्। - कुनै कुरा पेष्ट गर्ने कुरा छैन। - - \ No newline at end of file diff --git a/color/src/main/res/values-nl/strings.xml b/color/src/main/res/values-nl/strings.xml deleted file mode 100644 index d2529a54..00000000 --- a/color/src/main/res/values-nl/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rood - Groen - Blauw - ARGB - Kleur - Template kleuren - Aangepaste kleur - Geen kleur - Kopieer kleur - Plak kleur - Plak een geldige aRGB-code. - Niets om te plakken - - \ No newline at end of file diff --git a/color/src/main/res/values-no/strings.xml b/color/src/main/res/values-no/strings.xml deleted file mode 100644 index fb686d6c..00000000 --- a/color/src/main/res/values-no/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rød - Grønn - Blå - ARGB - Farge - Mal farger - Egendefinert farge - Ingen farge - Kopier farge - Lim inn farge - Lim inn gyldig aRGB-kode. - Ingenting å lime inn - - \ No newline at end of file diff --git a/color/src/main/res/values-pl/strings.xml b/color/src/main/res/values-pl/strings.xml deleted file mode 100644 index 3d1784f7..00000000 --- a/color/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Czerwony - Zielony - Niebieski. - ARGB - Kolor - Kolory szablonu - Kolor niestandardowy - Brak koloru - Kopiuj kolor - Kolor wklej - Wklej poprawny kod aRGB. - Nic do wklejenia - - \ No newline at end of file diff --git a/color/src/main/res/values-pt/strings.xml b/color/src/main/res/values-pt/strings.xml deleted file mode 100644 index bacd132a..00000000 --- a/color/src/main/res/values-pt/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Vermelho - Verde - Azul - ARGB - Cor - Cores do modelo - Cor personalizada - Sem cor. - Copiar cor - Cor da pasta - Cole um código aRGB válido. - Nada para colar - - \ No newline at end of file diff --git a/color/src/main/res/values-ru/strings.xml b/color/src/main/res/values-ru/strings.xml deleted file mode 100644 index bb6007b1..00000000 --- a/color/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Альфа - Красный - Зеленый - Синий - ARGB - Цвет - Цвета шаблона. - Custom color (Пользовательский цвет) - Без цвета - Копировать цвет - Цвет вставки - Вставьте действительный aRGB-код. - Нет текста для вставки - - \ No newline at end of file diff --git a/color/src/main/res/values-sk/strings.xml b/color/src/main/res/values-sk/strings.xml deleted file mode 100644 index e729efb3..00000000 --- a/color/src/main/res/values-sk/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Červená - Zelená - Modrý - ARGB - Farba - Farby šablóny - Vlastná farba - Bez farby - Skopírovať farbu - Vložiť farbu - Vložte platný aRGB kód. - Nič na vloženie - - \ No newline at end of file diff --git a/color/src/main/res/values-sl/strings.xml b/color/src/main/res/values-sl/strings.xml deleted file mode 100644 index 7fd1fa64..00000000 --- a/color/src/main/res/values-sl/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Rdeča - Zelena - Modra - ARGB - Barva - Barve predloge - Prilagojena barva - Brez barve - Kopiraj barvo - Barva vstavi - Prilepite veljaven aRGB-kodo. - Nič za prilepiti - - \ No newline at end of file diff --git a/color/src/main/res/values-sr/strings.xml b/color/src/main/res/values-sr/strings.xml deleted file mode 100644 index d393126b..00000000 --- a/color/src/main/res/values-sr/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alfa - Crvena - Zelena - Plavo. - ARGB - Boja - Boje predloška - Prilagođena boja - Bez boje - Kopiraj boju - Boja nalepljena - Nalepite validan aRGB kod. - Ništa za nalepiti - - \ No newline at end of file diff --git a/color/src/main/res/values-sv/strings.xml b/color/src/main/res/values-sv/strings.xml deleted file mode 100644 index e784d1fc..00000000 --- a/color/src/main/res/values-sv/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Röd - Grön - Blå - ARGB - Färg - Färger på mallen - Anpassad färg - Ingen färg - Kopiera färg - Klistra in färg - Klistra in giltig aRGB-kod. - Inget att klistra in - - \ No newline at end of file diff --git a/color/src/main/res/values-th/strings.xml b/color/src/main/res/values-th/strings.xml deleted file mode 100644 index 23affdc2..00000000 --- a/color/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Alpha - สีแดง - เขียว - สีน้ำเงิน - ARGB - สี - สีของเทมเพลต - สีที่กำหนดเอง - ไม่มีสี - สำเนาสี - Paste color -วางสี - วางรหัส aRGB ที่ถูกต้อง - ไม่มีอะไรที่จะวาง - - \ No newline at end of file diff --git a/color/src/main/res/values-tr/strings.xml b/color/src/main/res/values-tr/strings.xml deleted file mode 100644 index 594ab333..00000000 --- a/color/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Kırmızı - Yeşil - Mavi - ARGB - Renk - Şablon renkleri - Özel renk - Renksiz - Renk kopyala - Renk yapıştır - Geçerli bir aRGB Kodu yapıştırın. - Yapıştırılacak bir şey yok. - - \ No newline at end of file diff --git a/color/src/main/res/values-uk/strings.xml b/color/src/main/res/values-uk/strings.xml deleted file mode 100644 index e5f020f7..00000000 --- a/color/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Альфа - Червоний - Зелений - Синій - ARGB - Колір - Кольори шаблону - Спеціальний колір - Без кольору - Копіювати колір - Вставити колір - Вставте дійсний aRGB-код. - Нічого немає для вставки - - \ No newline at end of file diff --git a/color/src/main/res/values-vi/strings.xml b/color/src/main/res/values-vi/strings.xml deleted file mode 100644 index 7db69861..00000000 --- a/color/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Đỏ - Màu xanh - Màu xanh - ARGB - Màu sắc - Màu sắc mẫu (OK) - Tùy chỉnh màu sắc - Không màu sắc. - Sao chép màu sắc - Màu dán - Dán mã aRGB hợp lệ. - Không có gì để dán - - \ No newline at end of file diff --git a/color/src/main/res/values-zh-rCN/strings.xml b/color/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index 441286de..00000000 --- a/color/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - 红色 - 绿色 - 蓝色 - ARGB - 颜色 - 模板颜色 - 自定义颜色 - 没有颜色 - 复制颜色 - 粘贴颜色 - 请粘贴有效的aRGB代码。 - 无可粘贴 - - \ No newline at end of file diff --git a/color/src/main/res/values-zh-rTW/strings.xml b/color/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index ccc28816..00000000 --- a/color/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - 紅色 - 綠色 - 藍色 - ARGB - 顏色 - 模板顏色 - 自訂顏色 - 無色 - 複製顏色 - 貼上顏色 - 請貼上有效的aRGB代碼。 - 無內容可貼上 - - \ No newline at end of file diff --git a/color/src/main/res/values/strings.xml b/color/src/main/res/values/strings.xml deleted file mode 100644 index 20d395a3..00000000 --- a/color/src/main/res/values/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - Alpha - Red - Green - Blue - ARGB - Color - Template colors - Custom color - No color - Copy color - Paste color - Paste valid aRGB-Code. - Nothing to paste - - diff --git a/core/build.gradle.kts b/core/build.gradle.kts index a7452ed9..204a81ad 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,3 +1,5 @@ +import com.vanniktech.maven.publish.SonatypeHost + /* * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) * @@ -14,14 +16,97 @@ * limitations under the License. */ plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.CORE.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + isCoreLibraryDesugaringEnabled = true + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.CORE.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.materialIconsExtended) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.datetime) + implementation(libs.serialization) + } + + androidMain.orNull?.dependencies { + implementation(libs.androidx.window) + } + + val nonMacosMain by creating { + dependsOn(commonMain.get()) + + androidMain.orNull?.dependsOn(this) + jvmMain.orNull?.dependsOn(this) + iosMain.orNull?.dependsOn(this) + jsMain.orNull?.dependsOn(this) + + dependencies { + implementation(libs.window.size) + } + } + + val nonJvmMain by creating { + dependsOn(commonMain.get()) + + nativeMain.orNull?.dependsOn(this) + jsMain.orNull?.dependsOn(this) + } + } +} + +dependencies { + coreLibraryDesugaring(libs.desugar) } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/core/src/androidMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.android.kt b/core/src/androidMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.android.kt new file mode 100644 index 00000000..58a429b5 --- /dev/null +++ b/core/src/androidMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.android.kt @@ -0,0 +1,24 @@ +package com.maxkeppeker.sheets.core.utils + +import android.app.Activity +import android.content.Context +import android.content.ContextWrapper +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.ui.platform.LocalContext + +@Composable +actual fun AndroidWindowSizeFix(content: @Composable () -> Unit) { + // Fix for androidx.window crash prior 1.3.0 + CompositionLocalProvider( + LocalContext provides (LocalContext.current.findActivity() ?: LocalContext.current) + ) { + content() + } +} + +internal tailrec fun Context.findActivity(): Activity? = when (this) { + is Activity -> this + is ContextWrapper -> baseContext.findActivity() + else -> null +} \ No newline at end of file diff --git a/core/src/androidMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.android.kt b/core/src/androidMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.android.kt new file mode 100644 index 00000000..efda510a --- /dev/null +++ b/core/src/androidMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.android.kt @@ -0,0 +1,5 @@ +package com.maxkeppeker.sheets.core.utils + +import java.io.Serializable + +actual typealias JvmSerializable = Serializable \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CoreDialogTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CoreDialogTests.kt deleted file mode 100644 index 6a8886a0..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CoreDialogTests.kt +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional - -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.test.assertIsDisplayed -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.performClick -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.CoreDialog -import com.maxkeppeker.sheets.core.models.CoreSelection -import com.maxkeppeker.sheets.core.models.base.SelectionButton -import com.maxkeppeker.sheets.core.models.base.UseCaseState -import com.maxkeppeler.sheets.test.utils.* -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class CoreDialogTests { - - @get:Rule - val rule = createComposeRule() - - @Test - fun coreDialogVisible() { - rule.setContentAndWaitForIdle { - CoreDialog( - state = UseCaseState(visible = true), - selection = CoreSelection(), - body = { }, - ) - } - rule.onDialog().assertExists() - rule.onDialog().assertIsDisplayed() - } - - @Test - fun coreDialogNotVisible() { - rule.setContentAndWaitForIdle { - CoreDialog( - state = UseCaseState(visible = false), - selection = CoreSelection(), - body = { }, - ) - } - rule.onDialog().assertDoesNotExist() - } - - @Test - fun coreDialogInvokesPositiveButton() { - var positiveCalled = false - rule.setContent { - CoreDialog( - state = UseCaseState(visible = true), - selection = CoreSelection( - onPositiveClick = { positiveCalled = true }, - ), - body = { }, - ) - } - rule.onPositiveButton().performClick() - rule.onDialog().assertDoesNotExist() - assert(positiveCalled) - } - - @Test - fun coreDialogInvokesNegativeButton() { - var negativeCalled = false - rule.setContent { - CoreDialog( - state = UseCaseState(visible = true), - selection = CoreSelection( - onNegativeClick = { negativeCalled = true }, - ), - body = { }, - ) - } - rule.onNegativeButton().performClick() - rule.onDialog().assertDoesNotExist() - assert(negativeCalled) - } - - @Test - fun coreDialogInvokesExtraButton() { - var extraCalled = false - rule.setContent { - CoreDialog( - state = UseCaseState(visible = true), - selection = CoreSelection( - extraButton = SelectionButton("test"), - onExtraButtonClick = { extraCalled = true }, - ), - body = { }, - ) - } - rule.onExtraButton().performClick() - rule.onDialog().assertExists() - assert(extraCalled) - } - - @Test - fun coreDialogDisplaysBody() { - var bodyCalled = false - rule.setContent { - CoreDialog( - selection = CoreSelection(), - state = UseCaseState(visible = true), - body = { bodyCalled = true }, - ) - } - assert(bodyCalled) - } -} \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CorePopupTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CorePopupTests.kt deleted file mode 100644 index f9b75143..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CorePopupTests.kt +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional - -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.test.assertIsDisplayed -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.performClick -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.CorePopup -import com.maxkeppeker.sheets.core.models.CoreSelection -import com.maxkeppeker.sheets.core.models.base.SelectionButton -import com.maxkeppeker.sheets.core.models.base.UseCaseState -import com.maxkeppeler.sheets.test.utils.* -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class CorePopupTests { - - @get:Rule - val rule = createComposeRule() - @Test - fun corePopup_visible() { - rule.setContentAndWaitForIdle { - CorePopup( - state = UseCaseState(visible = true), - selection = CoreSelection(), - body = { }, - ) - } - rule.onPopup().assertExists() - rule.onPopup().assertIsDisplayed() - } - - @Test - fun corePopup_notVisible() { - rule.setContentAndWaitForIdle { - CorePopup( - state = UseCaseState(visible = false), - selection = CoreSelection(), - body = { }, - ) - } - rule.onPopup().assertDoesNotExist() - } - - @Test - fun corePopup_invokesPositiveButton() { - var positiveCalled = false - rule.setContent { - CorePopup( - state = UseCaseState(visible = true), - selection = CoreSelection( - onPositiveClick = { positiveCalled = true }, - ), - body = { }, - ) - } - rule.onPositiveButton().performClick() - rule.onPopup().assertDoesNotExist() - assert(positiveCalled) - } - - @Test - fun corePopup_invokesNegativeButton() { - var negativeCalled = false - rule.setContent { - CorePopup( - state = UseCaseState(visible = true), - selection = CoreSelection( - onNegativeClick = { negativeCalled = true }, - ), - body = { }, - ) - } - rule.onNegativeButton().performClick() - rule.onPopup().assertDoesNotExist() - assert(negativeCalled) - } - - @Test - fun corePopup_invokesExtraButton() { - var extraCalled = false - rule.setContent { - CorePopup( - state = UseCaseState(visible = true), - selection = CoreSelection( - extraButton = SelectionButton("test"), - onExtraButtonClick = { extraCalled = true }, - ), - body = { }, - ) - } - rule.onExtraButton().performClick() - rule.onPopup().assertExists() - assert(extraCalled) - } - - @Test - fun corePopup_displaysBody() { - var bodyCalled = false - rule.setContent { - CorePopup( - selection = CoreSelection(), - state = UseCaseState(visible = true), - body = { bodyCalled = true }, - ) - } - assert(bodyCalled) - } -} \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CoreViewTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CoreViewTests.kt deleted file mode 100644 index 9e970901..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/CoreViewTests.kt +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional - -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.test.assertIsDisplayed -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.performClick -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.CoreView -import com.maxkeppeker.sheets.core.models.CoreSelection -import com.maxkeppeker.sheets.core.models.base.SelectionButton -import com.maxkeppeker.sheets.core.models.base.UseCaseState -import com.maxkeppeler.sheets.test.utils.* -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class CoreViewTests { - - @get:Rule - val rule = createComposeRule() - - @Test - fun coreViewVisible() { - rule.setContentAndWaitForIdle { - CoreView( - useCaseState = UseCaseState(visible = true), - selection = CoreSelection(), - body = { }, - ) - } - rule.onView().assertExists() - rule.onView().assertIsDisplayed() - } - - @Test - fun coreViewNotVisible() { - rule.setContentAndWaitForIdle { - CoreView( - useCaseState = UseCaseState(visible = false), - selection = CoreSelection(), - body = { }, - ) - } - rule.onView().assertExists() - rule.onView().assertIsDisplayed() - } - - @Test - fun coreViewInvokesPositiveButton() { - var positiveCalled = false - rule.setContent { - CoreView( - useCaseState = UseCaseState(visible = true), - selection = CoreSelection( - onPositiveClick = { positiveCalled = true }, - ), - body = { }, - ) - } - rule.onPositiveButton().performClick() - rule.onView().assertExists() - assert(positiveCalled) - } - - @Test - fun coreViewInvokesNegativeButton() { - var negativeCalled = false - rule.setContent { - CoreView( - useCaseState = UseCaseState(visible = true), - selection = CoreSelection( - onNegativeClick = { negativeCalled = true }, - ), - body = { }, - ) - } - rule.onNegativeButton().performClick() - rule.onView().assertExists() - assert(negativeCalled) - } - - @Test - fun coreViewInvokesExtraButton() { - var extraCalled = false - rule.setContent { - CoreView( - useCaseState = UseCaseState(visible = true), - selection = CoreSelection( - extraButton = SelectionButton("test"), - onExtraButtonClick = { extraCalled = true }, - ), - body = { }, - ) - } - rule.onExtraButton().performClick() - rule.onView().assertExists() - assert(extraCalled) - } - - @Test - fun coreViewDisplaysBody() { - var bodyCalled = false - rule.setContent { - CoreView( - selection = CoreSelection(), - useCaseState = UseCaseState(visible = true), - body = { bodyCalled = true }, - ) - } - assert(bodyCalled) - } - -} \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/ButtonsComponentTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/ButtonsComponentTests.kt deleted file mode 100644 index 420aea23..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/ButtonsComponentTests.kt +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional.base - -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Face -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.test.* -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.models.base.BaseSelection -import com.maxkeppeker.sheets.core.models.base.IconSource -import com.maxkeppeker.sheets.core.models.base.LibOrientation -import com.maxkeppeker.sheets.core.models.base.SelectionButton -import com.maxkeppeker.sheets.core.models.base.UseCaseState -import com.maxkeppeker.sheets.core.utils.TestTags -import com.maxkeppeker.sheets.core.views.ButtonsComponent -import com.maxkeppeler.sheets.test.utils.onExtraButton -import com.maxkeppeler.sheets.test.utils.onNegativeButton -import com.maxkeppeler.sheets.test.utils.onNodeWithTags -import com.maxkeppeler.sheets.test.utils.onPositiveButton -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class ButtonsComponentTests { - - @get:Rule - val rule = createComposeRule() - - @Test - fun buttonsComponentInvokesValidPositiveButton() { - var positiveCalled = false - var negativeCalled = false - var closeCalled = false - rule.setContent { - ButtonsComponent( - state = UseCaseState( - onFinishedRequest = { closeCalled = true } - ), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() {}, - onPositive = { positiveCalled = true }, - onNegative = { negativeCalled = true }, - onPositiveValid = true, - ) - } - rule.onPositiveButton().assertIsEnabled() - rule.onPositiveButton().performClick() - assert(positiveCalled) - assert(!negativeCalled) - assert(closeCalled) - } - - @Test - fun buttonsComponentInvokesNotInvalidPositiveButton() { - var positiveCalled = false - var negativeCalled = false - var closeCalled = false - rule.setContent { - ButtonsComponent( - state = UseCaseState( - onFinishedRequest = { closeCalled = true } - ), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() {}, - onPositive = { positiveCalled = true }, - onNegative = { negativeCalled = true }, - onPositiveValid = false, - ) - } - rule.onPositiveButton().assertIsNotEnabled() - rule.onPositiveButton().performClick() - assert(!positiveCalled) - assert(!negativeCalled) - assert(!closeCalled) - } - - @Test - fun buttonsComponentInvokesNegativeButton() { - var positiveCalled = false - var negativeCalled = false - var closeCalled = false - rule.setContent { - ButtonsComponent( - state = UseCaseState( - onFinishedRequest = { closeCalled = true } - ), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() {}, - onPositive = { positiveCalled = true }, - onNegative = { negativeCalled = true }, - onPositiveValid = false, - ) - } - rule.onNegativeButton().performClick() - assert(!positiveCalled) - assert(negativeCalled) - assert(closeCalled) - } - - @Test - fun buttonsComponentInvokesExtraButton() { - var positiveCalled = false - var negativeCalled = false - var closeCalled = false - var extraCalled = false - rule.setContent { - ButtonsComponent( - state = UseCaseState( - onFinishedRequest = { closeCalled = true } - ), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val extraButton = SelectionButton("Test button") - override val onExtraButtonClick = { extraCalled = true } - }, - onPositive = { positiveCalled = true }, - onNegative = { negativeCalled = true }, - onPositiveValid = false, - ) - } - rule.onExtraButton().performClick() - assert(extraCalled) - assert(!positiveCalled) - assert(!negativeCalled) - assert(!closeCalled) - } - - @Test - fun buttonsComponentDisplaysPositiveButtonText() { - val text = "test-text-positive" - rule.setContent { - ButtonsComponent( - state = UseCaseState(), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val positiveButton = SelectionButton(text) - }, - onPositive = { }, - onNegative = { }, - onPositiveValid = false, - ) - } - rule.onPositiveButton().apply { - assertIsDisplayed() - assertTextEquals(text) - } - } - - @Test - fun buttonsComponentDisplaysNegativeButtonText() { - val text = "test-text-negative" - rule.setContent { - ButtonsComponent( - state = UseCaseState(), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val negativeButton = SelectionButton(text) - }, - onPositive = { }, - onNegative = { }, - onPositiveValid = false, - ) - } - rule.onNegativeButton().apply { - assertIsDisplayed() - assertTextEquals(text) - } - } - - @Test - fun buttonsComponentDisplaysExtraButtonText() { - val text = "test-text-extra" - rule.setContent { - ButtonsComponent( - state = UseCaseState(), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val extraButton = SelectionButton(text) - }, - onPositive = { }, - onNegative = { }, - onPositiveValid = false, - ) - } - rule.onExtraButton().apply { - assertIsDisplayed() - assertTextEquals(text) - } - } - - @Test - fun buttonsComponentDisplaysPositiveButtonIcon() { - val icon = IconSource(Icons.Rounded.Face) - rule.setContent { - ButtonsComponent( - state = UseCaseState(), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val positiveButton = SelectionButton("", icon) - }, - onPositive = { }, - onNegative = { }, - onPositiveValid = false, - ) - } - rule.onNodeWithTags( - TestTags.BUTTON_POSITIVE, - TestTags.BUTTON_ICON - ).apply { - assertExists() - assertIsDisplayed() - } - } - - @Test - fun buttonsComponentDisplaysNegativeButtonIcon() { - val icon = IconSource(Icons.Rounded.Face) - rule.setContent { - ButtonsComponent( - state = UseCaseState(), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val negativeButton = SelectionButton("", icon) - }, - onPositive = { }, - onNegative = { }, - onPositiveValid = false, - ) - } - rule.onNodeWithTags( - TestTags.BUTTON_NEGATIVE, - TestTags.BUTTON_ICON - ).apply { - assertExists() - assertIsDisplayed() - } - } - - @Test - fun buttonsComponentDisplaysExtraButtonIcon() { - val icon = IconSource(Icons.Rounded.Face) - rule.setContent { - ButtonsComponent( - state = UseCaseState(), - orientation = LibOrientation.PORTRAIT, - selection = object : BaseSelection() { - override val extraButton = SelectionButton("", icon) - }, - onPositive = { }, - onNegative = { }, - onPositiveValid = true, - ) - } - rule.onNodeWithTags( - TestTags.BUTTON_EXTRA, - TestTags.BUTTON_ICON - ).apply { - assertExists() - assertIsDisplayed() - } - } -} \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/DialogBaseTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/DialogBaseTests.kt deleted file mode 100644 index 2ce075d9..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/DialogBaseTests.kt +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional.base - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.height -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.Modifier -import androidx.compose.ui.test.assertHasClickAction -import androidx.compose.ui.test.click -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.onNodeWithTag -import androidx.compose.ui.test.performTouchInput -import androidx.compose.ui.unit.dp -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.models.base.UseCaseState -import com.maxkeppeker.sheets.core.utils.TestTags -import com.maxkeppeker.sheets.core.views.base.DialogBase -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class DialogBaseTests { - - @get:Rule - val rule = createComposeRule() - - @Test - fun dialogVisibleDisplaysContent() { - var contentCalled = false - val state = UseCaseState(visible = true) - rule.setContent { - DialogBase( - state = state, - onDialogClick = {}, - content = { contentCalled = true } - ) - } - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTAINER).assertExists() - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTENT).assertExists() - assert(contentCalled) - } - - @Test - fun dialogNotVisibleDisplaysNoContent() { - var contentCalled = false - val state = UseCaseState(visible = false) - rule.setContent { - DialogBase( - state = state, - onDialogClick = {}, - content = { contentCalled = true } - ) - } - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTAINER).assertDoesNotExist() - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTENT).assertDoesNotExist() - assert(!contentCalled) - } - - @Test - fun dialogVisibleAllowsInteraction() { - var contentClicked = false - val state = UseCaseState(visible = true) - rule.setContent { - DialogBase( - state = state, - content = { Column(Modifier.height(200.dp)) {} }, // Otherwise no content / area to click - onDialogClick = { contentClicked = true } - ) - } - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTENT).apply { - assertExists() - assertHasClickAction() - performTouchInput { click(center) } - assert(contentClicked) - } - } - - @Test - fun dialogNotVisibleAllowsNoInteraction() { - var contentClicked = false - val state = UseCaseState(visible = false) - rule.setContent { - DialogBase( - state = state, - content = { }, - onDialogClick = { contentClicked = true } - ) - } - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTENT).apply { - assertDoesNotExist() - assert(!contentClicked) - } - } - - @Test - fun dialogDismissesOnClickOutside() { - var dismissCall = false - rule.setContent { - DialogBase( - state = UseCaseState( - visible = true, - onDismissRequest = { dismissCall = true } - ), - content = { }, - ) - } - rule.onNodeWithTag(TestTags.DIALOG_BASE_CONTAINER).apply { - performTouchInput { click(topLeft) } - assert(dismissCall) - } - } -} \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/FrameBaseTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/FrameBaseTests.kt deleted file mode 100644 index 18c4b97d..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/FrameBaseTests.kt +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional.base - -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.onNodeWithTag -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.models.base.Header -import com.maxkeppeker.sheets.core.utils.TestTags -import com.maxkeppeker.sheets.core.views.base.FrameBase -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class FrameBaseTests { - - @get:Rule - val rule = createComposeRule() - - @Test - fun frameDisplaysContent() { - var contentCalled = false - rule.setContent { - FrameBase( - header = null, - buttonsVisible = false, - buttons = {}, - layout = { contentCalled = true } - ) - } - rule.onNodeWithTag(TestTags.FRAME_BASE_CONTENT).assertExists() - assert(contentCalled) - } - - @Test - fun frameDisplaysNoHeader() { - rule.setContent { - FrameBase( - header = null, - buttonsVisible = false, - buttons = {}, - layout = { } - ) - } - rule.onNodeWithTag(TestTags.FRAME_BASE_HEADER).assertDoesNotExist() - rule.onNodeWithTag(TestTags.FRAME_BASE_NO_HEADER).assertExists() - } - - @Test - fun frameDisplaysHeader() { - rule.setContent { - FrameBase( - header = Header.Custom {}, - buttonsVisible = false, - buttons = {}, - layout = { } - ) - } - rule.onNodeWithTag(TestTags.FRAME_BASE_NO_HEADER).assertDoesNotExist() - rule.onNodeWithTag(TestTags.FRAME_BASE_HEADER).assertExists() - } - - @Test - fun frameDisplaysButtons() { - var buttonsCalled = false - rule.setContent { - FrameBase( - header = null, - buttonsVisible = true, - buttons = { buttonsCalled = true }, - layout = { } - ) - } - rule.onNodeWithTag(TestTags.FRAME_BASE_BUTTONS).assertExists() - rule.onNodeWithTag(TestTags.FRAME_BASE_NO_BUTTONS).assertDoesNotExist() - assert(buttonsCalled) - } - - @Test - fun frameDisplaysNoButtons() { - var buttonsCalled = false - rule.setContent { - FrameBase( - header = null, - buttonsVisible = false, - buttons = { buttonsCalled = true }, - layout = { } - ) - } - rule.onNodeWithTag(TestTags.FRAME_BASE_BUTTONS).assertDoesNotExist() - rule.onNodeWithTag(TestTags.FRAME_BASE_NO_BUTTONS).assertExists() - assert(!buttonsCalled) - } - -} \ No newline at end of file diff --git a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/HeaderComponentTests.kt b/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/HeaderComponentTests.kt deleted file mode 100644 index 98747bbd..00000000 --- a/core/src/androidTest/java/com/maxkeppeker/sheets/core/functional/base/HeaderComponentTests.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.functional.base - -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.rounded.Face -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.ui.test.assertIsDisplayed -import androidx.compose.ui.test.assertTextEquals -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.onNodeWithTag -import androidx.test.ext.junit.runners.AndroidJUnit4 -import com.maxkeppeker.sheets.core.models.base.Header -import com.maxkeppeker.sheets.core.models.base.IconSource -import com.maxkeppeker.sheets.core.utils.TestTags -import com.maxkeppeker.sheets.core.views.HeaderComponent -import org.junit.Rule -import org.junit.Test -import org.junit.runner.RunWith - -@RunWith(AndroidJUnit4::class) -class HeaderComponentTests { - - @get:Rule - val rule = createComposeRule() - - @Test - fun headerDisplaysCustomHeader() { - var customHeaderCalled = false - rule.setContent { - HeaderComponent( - header = Header.Custom { customHeaderCalled = true }, - contentHorizontalPadding = PaddingValues() - ) - } - rule.onNodeWithTag(TestTags.HEADER_DEFAULT).assertDoesNotExist() - assert(customHeaderCalled) - } - - @Test - fun headerDisplaysDefaultHeader() { - rule.setContent { - HeaderComponent( - header = Header.Default("Title", IconSource(Icons.Rounded.Face)), - contentHorizontalPadding = PaddingValues() - ) - } - rule.onNodeWithTag(TestTags.HEADER_DEFAULT_TEXT).assertExists() - } - - @Test - fun headerDisplaysDefaultHeaderTextNoIcon() { - val text = "title" - rule.setContent { - HeaderComponent( - header = Header.Default(text, null), - contentHorizontalPadding = PaddingValues() - ) - } - rule.onNodeWithTag(TestTags.HEADER_DEFAULT_TEXT).apply { - assertIsDisplayed() - assertTextEquals(text) - } - rule.onNodeWithTag(TestTags.HEADER_DEFAULT_ICON).apply { - assertDoesNotExist() - } - } - - @Test - fun headerDisplaysDefaultHeaderTextWithIcon() { - val text = "title" - rule.setContent { - HeaderComponent( - header = Header.Default(text, IconSource(Icons.Rounded.Face)), - contentHorizontalPadding = PaddingValues() - ) - } - rule.onNodeWithTag(TestTags.HEADER_DEFAULT_TEXT).apply { - assertIsDisplayed() - assertTextEquals(text) - } - rule.onNodeWithTag(TestTags.HEADER_DEFAULT_ICON).apply { - assertExists() - assertIsDisplayed() - } - } - - -} \ No newline at end of file diff --git a/core/src/main/res/values-bg/strings.xml b/core/src/commonMain/composeResources/values-bg/strings.xml similarity index 100% rename from core/src/main/res/values-bg/strings.xml rename to core/src/commonMain/composeResources/values-bg/strings.xml diff --git a/core/src/main/res/values-cs/strings.xml b/core/src/commonMain/composeResources/values-cs/strings.xml similarity index 100% rename from core/src/main/res/values-cs/strings.xml rename to core/src/commonMain/composeResources/values-cs/strings.xml diff --git a/core/src/main/res/values-da/strings.xml b/core/src/commonMain/composeResources/values-da/strings.xml similarity index 100% rename from core/src/main/res/values-da/strings.xml rename to core/src/commonMain/composeResources/values-da/strings.xml diff --git a/core/src/main/res/values-de/strings.xml b/core/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 100% rename from core/src/main/res/values-de/strings.xml rename to core/src/commonMain/composeResources/values-de-rDE/strings.xml diff --git a/core/src/commonMain/composeResources/values-de/strings.xml b/core/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..bd27d95f --- /dev/null +++ b/core/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,4 @@ + + Abbrechen + Ok + \ No newline at end of file diff --git a/core/src/main/res/values-el/strings.xml b/core/src/commonMain/composeResources/values-el/strings.xml similarity index 100% rename from core/src/main/res/values-el/strings.xml rename to core/src/commonMain/composeResources/values-el/strings.xml diff --git a/core/src/main/res/values-eo/strings.xml b/core/src/commonMain/composeResources/values-eo/strings.xml similarity index 100% rename from core/src/main/res/values-eo/strings.xml rename to core/src/commonMain/composeResources/values-eo/strings.xml diff --git a/core/src/main/res/values-es/strings.xml b/core/src/commonMain/composeResources/values-es/strings.xml similarity index 100% rename from core/src/main/res/values-es/strings.xml rename to core/src/commonMain/composeResources/values-es/strings.xml diff --git a/core/src/main/res/values-et/strings.xml b/core/src/commonMain/composeResources/values-et/strings.xml similarity index 100% rename from core/src/main/res/values-et/strings.xml rename to core/src/commonMain/composeResources/values-et/strings.xml diff --git a/core/src/main/res/values-fa/strings.xml b/core/src/commonMain/composeResources/values-fa/strings.xml similarity index 100% rename from core/src/main/res/values-fa/strings.xml rename to core/src/commonMain/composeResources/values-fa/strings.xml diff --git a/core/src/main/res/values-fi/strings.xml b/core/src/commonMain/composeResources/values-fi/strings.xml similarity index 100% rename from core/src/main/res/values-fi/strings.xml rename to core/src/commonMain/composeResources/values-fi/strings.xml diff --git a/core/src/main/res/values-fr/strings.xml b/core/src/commonMain/composeResources/values-fr/strings.xml similarity index 100% rename from core/src/main/res/values-fr/strings.xml rename to core/src/commonMain/composeResources/values-fr/strings.xml diff --git a/core/src/main/res/values-ga/strings.xml b/core/src/commonMain/composeResources/values-ga/strings.xml similarity index 100% rename from core/src/main/res/values-ga/strings.xml rename to core/src/commonMain/composeResources/values-ga/strings.xml diff --git a/core/src/main/res/values-gd/strings.xml b/core/src/commonMain/composeResources/values-gd/strings.xml similarity index 100% rename from core/src/main/res/values-gd/strings.xml rename to core/src/commonMain/composeResources/values-gd/strings.xml diff --git a/core/src/main/res/values-hi/strings.xml b/core/src/commonMain/composeResources/values-hi/strings.xml similarity index 100% rename from core/src/main/res/values-hi/strings.xml rename to core/src/commonMain/composeResources/values-hi/strings.xml diff --git a/core/src/main/res/values-hr/strings.xml b/core/src/commonMain/composeResources/values-hr/strings.xml similarity index 100% rename from core/src/main/res/values-hr/strings.xml rename to core/src/commonMain/composeResources/values-hr/strings.xml diff --git a/core/src/main/res/values-hu/strings.xml b/core/src/commonMain/composeResources/values-hu/strings.xml similarity index 100% rename from core/src/main/res/values-hu/strings.xml rename to core/src/commonMain/composeResources/values-hu/strings.xml diff --git a/core/src/main/res/values-in-rID/strings.xml b/core/src/commonMain/composeResources/values-in-rID/strings.xml similarity index 100% rename from core/src/main/res/values-in-rID/strings.xml rename to core/src/commonMain/composeResources/values-in-rID/strings.xml diff --git a/core/src/main/res/values-is/strings.xml b/core/src/commonMain/composeResources/values-is/strings.xml similarity index 100% rename from core/src/main/res/values-is/strings.xml rename to core/src/commonMain/composeResources/values-is/strings.xml diff --git a/core/src/main/res/values-it/strings.xml b/core/src/commonMain/composeResources/values-it/strings.xml similarity index 100% rename from core/src/main/res/values-it/strings.xml rename to core/src/commonMain/composeResources/values-it/strings.xml diff --git a/core/src/main/res/values-iw/strings.xml b/core/src/commonMain/composeResources/values-iw/strings.xml similarity index 100% rename from core/src/main/res/values-iw/strings.xml rename to core/src/commonMain/composeResources/values-iw/strings.xml diff --git a/core/src/main/res/values-ja/strings.xml b/core/src/commonMain/composeResources/values-ja/strings.xml similarity index 100% rename from core/src/main/res/values-ja/strings.xml rename to core/src/commonMain/composeResources/values-ja/strings.xml diff --git a/core/src/main/res/values-jv/strings.xml b/core/src/commonMain/composeResources/values-jv/strings.xml similarity index 100% rename from core/src/main/res/values-jv/strings.xml rename to core/src/commonMain/composeResources/values-jv/strings.xml diff --git a/core/src/main/res/values-kk/strings.xml b/core/src/commonMain/composeResources/values-kk/strings.xml similarity index 100% rename from core/src/main/res/values-kk/strings.xml rename to core/src/commonMain/composeResources/values-kk/strings.xml diff --git a/core/src/main/res/values-ko/strings.xml b/core/src/commonMain/composeResources/values-ko/strings.xml similarity index 100% rename from core/src/main/res/values-ko/strings.xml rename to core/src/commonMain/composeResources/values-ko/strings.xml diff --git a/core/src/main/res/values-ku/strings.xml b/core/src/commonMain/composeResources/values-ku/strings.xml similarity index 100% rename from core/src/main/res/values-ku/strings.xml rename to core/src/commonMain/composeResources/values-ku/strings.xml diff --git a/core/src/main/res/values-lb/strings.xml b/core/src/commonMain/composeResources/values-lb/strings.xml similarity index 100% rename from core/src/main/res/values-lb/strings.xml rename to core/src/commonMain/composeResources/values-lb/strings.xml diff --git a/core/src/main/res/values-lo/strings.xml b/core/src/commonMain/composeResources/values-lo/strings.xml similarity index 100% rename from core/src/main/res/values-lo/strings.xml rename to core/src/commonMain/composeResources/values-lo/strings.xml diff --git a/core/src/main/res/values-lt/strings.xml b/core/src/commonMain/composeResources/values-lt/strings.xml similarity index 100% rename from core/src/main/res/values-lt/strings.xml rename to core/src/commonMain/composeResources/values-lt/strings.xml diff --git a/core/src/main/res/values-lv/strings.xml b/core/src/commonMain/composeResources/values-lv/strings.xml similarity index 100% rename from core/src/main/res/values-lv/strings.xml rename to core/src/commonMain/composeResources/values-lv/strings.xml diff --git a/core/src/main/res/values-ms/strings.xml b/core/src/commonMain/composeResources/values-ms/strings.xml similarity index 100% rename from core/src/main/res/values-ms/strings.xml rename to core/src/commonMain/composeResources/values-ms/strings.xml diff --git a/core/src/main/res/values-ne/strings.xml b/core/src/commonMain/composeResources/values-ne/strings.xml similarity index 100% rename from core/src/main/res/values-ne/strings.xml rename to core/src/commonMain/composeResources/values-ne/strings.xml diff --git a/core/src/main/res/values-nl/strings.xml b/core/src/commonMain/composeResources/values-nl/strings.xml similarity index 100% rename from core/src/main/res/values-nl/strings.xml rename to core/src/commonMain/composeResources/values-nl/strings.xml diff --git a/core/src/main/res/values-no/strings.xml b/core/src/commonMain/composeResources/values-no/strings.xml similarity index 100% rename from core/src/main/res/values-no/strings.xml rename to core/src/commonMain/composeResources/values-no/strings.xml diff --git a/core/src/main/res/values-pl/strings.xml b/core/src/commonMain/composeResources/values-pl/strings.xml similarity index 100% rename from core/src/main/res/values-pl/strings.xml rename to core/src/commonMain/composeResources/values-pl/strings.xml diff --git a/core/src/main/res/values-pt/strings.xml b/core/src/commonMain/composeResources/values-pt/strings.xml similarity index 100% rename from core/src/main/res/values-pt/strings.xml rename to core/src/commonMain/composeResources/values-pt/strings.xml diff --git a/core/src/main/res/values-ru/strings.xml b/core/src/commonMain/composeResources/values-ru/strings.xml similarity index 100% rename from core/src/main/res/values-ru/strings.xml rename to core/src/commonMain/composeResources/values-ru/strings.xml diff --git a/core/src/main/res/values-sk/strings.xml b/core/src/commonMain/composeResources/values-sk/strings.xml similarity index 100% rename from core/src/main/res/values-sk/strings.xml rename to core/src/commonMain/composeResources/values-sk/strings.xml diff --git a/core/src/main/res/values-sl/strings.xml b/core/src/commonMain/composeResources/values-sl/strings.xml similarity index 100% rename from core/src/main/res/values-sl/strings.xml rename to core/src/commonMain/composeResources/values-sl/strings.xml diff --git a/core/src/main/res/values-sr/strings.xml b/core/src/commonMain/composeResources/values-sr/strings.xml similarity index 100% rename from core/src/main/res/values-sr/strings.xml rename to core/src/commonMain/composeResources/values-sr/strings.xml diff --git a/core/src/main/res/values-sv/strings.xml b/core/src/commonMain/composeResources/values-sv/strings.xml similarity index 100% rename from core/src/main/res/values-sv/strings.xml rename to core/src/commonMain/composeResources/values-sv/strings.xml diff --git a/core/src/main/res/values-th/strings.xml b/core/src/commonMain/composeResources/values-th/strings.xml similarity index 100% rename from core/src/main/res/values-th/strings.xml rename to core/src/commonMain/composeResources/values-th/strings.xml diff --git a/core/src/main/res/values-tr/strings.xml b/core/src/commonMain/composeResources/values-tr/strings.xml similarity index 100% rename from core/src/main/res/values-tr/strings.xml rename to core/src/commonMain/composeResources/values-tr/strings.xml diff --git a/core/src/main/res/values-uk/strings.xml b/core/src/commonMain/composeResources/values-uk/strings.xml similarity index 100% rename from core/src/main/res/values-uk/strings.xml rename to core/src/commonMain/composeResources/values-uk/strings.xml diff --git a/core/src/main/res/values-vi/strings.xml b/core/src/commonMain/composeResources/values-vi/strings.xml similarity index 100% rename from core/src/main/res/values-vi/strings.xml rename to core/src/commonMain/composeResources/values-vi/strings.xml diff --git a/core/src/main/res/values-zh-rCN/strings.xml b/core/src/commonMain/composeResources/values-zh-rCN/strings.xml similarity index 100% rename from core/src/main/res/values-zh-rCN/strings.xml rename to core/src/commonMain/composeResources/values-zh-rCN/strings.xml diff --git a/core/src/main/res/values-zh-rTW/strings.xml b/core/src/commonMain/composeResources/values-zh-rTW/strings.xml similarity index 100% rename from core/src/main/res/values-zh-rTW/strings.xml rename to core/src/commonMain/composeResources/values-zh-rTW/strings.xml diff --git a/core/src/main/res/values/strings.xml b/core/src/commonMain/composeResources/values/strings.xml similarity index 71% rename from core/src/main/res/values/strings.xml rename to core/src/commonMain/composeResources/values/strings.xml index 61216b8a..53711d9c 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/commonMain/composeResources/values/strings.xml @@ -1,4 +1,3 @@ - Cancel Ok diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/CoreDialog.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CoreDialog.kt similarity index 93% rename from core/src/main/java/com/maxkeppeker/sheets/core/CoreDialog.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CoreDialog.kt index a2d0fdf7..57d2b384 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/CoreDialog.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CoreDialog.kt @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) package com.maxkeppeker.sheets.core -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import androidx.compose.ui.window.DialogProperties import com.maxkeppeker.sheets.core.models.CoreSelection @@ -34,7 +32,6 @@ import com.maxkeppeker.sheets.core.views.base.DialogBase * @param onPositiveValid Listener that is invoked to check if the dialog input is valid. * @param onPositiveValid If the positive button is valid and therefore enabled. */ -@ExperimentalMaterial3Api @Composable fun CoreDialog( state: UseCaseState, diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/CorePopup.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CorePopup.kt similarity index 94% rename from core/src/main/java/com/maxkeppeker/sheets/core/CorePopup.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CorePopup.kt index 45983d90..44fed895 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/CorePopup.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CorePopup.kt @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) package com.maxkeppeker.sheets.core -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.unit.IntOffset @@ -36,7 +34,6 @@ import com.maxkeppeker.sheets.core.views.base.PopupBase * @param onPositiveValid If the positive button is valid and therefore enabled. * @param properties The properties of the popup. */ -@ExperimentalMaterial3Api @Composable fun CorePopup( state: UseCaseState, diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/CoreView.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CoreView.kt similarity index 94% rename from core/src/main/java/com/maxkeppeker/sheets/core/CoreView.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CoreView.kt index 9467bc9a..768cd664 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/CoreView.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/CoreView.kt @@ -13,11 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) package com.maxkeppeker.sheets.core -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.runtime.Composable import com.maxkeppeker.sheets.core.models.CoreSelection import com.maxkeppeker.sheets.core.models.base.Header @@ -33,7 +31,6 @@ import com.maxkeppeker.sheets.core.views.base.FrameBase * @param body The body content to be displayed inside the dialog view. * @param onPositiveValid If the positive button is valid and therefore enabled. */ -@ExperimentalMaterial3Api @Composable fun CoreView( useCaseState: UseCaseState, diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/LibIcons.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/LibIcons.kt similarity index 96% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/LibIcons.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/LibIcons.kt index f24e3404..fc40f34d 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/icons/LibIcons.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/LibIcons.kt @@ -2,9 +2,12 @@ package com.maxkeppeker.sheets.core.icons +import androidx.compose.runtime.Stable import androidx.compose.ui.graphics.vector.ImageVector +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable -sealed class LibIcons { +sealed class LibIcons : JvmSerializable { abstract var EmojiEmotions: ImageVector abstract var EmojiNature: ImageVector @@ -33,7 +36,7 @@ sealed class LibIcons { * [Filled icons](https://material.io/resources/icons/?style=baseline) (previously the only * available theme, also known as the baseline theme) are the default icon theme. */ - object Filled : LibIcons() { + data object Filled : LibIcons() { override var EmojiEmotions = com.maxkeppeker.sheets.core.icons.filled.EmojiEmotions override var EmojiNature = com.maxkeppeker.sheets.core.icons.filled.EmojiNature override var EmojiFoodBeverage = com.maxkeppeker.sheets.core.icons.filled.EmojiFoodBeverage @@ -62,7 +65,7 @@ sealed class LibIcons { * [Outlined icons](https://material.io/resources/icons/?style=outline) make use of a thin * stroke and empty space inside for a lighter appearance. */ - object Outlined : LibIcons() { + data object Outlined : LibIcons() { override var EmojiEmotions = com.maxkeppeker.sheets.core.icons.outlined.EmojiEmotions override var EmojiNature = com.maxkeppeker.sheets.core.icons.outlined.EmojiNature override var EmojiFoodBeverage = com.maxkeppeker.sheets.core.icons.outlined.EmojiFoodBeverage @@ -92,7 +95,7 @@ sealed class LibIcons { * pairs well with brands that use heavier typography, curved logos, or circular elements to * express their style. */ - object Rounded : LibIcons() { + data object Rounded : LibIcons() { override var EmojiEmotions = com.maxkeppeker.sheets.core.icons.rounded.EmojiEmotions override var EmojiNature = com.maxkeppeker.sheets.core.icons.rounded.EmojiNature override var EmojiFoodBeverage = com.maxkeppeker.sheets.core.icons.rounded.EmojiFoodBeverage @@ -122,7 +125,7 @@ sealed class LibIcons { * straight edges, for a crisp style that remains legible even at smaller scales. These * rectangular shapes can support brand styles that are not well-reflected by rounded shapes. */ - object TwoTone : LibIcons() { + data object TwoTone : LibIcons() { override var EmojiEmotions = com.maxkeppeker.sheets.core.icons.twotone.EmojiEmotions override var EmojiNature = com.maxkeppeker.sheets.core.icons.twotone.EmojiNature override var EmojiFoodBeverage = com.maxkeppeker.sheets.core.icons.twotone.EmojiFoodBeverage @@ -152,7 +155,7 @@ sealed class LibIcons { * straight edges, for a crisp style that remains legible even at smaller scales. These * rectangular shapes can support brand styles that are not well-reflected by rounded shapes. */ - object Sharp : LibIcons() { + data object Sharp : LibIcons() { override var EmojiEmotions = com.maxkeppeker.sheets.core.icons.sharp.EmojiEmotions override var EmojiNature = com.maxkeppeker.sheets.core.icons.sharp.EmojiNature override var EmojiFoodBeverage = com.maxkeppeker.sheets.core.icons.sharp.EmojiFoodBeverage diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Apps.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Apps.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Apps.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Apps.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Backspace.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Backspace.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Backspace.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Backspace.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Check.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Check.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Check.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Check.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ChevronLeft.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ChevronLeft.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ChevronLeft.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ChevronLeft.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ChevronRight.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ChevronRight.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ChevronRight.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ChevronRight.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Clear.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Clear.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Clear.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Clear.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ContentCopy.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ContentCopy.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ContentCopy.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ContentCopy.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ContentPaste.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ContentPaste.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ContentPaste.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ContentPaste.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiEmotions.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiEmotions.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiEmotions.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiEmotions.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiEvents.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiEvents.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiEvents.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiEvents.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiFlags.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiFlags.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiFlags.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiFlags.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiFoodBeverage.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiFoodBeverage.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiFoodBeverage.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiFoodBeverage.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiNature.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiNature.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiNature.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiNature.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiObjects.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiObjects.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiObjects.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiObjects.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiSymbols.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiSymbols.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiSymbols.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiSymbols.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiTransportation.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiTransportation.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/EmojiTransportation.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/EmojiTransportation.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Error.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Error.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Error.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Error.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ExpandMore.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ExpandMore.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/ExpandMore.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/ExpandMore.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Info.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Info.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Info.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Info.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/NotInterested.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/NotInterested.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/NotInterested.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/NotInterested.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Star.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Star.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Star.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Star.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Tune.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Tune.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/filled/Tune.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/filled/Tune.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Apps.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Apps.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Apps.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Apps.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Backspace.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Backspace.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Backspace.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Backspace.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Check.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Check.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Check.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Check.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ChevronLeft.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ChevronLeft.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ChevronLeft.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ChevronLeft.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ChevronRight.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ChevronRight.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ChevronRight.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ChevronRight.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Clear.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Clear.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Clear.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Clear.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ContentCopy.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ContentCopy.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ContentCopy.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ContentCopy.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ContentPaste.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ContentPaste.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ContentPaste.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ContentPaste.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiEmotions.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiEmotions.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiEmotions.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiEmotions.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiEvents.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiEvents.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiEvents.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiEvents.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiFlags.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiFlags.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiFlags.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiFlags.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiFoodBeverage.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiFoodBeverage.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiFoodBeverage.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiFoodBeverage.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiNature.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiNature.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiNature.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiNature.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiObjects.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiObjects.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiObjects.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiObjects.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiSymbols.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiSymbols.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiSymbols.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiSymbols.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiTransportation.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiTransportation.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/EmojiTransportation.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/EmojiTransportation.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Error.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Error.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Error.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Error.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ExpandMore.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ExpandMore.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/ExpandMore.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/ExpandMore.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Info.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Info.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Info.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Info.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/NotInterested.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/NotInterested.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/NotInterested.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/NotInterested.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Star.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Star.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Star.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Star.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Tune.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Tune.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/outlined/Tune.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/outlined/Tune.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Apps.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Apps.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Apps.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Apps.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Backspace.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Backspace.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Backspace.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Backspace.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Check.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Check.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Check.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Check.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ChevronLeft.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ChevronLeft.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ChevronLeft.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ChevronLeft.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ChevronRight.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ChevronRight.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ChevronRight.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ChevronRight.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Clear.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Clear.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Clear.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Clear.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ContentCopy.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ContentCopy.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ContentCopy.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ContentCopy.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ContentPaste.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ContentPaste.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ContentPaste.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ContentPaste.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiEmotions.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiEmotions.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiEmotions.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiEmotions.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiEvents.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiEvents.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiEvents.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiEvents.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiFlags.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiFlags.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiFlags.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiFlags.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiFoodBeverage.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiFoodBeverage.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiFoodBeverage.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiFoodBeverage.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiNature.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiNature.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiNature.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiNature.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiObjects.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiObjects.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiObjects.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiObjects.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiSymbols.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiSymbols.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiSymbols.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiSymbols.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiTransportation.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiTransportation.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/EmojiTransportation.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/EmojiTransportation.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Error.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Error.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Error.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Error.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ExpandMore.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ExpandMore.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/ExpandMore.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/ExpandMore.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Info.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Info.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Info.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Info.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/NotInterested.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/NotInterested.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/NotInterested.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/NotInterested.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Star.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Star.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Star.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Star.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Tune.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Tune.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/rounded/Tune.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/rounded/Tune.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Apps.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Apps.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Apps.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Apps.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Backspace.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Backspace.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Backspace.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Backspace.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Check.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Check.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Check.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Check.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ChevronLeft.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ChevronLeft.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ChevronLeft.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ChevronLeft.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ChevronRight.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ChevronRight.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ChevronRight.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ChevronRight.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Clear.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Clear.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Clear.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Clear.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ContentCopy.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ContentCopy.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ContentCopy.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ContentCopy.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ContentPaste.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ContentPaste.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ContentPaste.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ContentPaste.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiEmotions.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiEmotions.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiEmotions.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiEmotions.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiEvents.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiEvents.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiEvents.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiEvents.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiFlags.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiFlags.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiFlags.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiFlags.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiFoodBeverage.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiFoodBeverage.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiFoodBeverage.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiFoodBeverage.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiNature.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiNature.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiNature.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiNature.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiObjects.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiObjects.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiObjects.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiObjects.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiSymbols.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiSymbols.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiSymbols.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiSymbols.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiTransportation.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiTransportation.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/EmojiTransportation.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/EmojiTransportation.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Error.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Error.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Error.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Error.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ExpandMore.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ExpandMore.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/ExpandMore.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/ExpandMore.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Info.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Info.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Info.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Info.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/NotInterested.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/NotInterested.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/NotInterested.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/NotInterested.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Star.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Star.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Star.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Star.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Tune.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Tune.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/sharp/Tune.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/sharp/Tune.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Apps.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Apps.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Apps.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Apps.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Backspace.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Backspace.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Backspace.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Backspace.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Check.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Check.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Check.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Check.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ChevronLeft.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ChevronLeft.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ChevronLeft.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ChevronLeft.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ChevronRight.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ChevronRight.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ChevronRight.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ChevronRight.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Clear.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Clear.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Clear.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Clear.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ContentCopy.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ContentCopy.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ContentCopy.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ContentCopy.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ContentPaste.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ContentPaste.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ContentPaste.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ContentPaste.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiEmotions.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiEmotions.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiEmotions.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiEmotions.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiEvents.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiEvents.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiEvents.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiEvents.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiFlags.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiFlags.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiFlags.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiFlags.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiFoodBeverage.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiFoodBeverage.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiFoodBeverage.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiFoodBeverage.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiNature.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiNature.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiNature.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiNature.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiObjects.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiObjects.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiObjects.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiObjects.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiSymbols.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiSymbols.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiSymbols.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiSymbols.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiTransportation.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiTransportation.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/EmojiTransportation.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/EmojiTransportation.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Error.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Error.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Error.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Error.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ExpandMore.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ExpandMore.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/ExpandMore.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/ExpandMore.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Info.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Info.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Info.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Info.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/NotInterested.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/NotInterested.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/NotInterested.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/NotInterested.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Star.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Star.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Star.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Star.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Tune.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Tune.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/icons/twotone/Tune.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/icons/twotone/Tune.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/CoreSelection.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/CoreSelection.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/CoreSelection.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/CoreSelection.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseBehaviors.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseBehaviors.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseBehaviors.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseBehaviors.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseConfigs.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseConfigs.kt similarity index 96% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseConfigs.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseConfigs.kt index 2ef6fb7e..ebecd33f 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseConfigs.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseConfigs.kt @@ -17,6 +17,7 @@ package com.maxkeppeker.sheets.core.models.base import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.utils.BaseConstants +import kotlinx.serialization.Serializable /** * Base configs for dialog-specific configs. diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseEffects.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseEffects.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseEffects.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseEffects.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseSelection.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseSelection.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/BaseSelection.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/BaseSelection.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/ButtonStyle.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/ButtonStyle.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/ButtonStyle.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/ButtonStyle.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/Debouncer.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/Debouncer.kt similarity index 93% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/Debouncer.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/Debouncer.kt index 0bf48561..b6ad03f8 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/Debouncer.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/Debouncer.kt @@ -15,6 +15,8 @@ */ package com.maxkeppeker.sheets.core.models.base +import kotlinx.datetime.Clock + /** * A class for time-based debouncing. * @@ -25,7 +27,7 @@ class Debouncer(private val delay: Long) { private var lastTime = 0L private val currentTime: Long - get() = System.currentTimeMillis() + get() = Clock.System.now().toEpochMilliseconds() /** * Debounces the given action by delaying its execution for the specified delay time. diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/Header.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/Header.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/Header.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/Header.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/IconSource.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/IconSource.kt similarity index 93% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/IconSource.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/IconSource.kt index 6f87304e..aab2c6e5 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/IconSource.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/IconSource.kt @@ -17,19 +17,21 @@ package com.maxkeppeker.sheets.core.models.base -import androidx.annotation.DrawableRes +import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.graphics.vector.ImageVector +import org.jetbrains.compose.resources.DrawableResource +import org.jetbrains.compose.resources.ExperimentalResourceApi /** * An icon from various sources alongside an optional contentDescription and tint. */ class IconSource { - @DrawableRes - var drawableRes: Int? = null + @OptIn(ExperimentalResourceApi::class) + var drawableRes: DrawableResource? = null var imageVector: ImageVector? = null var bitmap: ImageBitmap? = null var painter: Painter? = null @@ -43,8 +45,9 @@ class IconSource { * @param contentDescription Text that is used as content description for the icon * @param tint Color that is used to tint the icon */ + @OptIn(ExperimentalResourceApi::class) constructor( - @DrawableRes drawableRes: Int, + drawableRes: DrawableResource, contentDescription: String? = null, tint: Color? = null ) { @@ -108,8 +111,9 @@ class IconSource { * @param tint Color that is used to tint the icon * @param selectedTint Color that is used to tint the icon when selected */ + @OptIn(ExperimentalResourceApi::class) constructor( - @DrawableRes drawableRes: Int, + drawableRes: DrawableResource, contentDescription: String? = null, tint: Color? = null, selectedTint: Color? = null diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/LibOrientation.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/LibOrientation.kt similarity index 85% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/LibOrientation.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/LibOrientation.kt index e741e539..aee11d1c 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/LibOrientation.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/LibOrientation.kt @@ -15,13 +15,17 @@ */ package com.maxkeppeker.sheets.core.models.base +import kotlinx.serialization.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable + /** * Represents the orientations of the use-case views. * * @property PORTRAIT orientation with height greater than width * @property LANDSCAPE orientation with width greater than height */ -enum class LibOrientation { +@Serializable +enum class LibOrientation : JvmSerializable { PORTRAIT, LANDSCAPE, } \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/SelectionButton.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/SelectionButton.kt similarity index 88% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/SelectionButton.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/SelectionButton.kt index 3ba282a8..93b91f11 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/SelectionButton.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/SelectionButton.kt @@ -15,8 +15,9 @@ */ package com.maxkeppeker.sheets.core.models.base -import androidx.annotation.StringRes import androidx.compose.ui.text.AnnotatedString +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.StringResource /** * Represents a button with text and an optional icon. @@ -24,8 +25,8 @@ import androidx.compose.ui.text.AnnotatedString open class SelectionButton { internal val text: String? - @StringRes - internal val textRes: Int? + @OptIn(ExperimentalResourceApi::class) + internal val textRes: StringResource? val annotatedString: AnnotatedString? internal val icon: IconSource? internal val type: ButtonStyle @@ -37,6 +38,7 @@ open class SelectionButton { * @param icon The icon to be displayed on the button. Can be `null`. * @param type The style of the button. Default value is `ButtonStyle.TEXT`. */ + @OptIn(ExperimentalResourceApi::class) constructor( text: String, icon: IconSource? = null, @@ -56,8 +58,9 @@ open class SelectionButton { * @param icon The icon to be displayed on the button. Can be `null`. * @param type The style of the button. Default value is `ButtonStyle.TEXT`. */ + @OptIn(ExperimentalResourceApi::class) constructor( - @StringRes textRes: Int, + textRes: StringResource, icon: IconSource? = null, type: ButtonStyle = ButtonStyle.TEXT ) { @@ -75,6 +78,7 @@ open class SelectionButton { * @param icon The icon to be displayed on the button. Can be `null`. * @param type The style of the button. Default value is `ButtonStyle.TEXT`. */ + @OptIn(ExperimentalResourceApi::class) constructor( annotatedString: AnnotatedString, icon: IconSource? = null, diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/UseCaseState.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/UseCaseState.kt similarity index 97% rename from core/src/main/java/com/maxkeppeker/sheets/core/models/base/UseCaseState.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/UseCaseState.kt index 33263cb3..7c5e2547 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/models/base/UseCaseState.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/models/base/UseCaseState.kt @@ -21,7 +21,8 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue -import java.io.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable /** * Handles the base behavior of any use-case view. @@ -37,7 +38,7 @@ class UseCaseState( internal val onFinishedRequest: (UseCaseState.() -> Unit)? = null, internal val onDismissRequest: (UseCaseState.() -> Unit)? = null, internal val onCloseRequest: (UseCaseState.() -> Unit)? = null, -) { +) : JvmSerializable { internal var visible by mutableStateOf(visible) internal var embedded by mutableStateOf(embedded) internal var reset by mutableStateOf(false) @@ -154,10 +155,11 @@ class UseCaseState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class UseCaseStateData( val visible: Boolean, val embedded: Boolean, - ) : Serializable + ) : JvmSerializable } /** diff --git a/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.kt new file mode 100644 index 00000000..63011b25 --- /dev/null +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.kt @@ -0,0 +1,6 @@ +package com.maxkeppeker.sheets.core.utils + +import androidx.compose.runtime.Composable + +@Composable +expect fun AndroidWindowSizeFix(content: @Composable () -> Unit) \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.kt similarity index 65% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.kt index d4e63534..885e5b9f 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.kt @@ -16,15 +16,6 @@ package com.maxkeppeker.sheets.core.utils import androidx.compose.runtime.Composable -import androidx.compose.ui.platform.LocalConfiguration -private const val TABLET_THRESHOLD = 800 - -/** - * Determines whether the current screen should use landscape mode. - * - * @return `true` if the screen height is less than the [TABLET_THRESHOLD] in landscape mode, `false` otherwise. - */ @Composable -fun shouldUseLandscape(): Boolean = - LocalConfiguration.current.screenHeightDp < TABLET_THRESHOLD \ No newline at end of file +expect fun isLandscape(): Boolean \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseConstants.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseConstants.kt similarity index 79% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseConstants.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseConstants.kt index f934ef7f..4f0bd664 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseConstants.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseConstants.kt @@ -20,6 +20,10 @@ import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.ButtonStyle import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeker.sheets.core.models.base.SelectionButton +import org.jetbrains.compose.resources.ExperimentalResourceApi +import sheets_compose_dialogs.core.generated.resources.Res +import sheets_compose_dialogs.core.generated.resources.cancel +import sheets_compose_dialogs.core.generated.resources.ok /** * Defines module-wide constants. @@ -38,14 +42,16 @@ object BaseConstants { val DYNAMIC_SIZE_MAX = 200.dp + @OptIn(ExperimentalResourceApi::class) val DEFAULT_NEGATIVE_BUTTON = SelectionButton( - textRes = android.R.string.cancel, + textRes = Res.string.cancel, type = ButtonStyle.TEXT ) + @OptIn(ExperimentalResourceApi::class) val DEFAULT_POSITIVE_BUTTON = SelectionButton( - textRes = android.R.string.ok, + textRes = Res.string.ok, type = ButtonStyle.TEXT ) } \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseExtensions.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseExtensions.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseExtensions.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseExtensions.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseModifiers.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseModifiers.kt similarity index 84% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseModifiers.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseModifiers.kt index 26b9f8cf..45635753 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseModifiers.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseModifiers.kt @@ -19,8 +19,7 @@ import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.heightIn import androidx.compose.ui.Modifier import androidx.compose.ui.composed -import androidx.compose.ui.res.dimensionResource -import com.maxkeppeler.sheets.core.R +import androidx.compose.ui.unit.dp /** @@ -35,11 +34,10 @@ object BaseModifiers { */ fun Modifier.dynamicContentWrapOrMaxHeight(scope: ColumnScope): Modifier = composed { val modifier = this - val dynamicContentMaxHeight = dimensionResource(id = R.dimen.scd_dynamic_content_max_height) scope.run { modifier .weight(1f, false) - .heightIn(max = dynamicContentMaxHeight) + .heightIn(max = 350.dp) } } } \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseUtils.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseUtils.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseUtils.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseUtils.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseValues.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseValues.kt similarity index 77% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseValues.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseValues.kt index c2cc7303..d1116366 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/utils/BaseValues.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseValues.kt @@ -17,9 +17,7 @@ package com.maxkeppeker.sheets.core.utils import androidx.compose.foundation.layout.PaddingValues import androidx.compose.runtime.Composable -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.unit.dp -import com.maxkeppeler.sheets.core.R /** * Defines module-wide values. @@ -29,8 +27,8 @@ object BaseValues { val CONTENT_DEFAULT_PADDING: PaddingValues @Composable get() = PaddingValues( - start = dimensionResource(id = R.dimen.scd_normal_150), - end = dimensionResource(id = R.dimen.scd_normal_150), - top = dimensionResource(id = R.dimen.scd_normal_100) + start = 24.dp, + end = 24.dp, + top = 16.dp ) } \ No newline at end of file diff --git a/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.kt new file mode 100644 index 00000000..f4403fc9 --- /dev/null +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.kt @@ -0,0 +1,3 @@ +package com.maxkeppeker.sheets.core.utils + +expect interface JvmSerializable \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/utils/TestTags.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/TestTags.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/utils/TestTags.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/utils/TestTags.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/BaseTypeState.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/BaseTypeState.kt similarity index 87% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/BaseTypeState.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/BaseTypeState.kt index ee7f92ae..2243f872 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/views/BaseTypeState.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/BaseTypeState.kt @@ -18,12 +18,14 @@ package com.maxkeppeker.sheets.core.views import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue -import java.io.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable /** * The base class for the use-case view states. */ -abstract class BaseTypeState : Serializable { +@Serializable +abstract class BaseTypeState : JvmSerializable { open var inputDisabled by mutableStateOf(false) diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/ButtonsComponent.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/ButtonsComponent.kt similarity index 88% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/ButtonsComponent.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/ButtonsComponent.kt index 7ac55d19..ee333936 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/views/ButtonsComponent.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/ButtonsComponent.kt @@ -32,8 +32,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.ButtonStyle import com.maxkeppeker.sheets.core.models.base.LibOrientation @@ -41,7 +40,8 @@ import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.models.base.UseCaseState import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource /** * Buttons component. @@ -82,14 +82,14 @@ fun ButtonsComponent( val buttonPadding = when (orientation) { LibOrientation.PORTRAIT -> Modifier - .padding(top = dimensionResource(id = R.dimen.scd_normal_150)) - .padding(bottom = dimensionResource(id = R.dimen.scd_normal_150)) - .padding(horizontal = dimensionResource(id = R.dimen.scd_normal_150)) + .padding(top = 24.dp) + .padding(bottom = 24.dp) + .padding(horizontal = 24.dp) LibOrientation.LANDSCAPE -> Modifier - .padding(top = dimensionResource(id = R.dimen.scd_small_100)) - .padding(bottom = dimensionResource(id = R.dimen.scd_small_100)) - .padding(horizontal = dimensionResource(id = R.dimen.scd_small_100)) + .padding(top = 8.dp) + .padding(bottom = 8.dp) + .padding(horizontal = 8.dp) } Row( @@ -114,7 +114,7 @@ fun ButtonsComponent( SelectionButtonComponent( modifier = Modifier .wrapContentWidth() - .padding(horizontal = dimensionResource(id = R.dimen.scd_normal_100)), + .padding(horizontal = 16.dp), button = negativeButton, onClick = negativeAction, testTag = TestTags.BUTTON_NEGATIVE, @@ -140,6 +140,7 @@ fun ButtonsComponent( * @param enabled Controls the enabled state of this button. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services. * @param testTag The text that is used for the test tag. */ +@OptIn(ExperimentalResourceApi::class) @Composable private fun SelectionButtonComponent( modifier: Modifier, @@ -153,10 +154,10 @@ private fun SelectionButtonComponent( IconComponent( modifier = Modifier .testTags(testTag, TestTags.BUTTON_ICON) - .size(dimensionResource(R.dimen.scd_size_100)), + .size(16.dp), iconSource = icon, ) - Spacer(modifier = Modifier.width(dimensionResource(id = R.dimen.scd_small_100))) + Spacer(modifier = Modifier.width(8.dp)) } when { diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/Grid.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/Grid.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/Grid.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/Grid.kt diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/HeaderComponent.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/HeaderComponent.kt similarity index 90% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/HeaderComponent.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/HeaderComponent.kt index 887559f5..573c53bb 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/views/HeaderComponent.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/HeaderComponent.kt @@ -27,12 +27,10 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.Header import com.maxkeppeker.sheets.core.utils.TestTags -import com.maxkeppeler.sheets.core.R as RC /** * Header component of the dialog. @@ -64,14 +62,14 @@ private fun DefaultHeaderComponent( .testTag(TestTags.HEADER_DEFAULT) .fillMaxWidth() .padding(contentHorizontalPadding) - .padding(top = dimensionResource(id = RC.dimen.scd_normal_150)), + .padding(top = 24.dp), horizontalAlignment = if (header.icon != null) Alignment.CenterHorizontally else Alignment.Start ) { header.icon?.let { IconComponent( modifier = Modifier .testTag(TestTags.HEADER_DEFAULT_ICON) - .size(dimensionResource(RC.dimen.scd_size_150)), + .size(24.dp), iconSource = it, defaultTint = MaterialTheme.colorScheme.secondary ) @@ -82,7 +80,7 @@ private fun DefaultHeaderComponent( modifier = Modifier .testTag(TestTags.HEADER_DEFAULT_TEXT) .padding( - top = if (header.icon != null) dimensionResource(id = RC.dimen.scd_normal_100) + top = if (header.icon != null) 16.dp else 0.dp ), color = MaterialTheme.colorScheme.onSurface, diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/IconComponent.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/IconComponent.kt similarity index 92% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/IconComponent.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/IconComponent.kt index 687a0907..fa42bd1d 100644 --- a/core/src/main/java/com/maxkeppeker/sheets/core/views/IconComponent.kt +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/IconComponent.kt @@ -20,8 +20,9 @@ import androidx.compose.material3.LocalContentColor import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource import com.maxkeppeker.sheets.core.models.base.IconSource +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.painterResource /** * Icon component that is displayed in various places in a dialog. @@ -30,6 +31,7 @@ import com.maxkeppeker.sheets.core.models.base.IconSource * @param tint The color that is used to tint the icon. * @param defaultTint The default color that is used. */ +@OptIn(ExperimentalResourceApi::class) @Composable fun IconComponent( modifier: Modifier, @@ -40,7 +42,9 @@ fun IconComponent( val actualTint = tint ?: iconSource.tint ?: defaultTint ?: LocalContentColor.current - val resolvedPainterDrawableRes = iconSource.drawableRes?.let { painterResource(id = it) } + val resolvedPainterDrawableRes = iconSource.drawableRes?.let { + painterResource(it) + } (iconSource.painter ?: resolvedPainterDrawableRes)?.let { Icon( modifier = modifier, diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/base/DialogBase.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/DialogBase.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/base/DialogBase.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/DialogBase.kt diff --git a/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/FrameBase.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/FrameBase.kt new file mode 100644 index 00000000..913a23b7 --- /dev/null +++ b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/FrameBase.kt @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@file:OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3Api::class) + +package com.maxkeppeker.sheets.core.views.base + +import androidx.compose.foundation.layout.* +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.LocalLayoutDirection +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.unit.dp +import com.maxkeppeker.sheets.core.models.base.BaseConfigs +import com.maxkeppeker.sheets.core.models.base.Header +import com.maxkeppeker.sheets.core.models.base.LibOrientation +import com.maxkeppeker.sheets.core.utils.AndroidWindowSizeFix +import com.maxkeppeker.sheets.core.utils.BaseValues +import com.maxkeppeker.sheets.core.utils.TestTags +import com.maxkeppeker.sheets.core.utils.isLandscape +import com.maxkeppeker.sheets.core.views.HeaderComponent + +/** + * Base component for the content structure of a dialog. + * @param header The content to be displayed inside the dialog that functions as the header view of the dialog. + * @param horizontalContentPadding The horizontal padding that is applied to the content. + * @param layout The content to be displayed inside the dialog between the header and the buttons. + * @param layoutHorizontalAlignment The horizontal alignment of the layout's children. + * @param layoutLandscape The content to be displayed inside the dialog between the header and the buttons when the device is in landscape mode. + * @param layoutLandscapeVerticalAlignment The vertical alignment of the layout's children in landscape mode. + * @param buttonsVisible Display the buttons. + * @param buttons The content to be displayed inside the dialog that functions as the buttons view of the dialog. + */ +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun FrameBase( + header: Header? = null, + config: BaseConfigs? = null, + horizontalContentPadding: PaddingValues = BaseValues.CONTENT_DEFAULT_PADDING, + layout: @Composable ColumnScope.(LibOrientation) -> Unit, + layoutHorizontalAlignment: Alignment.Horizontal = Alignment.Start, + layoutLandscape: @Composable (RowScope.() -> Unit)? = null, + layoutLandscapeVerticalAlignment: Alignment.Vertical = Alignment.CenterVertically, + buttonsVisible: Boolean = true, + buttons: @Composable (ColumnScope.(LibOrientation) -> Unit)? = null, +) { + AndroidWindowSizeFix { + val layoutDirection = LocalLayoutDirection.current + val isDeviceLandscape = isLandscape() + val deviceOrientation = if (config?.orientation != LibOrientation.PORTRAIT && isDeviceLandscape) { + LibOrientation.LANDSCAPE + } else { + LibOrientation.PORTRAIT + } + val layoutType = when (config?.orientation) { + null -> { + when { + // Only if auto orientation is currently landscape, content for landscape exists + // and the device screen is not larger than a typical phone. + isDeviceLandscape && layoutLandscape != null -> LibOrientation.LANDSCAPE + else -> LibOrientation.PORTRAIT + } + } + LibOrientation.LANDSCAPE -> if (layoutLandscape != null) LibOrientation.LANDSCAPE else LibOrientation.PORTRAIT + else -> config.orientation + } + + Column( + modifier = when (deviceOrientation) { + LibOrientation.PORTRAIT -> Modifier.wrapContentSize() + LibOrientation.LANDSCAPE -> Modifier + .wrapContentWidth() + }, + horizontalAlignment = Alignment.Start + ) { + + header?.takeUnless { deviceOrientation == LibOrientation.LANDSCAPE }?.let { + // Display header + Column(modifier = Modifier.testTag(TestTags.FRAME_BASE_HEADER)) { + HeaderComponent( + header = header, + contentHorizontalPadding = PaddingValues( + start = horizontalContentPadding.calculateStartPadding(layoutDirection), + end = horizontalContentPadding.calculateEndPadding(layoutDirection), + ) + ) + } + } ?: run { + // If no header is defined, add extra spacing to the content top padding + Spacer( + modifier = Modifier + .testTag(TestTags.FRAME_BASE_NO_HEADER) + .height(8.dp) + ) + } + + val contentModifier = Modifier + .testTag(TestTags.FRAME_BASE_CONTENT) + .padding( + PaddingValues( + start = horizontalContentPadding.calculateStartPadding( + layoutDirection + ), + end = horizontalContentPadding.calculateEndPadding(layoutDirection), + // Enforce default top spacing + top = 16.dp, + ) + ) + when (layoutType) { + LibOrientation.PORTRAIT -> { + Column( + modifier = contentModifier, + horizontalAlignment = layoutHorizontalAlignment, + content = { layout(deviceOrientation) } + ) + } + LibOrientation.LANDSCAPE -> { + Row( + modifier = contentModifier, + verticalAlignment = layoutLandscapeVerticalAlignment, + content = layoutLandscape!! + ) + } + else -> Unit + } + + buttons?.let { buttons -> + if (buttonsVisible) { + Column(modifier = Modifier.testTag(TestTags.FRAME_BASE_BUTTONS)) { + buttons.invoke(this, deviceOrientation) + } + } else Spacer( + modifier = Modifier + .testTag(TestTags.FRAME_BASE_NO_BUTTONS) + .height(24.dp) + ) + } + } + } +} \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/base/PopupBase.kt b/core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/PopupBase.kt similarity index 100% rename from core/src/main/java/com/maxkeppeker/sheets/core/views/base/PopupBase.kt rename to core/src/commonMain/kotlin/com/maxkeppeker/sheets/core/views/base/PopupBase.kt diff --git a/core/src/jvmMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.jvm.kt b/core/src/jvmMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.jvm.kt new file mode 100644 index 00000000..d541a1c6 --- /dev/null +++ b/core/src/jvmMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.jvm.kt @@ -0,0 +1,8 @@ +package com.maxkeppeker.sheets.core.utils + +import androidx.compose.runtime.Composable + +@Composable +actual fun AndroidWindowSizeFix(content: @Composable () -> Unit) { + content() +} \ No newline at end of file diff --git a/core/src/jvmMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.jvm.kt b/core/src/jvmMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.jvm.kt new file mode 100644 index 00000000..efda510a --- /dev/null +++ b/core/src/jvmMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.jvm.kt @@ -0,0 +1,5 @@ +package com.maxkeppeker.sheets.core.utils + +import java.io.Serializable + +actual typealias JvmSerializable = Serializable \ No newline at end of file diff --git a/core/src/macosMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.macos.kt b/core/src/macosMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.macos.kt new file mode 100644 index 00000000..d70e7d4f --- /dev/null +++ b/core/src/macosMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.macos.kt @@ -0,0 +1,8 @@ +package com.maxkeppeker.sheets.core.utils + +import androidx.compose.runtime.Composable + +@Composable +actual fun isLandscape(): Boolean { + return false +} \ No newline at end of file diff --git a/core/src/main/AndroidManifest.xml b/core/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/core/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/core/src/main/java/com/maxkeppeker/sheets/core/views/base/FrameBase.kt b/core/src/main/java/com/maxkeppeker/sheets/core/views/base/FrameBase.kt deleted file mode 100644 index 385a7f81..00000000 --- a/core/src/main/java/com/maxkeppeker/sheets/core/views/base/FrameBase.kt +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3Api::class) - -package com.maxkeppeker.sheets.core.views.base - -import android.content.res.Configuration -import androidx.compose.foundation.layout.* -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalConfiguration -import androidx.compose.ui.platform.LocalLayoutDirection -import androidx.compose.ui.platform.testTag -import androidx.compose.ui.res.dimensionResource -import com.maxkeppeker.sheets.core.models.base.BaseConfigs -import com.maxkeppeker.sheets.core.models.base.Header -import com.maxkeppeker.sheets.core.models.base.LibOrientation -import com.maxkeppeker.sheets.core.utils.BaseValues -import com.maxkeppeker.sheets.core.utils.TestTags -import com.maxkeppeker.sheets.core.utils.shouldUseLandscape -import com.maxkeppeker.sheets.core.views.HeaderComponent -import com.maxkeppeler.sheets.core.R as RC - -/** - * Base component for the content structure of a dialog. - * @param header The content to be displayed inside the dialog that functions as the header view of the dialog. - * @param horizontalContentPadding The horizontal padding that is applied to the content. - * @param layout The content to be displayed inside the dialog between the header and the buttons. - * @param layoutHorizontalAlignment The horizontal alignment of the layout's children. - * @param layoutLandscape The content to be displayed inside the dialog between the header and the buttons when the device is in landscape mode. - * @param layoutLandscapeVerticalAlignment The vertical alignment of the layout's children in landscape mode. - * @param buttonsVisible Display the buttons. - * @param buttons The content to be displayed inside the dialog that functions as the buttons view of the dialog. - */ -@Composable -fun FrameBase( - header: Header? = null, - config: BaseConfigs? = null, - horizontalContentPadding: PaddingValues = BaseValues.CONTENT_DEFAULT_PADDING, - layout: @Composable ColumnScope.(LibOrientation) -> Unit, - layoutHorizontalAlignment: Alignment.Horizontal = Alignment.Start, - layoutLandscape: @Composable (RowScope.() -> Unit)? = null, - layoutLandscapeVerticalAlignment: Alignment.Vertical = Alignment.CenterVertically, - buttonsVisible: Boolean = true, - buttons: @Composable (ColumnScope.(LibOrientation) -> Unit)? = null, -) { - val layoutDirection = LocalLayoutDirection.current - val shouldUseLandscapeLayout = shouldUseLandscape() - val currentOrientation = LocalConfiguration.current.orientation - val isDeviceLandscape = currentOrientation == Configuration.ORIENTATION_LANDSCAPE - val deviceOrientation = - if (config?.orientation != LibOrientation.PORTRAIT && isDeviceLandscape) LibOrientation.LANDSCAPE else LibOrientation.PORTRAIT - val layoutType = when (config?.orientation) { - null -> { - when { - // Only if auto orientation is currently landscape, content for landscape exists - // and the device screen is not larger than a typical phone. - isDeviceLandscape - && layoutLandscape != null - && shouldUseLandscapeLayout -> LibOrientation.LANDSCAPE - else -> LibOrientation.PORTRAIT - } - } - LibOrientation.LANDSCAPE -> if (layoutLandscape != null) LibOrientation.LANDSCAPE else LibOrientation.PORTRAIT - else -> config.orientation - } - - Column( - modifier = when (deviceOrientation) { - LibOrientation.PORTRAIT -> Modifier.wrapContentSize() - LibOrientation.LANDSCAPE -> Modifier - .wrapContentWidth() - }, - horizontalAlignment = Alignment.Start - ) { - - header?.takeUnless { deviceOrientation == LibOrientation.LANDSCAPE }?.let { - // Display header - Column(modifier = Modifier.testTag(TestTags.FRAME_BASE_HEADER)) { - HeaderComponent( - header = header, - contentHorizontalPadding = PaddingValues( - start = horizontalContentPadding.calculateStartPadding(layoutDirection), - end = horizontalContentPadding.calculateEndPadding(layoutDirection), - ) - ) - } - } ?: run { - // If no header is defined, add extra spacing to the content top padding - Spacer( - modifier = Modifier - .testTag(TestTags.FRAME_BASE_NO_HEADER) - .height(dimensionResource(RC.dimen.scd_small_100)) - ) - } - - val contentModifier = Modifier - .testTag(TestTags.FRAME_BASE_CONTENT) - .padding( - PaddingValues( - start = horizontalContentPadding.calculateStartPadding( - layoutDirection - ), - end = horizontalContentPadding.calculateEndPadding(layoutDirection), - // Enforce default top spacing - top = dimensionResource(RC.dimen.scd_normal_100), - ) - ) - when (layoutType) { - LibOrientation.PORTRAIT -> { - Column( - modifier = contentModifier, - horizontalAlignment = layoutHorizontalAlignment, - content = { layout(deviceOrientation) } - ) - } - LibOrientation.LANDSCAPE -> { - Row( - modifier = contentModifier, - verticalAlignment = layoutLandscapeVerticalAlignment, - content = layoutLandscape!! - ) - } - else -> Unit - } - - buttons?.let { buttons -> - if (buttonsVisible) { - Column(modifier = Modifier.testTag(TestTags.FRAME_BASE_BUTTONS)) { - buttons.invoke(this, deviceOrientation) - } - } else Spacer( - modifier = Modifier - .testTag(TestTags.FRAME_BASE_NO_BUTTONS) - .height(dimensionResource(RC.dimen.scd_normal_150)) - ) - } - } -} \ No newline at end of file diff --git a/core/src/main/res/values-de-rDE/strings.xml b/core/src/main/res/values-de-rDE/strings.xml deleted file mode 100644 index dcd00853..00000000 --- a/core/src/main/res/values-de-rDE/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Abbrechen - ok - \ No newline at end of file diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml deleted file mode 100644 index 8a17d70f..00000000 --- a/core/src/main/res/values/dimens.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - 2dp - 4dp - 6dp - 8dp - 10dp - 12dp - - 16dp - 20dp - 24dp - 28dp - - 32dp - 40dp - 48dp - 56dp - 64dp - 72dp - 80dp - 128dp - - - - 8dp - 16dp - 20dp - 24dp - 28dp - 32dp - 36dp - 40dp - 44dp - 48dp - 52dp - 56dp - - - - 350dp - - - diff --git a/core/src/nonJvmMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.nonJvm.kt b/core/src/nonJvmMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.nonJvm.kt new file mode 100644 index 00000000..d541a1c6 --- /dev/null +++ b/core/src/nonJvmMain/kotlin/com/maxkeppeker/sheets/core/utils/AndroidWindowSizeFix.nonJvm.kt @@ -0,0 +1,8 @@ +package com.maxkeppeker.sheets.core.utils + +import androidx.compose.runtime.Composable + +@Composable +actual fun AndroidWindowSizeFix(content: @Composable () -> Unit) { + content() +} \ No newline at end of file diff --git a/core/src/nonJvmMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.nonJvm.kt b/core/src/nonJvmMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.nonJvm.kt new file mode 100644 index 00000000..3e455d88 --- /dev/null +++ b/core/src/nonJvmMain/kotlin/com/maxkeppeker/sheets/core/utils/JvmSerializable.nonJvm.kt @@ -0,0 +1,3 @@ +package com.maxkeppeker.sheets.core.utils + +actual interface JvmSerializable \ No newline at end of file diff --git a/core/src/nonMacosMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.nonMacOs.kt b/core/src/nonMacosMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.nonMacOs.kt new file mode 100644 index 00000000..7f6ebb76 --- /dev/null +++ b/core/src/nonMacosMain/kotlin/com/maxkeppeker/sheets/core/utils/BaseComposeUtils.nonMacOs.kt @@ -0,0 +1,15 @@ +package com.maxkeppeker.sheets.core.utils + +import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi +import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass +import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass +import androidx.compose.runtime.Composable + +@OptIn(ExperimentalMaterial3WindowSizeClassApi::class) +@Composable +actual fun isLandscape(): Boolean { + return when (calculateWindowSizeClass().widthSizeClass) { + WindowWidthSizeClass.Expanded -> true + else -> false + } +} \ No newline at end of file diff --git a/date_time/build.gradle.kts b/date_time/build.gradle.kts index fea538f4..9dd1cccd 100644 --- a/date_time/build.gradle.kts +++ b/date_time/build.gradle.kts @@ -1,3 +1,5 @@ +import com.vanniktech.maven.publish.SonatypeHost + /* * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) * @@ -14,23 +16,74 @@ * limitations under the License. */ plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.DATE_TIME.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } compileOptions { - // Flag to enable support for the new language APIs isCoreLibraryDesugaringEnabled = true + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.DATE_TIME.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.datetime) + implementation(libs.serialization) + + api(project(":core")) + } } } dependencies { - implementations(Dependencies.SNAPPER) - coreLibraryDesugaring(Dependencies.DESUGAR) + coreLibraryDesugaring(libs.desugar) } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/date_time/src/androidMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.android.kt b/date_time/src/androidMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.android.kt new file mode 100644 index 00000000..20ff2415 --- /dev/null +++ b/date_time/src/androidMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.android.kt @@ -0,0 +1,25 @@ +package com.maxkeppeler.sheets.date_time.utils + +import java.time.chrono.Chronology +import java.time.format.DateTimeFormatterBuilder +import java.util.Locale + +internal fun FormatStyle.toJava(): java.time.format.FormatStyle { + return when (this) { + FormatStyle.FULL -> java.time.format.FormatStyle.FULL + FormatStyle.LONG -> java.time.format.FormatStyle.LONG + FormatStyle.MEDIUM -> java.time.format.FormatStyle.MEDIUM + FormatStyle.SHORT -> java.time.format.FormatStyle.SHORT + } +} + +internal actual fun getLocalizedPattern( + isDate: Boolean, + formatStyle: FormatStyle +): String { + val locale = Locale.getDefault() + return DateTimeFormatterBuilder.getLocalizedDateTimePattern( + if (isDate) formatStyle.toJava() else null, + if (!isDate) formatStyle.toJava() else null, Chronology.ofLocale(locale), locale + ).toString() +} \ No newline at end of file diff --git a/date_time/src/appleMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.apple.kt b/date_time/src/appleMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.apple.kt new file mode 100644 index 00000000..d0baaba8 --- /dev/null +++ b/date_time/src/appleMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.apple.kt @@ -0,0 +1,25 @@ +package com.maxkeppeler.sheets.date_time.utils + +import platform.Foundation.* + +internal fun FormatStyle.toSwift(isAbsent: Boolean): NSDateFormatterStyle { + if (isAbsent) { + return NSDateFormatterNoStyle + } + return when (this) { + FormatStyle.FULL -> NSDateFormatterFullStyle + FormatStyle.LONG -> NSDateFormatterLongStyle + FormatStyle.MEDIUM -> NSDateFormatterMediumStyle + FormatStyle.SHORT -> NSDateFormatterShortStyle + } +} + +internal actual fun getLocalizedPattern( + isDate: Boolean, + formatStyle: FormatStyle +): String { + val formatter = NSDateFormatter() + formatter.setDateStyle(formatStyle.toSwift(!isDate)) + formatter.setTimeStyle(formatStyle.toSwift(isDate)) + return formatter.dateFormat() +} \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-bg/strings.xml b/date_time/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..7d4f9f63 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,14 @@ + + + AM + ММ + Часове + Минути + Секунди + Ден + Месец + Година + Настройка на време + Задайте дата. + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-cs/strings.xml b/date_time/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..e656464e --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Hodiny + Minuty + Sekundy + Den + Měsíc + Rok + Nastavte čas + Nastavit datum + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-da/strings.xml b/date_time/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..587db796 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Timer + Minutter + Sekunder + Dag + Måned + År + Indstil tid + Vælg dato + + \ No newline at end of file diff --git a/date_time/src/main/res/values-de-rDE/strings.xml b/date_time/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 95% rename from date_time/src/main/res/values-de-rDE/strings.xml rename to date_time/src/commonMain/composeResources/values-de-rDE/strings.xml index 92441059..84a8c774 100644 --- a/date_time/src/main/res/values-de-rDE/strings.xml +++ b/date_time/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -1,4 +1,4 @@ - + AM diff --git a/date_time/src/commonMain/composeResources/values-de/strings.xml b/date_time/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..bcceb8ba --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Stunden + Minuten + Sekunden + Tag + Monat + Jahr + Zeit einstellen + Datum festlegen + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-el/strings.xml b/date_time/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..d47de0be --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,14 @@ + + + AM + ΚΥ + Ωρες + Λεπτά + Δευτερόλεπτα + Ημέρα + Μήνας + Έτος + Ρύθμιση ώρας + Ορισμός ημερομηνίας. + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-eo/strings.xml b/date_time/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..1c0b4419 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Horoj + Minutes + Sekundoj + Tago + Monato + Jaro + Difini tempon + Agordi daton + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-es/strings.xml b/date_time/src/commonMain/composeResources/values-es/strings.xml new file mode 100644 index 00000000..ee08e7d1 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-es/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Horas + Minutos + Segundos + Día + Mes + Año + Establecer tiempo + Establecer fecha + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-et/strings.xml b/date_time/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..27865598 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Tunnid + Minutes + Sekundid + Day + Kuu + Aasta + Määra aeg + Määrake kuupäev + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-fa/strings.xml b/date_time/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..fe1f78ea --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,14 @@ + + + AM + صبح بخیر + ساعات + دقایق + ثانیه + روز + ماه + سال + تنظیم زمان + تنظیم تاریخ + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-fi/strings.xml b/date_time/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..1fef7ff4 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Tunnit + Pöytäkirja + Sekunnit + Päivä + Kuukausi + Vuosi + Aseta aika + Aseta päivämäärä + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-fr/strings.xml b/date_time/src/commonMain/composeResources/values-fr/strings.xml new file mode 100644 index 00000000..5f86c618 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-fr/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Heures + Minutes + Secondes + Jour + Mois + Année + Définir l\'heure + Définir la date + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ga/strings.xml b/date_time/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..a4ea2c9b --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,14 @@ + + + AM + Príomh-Aire + Uaireanta + Nótaí + Soicindí + + + Bliain + Roghnaigh ama + Socrú dáta + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-gd/strings.xml b/date_time/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..02190196 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Uairean + Gach mionaid + Dàrnaichean + Latha + Mìos + Bliadhna + Fhoirm + Deasaich dàta + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-hi/strings.xml b/date_time/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..c66393bc --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,14 @@ + + + AM + प्रधानमंत्री + घंटे + मिनट + सेकंड + दिन + महीना + वर्ष + समय सेट करें + तारीख सेट करें + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-hr/strings.xml b/date_time/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..aa91fcaa --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Sati + Minuta + Sekunde + Dan + Mjesec + Godina + Postavite vrijeme + Postavi datum + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-hu/strings.xml b/date_time/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..952704fb --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Órák + Percek + Másodpercek + Nap + Hónap + Év + Idő beállítása + Dátum beállítása + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-in-rID/strings.xml b/date_time/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..45058a2b --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM (Perdana Menteri) + Jam + Menit + Detik + Hari + Bulan + Tahun + Atur waktu + Atur tanggal + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-is/strings.xml b/date_time/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..695b9065 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Klukkustundir + Mínútur + Sekúndur + Dagur + Mánuður + Ár + Taktu tímann + Setja dagsetningu + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-it/strings.xml b/date_time/src/commonMain/composeResources/values-it/strings.xml new file mode 100644 index 00000000..513ace13 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-it/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM (Post Meridiem) + Ore + Minuti + Secondi + Giorno + Mese + Anno + Imposta l\'orario + Inserisci data + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-iw/strings.xml b/date_time/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..7a54f8a8 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,14 @@ + + + AM + ראש ממשלה + שעות + דקות + שניות + יום + חודש + שנה + הגדר זמן + הגדר תאריך + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ja/strings.xml b/date_time/src/commonMain/composeResources/values-ja/strings.xml new file mode 100644 index 00000000..3d793f34 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ja/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + 時間 + + + + + + 時間を設定してください。 + 日付を設定する + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-jv/strings.xml b/date_time/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..57aeb612 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Jam + Menit + Detik + Sasi + Bulan + Tahun + Damel wanci + Tanggal ditetapke + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-kk/strings.xml b/date_time/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..0beb4d2c --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,14 @@ + + + AM + Өкесінлерге жаза беру үшін ПМ. + Сағаттар + Минут + Секундтер + Күн + Ай + Жыл + Уақытты орнату + Күнді таңдау + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ko/strings.xml b/date_time/src/commonMain/composeResources/values-ko/strings.xml new file mode 100644 index 00000000..1cb0848d --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ko/strings.xml @@ -0,0 +1,14 @@ + + + 오전 + 오후 + 영업 시간 + 분 (Bun) + + + + + 시간 설정하기 + 날짜 설정하기 + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ku/strings.xml b/date_time/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..56a92c50 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,17 @@ + + + AM + PM + کاتژمێر + داقاوە + Seconds +چرکەکان + Ro + مانگ + Sal + کات دابنێ + +(or simply \"کات دابنێ\" if used in an Android app for setting time) + دەستکاریکردنی بەروار + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-lb/strings.xml b/date_time/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..4a5f3229 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Stonnen + Protokoll + Sekonnen + Dag + Monat + Johr + Festlegen vun der Zäit + Datum setzen + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-lo/strings.xml b/date_time/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..bd017969 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,14 @@ + + + ອາເມລ + ລົດມອນ + ເວລາ + ນະຄູນ + ວິນາທີ່ໃນວິນາທີ + ວັນ + ເດືອນ + ປີ + ຕັ້ງເວລາ + ຕັ້ງວັນທີ + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-lt/strings.xml b/date_time/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..8e7e84ff --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Valandos + Minutės + Sekundės + Diena + Mėnuo + Metai + Nustatykite laiką + Nustatykite datą + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-lv/strings.xml b/date_time/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..084f6288 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Stundas + Minūtes + Sekundes + Diena + Mēnesis. + Gads + Iestatīt laiku + Iestatīt datumu + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ms/strings.xml b/date_time/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..a046c746 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Jam + Minit + Saiz + Hari + Bulan + Tahun + Masa yang ditetapkan + Tetapkan tarikh + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ne/strings.xml b/date_time/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..b7daaf8b --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,14 @@ + + + AM + प्रधानमन्त्री + कालों + मिनेटसह + सेकेन्ड + दिन + महिना + वर्ष + समय सेट गर्नुहोस् + मिति सेट गर्नुहोस् + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-nl/strings.xml b/date_time/src/commonMain/composeResources/values-nl/strings.xml new file mode 100644 index 00000000..327c0cdc --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-nl/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Uren + Notulen + Seconden + Dag + Maand + Jaar + Tijd instellen + Stel datum in + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-no/strings.xml b/date_time/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..f6c214d9 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,14 @@ + + + OK + PM + Timer + Minutter + Sekunder + Dag + Måned + År + Angi tid + Angi dato + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-pl/strings.xml b/date_time/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..ea1a3859 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,14 @@ + + + AM + OK. + Godziny + Minuty + Sekundy + Dzień + Miesiąc + Rok + Ustaw czas + Ustaw datę + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-pt/strings.xml b/date_time/src/commonMain/composeResources/values-pt/strings.xml new file mode 100644 index 00000000..fbed35ac --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-pt/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM (Portador de Mensagens) + Horas + Minutos + Segundos + Dia + Mês + Ano + Definir horário + Definir data + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-ru/strings.xml b/date_time/src/commonMain/composeResources/values-ru/strings.xml new file mode 100644 index 00000000..a03afb48 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-ru/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Часы + Минуты + Секунды + День + Месяц + Год + Настроить время + Установить дату + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-sk/strings.xml b/date_time/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..0af7c3be --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,14 @@ + + + rýchly preklad am + PM + Hodiny + Minúty + Sekundy + Deň + Mesiac + Rok + Nastaviť čas + Nastaviť dátum + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-sl/strings.xml b/date_time/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..1d5f2b0c --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,14 @@ + + + AM + OK + Ure + Minuti + Sekunde + Dan + Mesec + Leto + Nastavi čas + Nastavi datum + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-sr/strings.xml b/date_time/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..1d1762f3 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Sati + Minuti + Sekunde + Dan + Mesec + Godina + Postavite vreme + Postavi datum + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-sv/strings.xml b/date_time/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..5f98b261 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Timmar + Protokoll + Sekunder + Dag + Månad + År + Ställ in tid + Ange datum + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-th/strings.xml b/date_time/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..095a850b --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,14 @@ + + + AM + นายกรัฐมนตรี + ชั่วโมง + นาที + วินาที + วัน + เดือน + ปี + ตั้งเวลา + กำหนดวันที่ + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-tr/strings.xml b/date_time/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..e91108ce --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Saatler + Dakikalar + Saniye + Gün + Ay + Yıl + Zaman ayarla + Tarih ayarla + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-uk/strings.xml b/date_time/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..53ec2c9e --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Години + Хвилини + Секунди + День + Місяць + Рік + Встановити час + Встановити дату + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-vi/strings.xml b/date_time/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..8eb34336 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,14 @@ + + + AM + Thủ tướng + Giờ + Phút + Giây. + Ngày + Tháng + Năm + Đặt thời gian + Đặt ngày + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-zh-rCN/strings.xml b/date_time/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..9633af04 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,14 @@ + + + 上午 + PM + 小时 + 分钟 + + Day + 月份 + 年份 + 设置时间 + 设置日期 + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values-zh-rTW/strings.xml b/date_time/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..a8fded18 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,16 @@ + + + AM + PM (下午/晚上) + 小時 + 會議紀錄 + + Day + +日子 + 月份 + 年份 + 設置時間 + 設置日期 + + \ No newline at end of file diff --git a/date_time/src/commonMain/composeResources/values/strings.xml b/date_time/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..d82a2256 --- /dev/null +++ b/date_time/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,14 @@ + + + AM + PM + Hours + Minutes + Seconds + Day + Month + Year + Set time + Set date + + diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeDialog.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeDialog.kt similarity index 98% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeDialog.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeDialog.kt index 95e5180c..b97ce952 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeDialog.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeDialog.kt @@ -34,6 +34,7 @@ import com.maxkeppeler.sheets.date_time.models.DateTimeSelection * @param header The header to be displayed at the top of the dialog. * @param properties DialogProperties for further customization of this dialog's behavior. */ +@OptIn(ExperimentalMaterial3Api::class) @Composable fun DateTimeDialog( state: UseCaseState, diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimePopup.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimePopup.kt similarity index 100% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimePopup.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimePopup.kt diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeState.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeState.kt similarity index 97% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeState.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeState.kt index 1f20d90d..9b234ae2 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeState.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeState.kt @@ -24,9 +24,10 @@ import androidx.compose.runtime.setValue import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.date_time.models.* import com.maxkeppeler.sheets.date_time.utils.* -import java.io.Serializable -import java.time.LocalDate -import java.time.LocalTime +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.datetime.LocalDate +import kotlinx.datetime.LocalTime +import kotlinx.datetime.atTime /** * Handles the date time state. @@ -128,7 +129,6 @@ internal class DateTimeState( private fun getDatePatternValue(): String? = selection.dateFormatStyle?.let { getLocalizedPattern( isDate = true, - locale = config.locale, formatStyle = it ) } @@ -136,7 +136,6 @@ internal class DateTimeState( private fun getTimePatternValue(): String? = selection.timeFormatStyle?.let { getLocalizedPattern( isDate = false, - locale = config.locale, formatStyle = it ) } @@ -200,7 +199,7 @@ internal class DateTimeState( val dateSelection: LocalDate?, val timeSelection: LocalTime?, val typeValues: MutableMap - ) : Serializable + ) : JvmSerializable } /** diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeView.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeView.kt similarity index 83% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeView.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeView.kt index 72e92800..d4aea444 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/DateTimeView.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/DateTimeView.kt @@ -26,7 +26,6 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import com.maxkeppeker.sheets.core.models.base.BaseBehaviors import com.maxkeppeker.sheets.core.models.base.Header import com.maxkeppeker.sheets.core.models.base.StateHandler @@ -36,6 +35,12 @@ import com.maxkeppeker.sheets.core.views.base.FrameBase import com.maxkeppeler.sheets.date_time.models.DateTimeConfig import com.maxkeppeler.sheets.date_time.models.DateTimeSelection import com.maxkeppeler.sheets.date_time.views.PickerComponent +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.StringResource +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.date_time.generated.resources.Res +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_set_date +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_set_time /** * Date Time dialog for the use-case to select a date, time or both in a quick way. @@ -44,6 +49,7 @@ import com.maxkeppeler.sheets.date_time.views.PickerComponent * @param config The general configuration for the dialog view. * @param header The header to be displayed at the top of the dialog view. */ +@OptIn(ExperimentalResourceApi::class) @ExperimentalMaterial3Api @Composable fun DateTimeView( @@ -70,7 +76,7 @@ fun DateTimeView( LaunchedEffect(state.isDateValid) { processSelection() } LaunchedEffect(state.isDateValid) { processSelection() } - val skipButton: @Composable ColumnScope.(Int, Boolean) -> Unit = @Composable { labelRes, error -> + val skipButton: @Composable ColumnScope.(StringResource, Boolean) -> Unit = @Composable { labelRes, error -> Button( modifier = Modifier.align(Alignment.CenterHorizontally), onClick = state::skipSelection, @@ -112,18 +118,18 @@ fun DateTimeView( if (selection.startWithTime) { if (!state.firstSkipped) { timePicker() - skipButton(R.string.sheets_compose_dialogs_set_date, !state.isDateValid) + skipButton(Res.string.sheets_compose_dialogs_set_date, !state.isDateValid) } else { datePicker() - skipButton(R.string.sheets_compose_dialogs_set_time, !state.isTimeValid) + skipButton(Res.string.sheets_compose_dialogs_set_time, !state.isTimeValid) } } else { if (!state.firstSkipped) { datePicker() - skipButton(R.string.sheets_compose_dialogs_set_time, !state.isTimeValid) + skipButton(Res.string.sheets_compose_dialogs_set_time, !state.isTimeValid) } else { timePicker() - skipButton(R.string.sheets_compose_dialogs_set_date, !state.isDateValid) + skipButton(Res.string.sheets_compose_dialogs_set_date, !state.isDateValid) } } } diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/DateTimeConfig.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/DateTimeConfig.kt similarity index 96% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/DateTimeConfig.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/DateTimeConfig.kt index 52be7999..4fa37206 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/DateTimeConfig.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/DateTimeConfig.kt @@ -19,7 +19,6 @@ import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.BaseConfigs import com.maxkeppeker.sheets.core.utils.BaseConstants.DEFAULT_ICON_STYLE import com.maxkeppeler.sheets.date_time.utils.Constants -import java.util.* /** * The general configuration for the date time dialog. @@ -31,7 +30,6 @@ import java.util.* * @param icons The style of icons that are used for dialog/ view-specific icons. */ class DateTimeConfig( - val locale: Locale = Locale.getDefault(), val hideDateCharacters: Boolean = false, val hideTimeCharacters: Boolean = false, val minYear: Int = Constants.DEFAULT_MIN_YEAR, diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/DateTimeSelection.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/DateTimeSelection.kt similarity index 96% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/DateTimeSelection.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/DateTimeSelection.kt index 3375cabe..d9715375 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/DateTimeSelection.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/DateTimeSelection.kt @@ -18,10 +18,11 @@ package com.maxkeppeler.sheets.date_time.models import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.LocalTime -import java.time.format.FormatStyle +import com.maxkeppeler.sheets.date_time.utils.FormatStyle +import kotlinx.datetime.LocalDate +import kotlinx.datetime.LocalDateTime +import kotlinx.datetime.LocalTime +import kotlinx.datetime.format.DateTimeFormat /** * The selection configuration for the date time dialog. diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/UnitOptionEntry.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/UnitOptionEntry.kt similarity index 76% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/UnitOptionEntry.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/UnitOptionEntry.kt index d6900154..b30a8313 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/UnitOptionEntry.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/UnitOptionEntry.kt @@ -15,8 +15,9 @@ */ package com.maxkeppeler.sheets.date_time.models -import androidx.annotation.StringRes -import java.io.Serializable +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.StringResource +import com.maxkeppeker.sheets.core.utils.JvmSerializable /** * A class that acts as a value item that can be selected for a unit. @@ -24,8 +25,9 @@ import java.io.Serializable * @param label The textual representation of the value. * @param labelRes The textual representation of the value by resource. */ -data class UnitOptionEntry( +@OptIn(ExperimentalResourceApi::class) +data class UnitOptionEntry constructor( val value: Int, val label: String? = null, - @StringRes val labelRes: Int? = null -) : Serializable + val labelRes: StringResource? = null +) : JvmSerializable diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/UnitSelection.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/UnitSelection.kt similarity index 77% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/UnitSelection.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/UnitSelection.kt index 89227ff4..f098dbe2 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/models/UnitSelection.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/models/UnitSelection.kt @@ -15,8 +15,13 @@ */ package com.maxkeppeler.sheets.date_time.models -import androidx.annotation.StringRes -import com.maxkeppeler.sheets.date_time.R +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.StringResource +import sheets_compose_dialogs.date_time.generated.resources.* +import sheets_compose_dialogs.date_time.generated.resources.Res +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_date_time_hour +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_date_time_minutes +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_date_time_seconds enum class UnitType(val isDate: Boolean) { DAY(true), @@ -34,8 +39,9 @@ enum class UnitType(val isDate: Boolean) { * @param options The list of of options that can be selected. * @param value The current selected value. */ +@OptIn(ExperimentalResourceApi::class) internal sealed class UnitSelection( - @StringRes open val placeholderRes: Int? = null, + open val placeholderRes: StringResource? = null, open val options: List = listOf(), open val value: UnitOptionEntry? = null, open val type: UnitType? = null @@ -60,7 +66,7 @@ internal sealed class UnitSelection( override val value: UnitOptionEntry? = null, override val options: List, ) : UnitSelection( - placeholderRes = R.string.sheets_compose_dialogs_date_time_hour, + placeholderRes = Res.string.sheets_compose_dialogs_date_time_hour, type = UnitType.HOUR ) @@ -73,7 +79,7 @@ internal sealed class UnitSelection( override val value: UnitOptionEntry? = null, override val options: List, ) : UnitSelection( - placeholderRes = R.string.sheets_compose_dialogs_date_time_minutes, + placeholderRes = Res.string.sheets_compose_dialogs_date_time_minutes, type = UnitType.MINUTE ) @@ -86,7 +92,7 @@ internal sealed class UnitSelection( override val value: UnitOptionEntry? = null, override val options: List, ) : UnitSelection( - placeholderRes = R.string.sheets_compose_dialogs_date_time_seconds, + placeholderRes = Res.string.sheets_compose_dialogs_date_time_seconds, type = UnitType.SECOND ) @@ -99,7 +105,7 @@ internal sealed class UnitSelection( override val value: UnitOptionEntry? = null, override val options: List ) : UnitSelection( - placeholderRes = R.string.sheets_compose_dialogs_date_time_day, + placeholderRes = Res.string.sheets_compose_dialogs_date_time_day, type = UnitType.DAY ) @@ -112,7 +118,7 @@ internal sealed class UnitSelection( override val value: UnitOptionEntry? = null, override val options: List, ) : UnitSelection( - placeholderRes = R.string.sheets_compose_dialogs_date_time_month, + placeholderRes = Res.string.sheets_compose_dialogs_date_time_month, type = UnitType.MONTH ) @@ -125,7 +131,7 @@ internal sealed class UnitSelection( override val value: UnitOptionEntry? = null, override val options: List ) : UnitSelection( - placeholderRes = R.string.sheets_compose_dialogs_date_time_year, + placeholderRes = Res.string.sheets_compose_dialogs_date_time_year, type = UnitType.YEAR ) } \ No newline at end of file diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/utils/Constants.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Constants.kt similarity index 97% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/utils/Constants.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Constants.kt index 99e7f906..d461e2c6 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/utils/Constants.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Constants.kt @@ -15,7 +15,8 @@ */ package com.maxkeppeler.sheets.date_time.utils -import java.time.LocalDate +import kotlinx.datetime.LocalDate + /** * Date Time dialog specific constants. diff --git a/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/ExtendDateTime.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/ExtendDateTime.kt new file mode 100644 index 00000000..83e5d0d5 --- /dev/null +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/ExtendDateTime.kt @@ -0,0 +1,57 @@ +package com.maxkeppeler.sheets.date_time.utils + +import kotlinx.datetime.* + +internal fun LocalDate.Companion.now(): LocalDate { + return Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).date +} + +/** + * Extension function that gets the maximum days of month + * + * @return [Int] of days in month + */ +internal fun Month.length(leapYear: Boolean): Int = when (this) { + Month.JANUARY -> 31 + Month.FEBRUARY -> { + if (leapYear) { + 29 + } else { + 28 + } + } + Month.MARCH -> 31 + Month.APRIL -> 30 + Month.MAY -> 31 + Month.JUNE -> 30 + Month.JULY -> 31 + Month.AUGUST -> 31 + Month.SEPTEMBER -> 30 + Month.OCTOBER -> 31 + Month.NOVEMBER -> 30 + Month.DECEMBER -> 31 + else -> 30 +} + +/** + * Extension function that gets the maximum days of month + * + * @return [Int] of days in month + */ +internal val LocalDate.lengthOfMonth: Int + get() = month.length(isLeapYear) + +/** + * Extension function that checks if year is a leap year. + * + * Example: 2016, 2020, 2024, etc + * + * @return [Boolean] whether year is a leap year + */ +internal val LocalDate.isLeapYear: Boolean + get() { + var isLeapYear = year % 4 == 0 + isLeapYear = isLeapYear && (year % 100 != 0 || year % 400 == 0) + + return isLeapYear + } \ No newline at end of file diff --git a/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/FormatStyle.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/FormatStyle.kt new file mode 100644 index 00000000..71f29663 --- /dev/null +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/FormatStyle.kt @@ -0,0 +1,34 @@ +package com.maxkeppeler.sheets.date_time.utils + + +/** + * Enumeration of the style of a localized date, time or date-time formatter. + * + * These styles are used when obtaining a date-time style from configuration. + */ +enum class FormatStyle { + // ordered from large to small + /** + * Full text style, with the most detail. + * For example, the format might be 'Tuesday, April 12, 1952 AD' or '3:30:42pm PST'. + */ + FULL, + + /** + * Long text style, with lots of detail. + * For example, the format might be 'January 12, 1952'. + */ + LONG, + + /** + * Medium text style, with some detail. + * For example, the format might be 'Jan 12, 1952'. + */ + MEDIUM, + + /** + * Short text style, typically numeric. + * For example, the format might be '12.13.52' or '3:30pm'. + */ + SHORT +} diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/utils/Utils.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.kt similarity index 82% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/utils/Utils.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.kt index f4dad48c..2c530e6e 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/utils/Utils.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.kt @@ -15,19 +15,17 @@ */ package com.maxkeppeler.sheets.date_time.utils -import com.maxkeppeler.sheets.date_time.R import com.maxkeppeler.sheets.date_time.models.DateTimeConfig import com.maxkeppeler.sheets.date_time.models.UnitOptionEntry import com.maxkeppeler.sheets.date_time.models.UnitSelection import com.maxkeppeler.sheets.date_time.models.UnitType -import java.time.LocalDate -import java.time.LocalTime -import java.time.Month -import java.time.chrono.Chronology -import java.time.format.DateTimeFormatter -import java.time.format.DateTimeFormatterBuilder -import java.time.format.FormatStyle -import java.util.* +import kotlinx.datetime.* +import kotlinx.datetime.format.FormatStringsInDatetimeFormats +import kotlinx.datetime.format.byUnicodePattern +import org.jetbrains.compose.resources.ExperimentalResourceApi +import sheets_compose_dialogs.date_time.generated.resources.Res +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_date_time_am +import sheets_compose_dialogs.date_time.generated.resources.sheets_compose_dialogs_date_time_pm internal fun getMapOptions( datePattern: String?, @@ -50,10 +48,10 @@ internal fun detectUnit( ): UnitSelection? { val now = LocalDate.now() val month = unitValues[UnitType.MONTH] - val date = LocalDate.of( - /* year = */ unitValues[UnitType.YEAR]?.value ?: now.year, - /* month = */ month?.value ?: now.monthValue, - /* dayOfMonth = */ 1 + val date = LocalDate( + year = unitValues[UnitType.YEAR]?.value ?: now.year, + monthNumber = month?.value ?: now.monthNumber, + dayOfMonth = 1 ) return when { segment.contains(Constants.SYMBOL_SECONDS) -> @@ -121,7 +119,7 @@ internal fun getInitTypeValues( } val year = dateSelection?.let { date -> options[UnitType.YEAR]?.let { it.firstOrNull { it.value == date.year } } } - val month = dateSelection?.let { options[UnitType.MONTH]?.getOrNull(it.monthValue.minus(1)) } + val month = dateSelection?.let { options[UnitType.MONTH]?.getOrNull(it.monthNumber.minus(1)) } val day = dateSelection?.let { options[UnitType.DAY]?.getOrNull(it.dayOfMonth.minus(1)) } return mutableMapOf( @@ -153,10 +151,10 @@ internal fun getLocalTimeOf( if (actualHourValue == 24) actualHourValue = 0 } - LocalTime.of( - actualHourValue, - minValue, - secValue + LocalTime( + hour = actualHourValue, + minute = minValue, + second = secValue ) }.getOrNull() @@ -164,21 +162,17 @@ internal fun getLocalTimeOf( internal fun getLocalDateOf( values: List, ) = runCatching { - LocalDate.of( + LocalDate( values[2]!!.value, values[1]!!.value, values[0]!!.value ) }.getOrNull() -internal fun getLocalizedPattern( +internal expect fun getLocalizedPattern( isDate: Boolean, - formatStyle: FormatStyle, - locale: Locale -): String = DateTimeFormatterBuilder.getLocalizedDateTimePattern( - if (isDate) formatStyle else null, - if (!isDate) formatStyle else null, Chronology.ofLocale(locale), locale -).toString() + formatStyle: FormatStyle +): String internal fun getLocalizedValues( config: DateTimeConfig, @@ -211,9 +205,10 @@ private fun containsAmPm(pattern: String?): Boolean = internal fun containsSeconds(pattern: String): Boolean = pattern.contains(Constants.SYMBOL_SECONDS) +@OptIn(ExperimentalResourceApi::class) internal fun getAmPmOptions() = listOf( - UnitOptionEntry(value = 0, labelRes = R.string.sheets_compose_dialogs_date_time_am), - UnitOptionEntry(value = 1, labelRes = R.string.sheets_compose_dialogs_date_time_pm), + UnitOptionEntry(value = 0, labelRes = Res.string.sheets_compose_dialogs_date_time_am), + UnitOptionEntry(value = 1, labelRes = Res.string.sheets_compose_dialogs_date_time_pm), ) internal fun getMinutesSecondsOptions(): List { @@ -243,7 +238,7 @@ internal fun getHoursOptions(pattern: String): List = } internal fun getDayOptions(date: LocalDate, month: UnitOptionEntry?): List { - val daysInMonth = date.lengthOfMonth() + val daysInMonth = date.lengthOfMonth return (1..(if (month?.value != null) 31 else daysInMonth)).map { UnitOptionEntry( it, @@ -252,19 +247,28 @@ internal fun getDayOptions(date: LocalDate, month: UnitOptionEntry?): List { val actualMonthPattern = pattern.filter { it == 'M' } val occurrences = actualMonthPattern.count { it == 'M' } return when { occurrences >= 3 -> { - Month.values().map { month -> + Month.entries.map { month -> + val currentDate = LocalDate.now() + val localDate = LocalDate( + year = currentDate.year, + monthNumber = month.number, + dayOfMonth = currentDate.dayOfMonth + ) UnitOptionEntry( - month.value, LocalDate.now().withMonth(month.value) - .format(DateTimeFormatter.ofPattern(actualMonthPattern)) + month.number, + localDate.format(LocalDate.Format { + byUnicodePattern(actualMonthPattern) + }) ) } } - else -> Month.values().map { it.value }.map { + else -> Month.entries.map { it.number }.map { UnitOptionEntry(it, it.toString()) }.toList() } diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/PickerComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/PickerComponent.kt similarity index 94% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/PickerComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/PickerComponent.kt index 3911690e..4f6d042f 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/PickerComponent.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/PickerComponent.kt @@ -25,8 +25,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.layout.onGloballyPositioned -import androidx.compose.ui.res.dimensionResource -import com.maxkeppeler.sheets.core.R +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.date_time.models.DateTimeConfig import com.maxkeppeler.sheets.date_time.models.UnitOptionEntry import com.maxkeppeler.sheets.date_time.models.UnitSelection @@ -80,8 +79,8 @@ internal fun PickerComponent( Text( modifier = Modifier .clip(MaterialTheme.shapes.extraSmall) - .padding(horizontal = dimensionResource(R.dimen.scd_small_75)) - .padding(top = dimensionResource(R.dimen.scd_normal_150)), + .padding(horizontal = 6.dp) + .padding(top = 24.dp), text = ":" ) } diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/PickerDateCharacterComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/PickerDateCharacterComponent.kt similarity index 80% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/PickerDateCharacterComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/PickerDateCharacterComponent.kt index 347d838c..17d909f3 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/PickerDateCharacterComponent.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/PickerDateCharacterComponent.kt @@ -21,8 +21,7 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource -import com.maxkeppeler.sheets.core.R as RC +import androidx.compose.ui.unit.dp /** * A component that displays a character of the date pattern. @@ -33,9 +32,9 @@ internal fun PickerDateCharacterComponent(text: String) { Text( modifier = Modifier .clip(MaterialTheme.shapes.extraSmall) - .padding(start = dimensionResource(RC.dimen.scd_small_25)) - .padding(bottom = dimensionResource(RC.dimen.scd_normal_150)) - .padding(end = dimensionResource(RC.dimen.scd_small_100)), + .padding(start = 2.dp) + .padding(bottom = 24.dp) + .padding(end = 8.dp), text = text ) } diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/SelectionContainerComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/SelectionContainerComponent.kt similarity index 86% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/SelectionContainerComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/SelectionContainerComponent.kt index b55b1357..3d96d4d4 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/SelectionContainerComponent.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/SelectionContainerComponent.kt @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(ExperimentalSnapperApi::class, ExperimentalSnapperApi::class) - package com.maxkeppeler.sheets.date_time.views import androidx.compose.animation.core.animateIntAsState +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding @@ -39,9 +39,6 @@ import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.date_time.models.UnitOptionEntry import com.maxkeppeler.sheets.date_time.models.UnitSelection -import dev.chrisbanes.snapper.ExperimentalSnapperApi -import dev.chrisbanes.snapper.SnapOffsets -import dev.chrisbanes.snapper.rememberSnapperFlingBehavior /** * The container of a selection. @@ -52,6 +49,7 @@ import dev.chrisbanes.snapper.rememberSnapperFlingBehavior * @param onValueChange The listener that returns the selected unit option item. * @param heightOffsetTopPadding The height offset that is applied to the top of this component. */ +@OptIn(ExperimentalFoundationApi::class) @Composable internal fun SelectionContainerComponent( unit: UnitSelection, @@ -74,22 +72,15 @@ internal fun SelectionContainerComponent( val listState = rememberLazyListState(getCurrentIndex()) val contentPadding = PaddingValues(0.dp, itemHeightDp) - val behavior = rememberSnapperFlingBehavior( - lazyListState = listState, - snapOffsetForItem = SnapOffsets.Center, - ) LaunchedEffect(height.value, unit, options) { listState.scrollToItem(getCurrentIndex()) - // Issue: https://github.com/chrisbanes/snapper/issues/32 - listState.scroll { scrollBy(20f) } } LazyColumn( state = listState, - flingBehavior = behavior, + flingBehavior = rememberSnapFlingBehavior(listState), contentPadding = contentPadding, modifier = Modifier - .testTags(TestTags.DATE_TIME_VALUE_CONTAINER_SELECTION, unit::class.simpleName!!) .height(LocalDensity.current.run { height.value.toDp() }) .padding(top = heightOffsetTopPadding) .graphicsLayer { alpha = 0.99F } @@ -111,7 +102,6 @@ internal fun SelectionContainerComponent( item { SelectionValueItem( modifier = Modifier - .testTags(TestTags.DATE_TIME_VALUE_SELECTION, unit.javaClass.simpleName, option.value) .widthIn(min = LocalDensity.current.run { animatedWidth.value.toDp() }) .onGloballyPositioned { coordinates -> if (itemHeight.value < coordinates.size.height) { diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/SelectionValueItem.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/SelectionValueItem.kt similarity index 82% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/SelectionValueItem.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/SelectionValueItem.kt index 5d6db519..3809354d 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/SelectionValueItem.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/SelectionValueItem.kt @@ -22,11 +22,11 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.date_time.models.UnitOptionEntry -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource /** * The value item component that can be selected. @@ -34,6 +34,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param option The option that the current component reflect. * @param onValueChange The listener that returns the new selection. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun SelectionValueItem( modifier: Modifier = Modifier, @@ -45,9 +46,9 @@ internal fun SelectionValueItem( modifier = modifier .clip(MaterialTheme.shapes.small) .clickable { option?.let { onValueChange.invoke(it) } } - .padding(vertical = dimensionResource(RC.dimen.scd_small_100)) - .padding(horizontal = dimensionResource(RC.dimen.scd_small_100)), - text = option?.labelRes?.let { stringResource(id = it) } ?: option?.label ?: "", + .padding(vertical = 8.dp) + .padding(horizontal = 8.dp), + text = option?.labelRes?.let { stringResource(it) } ?: option?.label ?: "", textAlign = TextAlign.Center, style = MaterialTheme.typography.bodyLarge ) diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/UnitContainerComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/UnitContainerComponent.kt similarity index 93% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/UnitContainerComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/UnitContainerComponent.kt index 28cbefcc..52c7f445 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/UnitContainerComponent.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/UnitContainerComponent.kt @@ -21,11 +21,10 @@ import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.ui.Alignment -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.date_time.models.DateTimeConfig import com.maxkeppeler.sheets.date_time.models.UnitOptionEntry import com.maxkeppeler.sheets.date_time.models.UnitSelection -import com.maxkeppeler.sheets.core.R as RC /** @@ -50,7 +49,7 @@ internal fun UnitContainerComponent( if (expanded.value) { SelectionContainerComponent( - heightOffsetTopPadding = dimensionResource(RC.dimen.scd_normal_150), + heightOffsetTopPadding = 24.dp, unit = unit, height = height, width = width, diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/UnitLabel.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/UnitLabel.kt similarity index 80% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/UnitLabel.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/UnitLabel.kt index 96f56a1c..65e278b7 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/UnitLabel.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/UnitLabel.kt @@ -20,21 +20,21 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.date_time.models.UnitSelection -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource /** * The label that is displayed above the value unit. * @param unit The value unit */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun UnitLabel(unit: UnitSelection) { Text( - modifier = Modifier.padding(bottom = dimensionResource(RC.dimen.scd_small_150)), - text = unit.placeholderRes?.let { stringResource(id = it) } ?: "", + modifier = Modifier.padding(bottom = 12.dp), + text = unit.placeholderRes?.let { stringResource(it) } ?: "", style = MaterialTheme.typography.labelMedium ) } \ No newline at end of file diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueComponent.kt similarity index 85% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueComponent.kt index 4a576dbb..666274bd 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueComponent.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueComponent.kt @@ -25,12 +25,12 @@ import androidx.compose.runtime.MutableState import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.layout.onGloballyPositioned -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.date_time.models.UnitSelection -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource /** * The value component that is displayed if a selection was made. @@ -38,6 +38,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param width The width of the component. * @param onClick The listener that is invoked if this component was selected. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun ValueComponent( unit: UnitSelection, @@ -46,7 +47,6 @@ internal fun ValueComponent( ) { Text( modifier = Modifier - .testTags(TestTags.DATE_TIME_VALUE_SELECTION, if(unit is UnitSelection.Hour) "Hour" else unit.javaClass.simpleName) .onGloballyPositioned { coordinates -> if (width.value < coordinates.size.width) { width.value = coordinates.size.width @@ -58,11 +58,11 @@ internal fun ValueComponent( else MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.3f) ) .clickable { onClick() } - .padding(dimensionResource(RC.dimen.scd_normal_100)), + .padding(16.dp), text = unit.value?.label - ?: unit.value?.labelRes?.let { stringResource(id = it) } + ?: unit.value?.labelRes?.let { stringResource(it) } ?: unit.options.last().label?.map { " " }?.joinToString(separator = "") - ?: unit.options.last().labelRes?.let { stringResource(id = it) } + ?: unit.options.last().labelRes?.let { stringResource(it) } ?.map { " " }?.joinToString(separator = "")!!, style = MaterialTheme.typography.bodyLarge ) diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueContainerComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueContainerComponent.kt similarity index 89% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueContainerComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueContainerComponent.kt index f5460889..17e32170 100644 --- a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueContainerComponent.kt +++ b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueContainerComponent.kt @@ -22,10 +22,9 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.date_time.models.DateTimeConfig import com.maxkeppeler.sheets.date_time.models.UnitSelection -import com.maxkeppeler.sheets.core.R as RC /** * The container view that builds up the value view. It consists of the label and the value. @@ -43,8 +42,8 @@ internal fun ValueContainerComponent( ) { Column( modifier = Modifier - .padding(vertical = dimensionResource(RC.dimen.scd_normal_150)) - .padding(horizontal = dimensionResource(RC.dimen.scd_small_100)), + .padding(vertical = 24.dp) + .padding(horizontal = 8.dp), horizontalAlignment = Alignment.CenterHorizontally ) { UnitLabel(unit = unit) diff --git a/date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueEmptyOverlayComponent.kt b/date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueEmptyOverlayComponent.kt similarity index 100% rename from date_time/src/main/java/com/maxkeppeler/sheets/date_time/views/ValueEmptyOverlayComponent.kt rename to date_time/src/commonMain/kotlin/com/maxkeppeler/sheets/date_time/views/ValueEmptyOverlayComponent.kt diff --git a/date_time/src/jsMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.js.kt b/date_time/src/jsMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.js.kt new file mode 100644 index 00000000..91132967 --- /dev/null +++ b/date_time/src/jsMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.js.kt @@ -0,0 +1,22 @@ +package com.maxkeppeler.sheets.date_time.utils + +internal actual fun getLocalizedPattern( + isDate: Boolean, + formatStyle: FormatStyle +): String { + return if (isDate) { + when (formatStyle) { + FormatStyle.FULL -> "EEEE, MMMM d, yyyy G" + FormatStyle.LONG -> "MMMM d, yyyy" + FormatStyle.MEDIUM -> "MMM d, yyyy" + FormatStyle.SHORT -> "dd.MM.yyyy" + } + } else { + when (formatStyle) { + FormatStyle.FULL -> "HH:mm:ss zzz" + FormatStyle.LONG -> "HH:mm:ss" + FormatStyle.MEDIUM -> "H:mm:ss" + FormatStyle.SHORT -> "H:m:s" + } + } +} \ No newline at end of file diff --git a/date_time/src/jvmMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.jvm.kt b/date_time/src/jvmMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.jvm.kt new file mode 100644 index 00000000..20ff2415 --- /dev/null +++ b/date_time/src/jvmMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.jvm.kt @@ -0,0 +1,25 @@ +package com.maxkeppeler.sheets.date_time.utils + +import java.time.chrono.Chronology +import java.time.format.DateTimeFormatterBuilder +import java.util.Locale + +internal fun FormatStyle.toJava(): java.time.format.FormatStyle { + return when (this) { + FormatStyle.FULL -> java.time.format.FormatStyle.FULL + FormatStyle.LONG -> java.time.format.FormatStyle.LONG + FormatStyle.MEDIUM -> java.time.format.FormatStyle.MEDIUM + FormatStyle.SHORT -> java.time.format.FormatStyle.SHORT + } +} + +internal actual fun getLocalizedPattern( + isDate: Boolean, + formatStyle: FormatStyle +): String { + val locale = Locale.getDefault() + return DateTimeFormatterBuilder.getLocalizedDateTimePattern( + if (isDate) formatStyle.toJava() else null, + if (!isDate) formatStyle.toJava() else null, Chronology.ofLocale(locale), locale + ).toString() +} \ No newline at end of file diff --git a/date_time/src/main/AndroidManifest.xml b/date_time/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/date_time/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/date_time/src/main/res/values-bg/strings.xml b/date_time/src/main/res/values-bg/strings.xml deleted file mode 100644 index 9086d1b9..00000000 --- a/date_time/src/main/res/values-bg/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - ММ - Часове - Минути - Секунди - Ден - Месец - Година - Настройка на време - Задайте дата. - - \ No newline at end of file diff --git a/date_time/src/main/res/values-cs/strings.xml b/date_time/src/main/res/values-cs/strings.xml deleted file mode 100644 index d004471a..00000000 --- a/date_time/src/main/res/values-cs/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Hodiny - Minuty - Sekundy - Den - Měsíc - Rok - Nastavte čas - Nastavit datum - - \ No newline at end of file diff --git a/date_time/src/main/res/values-da/strings.xml b/date_time/src/main/res/values-da/strings.xml deleted file mode 100644 index a6e6669d..00000000 --- a/date_time/src/main/res/values-da/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Timer - Minutter - Sekunder - Dag - Måned - År - Indstil tid - Vælg dato - - \ No newline at end of file diff --git a/date_time/src/main/res/values-de/strings.xml b/date_time/src/main/res/values-de/strings.xml deleted file mode 100644 index 20d64220..00000000 --- a/date_time/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Stunden - Minuten - Sekunden - Tag - Monat - Jahr - Zeit einstellen - Datum festlegen - - \ No newline at end of file diff --git a/date_time/src/main/res/values-el/strings.xml b/date_time/src/main/res/values-el/strings.xml deleted file mode 100644 index 528263bc..00000000 --- a/date_time/src/main/res/values-el/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - ΚΥ - Ωρες - Λεπτά - Δευτερόλεπτα - Ημέρα - Μήνας - Έτος - Ρύθμιση ώρας - Ορισμός ημερομηνίας. - - \ No newline at end of file diff --git a/date_time/src/main/res/values-eo/strings.xml b/date_time/src/main/res/values-eo/strings.xml deleted file mode 100644 index f22bc81c..00000000 --- a/date_time/src/main/res/values-eo/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Horoj - Minutes - Sekundoj - Tago - Monato - Jaro - Difini tempon - Agordi daton - - \ No newline at end of file diff --git a/date_time/src/main/res/values-es/strings.xml b/date_time/src/main/res/values-es/strings.xml deleted file mode 100644 index bc2f19fd..00000000 --- a/date_time/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Horas - Minutos - Segundos - Día - Mes - Año - Establecer tiempo - Establecer fecha - - \ No newline at end of file diff --git a/date_time/src/main/res/values-et/strings.xml b/date_time/src/main/res/values-et/strings.xml deleted file mode 100644 index 1dcbd4e3..00000000 --- a/date_time/src/main/res/values-et/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Tunnid - Minutes - Sekundid - Day - Kuu - Aasta - Määra aeg - Määrake kuupäev - - \ No newline at end of file diff --git a/date_time/src/main/res/values-fa/strings.xml b/date_time/src/main/res/values-fa/strings.xml deleted file mode 100644 index 9ca252fd..00000000 --- a/date_time/src/main/res/values-fa/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - صبح بخیر - ساعات - دقایق - ثانیه - روز - ماه - سال - تنظیم زمان - تنظیم تاریخ - - \ No newline at end of file diff --git a/date_time/src/main/res/values-fi/strings.xml b/date_time/src/main/res/values-fi/strings.xml deleted file mode 100644 index 25926929..00000000 --- a/date_time/src/main/res/values-fi/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Tunnit - Pöytäkirja - Sekunnit - Päivä - Kuukausi - Vuosi - Aseta aika - Aseta päivämäärä - - \ No newline at end of file diff --git a/date_time/src/main/res/values-fr/strings.xml b/date_time/src/main/res/values-fr/strings.xml deleted file mode 100644 index f8c58079..00000000 --- a/date_time/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Heures - Minutes - Secondes - Jour - Mois - Année - Définir l\'heure - Définir la date - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ga/strings.xml b/date_time/src/main/res/values-ga/strings.xml deleted file mode 100644 index 9b346151..00000000 --- a/date_time/src/main/res/values-ga/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - Príomh-Aire - Uaireanta - Nótaí - Soicindí - - - Bliain - Roghnaigh ama - Socrú dáta - - \ No newline at end of file diff --git a/date_time/src/main/res/values-gd/strings.xml b/date_time/src/main/res/values-gd/strings.xml deleted file mode 100644 index 14a2374d..00000000 --- a/date_time/src/main/res/values-gd/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Uairean - Gach mionaid - Dàrnaichean - Latha - Mìos - Bliadhna - Fhoirm - Deasaich dàta - - \ No newline at end of file diff --git a/date_time/src/main/res/values-hi/strings.xml b/date_time/src/main/res/values-hi/strings.xml deleted file mode 100644 index cb9b23fc..00000000 --- a/date_time/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - प्रधानमंत्री - घंटे - मिनट - सेकंड - दिन - महीना - वर्ष - समय सेट करें - तारीख सेट करें - - \ No newline at end of file diff --git a/date_time/src/main/res/values-hr/strings.xml b/date_time/src/main/res/values-hr/strings.xml deleted file mode 100644 index e621b05e..00000000 --- a/date_time/src/main/res/values-hr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Sati - Minuta - Sekunde - Dan - Mjesec - Godina - Postavite vrijeme - Postavi datum - - \ No newline at end of file diff --git a/date_time/src/main/res/values-hu/strings.xml b/date_time/src/main/res/values-hu/strings.xml deleted file mode 100644 index a65355db..00000000 --- a/date_time/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Órák - Percek - Másodpercek - Nap - Hónap - Év - Idő beállítása - Dátum beállítása - - \ No newline at end of file diff --git a/date_time/src/main/res/values-in-rID/strings.xml b/date_time/src/main/res/values-in-rID/strings.xml deleted file mode 100644 index 855fd34b..00000000 --- a/date_time/src/main/res/values-in-rID/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM (Perdana Menteri) - Jam - Menit - Detik - Hari - Bulan - Tahun - Atur waktu - Atur tanggal - - \ No newline at end of file diff --git a/date_time/src/main/res/values-is/strings.xml b/date_time/src/main/res/values-is/strings.xml deleted file mode 100644 index 965a106d..00000000 --- a/date_time/src/main/res/values-is/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Klukkustundir - Mínútur - Sekúndur - Dagur - Mánuður - Ár - Taktu tímann - Setja dagsetningu - - \ No newline at end of file diff --git a/date_time/src/main/res/values-it/strings.xml b/date_time/src/main/res/values-it/strings.xml deleted file mode 100644 index f140371e..00000000 --- a/date_time/src/main/res/values-it/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM (Post Meridiem) - Ore - Minuti - Secondi - Giorno - Mese - Anno - Imposta l\'orario - Inserisci data - - \ No newline at end of file diff --git a/date_time/src/main/res/values-iw/strings.xml b/date_time/src/main/res/values-iw/strings.xml deleted file mode 100644 index f0961c09..00000000 --- a/date_time/src/main/res/values-iw/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - ראש ממשלה - שעות - דקות - שניות - יום - חודש - שנה - הגדר זמן - הגדר תאריך - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ja/strings.xml b/date_time/src/main/res/values-ja/strings.xml deleted file mode 100644 index 03be96d9..00000000 --- a/date_time/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - 時間 - - - - - - 時間を設定してください。 - 日付を設定する - - \ No newline at end of file diff --git a/date_time/src/main/res/values-jv/strings.xml b/date_time/src/main/res/values-jv/strings.xml deleted file mode 100644 index 6611ea5a..00000000 --- a/date_time/src/main/res/values-jv/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Jam - Menit - Detik - Sasi - Bulan - Tahun - Damel wanci - Tanggal ditetapke - - \ No newline at end of file diff --git a/date_time/src/main/res/values-kk/strings.xml b/date_time/src/main/res/values-kk/strings.xml deleted file mode 100644 index 6e8a7f53..00000000 --- a/date_time/src/main/res/values-kk/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - Өкесінлерге жаза беру үшін ПМ. - Сағаттар - Минут - Секундтер - Күн - Ай - Жыл - Уақытты орнату - Күнді таңдау - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ko/strings.xml b/date_time/src/main/res/values-ko/strings.xml deleted file mode 100644 index ed276719..00000000 --- a/date_time/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 오전 - 오후 - 영업 시간 - 분 (Bun) - - - - - 시간 설정하기 - 날짜 설정하기 - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ku/strings.xml b/date_time/src/main/res/values-ku/strings.xml deleted file mode 100644 index 461bcf99..00000000 --- a/date_time/src/main/res/values-ku/strings.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - AM - PM - کاتژمێر - داقاوە - Seconds -چرکەکان - Ro - مانگ - Sal - کات دابنێ - -(or simply \"کات دابنێ\" if used in an Android app for setting time) - دەستکاریکردنی بەروار - - \ No newline at end of file diff --git a/date_time/src/main/res/values-lb/strings.xml b/date_time/src/main/res/values-lb/strings.xml deleted file mode 100644 index 1b42da5f..00000000 --- a/date_time/src/main/res/values-lb/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Stonnen - Protokoll - Sekonnen - Dag - Monat - Johr - Festlegen vun der Zäit - Datum setzen - - \ No newline at end of file diff --git a/date_time/src/main/res/values-lo/strings.xml b/date_time/src/main/res/values-lo/strings.xml deleted file mode 100644 index 270a6109..00000000 --- a/date_time/src/main/res/values-lo/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - ອາເມລ - ລົດມອນ - ເວລາ - ນະຄູນ - ວິນາທີ່ໃນວິນາທີ - ວັນ - ເດືອນ - ປີ - ຕັ້ງເວລາ - ຕັ້ງວັນທີ - - \ No newline at end of file diff --git a/date_time/src/main/res/values-lt/strings.xml b/date_time/src/main/res/values-lt/strings.xml deleted file mode 100644 index fad2c526..00000000 --- a/date_time/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Valandos - Minutės - Sekundės - Diena - Mėnuo - Metai - Nustatykite laiką - Nustatykite datą - - \ No newline at end of file diff --git a/date_time/src/main/res/values-lv/strings.xml b/date_time/src/main/res/values-lv/strings.xml deleted file mode 100644 index 5b22403d..00000000 --- a/date_time/src/main/res/values-lv/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Stundas - Minūtes - Sekundes - Diena - Mēnesis. - Gads - Iestatīt laiku - Iestatīt datumu - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ms/strings.xml b/date_time/src/main/res/values-ms/strings.xml deleted file mode 100644 index 09fc560b..00000000 --- a/date_time/src/main/res/values-ms/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Jam - Minit - Saiz - Hari - Bulan - Tahun - Masa yang ditetapkan - Tetapkan tarikh - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ne/strings.xml b/date_time/src/main/res/values-ne/strings.xml deleted file mode 100644 index 65077c1c..00000000 --- a/date_time/src/main/res/values-ne/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - प्रधानमन्त्री - कालों - मिनेटसह - सेकेन्ड - दिन - महिना - वर्ष - समय सेट गर्नुहोस् - मिति सेट गर्नुहोस् - - \ No newline at end of file diff --git a/date_time/src/main/res/values-nl/strings.xml b/date_time/src/main/res/values-nl/strings.xml deleted file mode 100644 index 449222f7..00000000 --- a/date_time/src/main/res/values-nl/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Uren - Notulen - Seconden - Dag - Maand - Jaar - Tijd instellen - Stel datum in - - \ No newline at end of file diff --git a/date_time/src/main/res/values-no/strings.xml b/date_time/src/main/res/values-no/strings.xml deleted file mode 100644 index b01e8f42..00000000 --- a/date_time/src/main/res/values-no/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - OK - PM - Timer - Minutter - Sekunder - Dag - Måned - År - Angi tid - Angi dato - - \ No newline at end of file diff --git a/date_time/src/main/res/values-pl/strings.xml b/date_time/src/main/res/values-pl/strings.xml deleted file mode 100644 index bce46844..00000000 --- a/date_time/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - OK. - Godziny - Minuty - Sekundy - Dzień - Miesiąc - Rok - Ustaw czas - Ustaw datę - - \ No newline at end of file diff --git a/date_time/src/main/res/values-pt/strings.xml b/date_time/src/main/res/values-pt/strings.xml deleted file mode 100644 index 082609c4..00000000 --- a/date_time/src/main/res/values-pt/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM (Portador de Mensagens) - Horas - Minutos - Segundos - Dia - Mês - Ano - Definir horário - Definir data - - \ No newline at end of file diff --git a/date_time/src/main/res/values-ru/strings.xml b/date_time/src/main/res/values-ru/strings.xml deleted file mode 100644 index 54805b3f..00000000 --- a/date_time/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Часы - Минуты - Секунды - День - Месяц - Год - Настроить время - Установить дату - - \ No newline at end of file diff --git a/date_time/src/main/res/values-sk/strings.xml b/date_time/src/main/res/values-sk/strings.xml deleted file mode 100644 index 1ebc0080..00000000 --- a/date_time/src/main/res/values-sk/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - rýchly preklad am - PM - Hodiny - Minúty - Sekundy - Deň - Mesiac - Rok - Nastaviť čas - Nastaviť dátum - - \ No newline at end of file diff --git a/date_time/src/main/res/values-sl/strings.xml b/date_time/src/main/res/values-sl/strings.xml deleted file mode 100644 index 8898d9c3..00000000 --- a/date_time/src/main/res/values-sl/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - OK - Ure - Minuti - Sekunde - Dan - Mesec - Leto - Nastavi čas - Nastavi datum - - \ No newline at end of file diff --git a/date_time/src/main/res/values-sr/strings.xml b/date_time/src/main/res/values-sr/strings.xml deleted file mode 100644 index 8c021197..00000000 --- a/date_time/src/main/res/values-sr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Sati - Minuti - Sekunde - Dan - Mesec - Godina - Postavite vreme - Postavi datum - - \ No newline at end of file diff --git a/date_time/src/main/res/values-sv/strings.xml b/date_time/src/main/res/values-sv/strings.xml deleted file mode 100644 index 7e6e1015..00000000 --- a/date_time/src/main/res/values-sv/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Timmar - Protokoll - Sekunder - Dag - Månad - År - Ställ in tid - Ange datum - - \ No newline at end of file diff --git a/date_time/src/main/res/values-th/strings.xml b/date_time/src/main/res/values-th/strings.xml deleted file mode 100644 index 35957496..00000000 --- a/date_time/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - นายกรัฐมนตรี - ชั่วโมง - นาที - วินาที - วัน - เดือน - ปี - ตั้งเวลา - กำหนดวันที่ - - \ No newline at end of file diff --git a/date_time/src/main/res/values-tr/strings.xml b/date_time/src/main/res/values-tr/strings.xml deleted file mode 100644 index fc4326fc..00000000 --- a/date_time/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Saatler - Dakikalar - Saniye - Gün - Ay - Yıl - Zaman ayarla - Tarih ayarla - - \ No newline at end of file diff --git a/date_time/src/main/res/values-uk/strings.xml b/date_time/src/main/res/values-uk/strings.xml deleted file mode 100644 index 38671863..00000000 --- a/date_time/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Години - Хвилини - Секунди - День - Місяць - Рік - Встановити час - Встановити дату - - \ No newline at end of file diff --git a/date_time/src/main/res/values-vi/strings.xml b/date_time/src/main/res/values-vi/strings.xml deleted file mode 100644 index 59353d1f..00000000 --- a/date_time/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - Thủ tướng - Giờ - Phút - Giây. - Ngày - Tháng - Năm - Đặt thời gian - Đặt ngày - - \ No newline at end of file diff --git a/date_time/src/main/res/values-zh-rCN/strings.xml b/date_time/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index e351f02a..00000000 --- a/date_time/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 上午 - PM - 小时 - 分钟 - - Day - 月份 - 年份 - 设置时间 - 设置日期 - - \ No newline at end of file diff --git a/date_time/src/main/res/values-zh-rTW/strings.xml b/date_time/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index 7865624f..00000000 --- a/date_time/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - AM - PM (下午/晚上) - 小時 - 會議紀錄 - - Day - -日子 - 月份 - 年份 - 設置時間 - 設置日期 - - \ No newline at end of file diff --git a/date_time/src/main/res/values/strings.xml b/date_time/src/main/res/values/strings.xml deleted file mode 100644 index a36608e7..00000000 --- a/date_time/src/main/res/values/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - AM - PM - Hours - Minutes - Seconds - Day - Month - Year - Set time - Set date - - diff --git a/date_time/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.wasmJs.kt b/date_time/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.wasmJs.kt new file mode 100644 index 00000000..91132967 --- /dev/null +++ b/date_time/src/wasmJsMain/kotlin/com/maxkeppeler/sheets/date_time/utils/Utils.wasmJs.kt @@ -0,0 +1,22 @@ +package com.maxkeppeler.sheets.date_time.utils + +internal actual fun getLocalizedPattern( + isDate: Boolean, + formatStyle: FormatStyle +): String { + return if (isDate) { + when (formatStyle) { + FormatStyle.FULL -> "EEEE, MMMM d, yyyy G" + FormatStyle.LONG -> "MMMM d, yyyy" + FormatStyle.MEDIUM -> "MMM d, yyyy" + FormatStyle.SHORT -> "dd.MM.yyyy" + } + } else { + when (formatStyle) { + FormatStyle.FULL -> "HH:mm:ss zzz" + FormatStyle.LONG -> "HH:mm:ss" + FormatStyle.MEDIUM -> "H:mm:ss" + FormatStyle.SHORT -> "H:m:s" + } + } +} \ No newline at end of file diff --git a/duration/build.gradle.kts b/duration/build.gradle.kts index 70e62ac3..a5601c17 100644 --- a/duration/build.gradle.kts +++ b/duration/build.gradle.kts @@ -1,27 +1,68 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.DURATION.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.DURATION.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/duration/src/commonMain/composeResources/values-bg/strings.xml b/duration/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..2b501979 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,14 @@ + + + Минимум + Максимум + h + м + s + Часове + Минути + Секунди + Изтриване на последния въведен елемент. + Изчисти входа + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-cs/strings.xml b/duration/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..d5ad22e5 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,14 @@ + + + Minimální + Maximum + h + m + s + Hodiny + Minuty + Sekundy + Smazat poslední zadání + Vyčistit vstup + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-da/strings.xml b/duration/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..2f8091a2 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Højst + h + m + s + Timer + Minutter + Sekunder + Slet seneste indtastning + Ryd indtastning + + \ No newline at end of file diff --git a/duration/src/main/res/values-de-rDE/strings.xml b/duration/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 94% rename from duration/src/main/res/values-de-rDE/strings.xml rename to duration/src/commonMain/composeResources/values-de-rDE/strings.xml index f9dfa1fe..06d53b11 100644 --- a/duration/src/main/res/values-de-rDE/strings.xml +++ b/duration/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -1,4 +1,4 @@ - + Mindestens diff --git a/duration/src/commonMain/composeResources/values-de/strings.xml b/duration/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..53f429a5 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maximal + h + m + s + Stunden + Minuten + Sekunden + Letzten Eingabe löschen + Eingabe löschen + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-el/strings.xml b/duration/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..bd27d8f8 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,14 @@ + + + Ελάχιστο + Μέγιστο + h + m + s + Ωρες + Λεπτά + Δευτερόλεπτα + Διαγραφή τελευταίας εισόδου + Καθαρισμός εισόδου + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-eo/strings.xml b/duration/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..94eefc0f --- /dev/null +++ b/duration/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimuma + h + m + s + Horoj + Minute + Sekundoj + Forigi lastan enigon + Forigi eniron + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-es/strings.xml b/duration/src/commonMain/composeResources/values-es/strings.xml new file mode 100644 index 00000000..46afed38 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-es/strings.xml @@ -0,0 +1,14 @@ + + + Mínimo + Máximo + h + m + s + Horas + Minutos + Segundos + Eliminar última entrada + Borrar entrada + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-et/strings.xml b/duration/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..fd5982b7 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,14 @@ + + + Miinimum + Maksimaalne + h + m + s + Tunnid + Minutes + Sekundid + Kustuta viimane sisend + Tühista sisend + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-fa/strings.xml b/duration/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..a8ea53e4 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,14 @@ + + + حداقل + حداکثر + h + m + s + ساعات + دقیقه + ثانیه + حذف آخرین ورودی + پاکسازی ورودی + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-fi/strings.xml b/duration/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..0a0a27f8 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,14 @@ + + + Vähimmäis + Maksimi + h + m + s + Tunnit + Pöytäkirja + Sekunnit + Poista viimeisin syöte + Tyhjennä syöte + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-fr/strings.xml b/duration/src/commonMain/composeResources/values-fr/strings.xml new file mode 100644 index 00000000..3cd63b83 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-fr/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maximum + h + m + s + Heures + Minutes + Secondes + Supprimer la dernière entrée + Effacer la saisie + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ga/strings.xml b/duration/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..6bb6714c --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,14 @@ + + + Is íochtarach. + Teorainn Mórchumais + h + m + s + Uaireanta + Nótaí + Soicindí + Scrios an iontráil dheireanach + Cléiriú isteach + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-gd/strings.xml b/duration/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..74fdc6a2 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,14 @@ + + + Cìogairin + Àrd-mhìneachadh + h + m + s + Uairean + Gach mionaid + Dàrnaichean + Sguab às am put mu dheireadh + Fuirich soilleir + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-hi/strings.xml b/duration/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..ae7c981e --- /dev/null +++ b/duration/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,14 @@ + + + न्यूनतम + अधिकतम + h + m + + घंटे + मिनट्स + सेकंड + पिछला इनपुट हटाएं + स्पष्ट इनपुट + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-hr/strings.xml b/duration/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..25a3f841 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,14 @@ + + + Minimalno + Maksimum + h + m + s + Sati + Minuta + Sekunde + Izbriši posljednji unos + Očisti unos + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-hu/strings.xml b/duration/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..6936eed1 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maximum + h + m + s + Órák + Percek + Másodpercek + Utolsó bevitel törlése + Tiszta bemenet + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-in-rID/strings.xml b/duration/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..bc175f11 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimum + h + m + s + Jam + Menit + Detik + Hapus masukan terakhir + Hapus masukan + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-is/strings.xml b/duration/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..7a22d5c6 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,14 @@ + + + Lágmarks- + Hámark + h + m + s + Klukkustundir + Mínútur + Sekúndur + Eyða síðasta inntaki + Hreinna innslátt + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-it/strings.xml b/duration/src/commonMain/composeResources/values-it/strings.xml new file mode 100644 index 00000000..b36174b2 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-it/strings.xml @@ -0,0 +1,14 @@ + + + Minimo + Massimo + h + m + s + Orari + Minuti. + Secondi + Elimina l\'ultimo input + Cancella l\'input + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-iw/strings.xml b/duration/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..306c7839 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,14 @@ + + + מינימום + מרבי + h + m + s + שעות + דקות + שניות + מחק את הקלט האחרון + נקה קלט + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ja/strings.xml b/duration/src/commonMain/composeResources/values-ja/strings.xml new file mode 100644 index 00000000..e5269997 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ja/strings.xml @@ -0,0 +1,14 @@ + + + 最小 + 最大 + h + m + s + 営業時間 + + + 最後の入力を削除する + 入力をクリア + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-jv/strings.xml b/duration/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..88c1c9f1 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimal + h + m + s + Jam-jam + Menit + Detik + Ngapus data paling anyar + Terangake masukan + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-kk/strings.xml b/duration/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..3fae2103 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,14 @@ + + + Аза туралы + Ең көп + h + m + s + Сағаттар + Минутты. + Секунды + Соңғы кірістірмемен шығару + Таза кіру + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ko/strings.xml b/duration/src/commonMain/composeResources/values-ko/strings.xml new file mode 100644 index 00000000..3d6f39d9 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ko/strings.xml @@ -0,0 +1,14 @@ + + + 최소한의 + 최대한의 + h + m + s + 시간 + + + 마지막 입력 삭제 + 입력 지우기 + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ku/strings.xml b/duration/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..04332668 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + سەرەتایی + h + m + s + کاتژمێر + دەقایەکان + چرکەمینداڵان + تاکە لەسەرین دانە حذف بکە + جێگیرکردنەوەی دانەوە بەبڕوانە + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-lb/strings.xml b/duration/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..bd6aa221 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maximum + h + m + s + Stonnen + Minutten + Sekonnen + Läscht de leschte Input. + Läschen Eingabe + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-lo/strings.xml b/duration/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..cd17aad3 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,14 @@ + + + ຕໍ່ໄປເກີດຄວາມຮ່ວມທີ່ບໍ່ດໍາເນີນການ. + ສູນເສຍສໍາລັບກ່ອນນັ້ນ + h + m + s + ຊົ່ວໂມງ + ນາທີ + ວິນາທີ່ + ລຶບຂໍ້ມູນຂອງການປ້ອນຫຼ້າສຸດ + ລົບຂໍ້ມູນເຂົ້າໃຊ້ໃດໆ + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-lt/strings.xml b/duration/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..a8fb1334 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimalus + h + m + s + Valandos + Minutes - Minutės + Sekundės + Ištrinti paskutinį įvedimą. + Išvalyti įvestį + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-lv/strings.xml b/duration/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..8a58d004 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimums + h + m + s + Stundas + Minūtes + Sekundes + Dzēst pēdējo ievadi. + Notklaust ievadījumu + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ms/strings.xml b/duration/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..4858358e --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimum + h + OK. + s + Jam + Minit + Sa(a)t + Padam input terakhir + Kosongkan input + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ne/strings.xml b/duration/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..705b0e1d --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,14 @@ + + + न्यूनतम + अधिकतम + OK + + s + कालों + दक्षिण, क्षण + सेकेण्ड + अन्तिम इनपुटलाई मेटाउनुहोस्। + प्रविष्टि साफ गर्नुहोस् + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-nl/strings.xml b/duration/src/commonMain/composeResources/values-nl/strings.xml new file mode 100644 index 00000000..d6db570e --- /dev/null +++ b/duration/src/commonMain/composeResources/values-nl/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maximum + h + m + s + Uren + Notulen + Seconden + Laatste invoer verwijderen + Wis invoer + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-no/strings.xml b/duration/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..6b5af144 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimum + h + m + s + Timer + Minutter + Sekunder + Slett siste inndata + Tøm input + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-pl/strings.xml b/duration/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..da013c21 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimum + OK + m + s + Godziny + Minuty + Sekundy + Usuń ostatni wpis + Wyczyść dane wejściowe + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-pt/strings.xml b/duration/src/commonMain/composeResources/values-pt/strings.xml new file mode 100644 index 00000000..8ee68df1 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-pt/strings.xml @@ -0,0 +1,14 @@ + + + Mínimo + Máximo + h + m + s + Horas + Minutos + Segundos + Apagar última entrada + Limpar entrada + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-ru/strings.xml b/duration/src/commonMain/composeResources/values-ru/strings.xml new file mode 100644 index 00000000..d548d73f --- /dev/null +++ b/duration/src/commonMain/composeResources/values-ru/strings.xml @@ -0,0 +1,14 @@ + + + Минимальный + Максимум + h + m + s + Часы + Минуты + Секунды + Удалить последний ввод + Очистить ввод + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-sk/strings.xml b/duration/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..f628e2d0 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,14 @@ + + + Minimálny + Maximálny + h + m + s + Hodiny + Protokol + Sekundy + Zmazať posledný vstup + Vyčistiť vstup + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-sl/strings.xml b/duration/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..fc52ccc6 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,14 @@ + + + Najmanjše + Največ + h + m + s + Ure + Minuti + Sekunde + Izbriši zadnji vnos + Pobriši vnos + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-sr/strings.xml b/duration/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..12547c95 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimum + h + m + s + Sati + Minuti + Sekundi + Obriši poslednji unos + Obriši unos. + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-sv/strings.xml b/duration/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..7604398f --- /dev/null +++ b/duration/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maximum + h + m + s + Timmar + Minuter + Sekunder + Radera senaste inmatningen + Rensa input + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-th/strings.xml b/duration/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..36bb6ea2 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,14 @@ + + + ขั้นต่ำ + มากที่สุด + h + m + s + เวลา + นาที + วินาที + ลบการป้อนข้อมูลล่าสุด + ล้างข้อมูลที่ป้อน + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-tr/strings.xml b/duration/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..30fd824f --- /dev/null +++ b/duration/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,14 @@ + + + Minimum + Maksimum + h + m + s + Saatler + Dakikalar + Saniye + Son girişi sil + Girdiyi temizle + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-uk/strings.xml b/duration/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..fc157448 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,14 @@ + + + Мінімум + Максимум + h + m + s + Години + Хвилини + Секунди + Видалити останній введений запис + Очистити введення + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-vi/strings.xml b/duration/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..5b4cd150 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,14 @@ + + + Tối thiểu + Tối đa + h + m + s + Giờ + Phút + Giây. + Xóa đầu vào cuối cùng + Xóa nội dung + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-zh-rCN/strings.xml b/duration/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..cdeba44c --- /dev/null +++ b/duration/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,14 @@ + + + 最小 + 最大的 + h + m + s + 小时 + 分钟 + + 删除最后一个输入 + 清除输入 + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values-zh-rTW/strings.xml b/duration/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..d08573e5 --- /dev/null +++ b/duration/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,14 @@ + + + 最小的 + 最大化 + h + m + s + 小時 + 會議紀錄 + + 刪除最後的輸入 + 清除輸入 + + \ No newline at end of file diff --git a/duration/src/commonMain/composeResources/values/strings.xml b/duration/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..0aa4fb64 --- /dev/null +++ b/duration/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,16 @@ + + + + + Minimum + Maximum + h + m + s + Hours + Minutes + Seconds + Delete last input + Clear input + + \ No newline at end of file diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/DurationDialog.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationDialog.kt similarity index 100% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/DurationDialog.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationDialog.kt diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/DurationPopup.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationPopup.kt similarity index 100% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/DurationPopup.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationPopup.kt diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/DurationState.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationState.kt similarity index 96% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/DurationState.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationState.kt index 861dbf5b..ec86cac6 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/DurationState.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationState.kt @@ -16,6 +16,7 @@ package com.maxkeppeler.sheets.duration import androidx.compose.runtime.Composable +import androidx.compose.runtime.Stable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.Saver @@ -25,7 +26,7 @@ import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.duration.models.DurationConfig import com.maxkeppeler.sheets.duration.models.DurationSelection import com.maxkeppeler.sheets.duration.utils.* -import java.io.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable /** * Handles the duration state. @@ -96,7 +97,7 @@ internal class DurationState( fun onEnterValue(value: String) { val newTimeBuilder = timeTextValue.apply { if (length >= config.timeFormat.length) { - repeat(value.length) { deleteCharAt(0) } + repeat(value.length) { deleteAt(0) } } append(value) } @@ -106,7 +107,7 @@ internal class DurationState( fun onBackspaceAction() { val newTimeBuilder = timeTextValue.apply { - deleteCharAt(lastIndex) + deleteAt(lastIndex) insert(0, 0.toString()) } timeTextValue = StringBuilder(newTimeBuilder) @@ -151,7 +152,7 @@ internal class DurationState( */ data class DurationStateData( val timeTextValue: StringBuilder, - ) : Serializable + ) : JvmSerializable } /** diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/DurationView.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationView.kt similarity index 100% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/DurationView.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/DurationView.kt diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationConfig.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationConfig.kt similarity index 89% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationConfig.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationConfig.kt index c02e32af..e526bc54 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationConfig.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationConfig.kt @@ -15,7 +15,7 @@ */ package com.maxkeppeler.sheets.duration.models -import androidx.annotation.IntRange +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.BaseConfigs import com.maxkeppeker.sheets.core.models.base.LibOrientation @@ -33,9 +33,9 @@ import com.maxkeppeker.sheets.core.utils.BaseConstants */ data class DurationConfig( val timeFormat: DurationFormat = DurationFormat.MM_SS, - @IntRange(from = 0L) val currentTime: Long? = null, - @IntRange(from = 0L) val minTime: Long = 0, - @IntRange(from = 1L) val maxTime: Long = Long.MAX_VALUE, + val currentTime: Long? = null, + val minTime: Long = 0, + val maxTime: Long = Long.MAX_VALUE, val displayClearButton: Boolean = false, override val icons: LibIcons = BaseConstants.DEFAULT_ICON_STYLE, override val orientation: LibOrientation? = BaseConstants.DEFAULT_LIB_LAYOUT, diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationFormat.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationFormat.kt similarity index 96% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationFormat.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationFormat.kt index 307d82a0..884f20a9 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationFormat.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationFormat.kt @@ -15,6 +15,8 @@ */ package com.maxkeppeler.sheets.duration.models +import androidx.compose.runtime.Stable + /** * Available time formats. */ diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationSelection.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationSelection.kt similarity index 98% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationSelection.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationSelection.kt index 8fe4dde7..e5d44800 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/models/DurationSelection.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/models/DurationSelection.kt @@ -17,6 +17,7 @@ package com.maxkeppeler.sheets.duration.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/utils/Constants.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/utils/Constants.kt similarity index 100% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/utils/Constants.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/utils/Constants.kt diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/utils/Utils.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/utils/Utils.kt similarity index 76% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/utils/Utils.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/utils/Utils.kt index d1d3f3ad..434c10d7 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/utils/Utils.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/utils/Utils.kt @@ -15,16 +15,22 @@ */ package com.maxkeppeler.sheets.duration.utils -import androidx.annotation.RestrictTo -import androidx.annotation.StringRes -import com.maxkeppeler.sheets.duration.R import com.maxkeppeler.sheets.duration.models.DurationConfig import com.maxkeppeler.sheets.duration.models.DurationFormat -import java.util.concurrent.TimeUnit +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.StringResource +import sheets_compose_dialogs.duration.generated.resources.* +import sheets_compose_dialogs.duration.generated.resources.Res +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_hour_code +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_minute_code +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_second_code +import kotlin.time.Duration.Companion.days +import kotlin.time.Duration.Companion.hours +import kotlin.time.Duration.Companion.minutes +import kotlin.time.Duration.Companion.seconds /** Splits seconds into days, hours, minutes and seconds. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) fun splitTime(timeInSeconds: Long): TimeInfo { val days = timeInSeconds / 86400 @@ -41,7 +47,6 @@ fun splitTime(timeInSeconds: Long): TimeInfo { } /** Helper class to store time units. */ -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) data class TimeInfo( val days: Long = 0, val hours: Long = 0, @@ -55,7 +60,7 @@ data class TimeInfo( internal fun parseCurrentTime(format: DurationFormat, currentTime: Long? = null): StringBuilder { - val time = StringBuffer("") + val time = StringBuilder() val (days, hours, minutes, seconds) = splitTime(currentTime ?: 0) // No support for days yet @@ -96,12 +101,17 @@ internal fun parseCurrentTime(format: DurationFormat, currentTime: Long? = null) return filledTimeString } -data class Label(@StringRes val short: Int, @StringRes val long: Int) +@OptIn(ExperimentalResourceApi::class) +data class Label( + val short: StringResource, + val long: StringResource +) -val labels = listOf( - Label(R.string.scd_duration_dialog_hour_code, R.string.scd_duration_dialog_hours), - Label(R.string.scd_duration_dialog_minute_code, R.string.scd_duration_dialog_minutes), - Label(R.string.scd_duration_dialog_second_code, R.string.scd_duration_dialog_seconds) +@OptIn(ExperimentalResourceApi::class) +internal val labels = listOf( + Label(Res.string.scd_duration_dialog_hour_code, Res.string.scd_duration_dialog_hours), + Label(Res.string.scd_duration_dialog_minute_code, Res.string.scd_duration_dialog_minutes), + Label(Res.string.scd_duration_dialog_second_code, Res.string.scd_duration_dialog_seconds) ) internal fun getValuePairs( @@ -144,10 +154,10 @@ internal fun parseToSeconds(time: StringBuilder, format: DurationFormat): Long { if (time.isEmpty()) return@forEachIndexed when { formatTimeUnit.contains("H", ignoreCase = true) -> { - timeInSeconds += TimeUnit.HOURS.toSeconds(time.reversed().toLong()) + timeInSeconds += time.reversed().toLong().hours.inWholeSeconds } formatTimeUnit.contains("M", ignoreCase = true) -> { - timeInSeconds += TimeUnit.MINUTES.toSeconds(time.reversed().toLong()) + timeInSeconds += time.reversed().toLong().minutes.inWholeSeconds } formatTimeUnit.contains("S", ignoreCase = true) -> { timeInSeconds += time.reversed().toInt() @@ -175,13 +185,13 @@ internal fun getFormattedHintTime(timeInSeconds: Long): MutableList 0) { var secondsValue = timeInSeconds - val days = TimeUnit.SECONDS.toDays(secondsValue).toInt() - secondsValue -= TimeUnit.DAYS.toSeconds(days.toLong()) - val hours = TimeUnit.SECONDS.toHours(secondsValue).toInt() - secondsValue -= TimeUnit.HOURS.toSeconds(hours.toLong()) - val minutes = TimeUnit.SECONDS.toMinutes(secondsValue).toInt() - secondsValue -= TimeUnit.MINUTES.toSeconds(minutes.toLong()) - val seconds = TimeUnit.SECONDS.toSeconds(secondsValue).toInt() + val days = secondsValue.seconds.inWholeDays.toInt() + secondsValue -= days.days.inWholeSeconds + val hours = secondsValue.seconds.inWholeHours.toInt() + secondsValue -= hours.hours.inWholeSeconds + val minutes = secondsValue.seconds.inWholeMinutes.toInt() + secondsValue -= minutes.minutes.inWholeSeconds + val seconds = secondsValue.seconds.inWholeSeconds.toInt() if (hours > 0) pairs.add(Pair(hours.toString(), labels[0])) if (minutes > 0) pairs.add(Pair(minutes.toString(),labels[1])) diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/KeyItemComponent.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/KeyItemComponent.kt similarity index 89% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/views/KeyItemComponent.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/KeyItemComponent.kt index 2030bae7..bb49c408 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/KeyItemComponent.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/KeyItemComponent.kt @@ -33,17 +33,19 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.duration.R import com.maxkeppeler.sheets.duration.models.DurationConfig import com.maxkeppeler.sheets.duration.utils.Constants -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.duration.generated.resources.Res +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_clear_input +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_delete_last_input /** * The item component of the keyboard. @@ -53,6 +55,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param onBackspaceAction The listener that is invoked when [Constants.ACTION_BACKSPACE] was clicked. * @param onEmptyAction The listener that is invoked when [Constants.ACTION_CLEAR] was clicked. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun KeyItemComponent( config: DurationConfig, @@ -102,11 +105,11 @@ internal fun KeyItemComponent( verticalAlignment = Alignment.CenterVertically ) { if (isActionBackspace || isActionClear) { - val maxSize = dimensionResource(RC.dimen.scd_size_150) - val minSize = dimensionResource(RC.dimen.scd_size_100) + val maxSize = 48.dp + val minSize = 16.dp Icon( modifier = Modifier - .padding(dimensionResource(RC.dimen.scd_small_100)) + .padding(8.dp) .sizeIn( maxWidth = maxSize, maxHeight = maxSize, @@ -116,8 +119,8 @@ internal fun KeyItemComponent( .fillMaxSize(), imageVector = if (isActionBackspace) config.icons.Backspace else config.icons.Clear, contentDescription = stringResource( - if (isActionBackspace) R.string.scd_duration_dialog_delete_last_input - else R.string.scd_duration_dialog_clear_input + if (isActionBackspace) Res.string.scd_duration_dialog_delete_last_input + else Res.string.scd_duration_dialog_clear_input ), tint = MaterialTheme.colorScheme.secondary ) diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/KeyboardComponent.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/KeyboardComponent.kt similarity index 100% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/views/KeyboardComponent.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/KeyboardComponent.kt diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeDisplayComponent.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeDisplayComponent.kt similarity index 100% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeDisplayComponent.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeDisplayComponent.kt diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeHintComponent.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeHintComponent.kt similarity index 72% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeHintComponent.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeHintComponent.kt index 069845fe..beb72d8e 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeHintComponent.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeHintComponent.kt @@ -18,10 +18,13 @@ package com.maxkeppeler.sheets.duration.views import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import com.maxkeppeker.sheets.core.models.base.LibOrientation -import com.maxkeppeler.sheets.duration.R import com.maxkeppeler.sheets.duration.utils.getFormattedHintTime +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.duration.generated.resources.Res +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_at_least_placeholder +import sheets_compose_dialogs.duration.generated.resources.scd_duration_dialog_at_most_placeholder /** * The info component that will show a hint if the selected time is out of the specified bounds. @@ -29,6 +32,7 @@ import com.maxkeppeler.sheets.duration.utils.getFormattedHintTime * @param minTime The minimum valid time. * @param maxTime The maximum valid time. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun TimeHintComponent( orientation: LibOrientation, @@ -38,8 +42,8 @@ internal fun TimeHintComponent( if (minTime != null || maxTime != null) { - val hintRes = if (minTime != null) R.string.scd_duration_dialog_at_least_placeholder - else R.string.scd_duration_dialog_at_most_placeholder + val hintRes = if (minTime != null) Res.string.scd_duration_dialog_at_least_placeholder + else Res.string.scd_duration_dialog_at_most_placeholder val time = minTime ?: maxTime ?: throw IllegalStateException("Hint is shown but min and max time values are null.") @@ -49,7 +53,7 @@ internal fun TimeHintComponent( modifier = Modifier, orientation = orientation, values = values, - hintValue = stringResource(id = hintRes) + hintValue = stringResource(hintRes) ) } } diff --git a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeValueComponent.kt b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeValueComponent.kt similarity index 92% rename from duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeValueComponent.kt rename to duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeValueComponent.kt index dded2a79..87fe4aef 100644 --- a/duration/src/main/java/com/maxkeppeler/sheets/duration/views/TimeValueComponent.kt +++ b/duration/src/commonMain/kotlin/com/maxkeppeler/sheets/duration/views/TimeValueComponent.kt @@ -21,15 +21,14 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.withStyle import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.LibOrientation import com.maxkeppeler.sheets.duration.utils.Label -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource /** * The value component that reflects one unit and its value. @@ -40,6 +39,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param indexOfFirstValue The index of the first valid value. * @param isHintView If the current component will be displays as a small hint or not. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun TimeValueComponent( modifier: Modifier = Modifier, @@ -113,8 +113,8 @@ internal fun TimeValueComponent( modifier = Modifier.width( when { orientation == LibOrientation.LANDSCAPE && !isHintView -> - dimensionResource(RC.dimen.scd_small_150) - else -> dimensionResource(RC.dimen.scd_small_50) + 12.dp + else -> 4.dp } ) ) @@ -129,7 +129,7 @@ internal fun TimeValueComponent( style = labelStyle, ) if (!isHintView && index != values.lastIndex) { - Spacer(modifier = Modifier.width(dimensionResource(RC.dimen.scd_small_75))) + Spacer(modifier = Modifier.width(6.dp)) } } } @@ -144,7 +144,7 @@ internal fun TimeValueComponent( content = { Column(horizontalAlignment = Alignment.CenterHorizontally) { Row { valueContent() } - if (valid) Spacer(modifier = Modifier.height(dimensionResource(RC.dimen.scd_normal_100))) + if (valid) Spacer(modifier = Modifier.height(16.dp)) hintView?.invoke() } } @@ -158,7 +158,7 @@ internal fun TimeValueComponent( verticalArrangement = Arrangement.Center, content = { valueContent() -// Spacer(modifier = Modifier.height(dimensionResource(RC.dimen.scd_normal_100))) +// Spacer(modifier = Modifier.height(16.dp)) hintView?.invoke() } ) diff --git a/duration/src/main/AndroidManifest.xml b/duration/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/duration/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/duration/src/main/res/values-bg/strings.xml b/duration/src/main/res/values-bg/strings.xml deleted file mode 100644 index dbe72d23..00000000 --- a/duration/src/main/res/values-bg/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Минимум - Максимум - h - м - s - Часове - Минути - Секунди - Изтриване на последния въведен елемент. - Изчисти входа - - \ No newline at end of file diff --git a/duration/src/main/res/values-cs/strings.xml b/duration/src/main/res/values-cs/strings.xml deleted file mode 100644 index 4cd6ac14..00000000 --- a/duration/src/main/res/values-cs/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimální - Maximum - h - m - s - Hodiny - Minuty - Sekundy - Smazat poslední zadání - Vyčistit vstup - - \ No newline at end of file diff --git a/duration/src/main/res/values-da/strings.xml b/duration/src/main/res/values-da/strings.xml deleted file mode 100644 index 53abee85..00000000 --- a/duration/src/main/res/values-da/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Højst - h - m - s - Timer - Minutter - Sekunder - Slet seneste indtastning - Ryd indtastning - - \ No newline at end of file diff --git a/duration/src/main/res/values-de/strings.xml b/duration/src/main/res/values-de/strings.xml deleted file mode 100644 index e9b53edf..00000000 --- a/duration/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maximal - h - m - s - Stunden - Minuten - Sekunden - Letzten Eingabe löschen - Eingabe löschen - - \ No newline at end of file diff --git a/duration/src/main/res/values-el/strings.xml b/duration/src/main/res/values-el/strings.xml deleted file mode 100644 index 7bf05564..00000000 --- a/duration/src/main/res/values-el/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Ελάχιστο - Μέγιστο - h - m - s - Ωρες - Λεπτά - Δευτερόλεπτα - Διαγραφή τελευταίας εισόδου - Καθαρισμός εισόδου - - \ No newline at end of file diff --git a/duration/src/main/res/values-eo/strings.xml b/duration/src/main/res/values-eo/strings.xml deleted file mode 100644 index cd15459c..00000000 --- a/duration/src/main/res/values-eo/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimuma - h - m - s - Horoj - Minute - Sekundoj - Forigi lastan enigon - Forigi eniron - - \ No newline at end of file diff --git a/duration/src/main/res/values-es/strings.xml b/duration/src/main/res/values-es/strings.xml deleted file mode 100644 index 46d83a12..00000000 --- a/duration/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Mínimo - Máximo - h - m - s - Horas - Minutos - Segundos - Eliminar última entrada - Borrar entrada - - \ No newline at end of file diff --git a/duration/src/main/res/values-et/strings.xml b/duration/src/main/res/values-et/strings.xml deleted file mode 100644 index 46ec193e..00000000 --- a/duration/src/main/res/values-et/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Miinimum - Maksimaalne - h - m - s - Tunnid - Minutes - Sekundid - Kustuta viimane sisend - Tühista sisend - - \ No newline at end of file diff --git a/duration/src/main/res/values-fa/strings.xml b/duration/src/main/res/values-fa/strings.xml deleted file mode 100644 index ea00f509..00000000 --- a/duration/src/main/res/values-fa/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - حداقل - حداکثر - h - m - s - ساعات - دقیقه - ثانیه - حذف آخرین ورودی - پاکسازی ورودی - - \ No newline at end of file diff --git a/duration/src/main/res/values-fi/strings.xml b/duration/src/main/res/values-fi/strings.xml deleted file mode 100644 index d5c7b956..00000000 --- a/duration/src/main/res/values-fi/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Vähimmäis - Maksimi - h - m - s - Tunnit - Pöytäkirja - Sekunnit - Poista viimeisin syöte - Tyhjennä syöte - - \ No newline at end of file diff --git a/duration/src/main/res/values-fr/strings.xml b/duration/src/main/res/values-fr/strings.xml deleted file mode 100644 index 3dd20e71..00000000 --- a/duration/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maximum - h - m - s - Heures - Minutes - Secondes - Supprimer la dernière entrée - Effacer la saisie - - \ No newline at end of file diff --git a/duration/src/main/res/values-ga/strings.xml b/duration/src/main/res/values-ga/strings.xml deleted file mode 100644 index 0074c94c..00000000 --- a/duration/src/main/res/values-ga/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Is íochtarach. - Teorainn Mórchumais - h - m - s - Uaireanta - Nótaí - Soicindí - Scrios an iontráil dheireanach - Cléiriú isteach - - \ No newline at end of file diff --git a/duration/src/main/res/values-gd/strings.xml b/duration/src/main/res/values-gd/strings.xml deleted file mode 100644 index a927f3aa..00000000 --- a/duration/src/main/res/values-gd/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Cìogairin - Àrd-mhìneachadh - h - m - s - Uairean - Gach mionaid - Dàrnaichean - Sguab às am put mu dheireadh - Fuirich soilleir - - \ No newline at end of file diff --git a/duration/src/main/res/values-hi/strings.xml b/duration/src/main/res/values-hi/strings.xml deleted file mode 100644 index 72aea324..00000000 --- a/duration/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - न्यूनतम - अधिकतम - h - m - - घंटे - मिनट्स - सेकंड - पिछला इनपुट हटाएं - स्पष्ट इनपुट - - \ No newline at end of file diff --git a/duration/src/main/res/values-hr/strings.xml b/duration/src/main/res/values-hr/strings.xml deleted file mode 100644 index 57caddea..00000000 --- a/duration/src/main/res/values-hr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimalno - Maksimum - h - m - s - Sati - Minuta - Sekunde - Izbriši posljednji unos - Očisti unos - - \ No newline at end of file diff --git a/duration/src/main/res/values-hu/strings.xml b/duration/src/main/res/values-hu/strings.xml deleted file mode 100644 index 584f190c..00000000 --- a/duration/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maximum - h - m - s - Órák - Percek - Másodpercek - Utolsó bevitel törlése - Tiszta bemenet - - \ No newline at end of file diff --git a/duration/src/main/res/values-in-rID/strings.xml b/duration/src/main/res/values-in-rID/strings.xml deleted file mode 100644 index e48c3718..00000000 --- a/duration/src/main/res/values-in-rID/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimum - h - m - s - Jam - Menit - Detik - Hapus masukan terakhir - Hapus masukan - - \ No newline at end of file diff --git a/duration/src/main/res/values-is/strings.xml b/duration/src/main/res/values-is/strings.xml deleted file mode 100644 index 0324977a..00000000 --- a/duration/src/main/res/values-is/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Lágmarks- - Hámark - h - m - s - Klukkustundir - Mínútur - Sekúndur - Eyða síðasta inntaki - Hreinna innslátt - - \ No newline at end of file diff --git a/duration/src/main/res/values-it/strings.xml b/duration/src/main/res/values-it/strings.xml deleted file mode 100644 index 79873bc1..00000000 --- a/duration/src/main/res/values-it/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimo - Massimo - h - m - s - Orari - Minuti. - Secondi - Elimina l\'ultimo input - Cancella l\'input - - \ No newline at end of file diff --git a/duration/src/main/res/values-iw/strings.xml b/duration/src/main/res/values-iw/strings.xml deleted file mode 100644 index 56097984..00000000 --- a/duration/src/main/res/values-iw/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - מינימום - מרבי - h - m - s - שעות - דקות - שניות - מחק את הקלט האחרון - נקה קלט - - \ No newline at end of file diff --git a/duration/src/main/res/values-ja/strings.xml b/duration/src/main/res/values-ja/strings.xml deleted file mode 100644 index 898977d2..00000000 --- a/duration/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 最小 - 最大 - h - m - s - 営業時間 - - - 最後の入力を削除する - 入力をクリア - - \ No newline at end of file diff --git a/duration/src/main/res/values-jv/strings.xml b/duration/src/main/res/values-jv/strings.xml deleted file mode 100644 index b759f65b..00000000 --- a/duration/src/main/res/values-jv/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimal - h - m - s - Jam-jam - Menit - Detik - Ngapus data paling anyar - Terangake masukan - - \ No newline at end of file diff --git a/duration/src/main/res/values-kk/strings.xml b/duration/src/main/res/values-kk/strings.xml deleted file mode 100644 index c71b5a72..00000000 --- a/duration/src/main/res/values-kk/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Аза туралы - Ең көп - h - m - s - Сағаттар - Минутты. - Секунды - Соңғы кірістірмемен шығару - Таза кіру - - \ No newline at end of file diff --git a/duration/src/main/res/values-ko/strings.xml b/duration/src/main/res/values-ko/strings.xml deleted file mode 100644 index 62b71cbc..00000000 --- a/duration/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 최소한의 - 최대한의 - h - m - s - 시간 - - - 마지막 입력 삭제 - 입력 지우기 - - \ No newline at end of file diff --git a/duration/src/main/res/values-ku/strings.xml b/duration/src/main/res/values-ku/strings.xml deleted file mode 100644 index e31c326d..00000000 --- a/duration/src/main/res/values-ku/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - سەرەتایی - h - m - s - کاتژمێر - دەقایەکان - چرکەمینداڵان - تاکە لەسەرین دانە حذف بکە - جێگیرکردنەوەی دانەوە بەبڕوانە - - \ No newline at end of file diff --git a/duration/src/main/res/values-lb/strings.xml b/duration/src/main/res/values-lb/strings.xml deleted file mode 100644 index 26c4224f..00000000 --- a/duration/src/main/res/values-lb/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maximum - h - m - s - Stonnen - Minutten - Sekonnen - Läscht de leschte Input. - Läschen Eingabe - - \ No newline at end of file diff --git a/duration/src/main/res/values-lo/strings.xml b/duration/src/main/res/values-lo/strings.xml deleted file mode 100644 index adfddd49..00000000 --- a/duration/src/main/res/values-lo/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - ຕໍ່ໄປເກີດຄວາມຮ່ວມທີ່ບໍ່ດໍາເນີນການ. - ສູນເສຍສໍາລັບກ່ອນນັ້ນ - h - m - s - ຊົ່ວໂມງ - ນາທີ - ວິນາທີ່ - ລຶບຂໍ້ມູນຂອງການປ້ອນຫຼ້າສຸດ - ລົບຂໍ້ມູນເຂົ້າໃຊ້ໃດໆ - - \ No newline at end of file diff --git a/duration/src/main/res/values-lt/strings.xml b/duration/src/main/res/values-lt/strings.xml deleted file mode 100644 index a1a2f597..00000000 --- a/duration/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimalus - h - m - s - Valandos - Minutes - Minutės - Sekundės - Ištrinti paskutinį įvedimą. - Išvalyti įvestį - - \ No newline at end of file diff --git a/duration/src/main/res/values-lv/strings.xml b/duration/src/main/res/values-lv/strings.xml deleted file mode 100644 index cbfed632..00000000 --- a/duration/src/main/res/values-lv/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimums - h - m - s - Stundas - Minūtes - Sekundes - Dzēst pēdējo ievadi. - Notklaust ievadījumu - - \ No newline at end of file diff --git a/duration/src/main/res/values-ms/strings.xml b/duration/src/main/res/values-ms/strings.xml deleted file mode 100644 index 9523ed2a..00000000 --- a/duration/src/main/res/values-ms/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimum - h - OK. - s - Jam - Minit - Sa(a)t - Padam input terakhir - Kosongkan input - - \ No newline at end of file diff --git a/duration/src/main/res/values-ne/strings.xml b/duration/src/main/res/values-ne/strings.xml deleted file mode 100644 index 526df4a2..00000000 --- a/duration/src/main/res/values-ne/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - न्यूनतम - अधिकतम - OK - - s - कालों - दक्षिण, क्षण - सेकेण्ड - अन्तिम इनपुटलाई मेटाउनुहोस्। - प्रविष्टि साफ गर्नुहोस् - - \ No newline at end of file diff --git a/duration/src/main/res/values-nl/strings.xml b/duration/src/main/res/values-nl/strings.xml deleted file mode 100644 index e2cabefa..00000000 --- a/duration/src/main/res/values-nl/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maximum - h - m - s - Uren - Notulen - Seconden - Laatste invoer verwijderen - Wis invoer - - \ No newline at end of file diff --git a/duration/src/main/res/values-no/strings.xml b/duration/src/main/res/values-no/strings.xml deleted file mode 100644 index 69c39de5..00000000 --- a/duration/src/main/res/values-no/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimum - h - m - s - Timer - Minutter - Sekunder - Slett siste inndata - Tøm input - - \ No newline at end of file diff --git a/duration/src/main/res/values-pl/strings.xml b/duration/src/main/res/values-pl/strings.xml deleted file mode 100644 index 894b05e3..00000000 --- a/duration/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimum - OK - m - s - Godziny - Minuty - Sekundy - Usuń ostatni wpis - Wyczyść dane wejściowe - - \ No newline at end of file diff --git a/duration/src/main/res/values-pt/strings.xml b/duration/src/main/res/values-pt/strings.xml deleted file mode 100644 index 30c87505..00000000 --- a/duration/src/main/res/values-pt/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Mínimo - Máximo - h - m - s - Horas - Minutos - Segundos - Apagar última entrada - Limpar entrada - - \ No newline at end of file diff --git a/duration/src/main/res/values-ru/strings.xml b/duration/src/main/res/values-ru/strings.xml deleted file mode 100644 index 0a666ee7..00000000 --- a/duration/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Минимальный - Максимум - h - m - s - Часы - Минуты - Секунды - Удалить последний ввод - Очистить ввод - - \ No newline at end of file diff --git a/duration/src/main/res/values-sk/strings.xml b/duration/src/main/res/values-sk/strings.xml deleted file mode 100644 index d38917bf..00000000 --- a/duration/src/main/res/values-sk/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimálny - Maximálny - h - m - s - Hodiny - Protokol - Sekundy - Zmazať posledný vstup - Vyčistiť vstup - - \ No newline at end of file diff --git a/duration/src/main/res/values-sl/strings.xml b/duration/src/main/res/values-sl/strings.xml deleted file mode 100644 index 818346e9..00000000 --- a/duration/src/main/res/values-sl/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Najmanjše - Največ - h - m - s - Ure - Minuti - Sekunde - Izbriši zadnji vnos - Pobriši vnos - - \ No newline at end of file diff --git a/duration/src/main/res/values-sr/strings.xml b/duration/src/main/res/values-sr/strings.xml deleted file mode 100644 index dd98a07d..00000000 --- a/duration/src/main/res/values-sr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimum - h - m - s - Sati - Minuti - Sekundi - Obriši poslednji unos - Obriši unos. - - \ No newline at end of file diff --git a/duration/src/main/res/values-sv/strings.xml b/duration/src/main/res/values-sv/strings.xml deleted file mode 100644 index 29d2f194..00000000 --- a/duration/src/main/res/values-sv/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maximum - h - m - s - Timmar - Minuter - Sekunder - Radera senaste inmatningen - Rensa input - - \ No newline at end of file diff --git a/duration/src/main/res/values-th/strings.xml b/duration/src/main/res/values-th/strings.xml deleted file mode 100644 index e68143ad..00000000 --- a/duration/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - ขั้นต่ำ - มากที่สุด - h - m - s - เวลา - นาที - วินาที - ลบการป้อนข้อมูลล่าสุด - ล้างข้อมูลที่ป้อน - - \ No newline at end of file diff --git a/duration/src/main/res/values-tr/strings.xml b/duration/src/main/res/values-tr/strings.xml deleted file mode 100644 index 0b3f8770..00000000 --- a/duration/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Minimum - Maksimum - h - m - s - Saatler - Dakikalar - Saniye - Son girişi sil - Girdiyi temizle - - \ No newline at end of file diff --git a/duration/src/main/res/values-uk/strings.xml b/duration/src/main/res/values-uk/strings.xml deleted file mode 100644 index efbf41a7..00000000 --- a/duration/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Мінімум - Максимум - h - m - s - Години - Хвилини - Секунди - Видалити останній введений запис - Очистити введення - - \ No newline at end of file diff --git a/duration/src/main/res/values-vi/strings.xml b/duration/src/main/res/values-vi/strings.xml deleted file mode 100644 index 4dc16586..00000000 --- a/duration/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - Tối thiểu - Tối đa - h - m - s - Giờ - Phút - Giây. - Xóa đầu vào cuối cùng - Xóa nội dung - - \ No newline at end of file diff --git a/duration/src/main/res/values-zh-rCN/strings.xml b/duration/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index e0696974..00000000 --- a/duration/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 最小 - 最大的 - h - m - s - 小时 - 分钟 - - 删除最后一个输入 - 清除输入 - - \ No newline at end of file diff --git a/duration/src/main/res/values-zh-rTW/strings.xml b/duration/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index 31f97317..00000000 --- a/duration/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - 最小的 - 最大化 - h - m - s - 小時 - 會議紀錄 - - 刪除最後的輸入 - 清除輸入 - - \ No newline at end of file diff --git a/duration/src/main/res/values/strings.xml b/duration/src/main/res/values/strings.xml deleted file mode 100644 index c810f9c8..00000000 --- a/duration/src/main/res/values/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Minimum - Maximum - h - m - s - Hours - Minutes - Seconds - Delete last input - Clear input - - \ No newline at end of file diff --git a/emoji/build.gradle.kts b/emoji/build.gradle.kts index 35651f4b..0505de79 100644 --- a/emoji/build.gradle.kts +++ b/emoji/build.gradle.kts @@ -1,34 +1,58 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.EMOJI.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } } -dependencies { - implementations(Dependencies.Vanniktech.EMOJI_GOOGLE) - implementations(Dependencies.Vanniktech.EMOJI_IOS) - implementations(Dependencies.Vanniktech.EMOJI_TWITTER) - implementations(Dependencies.Vanniktech.EMOJI_FACEBOOK) +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + + implementation(libs.emoji.facebook) + implementation(libs.emoji.google) + implementation(libs.emoji.ios) + implementation(libs.emoji.twitter) + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiDialog.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiDialog.kt similarity index 100% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiDialog.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiDialog.kt diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiPopup.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiPopup.kt similarity index 98% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiPopup.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiPopup.kt index 096eea63..03f101fd 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiPopup.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiPopup.kt @@ -38,6 +38,7 @@ import com.maxkeppeler.sheets.emoji.models.EmojiSelection * @param offset The offset of the popup. * @param properties PopupProperties for further customization of this popup's behavior. */ +@OptIn(ExperimentalMaterial3Api::class) @Composable fun EmojiPopup( state: UseCaseState, diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiState.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiState.kt similarity index 98% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiState.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiState.kt index 75505a27..af6ed527 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiState.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiState.kt @@ -27,7 +27,7 @@ import com.maxkeppeler.sheets.emoji.models.EmojiSelection import com.vanniktech.emoji.Emoji import com.vanniktech.emoji.EmojiCategory import com.vanniktech.emoji.google.GoogleEmojiProvider -import java.io.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable /** * Handles the emoji state. @@ -109,7 +109,7 @@ internal class EmojiState( */ data class EmojiStateData( val selectedEmoji: Emoji? - ) : Serializable + ) : JvmSerializable } /** diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiView.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiView.kt similarity index 92% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiView.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiView.kt index 09132eac..08206b3b 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/EmojiView.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/EmojiView.kt @@ -30,7 +30,6 @@ import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.models.base.BaseBehaviors import com.maxkeppeker.sheets.core.models.base.Header @@ -46,7 +45,6 @@ import com.maxkeppeler.sheets.emoji.utils.EmojiInstaller import com.maxkeppeler.sheets.emoji.views.EmojiHeaderComponent import com.maxkeppeler.sheets.emoji.views.EmojiItemComponent import com.vanniktech.emoji.Emoji -import com.maxkeppeler.sheets.core.R as RC /** * Emoji view for the use-case to to select any emoji or a variant, if available. @@ -104,12 +102,12 @@ fun EmojiView( LazyVerticalGrid( modifier = Modifier .dynamicContentWrapOrMaxHeight(this) - .padding(top = dimensionResource(RC.dimen.scd_normal_100)), + .padding(top = 16.dp), contentPadding = PaddingValues( - bottom = if (selection.withButtonView) 0.dp else dimensionResource(RC.dimen.scd_normal_100), + bottom = if (selection.withButtonView) 0.dp else 16.dp, ), - horizontalArrangement = Arrangement.spacedBy(dimensionResource(RC.dimen.scd_small_25)), - verticalArrangement = Arrangement.spacedBy(dimensionResource(RC.dimen.scd_small_25)), + horizontalArrangement = Arrangement.spacedBy(2.dp), + verticalArrangement = Arrangement.spacedBy(2.dp), columns = GridCells.Fixed(emojiState.categories.size) ) { items(emojiState.categoryEmojis, key = { it.unicode }) { emoji -> diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiCategoryAppearance.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiCategoryAppearance.kt similarity index 100% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiCategoryAppearance.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiCategoryAppearance.kt diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiConfig.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiConfig.kt similarity index 100% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiConfig.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiConfig.kt diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiProvider.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiProvider.kt similarity index 100% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiProvider.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiProvider.kt diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiSelection.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiSelection.kt similarity index 100% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/models/EmojiSelection.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/models/EmojiSelection.kt diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/utils/Constants.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/utils/Constants.kt similarity index 100% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/utils/Constants.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/utils/Constants.kt diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/utils/EmojiInstaller.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/utils/EmojiInstaller.kt similarity index 75% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/utils/EmojiInstaller.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/utils/EmojiInstaller.kt index f78dbe5c..104858f3 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/utils/EmojiInstaller.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/utils/EmojiInstaller.kt @@ -34,17 +34,16 @@ internal object EmojiInstaller { * Installs an emoji provider. * @param emojiProvider The emoji provider that will be installed. */ + @Synchronized fun installProvider(emojiProvider: EmojiProvider) { - synchronized(EmojiInstaller::class.java) { - if (!initiated) { - when (emojiProvider) { - EmojiProvider.GOOGLE -> EmojiManager.install(GoogleEmojiProvider()) - EmojiProvider.IOS -> EmojiManager.install(IosEmojiProvider()) - EmojiProvider.FACEBOOK -> EmojiManager.install(FacebookEmojiProvider()) - EmojiProvider.TWITTER -> EmojiManager.install(TwitterEmojiProvider()) - } - initiated = true + if (!initiated) { + when (emojiProvider) { + EmojiProvider.GOOGLE -> EmojiManager.install(GoogleEmojiProvider()) + EmojiProvider.IOS -> EmojiManager.install(IosEmojiProvider()) + EmojiProvider.FACEBOOK -> EmojiManager.install(FacebookEmojiProvider()) + EmojiProvider.TWITTER -> EmojiManager.install(TwitterEmojiProvider()) } + initiated = true } } diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiHeaderComponent.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiHeaderComponent.kt similarity index 95% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiHeaderComponent.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiHeaderComponent.kt index 0de2bebd..c1ca1410 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiHeaderComponent.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiHeaderComponent.kt @@ -25,10 +25,9 @@ import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R import com.maxkeppeler.sheets.emoji.models.EmojiCategoryAppearance import com.maxkeppeler.sheets.emoji.models.EmojiConfig import com.vanniktech.emoji.EmojiCategory @@ -58,7 +57,7 @@ internal fun EmojiHeaderComponent( modifier = Modifier.testTags(TestTags.EMOJI_CATEGORY, config.categoryAppearance), columns = GridCells.Fixed(categories.size), userScrollEnabled = false, - horizontalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.scd_small_25)), + horizontalArrangement = Arrangement.spacedBy(2.dp), ) { itemsIndexed(categoryIcons) { index, icon -> val selected = index == selectedCategory diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiHeaderItemComponent.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiHeaderItemComponent.kt similarity index 91% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiHeaderItemComponent.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiHeaderItemComponent.kt index 3800cdd3..d31f136d 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiHeaderItemComponent.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiHeaderItemComponent.kt @@ -27,10 +27,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** * The emoji header item component. @@ -53,12 +52,12 @@ internal fun EmojiHeaderItemComponent( .clip(if (selected) RoundedCornerShape(50) else MaterialTheme.shapes.small) .background(if (selected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent) .clickable { onClick() } - .padding(dimensionResource(RC.dimen.scd_small_50)), + .padding(4.dp), horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically ) { Icon( - modifier = Modifier.size(dimensionResource(RC.dimen.scd_normal_150)), + modifier = Modifier.size(24.dp), imageVector = imageVector, contentDescription = "", tint = if (selected) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurface diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiItemComponent.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiItemComponent.kt similarity index 86% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiItemComponent.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiItemComponent.kt index 468330a0..d55270ac 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiItemComponent.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiItemComponent.kt @@ -23,6 +23,7 @@ import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -31,14 +32,12 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.layout.onGloballyPositioned -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.unit.IntSize -import androidx.compose.ui.viewinterop.AndroidView +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.vanniktech.emoji.Emoji -import com.vanniktech.emoji.EmojiTextView -import com.maxkeppeler.sheets.core.R as RC /** @@ -47,6 +46,7 @@ import com.maxkeppeler.sheets.core.R as RC * @param selectedEmoji The emoji that is currently selected. * @param onClick The listener that returns the selected emoji. */ +@OptIn(ExperimentalFoundationApi::class) @Composable internal fun EmojiItemComponent( emoji: Emoji, @@ -84,17 +84,12 @@ internal fun EmojiItemComponent( if (emoji.variants.isNotEmpty()) showVariants.value = true } ) - .padding(dimensionResource(RC.dimen.scd_small_25)), + .padding(2.dp), ) { - - AndroidView( + Text( modifier = Modifier.align(Alignment.Center), - factory = { context -> - EmojiTextView(context).apply { - setEmojiSize(constraints.maxWidth, false) - text = emoji.unicode - } - }, + fontSize = constraints.maxWidth.sp, + text = emoji.unicode ) } } \ No newline at end of file diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiTextHeaderItemComponent.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiTextHeaderItemComponent.kt similarity index 90% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiTextHeaderItemComponent.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiTextHeaderItemComponent.kt index f11141fa..2fe1d1e1 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/EmojiTextHeaderItemComponent.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/EmojiTextHeaderItemComponent.kt @@ -25,10 +25,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** @@ -52,8 +51,8 @@ internal fun EmojiTextHeaderItemComponent( .background(if (selected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent) .clickable { onClick() } .padding( - horizontal = dimensionResource(RC.dimen.scd_small_150), - vertical = dimensionResource(RC.dimen.scd_small_50) + horizontal = 12.dp, + vertical = 4.dp ), text = name, style = if (selected) MaterialTheme.typography.labelLarge.copy(color = MaterialTheme.colorScheme.primary) diff --git a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/VariantsPopup.kt b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/VariantsPopup.kt similarity index 90% rename from emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/VariantsPopup.kt rename to emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/VariantsPopup.kt index 402d1aa2..ad4e897c 100644 --- a/emoji/src/main/java/com/maxkeppeler/sheets/emoji/views/VariantsPopup.kt +++ b/emoji/src/commonMain/kotlin/com/maxkeppeler/sheets/emoji/views/VariantsPopup.kt @@ -26,11 +26,10 @@ import androidx.compose.runtime.MutableState import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.unit.IntSize +import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Popup import com.vanniktech.emoji.Emoji -import com.maxkeppeler.sheets.core.R as RC /** * A popup that shows the various variants of an emoji. @@ -57,16 +56,16 @@ internal fun VariantsPopup( Box(Modifier.wrapContentWidth()) { Surface( modifier = Modifier - .padding(horizontal = dimensionResource(RC.dimen.scd_small_50)) + .padding(horizontal = 4.dp) .widthIn(max = itemSize * 6), shape = MaterialTheme.shapes.medium, color = MaterialTheme.colorScheme.surface, - shadowElevation = dimensionResource(RC.dimen.scd_small_50), + shadowElevation = 4.dp, ) { LazyVerticalGrid( modifier = Modifier .wrapContentWidth() - .padding(dimensionResource(RC.dimen.scd_normal_100)), + .padding(16.dp), columns = GridCells.Adaptive(itemSize), userScrollEnabled = false, horizontalArrangement = Arrangement.Center diff --git a/emoji/src/main/AndroidManifest.xml b/emoji/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/emoji/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 7c094f68..b614219b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,27 +7,26 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": + +#Kotlin kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true +kotlin.js.compiler=ir + +#Multiplatform +android.useAndroidX=true +kotlin.mpp.androidSourceSetLayoutVersion=2 +kotlin.mpp.enableCInteropCommonization=true -android.disableAutomaticComponentCreation=true +# Compose targets +org.jetbrains.compose.experimental.macos.enabled=true +org.jetbrains.compose.experimental.jscanvas.enabled=true +org.jetbrains.compose.experimental.wasm.enabled=true # Maven publish information -GROUP=com.maxkeppeler.sheets-compose-dialogs -VERSION_NAME=1.3.0 +# GROUP=com.maxkeppeler.sheets-compose-dialogs +GROUP=dev.datlag.sheets-compose-dialogs +VERSION_NAME=2.0.0-SNAPSHOT POM_DESCRIPTION=An Android library that offers dialogs & views for various use-cases - build with Jetpack Compose. POM_INCEPTION_YEAR=2022 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..e11ee46a --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,54 @@ +[versions] +activity-compose = "1.9.0" +android = "8.2.2" +androidx-core-ktx = "1.13.1" +compose = "1.7.0-rc01" +androidx-test-core = "1.5.0" +datetime = "0.6.1" +desugar = "2.0.4" +emoji = "0.21.0" +espresso-core = "3.5.1" +junit = "1.1.5" +junit-version = "4.13.2" +kotlin = "2.0.20" +lifecycle-runtime-ktx = "2.7.0" +navigation-compose = "2.7.7" +publish = "0.29.0" +runner = "1.5.2" +serialization = "1.7.3" +ui-test-junit4 = "1.6.5" +window-size = "0.5.0" + +[libraries] +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" } +androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test-core" } +androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core-ktx" } +androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junit" } +androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso-core" } +androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle-runtime-ktx" } +androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation-compose" } +androidx-runner = { module = "androidx.test:runner", version.ref = "runner" } +androidx-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "ui-test-junit4" } +androidx-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } +androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } +androidx-window = { module = "androidx.window:window", version.require = "1.3.0" } +datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "datetime" } +desugar = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "desugar" } +emoji-facebook = { group = "com.vanniktech", name = "emoji-facebook", version.ref = "emoji" } +emoji-google = { group = "com.vanniktech", name = "emoji-google", version.ref = "emoji" } +emoji-ios = { group = "com.vanniktech", name = "emoji-ios", version.ref = "emoji" } +emoji-twitter = { group = "com.vanniktech", name = "emoji-twitter", version.ref = "emoji" } +junit = { module = "junit:junit", version.ref = "junit-version" } +serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "serialization" } +stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" } +window-size = { group = "dev.chrisbanes.material3", name = "material3-window-size-class-multiplatform", version.ref = "window-size" } + +[plugins] +android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +android-application = { id = "com.android.application", version.ref = "android" } +android-library = { id = "com.android.library", version.ref = "android" } +compose = { id = "org.jetbrains.compose", version.ref = "compose" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +publish = { id = "com.vanniktech.maven.publish", version.ref = "publish" } +serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ce86dd0f..f433c92d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Mar 16 20:09:09 CET 2023 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/info/build.gradle.kts b/info/build.gradle.kts index ee2113c0..00405def 100644 --- a/info/build.gradle.kts +++ b/info/build.gradle.kts @@ -1,27 +1,67 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.INFO.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.INFO.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/InfoDialog.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/InfoDialog.kt similarity index 100% rename from info/src/main/java/com/maxkeppeler/sheets/info/InfoDialog.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/InfoDialog.kt diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/InfoPopup.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/InfoPopup.kt similarity index 100% rename from info/src/main/java/com/maxkeppeler/sheets/info/InfoPopup.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/InfoPopup.kt diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/InfoView.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/InfoView.kt similarity index 100% rename from info/src/main/java/com/maxkeppeler/sheets/info/InfoView.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/InfoView.kt diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/models/InfoBody.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/models/InfoBody.kt similarity index 100% rename from info/src/main/java/com/maxkeppeler/sheets/info/models/InfoBody.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/models/InfoBody.kt diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/models/InfoSelection.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/models/InfoSelection.kt similarity index 98% rename from info/src/main/java/com/maxkeppeler/sheets/info/models/InfoSelection.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/models/InfoSelection.kt index c8cc18dc..eea114e6 100644 --- a/info/src/main/java/com/maxkeppeler/sheets/info/models/InfoSelection.kt +++ b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/models/InfoSelection.kt @@ -17,6 +17,7 @@ package com.maxkeppeler.sheets.info.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/views/BodyComponent.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/views/BodyComponent.kt similarity index 100% rename from info/src/main/java/com/maxkeppeler/sheets/info/views/BodyComponent.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/views/BodyComponent.kt diff --git a/info/src/main/java/com/maxkeppeler/sheets/info/views/DefaultBodyComponent.kt b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/views/DefaultBodyComponent.kt similarity index 90% rename from info/src/main/java/com/maxkeppeler/sheets/info/views/DefaultBodyComponent.kt rename to info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/views/DefaultBodyComponent.kt index 67a0b1c3..6d7d4992 100644 --- a/info/src/main/java/com/maxkeppeler/sheets/info/views/DefaultBodyComponent.kt +++ b/info/src/commonMain/kotlin/com/maxkeppeler/sheets/info/views/DefaultBodyComponent.kt @@ -22,10 +22,9 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeler.sheets.info.models.InfoBody -import com.maxkeppeler.sheets.core.R as RC /** * The default body component for the info dialog. @@ -36,7 +35,7 @@ internal fun DefaultBodyComponent(body: InfoBody.Default) { Column( modifier = Modifier .testTag(TestTags.INFO_BODY_DEFAULT) - .padding(top = dimensionResource(id = RC.dimen.scd_normal_100)) + .padding(top = 16.dp) ) { body.preBody() diff --git a/info/src/main/AndroidManifest.xml b/info/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/info/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/input/build.gradle.kts b/input/build.gradle.kts index ad65c3a2..8fe05b8b 100644 --- a/input/build.gradle.kts +++ b/input/build.gradle.kts @@ -1,27 +1,67 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.INPUT.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.INPUT.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/InputDialog.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputDialog.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/InputDialog.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputDialog.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/InputPopup.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputPopup.kt similarity index 98% rename from input/src/main/java/com/maxkeppeler/sheets/input/InputPopup.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputPopup.kt index cc3d5e59..7c82f834 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/InputPopup.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputPopup.kt @@ -38,6 +38,7 @@ import com.maxkeppeler.sheets.input.models.InputSelection * @param offset The offset of the popup. * @param properties PopupProperties for further customization of this popup's behavior. */ +@OptIn(ExperimentalMaterial3Api::class) @Composable fun InputPopup( state: UseCaseState, diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/InputState.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputState.kt similarity index 94% rename from input/src/main/java/com/maxkeppeler/sheets/input/InputState.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputState.kt index 3b985bca..b5b8fef3 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/InputState.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputState.kt @@ -15,14 +15,14 @@ */ package com.maxkeppeler.sheets.input -import android.os.Bundle import androidx.compose.runtime.* import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.rememberSaveable +import com.maxkeppeker.sheets.core.utils.JvmSerializable import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.input.models.Input import com.maxkeppeler.sheets.input.models.InputSelection -import java.io.Serializable +import kotlinx.serialization.Serializable /** * Handles the list state. @@ -61,14 +61,12 @@ internal class InputState( } fun onFinish() { - val bundle = Bundle() input.forEach { input -> if (input.isInput()) { input.onResult() - input.putValue(bundle) } } - selection.onPositiveClick?.invoke(bundle) + selection.onPositiveClick?.invoke() } override fun reset() { @@ -95,9 +93,10 @@ internal class InputState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class InputStateData( val input: List - ) : Serializable + ) : JvmSerializable } diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/InputView.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputView.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/InputView.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/InputView.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/Input.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/Input.kt similarity index 87% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/Input.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/Input.kt index 924e402e..ea016d9f 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/Input.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/Input.kt @@ -17,8 +17,8 @@ package com.maxkeppeler.sheets.input.models -import android.os.Bundle -import java.io.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable /** * Base input definition that can be added to the input dialog. @@ -27,12 +27,13 @@ import java.io.Serializable * @param header The additional [InputHeader] to add more context information to the selection. * @param columns The columns that this input spans. */ +@Serializable abstract class Input( internal open val key: String? = null, internal open val required: Boolean = false, internal open val header: InputHeader? = null, internal open val columns: Int? = null, -) : Serializable { +) : JvmSerializable { internal var position: Int = 0 @@ -58,13 +59,6 @@ abstract class Input( */ internal open fun onResult(): Unit? = Unit - /** - * Save the input value into the bundle. - * Takes the index as an key, if there's no unique input key available. - * @param bundle The bundle where the input data is saved. - */ - internal open fun putValue(bundle: Bundle): Unit? = Unit - /** * Helper method that either uses the key or the index as String to assign key-value pairs * Returns the key that is used to store input data in the bundle. diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputCheckbox.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCheckbox.kt similarity index 94% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputCheckbox.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCheckbox.kt index 64e78220..5c00c6b8 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputCheckbox.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCheckbox.kt @@ -17,8 +17,6 @@ package com.maxkeppeler.sheets.input.models -import android.os.Bundle - /** * Represents a checkbox. * @param text The text to the checkbox. @@ -30,7 +28,7 @@ import android.os.Bundle * @param header The additional [InputHeader] to add more context information to the selection. * @param columns The columns that this input spans. */ -class InputCheckbox( +data class InputCheckbox( internal val text: String, private val enabled: Boolean = false, private val changeListener: ((Boolean) -> Unit)? = null, @@ -56,6 +54,4 @@ class InputCheckbox( override fun isValid(): Boolean = (required && value) || !required - override fun putValue(bundle: Bundle) = bundle.putBoolean(getBundleKey(), value) - } \ No newline at end of file diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputCheckboxGroup.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCheckboxGroup.kt similarity index 93% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputCheckboxGroup.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCheckboxGroup.kt index 7e7b9334..bfd5d0cb 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputCheckboxGroup.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCheckboxGroup.kt @@ -17,8 +17,6 @@ package com.maxkeppeler.sheets.input.models -import android.os.Bundle - /** * Represents a group of checkboxes. * @param items A list of Strings representing the individual checkbox text. @@ -30,7 +28,7 @@ import android.os.Bundle * @param header The additional [InputHeader] to add more context information to the selection. * @param columns The columns that this input spans. */ -class InputCheckboxGroup( +data class InputCheckboxGroup( internal val items: List, private val enabledIndices: List = listOf(), private val changeListener: ((List) -> Unit)? = null, @@ -55,6 +53,4 @@ class InputCheckboxGroup( override fun onResult() = resultListener?.invoke(value) override fun isValid(): Boolean = required && value.isNotEmpty() || !required - - override fun putValue(bundle: Bundle) = bundle.putIntArray(getBundleKey(), value.toIntArray()) } \ No newline at end of file diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputConfig.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputConfig.kt similarity index 96% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputConfig.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputConfig.kt index 29d2854d..1f85a203 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputConfig.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputConfig.kt @@ -15,6 +15,7 @@ */ package com.maxkeppeler.sheets.input.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.icons.LibIcons import com.maxkeppeker.sheets.core.models.base.BaseConfigs import com.maxkeppeker.sheets.core.utils.BaseConstants.DEFAULT_ICON_STYLE diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputCustomView.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCustomView.kt similarity index 94% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputCustomView.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCustomView.kt index 31c86c96..464b5f19 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputCustomView.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputCustomView.kt @@ -18,6 +18,7 @@ package com.maxkeppeler.sheets.input.models import androidx.compose.runtime.Composable +import androidx.compose.runtime.Stable /** * Represents a custom view. @@ -25,7 +26,7 @@ import androidx.compose.runtime.Composable * @param header The additional [InputHeader] to add more context information to the selection. * @param columns The columns that this input spans. */ -class InputCustomView( +data class InputCustomView( internal val view: @Composable () -> Unit, override val header: InputHeader? = null, override val columns: Int? = null, diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputDivider.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputDivider.kt similarity index 95% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputDivider.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputDivider.kt index f121f366..71f4407d 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputDivider.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputDivider.kt @@ -17,6 +17,8 @@ package com.maxkeppeler.sheets.input.models +import androidx.compose.runtime.Stable + /** * Represents a divider. * @param columns The columns that this input spans. diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputHeader.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputHeader.kt similarity index 78% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputHeader.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputHeader.kt index 93e21b17..15cb7fb4 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputHeader.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputHeader.kt @@ -17,8 +17,11 @@ package com.maxkeppeler.sheets.input.models +import androidx.compose.runtime.Stable import com.maxkeppeker.sheets.core.models.base.IconSource -import java.io.Serializable +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable +import kotlinx.serialization.Transient /** * Represents a header that can be added to invidual input types. @@ -26,8 +29,9 @@ import java.io.Serializable * @param body The text that is used for the body. * @param icon The icon that is displayed on the left side of the title. */ -class InputHeader( +@Serializable +data class InputHeader( val title: String? = null, val body: String? = null, - val icon: IconSource? = null, -) : Serializable + @Transient @kotlin.jvm.Transient val icon: IconSource? = null, +) : JvmSerializable diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputRadioButtonGroup.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputRadioButtonGroup.kt similarity index 94% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputRadioButtonGroup.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputRadioButtonGroup.kt index 5a21326d..296b6c6b 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputRadioButtonGroup.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputRadioButtonGroup.kt @@ -17,8 +17,6 @@ package com.maxkeppeler.sheets.input.models -import android.os.Bundle - /** * Represents a group of radio buttons. * @param items A list of Strings representing the individual radio button text. @@ -56,6 +54,4 @@ class InputRadioButtonGroup( override fun isValid(): Boolean = required && value != null || !required - override fun putValue(bundle: Bundle) = value?.let { bundle.putInt(getBundleKey(), it) } - } \ No newline at end of file diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputSelection.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputSelection.kt similarity index 96% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputSelection.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputSelection.kt index 4107a1e6..b1e40370 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputSelection.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputSelection.kt @@ -17,7 +17,6 @@ package com.maxkeppeler.sheets.input.models -import android.os.Bundle import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants @@ -41,5 +40,5 @@ class InputSelection( override val negativeButton: SelectionButton? = BaseConstants.DEFAULT_NEGATIVE_BUTTON, override val onNegativeClick: (() -> Unit)? = null, override val positiveButton: SelectionButton = BaseConstants.DEFAULT_POSITIVE_BUTTON, - val onPositiveClick: ((result: Bundle) -> Unit)? = null, + val onPositiveClick: (() -> Unit)? = null, ) : BaseSelection() \ No newline at end of file diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputText.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputText.kt similarity index 94% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputText.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputText.kt index 34b4852a..60f99d51 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputText.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputText.kt @@ -17,13 +17,15 @@ package com.maxkeppeler.sheets.input.models +import androidx.compose.runtime.Stable + /** * Represents a text body. * @param text The text of the body * @param header The additional [InputHeader] to add more context information to the selection. * @param columns The columns that this input spans. */ -class InputText( +data class InputText( internal val text: String, override val header: InputHeader? = null, override val columns: Int? = null, diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputTextField.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputTextField.kt similarity index 97% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputTextField.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputTextField.kt index a7391bca..ce35259b 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputTextField.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputTextField.kt @@ -18,7 +18,6 @@ package com.maxkeppeler.sheets.input.models -import android.os.Bundle import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material3.ExperimentalMaterial3Api @@ -89,8 +88,4 @@ data class InputTextField( val requiredValid = (required && value?.isNotEmpty() == true || !required) return customValidationOk && requiredValid } - - override fun putValue(bundle: Bundle) { - bundle.putString(getBundleKey(), value) - } } \ No newline at end of file diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/InputTextFieldType.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputTextFieldType.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/InputTextFieldType.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/InputTextFieldType.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/models/ValidationResult.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/ValidationResult.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/models/ValidationResult.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/models/ValidationResult.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxComponent.kt similarity index 87% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxComponent.kt index cad7d14e..4ef96479 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxComponent.kt @@ -24,12 +24,11 @@ import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.input.models.Input import com.maxkeppeler.sheets.input.models.InputCheckbox -import com.maxkeppeler.sheets.core.R as RC /** * Checkbox component. @@ -63,16 +62,16 @@ internal fun InputCheckboxComponent( Checkbox( modifier = Modifier .testTags(TestTags.INPUT_ITEM_CHECKBOX_CHECKBOX, index) - .padding(start = dimensionResource(RC.dimen.scd_small_50)) - .size(dimensionResource(RC.dimen.scd_normal_150)), + .padding(start = 4.dp) + .size(24.dp), checked = checked, onCheckedChange = { checked = it } ) Column( modifier = Modifier - .padding(vertical = dimensionResource(RC.dimen.scd_small_150)) - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) + .padding(vertical = 12.dp) + .padding(start = 16.dp) .fillMaxWidth() .wrapContentHeight(), ) { diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxGroupComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxGroupComponent.kt similarity index 93% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxGroupComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxGroupComponent.kt index 5f5b18b3..8e3ba9f5 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxGroupComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxGroupComponent.kt @@ -23,12 +23,11 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.mutableStateListOf import androidx.compose.runtime.remember import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.input.models.Input import com.maxkeppeler.sheets.input.models.InputCheckboxGroup -import com.maxkeppeler.sheets.core.R as RC /** * Checkbox-Group component. @@ -65,7 +64,7 @@ internal fun InputCheckboxGroupComponent( } ) if (index != input.items.lastIndex) { - Spacer(Modifier.height(dimensionResource(RC.dimen.scd_small_50))) + Spacer(Modifier.height(4.dp)) } } } diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxItemComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxItemComponent.kt similarity index 86% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxItemComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxItemComponent.kt index 60adff84..25688852 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputCheckboxItemComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputCheckboxItemComponent.kt @@ -24,10 +24,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** * The CheckBox item for the CheckBox-Group. @@ -55,16 +54,16 @@ internal fun InputCheckboxItemComponent( Checkbox( modifier = Modifier .testTags(TestTags.INPUT_ITEM_CHECKBOX_GROUP_ITEM_CHECKBOX, index) - .padding(start = dimensionResource(RC.dimen.scd_small_50)) - .size(dimensionResource(RC.dimen.scd_normal_150)), + .padding(start = 4.dp) + .size(24.dp), checked = selected, onCheckedChange = { onSelected() }, ) Column( modifier = Modifier - .padding(vertical = dimensionResource(RC.dimen.scd_small_100)) - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) + .padding(vertical = 8.dp) + .padding(start = 16.dp) .fillMaxWidth() .wrapContentHeight(), ) { diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputComponent.kt similarity index 88% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputComponent.kt index 6eb57d33..eee1c4b0 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputComponent.kt @@ -22,10 +22,9 @@ import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.itemsIndexed import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.input.models.Input import com.maxkeppeler.sheets.input.models.InputConfig -import com.maxkeppeler.sheets.core.R as RC /** * Input component that displays the setup inputs. @@ -45,8 +44,8 @@ internal fun InputComponent( LazyVerticalGrid( modifier = modifier, columns = GridCells.Fixed(config.columns), - horizontalArrangement = Arrangement.spacedBy(dimensionResource(RC.dimen.scd_small_100)), - verticalArrangement = Arrangement.spacedBy(dimensionResource(RC.dimen.scd_small_100)) + horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp) ) { itemsIndexed( items = input, diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputDividerComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputDividerComponent.kt similarity index 86% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputDividerComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputDividerComponent.kt index d1bd05cf..870578f3 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputDividerComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputDividerComponent.kt @@ -21,10 +21,9 @@ import androidx.compose.material3.Divider import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** * Divider component. @@ -39,8 +38,8 @@ internal fun InputDividerComponent( .testTags(TestTags.INPUT_ITEM_DIVIDER, index) .fillMaxWidth() .padding( - top = dimensionResource(RC.dimen.scd_small_100), - bottom = dimensionResource(RC.dimen.scd_small_50), + top = 8.dp, + bottom = 4.dp, ), color = MaterialTheme.colorScheme.outlineVariant ) diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemComponent.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemComponent.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemHeaderComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemHeaderComponent.kt similarity index 86% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemHeaderComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemHeaderComponent.kt index 1727bf78..162b12f7 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemHeaderComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemHeaderComponent.kt @@ -21,13 +21,11 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeker.sheets.core.views.IconComponent import com.maxkeppeler.sheets.input.models.InputHeader -import com.maxkeppeler.sheets.core.R as RC /** * The header for an input item type component. @@ -44,7 +42,7 @@ internal fun InputItemHeaderComponent( .testTags(TestTags.INPUT_ITEM_HEADER, index) .fillMaxWidth() .padding( - bottom = dimensionResource(RC.dimen.scd_small_100) + bottom = 8.dp ), verticalArrangement = Arrangement.Center ) { @@ -54,14 +52,14 @@ internal fun InputItemHeaderComponent( IconComponent( modifier = Modifier .testTags(TestTags.INPUT_ITEM_HEADER_ICON, index) - .size(dimensionResource(RC.dimen.scd_size_100)), + .size(16.dp), iconSource = it, ) } header.title?.let { title -> val startPadding = - if (header.icon != null) dimensionResource(RC.dimen.scd_small_100) else 0.dp + if (header.icon != null) 8.dp else 0.dp Text( modifier = Modifier .testTags(TestTags.INPUT_ITEM_HEADER_TITLE, index) @@ -76,7 +74,7 @@ internal fun InputItemHeaderComponent( Text( modifier = Modifier .testTags(TestTags.INPUT_ITEM_HEADER_BODY, index) - .padding(top = dimensionResource(RC.dimen.scd_small_50)), + .padding(top = 4.dp), text = text, style = MaterialTheme.typography.bodySmall ) diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemOverlayComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemOverlayComponent.kt similarity index 88% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemOverlayComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemOverlayComponent.kt index 7c5e0f90..d3123548 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemOverlayComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemOverlayComponent.kt @@ -23,11 +23,10 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.input.models.InputConfig -import com.maxkeppeler.sheets.core.R as RC /** * The overlay for an input item type component when the data is required. @@ -42,8 +41,8 @@ internal fun BoxScope.InputItemOverlayComponent( modifier = Modifier .align(Alignment.TopEnd) .testTags(TestTags.INPUT_ITEM_OVERLAY, index) - .padding(dimensionResource(RC.dimen.scd_small_100)) - .size(dimensionResource(RC.dimen.scd_size_50)), + .padding(8.dp) + .size(8.dp), imageVector = config.icons.Star, contentDescription = null, tint = MaterialTheme.colorScheme.error diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemTypeComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemTypeComponent.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputItemTypeComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputItemTypeComponent.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputRadioButtonGroupComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputRadioButtonGroupComponent.kt similarity index 92% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputRadioButtonGroupComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputRadioButtonGroupComponent.kt index 7e8c8935..ef555f68 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputRadioButtonGroupComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputRadioButtonGroupComponent.kt @@ -20,12 +20,11 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.runtime.* import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeler.sheets.input.models.Input import com.maxkeppeler.sheets.input.models.InputRadioButtonGroup -import com.maxkeppeler.sheets.core.R as RC /** * RadioButton-Group component. @@ -59,7 +58,7 @@ internal fun InputRadioButtonGroupComponent( onSelected = { selectedIndex = index } ) if (index != input.items.lastIndex) { - Spacer(Modifier.height(dimensionResource(RC.dimen.scd_small_50))) + Spacer(Modifier.height(4.dp)) } } } diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputRadioButtonItemComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputRadioButtonItemComponent.kt similarity index 86% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputRadioButtonItemComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputRadioButtonItemComponent.kt index b03b4353..7e4fd4b7 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputRadioButtonItemComponent.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputRadioButtonItemComponent.kt @@ -24,10 +24,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** * The RadioButton item for the RadioButton-Group. @@ -55,16 +54,16 @@ internal fun InputRadioButtonItemComponent( RadioButton( modifier = Modifier .testTags(TestTags.INPUT_ITEM_RADIOBUTTON_GROUP_ITEM_RADIOBUTTON, index) - .padding(start = dimensionResource(RC.dimen.scd_small_50)) - .size(dimensionResource(RC.dimen.scd_normal_150)), + .padding(start = 4.dp) + .size(24.dp), selected = selected, onClick = { onSelected() }, ) Column( modifier = Modifier - .padding(vertical = dimensionResource(RC.dimen.scd_small_100)) - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) + .padding(vertical = 8.dp) + .padding(start = 16.dp) .fillMaxWidth() .wrapContentHeight(), ) { diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputTextComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputTextComponent.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputTextComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputTextComponent.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputTextFieldComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputTextFieldComponent.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputTextFieldComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputTextFieldComponent.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/InputViewComponent.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputViewComponent.kt similarity index 100% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/InputViewComponent.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/InputViewComponent.kt diff --git a/input/src/main/java/com/maxkeppeler/sheets/input/views/TextFieldErrorContainer.kt b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/TextFieldErrorContainer.kt similarity index 92% rename from input/src/main/java/com/maxkeppeler/sheets/input/views/TextFieldErrorContainer.kt rename to input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/TextFieldErrorContainer.kt index ee97d638..4fc0a085 100644 --- a/input/src/main/java/com/maxkeppeler/sheets/input/views/TextFieldErrorContainer.kt +++ b/input/src/commonMain/kotlin/com/maxkeppeler/sheets/input/views/TextFieldErrorContainer.kt @@ -23,10 +23,9 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags -import com.maxkeppeler.sheets.core.R as RC /** * A container to apply an error message to the TextField if the data is invalid. @@ -53,7 +52,7 @@ internal fun TextFieldErrorContainer( modifier = Modifier .testTags(TestTags.INPUT_ITEM_TEXT_FIELD_ERROR_TEXT) .fillMaxWidth() - .padding(top = dimensionResource(RC.dimen.scd_small_100)) + .padding(top = 8.dp) ) } } diff --git a/input/src/main/AndroidManifest.xml b/input/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/input/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock new file mode 100644 index 00000000..70c81ae2 --- /dev/null +++ b/kotlin-js-store/yarn.lock @@ -0,0 +1,3051 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@js-joda/core@3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-3.2.0.tgz#3e61e21b7b2b8a6be746df1335cf91d70db2a273" + integrity sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg== + +"@jsonjoy.com/base64@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/base64/-/base64-1.1.1.tgz#a717fd8840f7bad49c7fe66cc65db8bcfc4c4dc5" + integrity sha512-LnFjVChaGY8cZVMwAIMjvA1XwQjZ/zIXHyh28IyJkyNkzof4Dkm1+KN9UIm3lHhREH4vs7XwZ0NpkZKnwOtEfg== + +"@jsonjoy.com/json-pack@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/json-pack/-/json-pack-1.0.2.tgz#d7c8c284db828b29eebb9082134251a8216ec5cc" + integrity sha512-4KMApTgb1Hvjz9Ue7unziJ1xNy3k6d2erp0hz1iXryXsf6LEM3KwN6YrfbqT0vqkUO8Tu+CSnvMia9cWX6YGVw== + dependencies: + "@jsonjoy.com/base64" "^1.1.1" + "@jsonjoy.com/util" "^1.0.0" + hyperdyperid "^1.2.0" + thingies "^1.20.0" + +"@jsonjoy.com/util@^1.0.0", "@jsonjoy.com/util@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@jsonjoy.com/util/-/util-1.1.0.tgz#9726365362ede17405d2b521b4c782582df7ed4f" + integrity sha512-Yz+xITJ3Y/w0DBISwPkBETP5/cITHXscjgQNZIkfrVz1V7/ahJY8vw+T+LZy/KtXgKuUWqu4GALAQ3bhGt9J8A== + dependencies: + hyperdyperid "^1.2.0" + +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz#4fc56c15c580b9adb7dc3c333a134e540b44bfb1" + integrity sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== + +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + +"@types/body-parser@*": + version "1.19.5" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.5.tgz#04ce9a3b677dc8bd681a17da1ab9835dc9d3ede4" + integrity sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/bonjour@^3.5.13": + version "3.5.13" + resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.13.tgz#adf90ce1a105e81dd1f9c61fdc5afda1bfb92956" + integrity sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ== + dependencies: + "@types/node" "*" + +"@types/connect-history-api-fallback@^1.5.4": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz#7de71645a103056b48ac3ce07b3520b819c1d5b3" + integrity sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw== + dependencies: + "@types/express-serve-static-core" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.17" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.17.tgz#5d718a5e494a8166f569d986794e49c48b216b2b" + integrity sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.56.6" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.6.tgz#d5dc16cac025d313ee101108ba5714ea10eb3ed0" + integrity sha512-ymwc+qb1XkjT/gfoQwxIeHZ6ixH23A+tCT2ADSA/DPVKzAjwYkTXBMCQ/f6fe4wEa85Lhp26VPeUxI7wMhAi7A== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": + version "4.17.43" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz#10d8444be560cb789c4735aea5eac6e5af45df54" + integrity sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@*", "@types/express@^4.17.21": + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/http-errors@*": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.4.tgz#7eb47726c391b7345a6ec35ad7f4de469cf5ba4f" + integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== + +"@types/http-proxy@^1.17.8": + version "1.17.14" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.14.tgz#57f8ccaa1c1c3780644f8a94f9c6b5000b5e2eec" + integrity sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w== + dependencies: + "@types/node" "*" + +"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/mime@*": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.4.tgz#2198ac274de6017b44d941e00261d5bc6a0e0a45" + integrity sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw== + +"@types/mime@^1": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== + +"@types/node-forge@^1.3.0": + version "1.3.11" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== + dependencies: + "@types/node" "*" + +"@types/node@*", "@types/node@>=10.0.0": + version "20.12.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.2.tgz#9facdd11102f38b21b4ebedd9d7999663343d72e" + integrity sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ== + dependencies: + undici-types "~5.26.4" + +"@types/qs@*": + version "6.9.14" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.14.tgz#169e142bfe493895287bee382af6039795e9b75b" + integrity sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA== + +"@types/range-parser@*": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== + +"@types/retry@0.12.2": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" + integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== + +"@types/send@*": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" + integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-index@^1.9.4": + version "1.9.4" + resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.4.tgz#e6ae13d5053cb06ed36392110b4f9a49ac4ec898" + integrity sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug== + dependencies: + "@types/express" "*" + +"@types/serve-static@*": + version "1.15.5" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.5.tgz#15e67500ec40789a1e8c9defc2d32a896f05b033" + integrity sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ== + dependencies: + "@types/http-errors" "*" + "@types/mime" "*" + "@types/node" "*" + +"@types/serve-static@^1.15.5": + version "1.15.7" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.7.tgz#22174bbd74fb97fe303109738e9b5c2f3064f714" + integrity sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + +"@types/sockjs@^0.3.36": + version "0.3.36" + resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.36.tgz#ce322cf07bcc119d4cbf7f88954f3a3bd0f67535" + integrity sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q== + dependencies: + "@types/node" "*" + +"@types/ws@^8.5.10": + version "8.5.10" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" + integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== + dependencies: + "@types/node" "*" + +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + +acorn@^8.7.1, acorn@^8.8.2: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.0, ajv@^8.9.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-html-community@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" + integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +body-parser@1.20.2, body-parser@^1.19.0: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +bonjour-service@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.2.1.tgz#eb41b3085183df3321da1264719fbada12478d02" + integrity sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw== + dependencies: + fast-deep-equal "^3.1.3" + multicast-dns "^7.2.5" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserslist@^4.21.10: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +bundle-name@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-4.1.0.tgz#f3b96b34160d6431a19d7688135af7cfb8797889" + integrity sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q== + dependencies: + run-applescript "^7.0.0" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001587: + version "1.0.30001600" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz#93a3ee17a35aa6a9f0c6ef1b2ab49507d1ab9079" + integrity sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chokidar@^3.5.1, chokidar@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.10, colorette@^2.0.14: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== + +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" + integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== + +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cross-spawn@^7.0.0, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== + +date-format@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" + integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4.3.4, debug@^4.1.0, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +default-browser-id@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-5.0.0.tgz#a1d98bf960c15082d8a3fa69e83150ccccc3af26" + integrity sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA== + +default-browser@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-5.2.1.tgz#7b7ba61204ff3e425b556869ae6d3e9d9f1712cf" + integrity sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg== + dependencies: + bundle-name "^4.1.0" + default-browser-id "^5.0.0" + +default-gateway@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== + dependencies: + execa "^5.0.0" + +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-node@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" + integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +dns-packet@^5.2.2: + version "5.6.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f" + integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== + dependencies: + "@leichtgewicht/ip-codec" "^2.0.1" + +dom-serialize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.668: + version "1.4.722" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.722.tgz#99ae3484c5fc0f387d39ad98d77e1f259b9f4074" + integrity sha512-5nLE0TWFFpZ80Crhtp4pIp8LXCztjYX41yUcV6b+bKR2PqzjskTMOOlBi1VjBHlvHwS+4gar7kNKOrsbsewEZQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +engine.io-parser@~5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" + integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== + +engine.io@~6.5.2: + version "6.5.4" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.4.tgz#6822debf324e781add2254e912f8568508850cdc" + integrity sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.11.0" + +enhanced-resolve@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" + integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +envinfo@^7.7.3: + version "7.11.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.1.tgz#2ffef77591057081b0129a8fd8cf6118da1b94e1" + integrity sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg== + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-module-lexer@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.0.tgz#4878fee3789ad99e065f975fdd3c645529ff0236" + integrity sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw== + +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +express@^4.17.3: + version "4.19.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" + integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.2" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.6.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +faye-websocket@^0.11.3: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== + dependencies: + websocket-driver ">=0.5.1" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + +follow-redirects@^1.0.0: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + +format-util@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" + integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +glob@^10.3.7: + version "10.3.12" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" + integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.6" + minimatch "^9.0.1" + minipass "^7.0.4" + path-scurry "^1.10.2" + +glob@^7.1.3, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ== + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^2.4.0: + version "2.5.2" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" + integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-parser-js@>=0.5.1: + version "0.5.8" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" + integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== + +http-proxy-middleware@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" + integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== + dependencies: + "@types/http-proxy" "^1.17.8" + http-proxy "^1.18.1" + is-glob "^4.0.1" + is-plain-obj "^3.0.0" + micromatch "^4.0.2" + +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +hyperdyperid@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hyperdyperid/-/hyperdyperid-1.2.0.tgz#59668d323ada92228d2a869d3e474d5a33b69e6b" + integrity sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A== + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +ipaddr.js@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.2.0.tgz#d33fa7bac284f4de7af949638c9d68157c6b92e8" + integrity sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + +is-network-error@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-network-error/-/is-network-error-1.1.0.tgz#d26a760e3770226d11c169052f266a4803d9c997" + integrity sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-obj@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" + integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-wsl@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-3.1.0.tgz#e1c657e39c10090afcbedec61720f6b924c3cbd2" + integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw== + dependencies: + is-inside-container "^1.0.0" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isbinaryfile@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jackspeak@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" + integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +karma-chrome-launcher@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" + integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== + dependencies: + which "^1.2.1" + +karma-mocha@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" + integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== + dependencies: + minimist "^1.2.3" + +karma-sourcemap-loader@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" + integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== + dependencies: + graceful-fs "^4.2.10" + +karma-webpack@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.1.tgz#4eafd31bbe684a747a6e8f3e4ad373e53979ced4" + integrity sha512-oo38O+P3W2mSPCSUrQdySSPv1LvPpXP+f+bBimNomS5sW+1V4SuhCuW8TfJzV+rDv921w2fDSDw0xJbPe6U+kQ== + dependencies: + glob "^7.1.3" + minimatch "^9.0.3" + webpack-merge "^4.1.5" + +karma@6.4.3: + version "6.4.3" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" + integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== + dependencies: + "@colors/colors" "1.5.0" + body-parser "^1.19.0" + braces "^3.0.2" + chokidar "^3.5.1" + connect "^3.7.0" + di "^0.0.1" + dom-serialize "^2.2.1" + glob "^7.1.7" + graceful-fs "^4.2.6" + http-proxy "^1.18.1" + isbinaryfile "^4.0.8" + lodash "^4.17.21" + log4js "^6.4.1" + mime "^2.5.2" + minimatch "^3.0.4" + mkdirp "^0.5.5" + qjobs "^1.2.0" + range-parser "^1.2.1" + rimraf "^3.0.2" + socket.io "^4.7.2" + source-map "^0.6.1" + tmp "^0.2.1" + ua-parser-js "^0.7.30" + yargs "^16.1.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +launch-editor@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.6.1.tgz#f259c9ef95cbc9425620bbbd14b468fcdb4ffe3c" + integrity sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.8.1" + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log4js@^6.4.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" + integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + flatted "^3.2.7" + rfdc "^1.3.0" + streamroller "^3.1.5" + +lru-cache@^10.2.0: + version "10.2.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" + integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +memfs@^4.6.0: + version "4.9.1" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-4.9.1.tgz#cd0b94987c365298a6e57b4beb98c658008d7ff1" + integrity sha512-36cVYFMaa9HNEYyvkyKCwker8DBmOdjWLrfekE/cHEKJ806fCfKNVhOJNvoyV/CrGSZDtfQPbhn0Zid0gbH0Hw== + dependencies: + "@jsonjoy.com/json-pack" "^1.0.2" + "@jsonjoy.com/util" "^1.1.0" + sonic-forest "^1.0.0" + tslib "^2.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.2: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mime@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^9.0.1, minimatch@^9.0.3: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.3, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" + integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.3.0.tgz#0e185c49e6dccf582035c05fa91084a4ff6e3fe9" + integrity sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "8.1.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multicast-dns@^7.2.5: + version "7.2.5" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" + integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== + dependencies: + dns-packet "^5.2.2" + thunky "^1.0.2" + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + +on-finished@2.4.1, on-finished@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^10.0.3: + version "10.1.0" + resolved "https://registry.yarnpkg.com/open/-/open-10.1.0.tgz#a7795e6e5d519abe4286d9937bb24b51122598e1" + integrity sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw== + dependencies: + default-browser "^5.2.1" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^3.1.0" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-retry@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-6.2.0.tgz#8d6df01af298750009691ce2f9b3ad2d5968f3bd" + integrity sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA== + dependencies: + "@types/retry" "0.12.2" + is-network-error "^1.0.0" + retry "^0.13.1" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-scurry@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" + integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qjobs@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readable-stream@^2.0.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.20.0: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + +rfdc@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rimraf@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.5.tgz#9be65d2d6e683447d2e9013da2bf451139a61ccf" + integrity sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A== + dependencies: + glob "^10.3.7" + +run-applescript@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-7.0.0.tgz#e5a553c2bffd620e169d276c1cd8f1b64778fbeb" + integrity sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A== + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^4.0.0, schema-utils@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" + integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== + +selfsigned@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.4.1.tgz#560d90565442a3ed35b674034cec4e95dceb4ae0" + integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== + dependencies: + "@types/node-forge" "^1.3.0" + node-forge "^1" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serialize-javascript@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shell-quote@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + +side-channel@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +socket.io-adapter@~2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz#4fdb1358667f6d68f25343353bd99bd11ee41006" + integrity sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg== + dependencies: + debug "~4.3.4" + ws "~8.11.0" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@^4.7.2: + version "4.7.5" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.5.tgz#56eb2d976aef9d1445f373a62d781a41c7add8f8" + integrity sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + cors "~2.8.5" + debug "~4.3.2" + engine.io "~6.5.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" + +sockjs@^0.3.24: + version "0.3.24" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" + integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== + dependencies: + faye-websocket "^0.11.3" + uuid "^8.3.2" + websocket-driver "^0.7.4" + +sonic-forest@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sonic-forest/-/sonic-forest-1.0.0.tgz#b0b77d9bca76434f4ef87b61042d041da63f3be5" + integrity sha512-yFO2N4uTUFtgKLw03WWFpN1iEwZySweMsa18XN3Kt0yYrlmVHunC2ZgM+437zDoKISAJHcH3Cg18U7d6tuSgSQ== + +source-map-js@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + +source-map-loader@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-5.0.0.tgz#f593a916e1cc54471cfc8851b905c8a845fc7e38" + integrity sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA== + dependencies: + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +"statuses@>= 1.4.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + +streamroller@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + fs-extra "^8.1.0" + +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@8.1.1, supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + +terser@^5.26.0: + version "5.30.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.30.0.tgz#64cb2af71e16ea3d32153f84d990f9be0cdc22bf" + integrity sha512-Y/SblUl5kEyEFzhMAQdsxVHh+utAxd4IuRNJzKywY/4uzSogh3G219jqbDDxYu4MXO9CzY3tSEqmZvW6AoEDJw== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +thingies@^1.20.0: + version "1.21.0" + resolved "https://registry.yarnpkg.com/thingies/-/thingies-1.21.0.tgz#e80fbe58fd6fdaaab8fad9b67bd0a5c943c445c1" + integrity sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g== + +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + +tmp@^0.2.1: + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tslib@^2.0.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typescript@5.4.3: + version "5.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" + integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== + +ua-parser-js@^0.7.30: + version "0.7.37" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.37.tgz#e464e66dac2d33a7a1251d7d7a99d6157ec27832" + integrity sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== + +watchpack@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" + integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== + dependencies: + minimalistic-assert "^1.0.0" + +webpack-cli@5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-dev-middleware@^7.1.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-7.2.1.tgz#2af00538b6e4eda05f5afdd5d711dbebc05958f7" + integrity sha512-hRLz+jPQXo999Nx9fXVdKlg/aehsw1ajA9skAneGmT03xwmyuhvF93p6HUKKbWhXdcERtGTzUCtIQr+2IQegrA== + dependencies: + colorette "^2.0.10" + memfs "^4.6.0" + mime-types "^2.1.31" + on-finished "^2.4.1" + range-parser "^1.2.1" + schema-utils "^4.0.0" + +webpack-dev-server@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-5.0.4.tgz#cb6ea47ff796b9251ec49a94f24a425e12e3c9b8" + integrity sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA== + dependencies: + "@types/bonjour" "^3.5.13" + "@types/connect-history-api-fallback" "^1.5.4" + "@types/express" "^4.17.21" + "@types/serve-index" "^1.9.4" + "@types/serve-static" "^1.15.5" + "@types/sockjs" "^0.3.36" + "@types/ws" "^8.5.10" + ansi-html-community "^0.0.8" + bonjour-service "^1.2.1" + chokidar "^3.6.0" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.4.0" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.1.0" + launch-editor "^2.6.1" + open "^10.0.3" + p-retry "^6.2.0" + rimraf "^5.0.5" + schema-utils "^4.2.0" + selfsigned "^2.4.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^7.1.0" + ws "^8.16.0" + +webpack-merge@^4.1.5: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== + dependencies: + lodash "^4.17.15" + +webpack-merge@^5.7.3: + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@5.91.0: + version "5.91.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" + integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.16.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + +websocket-driver@>=0.5.1, websocket-driver@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + +which@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@^8.16.0: + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0, yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/list/build.gradle.kts b/list/build.gradle.kts index a665a04e..55f1681f 100644 --- a/list/build.gradle.kts +++ b/list/build.gradle.kts @@ -1,27 +1,68 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.LIST.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.LIST.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/list/src/commonMain/composeResources/values-bg/strings.xml b/list/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..0630a4ec --- /dev/null +++ b/list/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,6 @@ + + + Изберете поне %1$d опции. + Изберете най-много %1$d опции + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-cs/strings.xml b/list/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..93f29e29 --- /dev/null +++ b/list/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,6 @@ + + + Vyberte alespoň %1$d možnosti. + Vyberte nejvýše %1$d možnosti + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-da/strings.xml b/list/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..6b41e51b --- /dev/null +++ b/list/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,6 @@ + + + Vælg mindst %1$d muligheder. + Vælg højst %1$d muligheder. + + \ No newline at end of file diff --git a/list/src/main/res/values-de-rDE/strings.xml b/list/src/commonMain/composeResources/values-de-rDE/strings.xml similarity index 84% rename from list/src/main/res/values-de-rDE/strings.xml rename to list/src/commonMain/composeResources/values-de-rDE/strings.xml index a7461260..00f2f6d7 100644 --- a/list/src/main/res/values-de-rDE/strings.xml +++ b/list/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -1,4 +1,4 @@ - + Wähle mindestens %1$d Optionen aus diff --git a/list/src/commonMain/composeResources/values-de/strings.xml b/list/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..2e90344a --- /dev/null +++ b/list/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,6 @@ + + + Wählen Sie mindestens %1$d Optionen aus. + Wählen Sie höchstens %1$d Optionen aus. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-el/strings.xml b/list/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..273d489a --- /dev/null +++ b/list/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,6 @@ + + + Επιλέξτε τουλάχιστον %1$d επιλογές + Επιλέξτε το πολύ %1$d επιλογές. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-eo/strings.xml b/list/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..a108ffe0 --- /dev/null +++ b/list/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,6 @@ + + + Elektu almenaŭ %1$d opciojn. + Elektu maksimume %1$d opciojn + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-es/strings.xml b/list/src/commonMain/composeResources/values-es/strings.xml new file mode 100644 index 00000000..3da04a69 --- /dev/null +++ b/list/src/commonMain/composeResources/values-es/strings.xml @@ -0,0 +1,6 @@ + + + Selecciona al menos %1$d opciones + Seleccione como máximo %1$d opciones + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-et/strings.xml b/list/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..937fca1b --- /dev/null +++ b/list/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,6 @@ + + + Valige vähemalt %1$d valikut. + Valige maksimaalselt %1$d võimalust + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-fa/strings.xml b/list/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..28faba8b --- /dev/null +++ b/list/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,6 @@ + + + حداقل %1$d گزینه را انتخاب کنید + حداکثر %1$d گزینه را انتخاب کنید + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-fi/strings.xml b/list/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..89a8c9ff --- /dev/null +++ b/list/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,6 @@ + + + Valitse vähintään %1$d vaihtoehtoa + Valitse enintään %1$d vaihtoehtoa + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-fr/strings.xml b/list/src/commonMain/composeResources/values-fr/strings.xml new file mode 100644 index 00000000..977f52d1 --- /dev/null +++ b/list/src/commonMain/composeResources/values-fr/strings.xml @@ -0,0 +1,6 @@ + + + Sélectionnez au moins %1$d options. + Sélectionnez au maximum %1$d options + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ga/strings.xml b/list/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..2e389e71 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,6 @@ + + + Roghnaigh ar a laghad %1$d rogha + Roghnaigh ar a máthair %1$d rogha agus gan níos mó. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-gd/strings.xml b/list/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..ea5552d5 --- /dev/null +++ b/list/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,6 @@ + + + Tagh air a bheil %1$d roghainnean aig a mhìnmeanadh + Tagh air feadh gun tèid barrachd na %1$d roghainn a thaghadh + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-hi/strings.xml b/list/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..615bf754 --- /dev/null +++ b/list/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,6 @@ + + + कम से कम %1$d विकल्प चुनें + अधिकतम %1$d विकल्पों में से चयन करें + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-hr/strings.xml b/list/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..a7be7241 --- /dev/null +++ b/list/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,6 @@ + + + Odaberite barem %1$d opcija + Odaberite najviše %1$d opcija + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-hu/strings.xml b/list/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..ab4916c6 --- /dev/null +++ b/list/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,6 @@ + + + Válaszd ki legalább %1$d lehetőséget + Válasszon legfeljebb %1$d lehetőséget + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-in-rID/strings.xml b/list/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..fd1473d2 --- /dev/null +++ b/list/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,6 @@ + + + Pilih setidaknya %1$d opsi. + Pilih maksimal %1$d pilihan + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-is/strings.xml b/list/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..92ac49c8 --- /dev/null +++ b/list/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,6 @@ + + + Velja þarf að minnsta kosti %1$d möguleika. + Veldu allra mest $1$d möguleika + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-it/strings.xml b/list/src/commonMain/composeResources/values-it/strings.xml new file mode 100644 index 00000000..e5b8cd50 --- /dev/null +++ b/list/src/commonMain/composeResources/values-it/strings.xml @@ -0,0 +1,6 @@ + + + Seleziona almeno %1$d opzioni + Seleziona al massimo %1$d opzioni + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-iw/strings.xml b/list/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..61522e1c --- /dev/null +++ b/list/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,6 @@ + + + בחר לפחות %1$d אפשרויות + בחר לכל היותר %1$d אפשרויות + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ja/strings.xml b/list/src/commonMain/composeResources/values-ja/strings.xml new file mode 100644 index 00000000..d193c671 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ja/strings.xml @@ -0,0 +1,6 @@ + + + 少なくとも%1$d個のオプションを選択してください。 + 最大%1$d個のオプションを選択してください。 + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-jv/strings.xml b/list/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..9c2614cb --- /dev/null +++ b/list/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,6 @@ + + + Pilih setidaknya %1$d opsi. + Pilih paling sejene %1$d pilihan + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-kk/strings.xml b/list/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..de1d6190 --- /dev/null +++ b/list/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,6 @@ + + + %1$d опцияларды таңдау. + %1$d ондағы опцияларды таңдау + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ko/strings.xml b/list/src/commonMain/composeResources/values-ko/strings.xml new file mode 100644 index 00000000..0ec93be3 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ko/strings.xml @@ -0,0 +1,6 @@ + + + 적어도 %1$d개의 옵션을 선택하세요. + 최대 %1$d 개의 옵션을 선택하세요. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ku/strings.xml b/list/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..a07e3bb7 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,6 @@ + + + تکایە کمێک لە %1$d هەڵبژێرە + هەڵبژاردنی %1$d هەڵبژارد بۆ دیاربکاتەوە + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-lb/strings.xml b/list/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..581776ea --- /dev/null +++ b/list/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,6 @@ + + + Wielt mindestens %1$d Optiounen aus. + Wielt maximal %1$d Optiounen aus + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-lo/strings.xml b/list/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..556e6dbe --- /dev/null +++ b/list/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,6 @@ + + + ເລືອກຢ່າງໜຶ່ງສູງສຸດຫຼາຍເກີນຫນ້າ %1$d ທາງເພື່ອແລະປ່ຽນສາມາດໂຕະມັນໄດ້ໄດ້ເອງ + ເລືອກໄວ້ແລ້ວທີ່ສາມາດເລືອກໄດ້ນີ້ບໍ່ໜ້ອຍ %1$d ຕົວເລືອດ + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-lt/strings.xml b/list/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..fb5fa22d --- /dev/null +++ b/list/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,6 @@ + + + Pasirinkite bent jau %1$d parinktis + Pasirinkite daugiausiai %1$d parinktis + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-lv/strings.xml b/list/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..c6f825d4 --- /dev/null +++ b/list/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,6 @@ + + + Izvēlieties vismaz %1$d opcijas + Izvēlieties ne vairāk kā %1$d opcijas. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ms/strings.xml b/list/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..1fb2e4e5 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,6 @@ + + + Pilih sekurang-kurangnya %1$d pilihan + Pilih paling banyak %1$d pilihan + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ne/strings.xml b/list/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..d4c8dff7 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,6 @@ + + + कमैले कमै %1$d पर्याप्त विकल्पहरू छान्नुहोस्। + कम्तिमा %1$d विकल्पहरू छनिनेछन्। + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-nl/strings.xml b/list/src/commonMain/composeResources/values-nl/strings.xml new file mode 100644 index 00000000..660d6223 --- /dev/null +++ b/list/src/commonMain/composeResources/values-nl/strings.xml @@ -0,0 +1,6 @@ + + + Selecteer ten minste %1$d opties. + Selecteer maximaal %1$d opties + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-no/strings.xml b/list/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..efcbe505 --- /dev/null +++ b/list/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,6 @@ + + + Velg minst %1$d alternativer + Velg maksimalt %1$d alternativer + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-pl/strings.xml b/list/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..50199ef3 --- /dev/null +++ b/list/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,6 @@ + + + Wybierz co najmniej %1$d opcje + Wybierz maksymalnie %1$d opcje. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-pt/strings.xml b/list/src/commonMain/composeResources/values-pt/strings.xml new file mode 100644 index 00000000..6140b896 --- /dev/null +++ b/list/src/commonMain/composeResources/values-pt/strings.xml @@ -0,0 +1,6 @@ + + + Selecione pelo menos %1$d opções. + Selecione no máximo %1$d opções + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-ru/strings.xml b/list/src/commonMain/composeResources/values-ru/strings.xml new file mode 100644 index 00000000..ccce1511 --- /dev/null +++ b/list/src/commonMain/composeResources/values-ru/strings.xml @@ -0,0 +1,6 @@ + + + Выберите как минимум %1$d вариант(а) + Выберите не более %1$d опций + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-sk/strings.xml b/list/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..e7044bcd --- /dev/null +++ b/list/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,6 @@ + + + Vyberte aspoň %1$d možnosti. + Vyberte maximálne %1$d možnosti. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-sl/strings.xml b/list/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..7527e280 --- /dev/null +++ b/list/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,6 @@ + + + Izberi vsaj %1$d možnosti. + Izberite največ %1$d možnosti. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-sr/strings.xml b/list/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..4967f620 --- /dev/null +++ b/list/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,6 @@ + + + Izaberite najmanje %1$d opciju + Odaberite najviše %1$d opcija + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-sv/strings.xml b/list/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..88e32c1a --- /dev/null +++ b/list/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,6 @@ + + + Välj åtminstone %1$d alternativ + Välj högst %1$d alternativ. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-th/strings.xml b/list/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..373db4bc --- /dev/null +++ b/list/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,6 @@ + + + เลือกอย่างน้อย %1$d ตัวเลือก + เลือกได้มากที่สุด %1$d ตัวเลือก + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-tr/strings.xml b/list/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..42c2eb8b --- /dev/null +++ b/list/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,6 @@ + + + En azından %1$d seçenek seçin. + En fazla %1$d seçeneği seçin. + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-uk/strings.xml b/list/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..672b0097 --- /dev/null +++ b/list/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,6 @@ + + + Виберіть принаймні %1$d опцій + Оберіть не більше %1$d варіантів + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-vi/strings.xml b/list/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..1f869808 --- /dev/null +++ b/list/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,6 @@ + + + Hãy chọn ít nhất %1$d lựa chọn + Chọn tối đa %1$d tùy chọn + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-zh-rCN/strings.xml b/list/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..34f5353b --- /dev/null +++ b/list/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,6 @@ + + + 至少选择%1$d个选项 + 最多选择 %1$d 个选项 + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values-zh-rTW/strings.xml b/list/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..570383f5 --- /dev/null +++ b/list/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,6 @@ + + + 至少選擇 %1$d 選項 + 選擇最多 %1$d 選項 + + \ No newline at end of file diff --git a/list/src/commonMain/composeResources/values/strings.xml b/list/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..3311b005 --- /dev/null +++ b/list/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,6 @@ + + + Select at least %1$d options + Select at most %1$d options + + diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/ListDialog.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListDialog.kt similarity index 100% rename from list/src/main/java/com/maxkeppeler/sheets/list/ListDialog.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListDialog.kt diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/ListPopup.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListPopup.kt similarity index 100% rename from list/src/main/java/com/maxkeppeler/sheets/list/ListPopup.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListPopup.kt diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/ListState.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListState.kt similarity index 97% rename from list/src/main/java/com/maxkeppeler/sheets/list/ListState.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListState.kt index 512b5f16..4946070f 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/ListState.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListState.kt @@ -21,11 +21,12 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import com.maxkeppeker.sheets.core.utils.JvmSerializable import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.list.models.ListConfig import com.maxkeppeler.sheets.list.models.ListOption import com.maxkeppeler.sheets.list.models.ListSelection -import java.io.Serializable +import kotlinx.serialization.Serializable /** * Handles the list state. @@ -134,9 +135,10 @@ internal class ListState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class ListStateData( val options: List - ) : Serializable + ) : JvmSerializable } diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/ListView.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListView.kt similarity index 99% rename from list/src/main/java/com/maxkeppeler/sheets/list/ListView.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListView.kt index 83e8c6dc..6b4c0eda 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/ListView.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/ListView.kt @@ -83,7 +83,7 @@ fun ListView( ) }, buttonsVisible = selection.withButtonView - ) {orientation -> + ) { orientation -> ButtonsComponent( orientation = orientation, onPositiveValid = listState.valid, diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/models/ListConfig.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListConfig.kt similarity index 100% rename from list/src/main/java/com/maxkeppeler/sheets/list/models/ListConfig.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListConfig.kt diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/models/ListOption.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListOption.kt similarity index 83% rename from list/src/main/java/com/maxkeppeler/sheets/list/models/ListOption.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListOption.kt index be267371..a18fc16d 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/models/ListOption.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListOption.kt @@ -18,8 +18,9 @@ package com.maxkeppeler.sheets.list.models import com.maxkeppeker.sheets.core.models.base.IconSource -import java.io.Serializable -import java.util.* +import com.maxkeppeker.sheets.core.utils.JvmSerializable +import kotlinx.serialization.Serializable +import kotlinx.serialization.Transient /** * An option for the the list dialog. @@ -28,12 +29,13 @@ import java.util.* * @param subtitleText The subtitle displayed in the option. * @param selected The state if the option is selected by default. */ +@Serializable data class ListOption( - val icon: IconSource? = null, + @Transient @kotlin.jvm.Transient val icon: IconSource? = null, val titleText: String, val subtitleText: String? = null, val selected: Boolean = false, -) : Serializable { +) : JvmSerializable { internal var position: Int = 0 } diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/models/ListSelection.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListSelection.kt similarity index 96% rename from list/src/main/java/com/maxkeppeler/sheets/list/models/ListSelection.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListSelection.kt index 385e6ab2..b5466ee3 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/models/ListSelection.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/models/ListSelection.kt @@ -17,7 +17,6 @@ package com.maxkeppeler.sheets.list.models -import androidx.annotation.IntRange import com.maxkeppeker.sheets.core.models.base.BaseSelection import com.maxkeppeker.sheets.core.models.base.SelectionButton import com.maxkeppeker.sheets.core.utils.BaseConstants @@ -71,8 +70,8 @@ sealed class ListSelection( class Multiple( override val options: List, val showCheckBoxes: Boolean = false, - @IntRange(from = 1L, to = 90L) val minChoices: Int? = null, - @IntRange(from = 3L, to = 90L) val maxChoices: Int? = null, + val minChoices: Int? = null, + val maxChoices: Int? = null, override val withButtonView: Boolean = true, override val extraButton: SelectionButton? = null, override val onExtraButtonClick: (() -> Unit)? = null, diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionBoundsComponent.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionBoundsComponent.kt similarity index 83% rename from list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionBoundsComponent.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionBoundsComponent.kt index 70719f7f..68c4baaa 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionBoundsComponent.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionBoundsComponent.kt @@ -24,22 +24,25 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.dimensionResource -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.withStyle +import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import com.maxkeppeler.sheets.list.R import com.maxkeppeler.sheets.list.models.ListOption import com.maxkeppeler.sheets.list.models.ListSelection -import com.maxkeppeler.sheets.core.R as RC +import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.stringResource +import sheets_compose_dialogs.list.generated.resources.Res +import sheets_compose_dialogs.list.generated.resources.scd_list_dialog_max_choices +import sheets_compose_dialogs.list.generated.resources.scd_list_dialog_min_choices /** * A view that reflects the selection bounds of the list. * @param selection The selection configuration. * @param selectedOptions The list of options that are selected. */ +@OptIn(ExperimentalResourceApi::class) @Composable internal fun ListOptionBoundsComponent( selection: ListSelection, @@ -52,14 +55,14 @@ internal fun ListOptionBoundsComponent( || selection.maxChoices != null) -> { Row( modifier = Modifier - .padding(bottom = dimensionResource(id = RC.dimen.scd_normal_100)), + .padding(bottom = 16.dp), verticalAlignment = Alignment.CenterVertically ) { selection.minChoices?.let { minChoices -> if (selectedAmount < minChoices) { Text( - text = stringResource(id = R.string.scd_list_dialog_min_choices, minChoices), + text = stringResource(Res.string.scd_list_dialog_min_choices, minChoices), style = MaterialTheme.typography.labelLarge ) } @@ -67,7 +70,7 @@ internal fun ListOptionBoundsComponent( selection.maxChoices?.let { maxChoices -> if (selectedAmount > maxChoices) { Text( - text = stringResource(id = R.string.scd_list_dialog_max_choices, maxChoices), + text = stringResource(Res.string.scd_list_dialog_max_choices, maxChoices), style = MaterialTheme.typography.labelLarge ) } diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionComponent.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionComponent.kt similarity index 92% rename from list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionComponent.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionComponent.kt index c203e354..f0224844 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionComponent.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionComponent.kt @@ -25,10 +25,9 @@ import androidx.compose.foundation.lazy.items import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeler.sheets.list.models.ListOption import com.maxkeppeler.sheets.list.models.ListSelection -import com.maxkeppeler.sheets.core.R as RC /** * The view for the selection of the options. @@ -56,7 +55,7 @@ fun ListOptionComponent( LazyColumn( modifier = modifier, - verticalArrangement = Arrangement.spacedBy(dimensionResource(RC.dimen.scd_small_100)) + verticalArrangement = Arrangement.spacedBy(8.dp) ) { items(options) { option -> ListOptionItemComponent( diff --git a/list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionItemComponent.kt b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionItemComponent.kt similarity index 91% rename from list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionItemComponent.kt rename to list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionItemComponent.kt index f5a918f4..943f3fa0 100644 --- a/list/src/main/java/com/maxkeppeler/sheets/list/views/ListOptionItemComponent.kt +++ b/list/src/commonMain/kotlin/com/maxkeppeler/sheets/list/views/ListOptionItemComponent.kt @@ -32,13 +32,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.dimensionResource +import androidx.compose.ui.unit.dp import com.maxkeppeker.sheets.core.utils.TestTags import com.maxkeppeker.sheets.core.utils.testTags import com.maxkeppeker.sheets.core.views.IconComponent import com.maxkeppeler.sheets.list.models.ListOption import com.maxkeppeler.sheets.list.models.ListSelection -import com.maxkeppeler.sheets.core.R as RC /** * The item component for an option. @@ -99,8 +98,8 @@ internal fun ListOptionItemComponent( option.icon?.let { IconComponent( modifier = Modifier - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) - .size(dimensionResource(RC.dimen.scd_size_150)), + .padding(start = 16.dp) + .size(48.dp), iconSource = it, tint = iconColor ) @@ -108,8 +107,8 @@ internal fun ListOptionItemComponent( Column( modifier = Modifier - .padding(vertical = dimensionResource(RC.dimen.scd_small_150)) - .padding(start = dimensionResource(RC.dimen.scd_normal_100)) + .padding(vertical = 12.dp) + .padding(start = 16.dp) .fillMaxWidth() .wrapContentHeight(), ) { diff --git a/list/src/main/AndroidManifest.xml b/list/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e5..00000000 --- a/list/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/list/src/main/res/values-bg/strings.xml b/list/src/main/res/values-bg/strings.xml deleted file mode 100644 index 01113497..00000000 --- a/list/src/main/res/values-bg/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Изберете поне %1$d опции. - Изберете най-много %1$d опции - - \ No newline at end of file diff --git a/list/src/main/res/values-cs/strings.xml b/list/src/main/res/values-cs/strings.xml deleted file mode 100644 index 49b81772..00000000 --- a/list/src/main/res/values-cs/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Vyberte alespoň %1$d možnosti. - Vyberte nejvýše %1$d možnosti - - \ No newline at end of file diff --git a/list/src/main/res/values-da/strings.xml b/list/src/main/res/values-da/strings.xml deleted file mode 100644 index fcd6e34c..00000000 --- a/list/src/main/res/values-da/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Vælg mindst %1$d muligheder. - Vælg højst %1$d muligheder. - - \ No newline at end of file diff --git a/list/src/main/res/values-de/strings.xml b/list/src/main/res/values-de/strings.xml deleted file mode 100644 index 36ec7079..00000000 --- a/list/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Wählen Sie mindestens %1$d Optionen aus. - Wählen Sie höchstens %1$d Optionen aus. - - \ No newline at end of file diff --git a/list/src/main/res/values-el/strings.xml b/list/src/main/res/values-el/strings.xml deleted file mode 100644 index d3123196..00000000 --- a/list/src/main/res/values-el/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Επιλέξτε τουλάχιστον %1$d επιλογές - Επιλέξτε το πολύ %1$d επιλογές. - - \ No newline at end of file diff --git a/list/src/main/res/values-eo/strings.xml b/list/src/main/res/values-eo/strings.xml deleted file mode 100644 index 0b509058..00000000 --- a/list/src/main/res/values-eo/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Elektu almenaŭ %1$d opciojn. - Elektu maksimume %1$d opciojn - - \ No newline at end of file diff --git a/list/src/main/res/values-es/strings.xml b/list/src/main/res/values-es/strings.xml deleted file mode 100644 index 705f7e69..00000000 --- a/list/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Selecciona al menos %1$d opciones - Seleccione como máximo %1$d opciones - - \ No newline at end of file diff --git a/list/src/main/res/values-et/strings.xml b/list/src/main/res/values-et/strings.xml deleted file mode 100644 index bb93b574..00000000 --- a/list/src/main/res/values-et/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Valige vähemalt %1$d valikut. - Valige maksimaalselt %1$d võimalust - - \ No newline at end of file diff --git a/list/src/main/res/values-fa/strings.xml b/list/src/main/res/values-fa/strings.xml deleted file mode 100644 index afb27e5e..00000000 --- a/list/src/main/res/values-fa/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - حداقل %1$d گزینه را انتخاب کنید - حداکثر %1$d گزینه را انتخاب کنید - - \ No newline at end of file diff --git a/list/src/main/res/values-fi/strings.xml b/list/src/main/res/values-fi/strings.xml deleted file mode 100644 index bf4a5867..00000000 --- a/list/src/main/res/values-fi/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Valitse vähintään %1$d vaihtoehtoa - Valitse enintään %1$d vaihtoehtoa - - \ No newline at end of file diff --git a/list/src/main/res/values-fr/strings.xml b/list/src/main/res/values-fr/strings.xml deleted file mode 100644 index d118617a..00000000 --- a/list/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Sélectionnez au moins %1$d options. - Sélectionnez au maximum %1$d options - - \ No newline at end of file diff --git a/list/src/main/res/values-ga/strings.xml b/list/src/main/res/values-ga/strings.xml deleted file mode 100644 index ca5b3675..00000000 --- a/list/src/main/res/values-ga/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Roghnaigh ar a laghad %1$d rogha - Roghnaigh ar a máthair %1$d rogha agus gan níos mó. - - \ No newline at end of file diff --git a/list/src/main/res/values-gd/strings.xml b/list/src/main/res/values-gd/strings.xml deleted file mode 100644 index 2df8d19b..00000000 --- a/list/src/main/res/values-gd/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Tagh air a bheil %1$d roghainnean aig a mhìnmeanadh - Tagh air feadh gun tèid barrachd na %1$d roghainn a thaghadh - - \ No newline at end of file diff --git a/list/src/main/res/values-hi/strings.xml b/list/src/main/res/values-hi/strings.xml deleted file mode 100644 index ca9cc49b..00000000 --- a/list/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - कम से कम %1$d विकल्प चुनें - अधिकतम %1$d विकल्पों में से चयन करें - - \ No newline at end of file diff --git a/list/src/main/res/values-hr/strings.xml b/list/src/main/res/values-hr/strings.xml deleted file mode 100644 index d918b2c4..00000000 --- a/list/src/main/res/values-hr/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Odaberite barem %1$d opcija - Odaberite najviše %1$d opcija - - \ No newline at end of file diff --git a/list/src/main/res/values-hu/strings.xml b/list/src/main/res/values-hu/strings.xml deleted file mode 100644 index 8dec9db3..00000000 --- a/list/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Válaszd ki legalább %1$d lehetőséget - Válasszon legfeljebb %1$d lehetőséget - - \ No newline at end of file diff --git a/list/src/main/res/values-in-rID/strings.xml b/list/src/main/res/values-in-rID/strings.xml deleted file mode 100644 index 298f8384..00000000 --- a/list/src/main/res/values-in-rID/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Pilih setidaknya %1$d opsi. - Pilih maksimal %1$d pilihan - - \ No newline at end of file diff --git a/list/src/main/res/values-is/strings.xml b/list/src/main/res/values-is/strings.xml deleted file mode 100644 index c2bd7284..00000000 --- a/list/src/main/res/values-is/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Velja þarf að minnsta kosti %1$d möguleika. - Veldu allra mest $1$d möguleika - - \ No newline at end of file diff --git a/list/src/main/res/values-it/strings.xml b/list/src/main/res/values-it/strings.xml deleted file mode 100644 index 7f30426c..00000000 --- a/list/src/main/res/values-it/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Seleziona almeno %1$d opzioni - Seleziona al massimo %1$d opzioni - - \ No newline at end of file diff --git a/list/src/main/res/values-iw/strings.xml b/list/src/main/res/values-iw/strings.xml deleted file mode 100644 index 4ea87d56..00000000 --- a/list/src/main/res/values-iw/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - בחר לפחות %1$d אפשרויות - בחר לכל היותר %1$d אפשרויות - - \ No newline at end of file diff --git a/list/src/main/res/values-ja/strings.xml b/list/src/main/res/values-ja/strings.xml deleted file mode 100644 index 3a513038..00000000 --- a/list/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 少なくとも%1$d個のオプションを選択してください。 - 最大%1$d個のオプションを選択してください。 - - \ No newline at end of file diff --git a/list/src/main/res/values-jv/strings.xml b/list/src/main/res/values-jv/strings.xml deleted file mode 100644 index 3513490d..00000000 --- a/list/src/main/res/values-jv/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Pilih setidaknya %1$d opsi. - Pilih paling sejene %1$d pilihan - - \ No newline at end of file diff --git a/list/src/main/res/values-kk/strings.xml b/list/src/main/res/values-kk/strings.xml deleted file mode 100644 index 98cc2e94..00000000 --- a/list/src/main/res/values-kk/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - %1$d опцияларды таңдау. - %1$d ондағы опцияларды таңдау - - \ No newline at end of file diff --git a/list/src/main/res/values-ko/strings.xml b/list/src/main/res/values-ko/strings.xml deleted file mode 100644 index 2d804d10..00000000 --- a/list/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 적어도 %1$d개의 옵션을 선택하세요. - 최대 %1$d 개의 옵션을 선택하세요. - - \ No newline at end of file diff --git a/list/src/main/res/values-ku/strings.xml b/list/src/main/res/values-ku/strings.xml deleted file mode 100644 index 0a3f20b4..00000000 --- a/list/src/main/res/values-ku/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - تکایە کمێک لە %1$d هەڵبژێرە - هەڵبژاردنی %1$d هەڵبژارد بۆ دیاربکاتەوە - - \ No newline at end of file diff --git a/list/src/main/res/values-lb/strings.xml b/list/src/main/res/values-lb/strings.xml deleted file mode 100644 index b90a8c1d..00000000 --- a/list/src/main/res/values-lb/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Wielt mindestens %1$d Optiounen aus. - Wielt maximal %1$d Optiounen aus - - \ No newline at end of file diff --git a/list/src/main/res/values-lo/strings.xml b/list/src/main/res/values-lo/strings.xml deleted file mode 100644 index 158b1e29..00000000 --- a/list/src/main/res/values-lo/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - ເລືອກຢ່າງໜຶ່ງສູງສຸດຫຼາຍເກີນຫນ້າ %1$d ທາງເພື່ອແລະປ່ຽນສາມາດໂຕະມັນໄດ້ໄດ້ເອງ - ເລືອກໄວ້ແລ້ວທີ່ສາມາດເລືອກໄດ້ນີ້ບໍ່ໜ້ອຍ %1$d ຕົວເລືອດ - - \ No newline at end of file diff --git a/list/src/main/res/values-lt/strings.xml b/list/src/main/res/values-lt/strings.xml deleted file mode 100644 index a51654ff..00000000 --- a/list/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Pasirinkite bent jau %1$d parinktis - Pasirinkite daugiausiai %1$d parinktis - - \ No newline at end of file diff --git a/list/src/main/res/values-lv/strings.xml b/list/src/main/res/values-lv/strings.xml deleted file mode 100644 index ed406e0a..00000000 --- a/list/src/main/res/values-lv/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Izvēlieties vismaz %1$d opcijas - Izvēlieties ne vairāk kā %1$d opcijas. - - \ No newline at end of file diff --git a/list/src/main/res/values-ms/strings.xml b/list/src/main/res/values-ms/strings.xml deleted file mode 100644 index 04b0ef74..00000000 --- a/list/src/main/res/values-ms/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Pilih sekurang-kurangnya %1$d pilihan - Pilih paling banyak %1$d pilihan - - \ No newline at end of file diff --git a/list/src/main/res/values-ne/strings.xml b/list/src/main/res/values-ne/strings.xml deleted file mode 100644 index 8dacaafa..00000000 --- a/list/src/main/res/values-ne/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - कमैले कमै %1$d पर्याप्त विकल्पहरू छान्नुहोस्। - कम्तिमा %1$d विकल्पहरू छनिनेछन्। - - \ No newline at end of file diff --git a/list/src/main/res/values-nl/strings.xml b/list/src/main/res/values-nl/strings.xml deleted file mode 100644 index d4673661..00000000 --- a/list/src/main/res/values-nl/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Selecteer ten minste %1$d opties. - Selecteer maximaal %1$d opties - - \ No newline at end of file diff --git a/list/src/main/res/values-no/strings.xml b/list/src/main/res/values-no/strings.xml deleted file mode 100644 index d74ed818..00000000 --- a/list/src/main/res/values-no/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Velg minst %1$d alternativer - Velg maksimalt %1$d alternativer - - \ No newline at end of file diff --git a/list/src/main/res/values-pl/strings.xml b/list/src/main/res/values-pl/strings.xml deleted file mode 100644 index 85e054ed..00000000 --- a/list/src/main/res/values-pl/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Wybierz co najmniej %1$d opcje - Wybierz maksymalnie %1$d opcje. - - \ No newline at end of file diff --git a/list/src/main/res/values-pt/strings.xml b/list/src/main/res/values-pt/strings.xml deleted file mode 100644 index d6ce81c4..00000000 --- a/list/src/main/res/values-pt/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Selecione pelo menos %1$d opções. - Selecione no máximo %1$d opções - - \ No newline at end of file diff --git a/list/src/main/res/values-ru/strings.xml b/list/src/main/res/values-ru/strings.xml deleted file mode 100644 index 573922b5..00000000 --- a/list/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Выберите как минимум %1$d вариант(а) - Выберите не более %1$d опций - - \ No newline at end of file diff --git a/list/src/main/res/values-sk/strings.xml b/list/src/main/res/values-sk/strings.xml deleted file mode 100644 index 85fd7d50..00000000 --- a/list/src/main/res/values-sk/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Vyberte aspoň %1$d možnosti. - Vyberte maximálne %1$d možnosti. - - \ No newline at end of file diff --git a/list/src/main/res/values-sl/strings.xml b/list/src/main/res/values-sl/strings.xml deleted file mode 100644 index c0dfd7b2..00000000 --- a/list/src/main/res/values-sl/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Izberi vsaj %1$d možnosti. - Izberite največ %1$d možnosti. - - \ No newline at end of file diff --git a/list/src/main/res/values-sr/strings.xml b/list/src/main/res/values-sr/strings.xml deleted file mode 100644 index b6195ab9..00000000 --- a/list/src/main/res/values-sr/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Izaberite najmanje %1$d opciju - Odaberite najviše %1$d opcija - - \ No newline at end of file diff --git a/list/src/main/res/values-sv/strings.xml b/list/src/main/res/values-sv/strings.xml deleted file mode 100644 index ec062b18..00000000 --- a/list/src/main/res/values-sv/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Välj åtminstone %1$d alternativ - Välj högst %1$d alternativ. - - \ No newline at end of file diff --git a/list/src/main/res/values-th/strings.xml b/list/src/main/res/values-th/strings.xml deleted file mode 100644 index d2e91442..00000000 --- a/list/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - เลือกอย่างน้อย %1$d ตัวเลือก - เลือกได้มากที่สุด %1$d ตัวเลือก - - \ No newline at end of file diff --git a/list/src/main/res/values-tr/strings.xml b/list/src/main/res/values-tr/strings.xml deleted file mode 100644 index 96d74ec9..00000000 --- a/list/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - En azından %1$d seçenek seçin. - En fazla %1$d seçeneği seçin. - - \ No newline at end of file diff --git a/list/src/main/res/values-uk/strings.xml b/list/src/main/res/values-uk/strings.xml deleted file mode 100644 index 9fc12a52..00000000 --- a/list/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Виберіть принаймні %1$d опцій - Оберіть не більше %1$d варіантів - - \ No newline at end of file diff --git a/list/src/main/res/values-vi/strings.xml b/list/src/main/res/values-vi/strings.xml deleted file mode 100644 index abc9a51f..00000000 --- a/list/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Hãy chọn ít nhất %1$d lựa chọn - Chọn tối đa %1$d tùy chọn - - \ No newline at end of file diff --git a/list/src/main/res/values-zh-rCN/strings.xml b/list/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index c7d465fc..00000000 --- a/list/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 至少选择%1$d个选项 - 最多选择 %1$d 个选项 - - \ No newline at end of file diff --git a/list/src/main/res/values-zh-rTW/strings.xml b/list/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index cf150745..00000000 --- a/list/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 至少選擇 %1$d 選項 - 選擇最多 %1$d 選項 - - \ No newline at end of file diff --git a/list/src/main/res/values/strings.xml b/list/src/main/res/values/strings.xml deleted file mode 100644 index 52afb9bd..00000000 --- a/list/src/main/res/values/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Select at least %1$d options - Select at most %1$d options - - diff --git a/option/build.gradle.kts b/option/build.gradle.kts index 704dc172..752160b2 100644 --- a/option/build.gradle.kts +++ b/option/build.gradle.kts @@ -1,27 +1,68 @@ -/* - * Copyright (C) 2022-2024. Maximilian Keppeler (https://www.maxkeppeler.com) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +import com.vanniktech.maven.publish.SonatypeHost + plugins { - id(Plugins.CUSTOM_LIBRARY_MODULE.id) + alias(libs.plugins.android.library) + alias(libs.plugins.compose) + alias(libs.plugins.compose.compiler) + alias(libs.plugins.multiplatform) + alias(libs.plugins.serialization) + alias(libs.plugins.publish) + `maven-publish` } android { namespace = Modules.OPTION.namespace + compileSdk = 34 + + defaultConfig { + minSdk = 21 + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + lint { + checkGeneratedSources = false + checkReleaseBuilds = false + abortOnError = false + } +} + +kotlin { + androidTarget { + publishAllLibraryVariants() + } + jvm() + + iosX64() + iosArm64() + iosSimulatorArm64() + + macosX64() + macosArm64() + + js(IR) { + moduleName = Modules.OPTION.moduleName + browser() + binaries.executable() + } + + applyDefaultHierarchyTemplate() + + sourceSets { + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.components.resources) + + implementation(libs.serialization) + + api(project(":core")) + } + } } mavenPublishing { - publishToMavenCentral() - signAllPublications() -} \ No newline at end of file + publishToMavenCentral(SonatypeHost.S01, automaticRelease = true) +} diff --git a/option/src/commonMain/composeResources/values-bg/strings.xml b/option/src/commonMain/composeResources/values-bg/strings.xml new file mode 100644 index 00000000..314968dd --- /dev/null +++ b/option/src/commonMain/composeResources/values-bg/strings.xml @@ -0,0 +1,6 @@ + + + Select at least %1$d options + Select at most %1$d options + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-cs/strings.xml b/option/src/commonMain/composeResources/values-cs/strings.xml new file mode 100644 index 00000000..4a8eb6c9 --- /dev/null +++ b/option/src/commonMain/composeResources/values-cs/strings.xml @@ -0,0 +1,6 @@ + + + Vyberte alespoň %1$d možnosti. + Vyberte nejvýše %1$d možnosti + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-da/strings.xml b/option/src/commonMain/composeResources/values-da/strings.xml new file mode 100644 index 00000000..44ab57be --- /dev/null +++ b/option/src/commonMain/composeResources/values-da/strings.xml @@ -0,0 +1,6 @@ + + + Vælg mindst %1$d muligheder. + Vælg højst %1$d muligheder. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-de-rDE/strings.xml b/option/src/commonMain/composeResources/values-de-rDE/strings.xml new file mode 100644 index 00000000..25fee209 --- /dev/null +++ b/option/src/commonMain/composeResources/values-de-rDE/strings.xml @@ -0,0 +1,7 @@ + + + + Wähle mindestens %1$d Optionen aus + Wähle maximal %1$d Optionen aus + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-de/strings.xml b/option/src/commonMain/composeResources/values-de/strings.xml new file mode 100644 index 00000000..27da61bc --- /dev/null +++ b/option/src/commonMain/composeResources/values-de/strings.xml @@ -0,0 +1,6 @@ + + + Wählen Sie mindestens %1$d Optionen aus. + Wählen Sie höchstens %1$d Optionen aus. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-el/strings.xml b/option/src/commonMain/composeResources/values-el/strings.xml new file mode 100644 index 00000000..5e47ff40 --- /dev/null +++ b/option/src/commonMain/composeResources/values-el/strings.xml @@ -0,0 +1,6 @@ + + + Επιλέξτε τουλάχιστον %1$d επιλογές + Επιλέξτε το πολύ %1$d επιλογές. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-eo/strings.xml b/option/src/commonMain/composeResources/values-eo/strings.xml new file mode 100644 index 00000000..3a330a4a --- /dev/null +++ b/option/src/commonMain/composeResources/values-eo/strings.xml @@ -0,0 +1,6 @@ + + + Elektu almenaŭ %1$d opciojn. + Elektu maksimume %1$d opciojn + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-es/strings.xml b/option/src/commonMain/composeResources/values-es/strings.xml new file mode 100644 index 00000000..856433f0 --- /dev/null +++ b/option/src/commonMain/composeResources/values-es/strings.xml @@ -0,0 +1,6 @@ + + + Selecciona al menos %1$d opciones + Seleccione como máximo %1$d opciones + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-et/strings.xml b/option/src/commonMain/composeResources/values-et/strings.xml new file mode 100644 index 00000000..9ebc2d81 --- /dev/null +++ b/option/src/commonMain/composeResources/values-et/strings.xml @@ -0,0 +1,6 @@ + + + Valige vähemalt %1$d valikut. + Valige maksimaalselt %1$d võimalust + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-fa/strings.xml b/option/src/commonMain/composeResources/values-fa/strings.xml new file mode 100644 index 00000000..b39c80d0 --- /dev/null +++ b/option/src/commonMain/composeResources/values-fa/strings.xml @@ -0,0 +1,6 @@ + + + حداقل %1$d گزینه را انتخاب کنید + حداکثر %1$d گزینه را انتخاب کنید + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-fi/strings.xml b/option/src/commonMain/composeResources/values-fi/strings.xml new file mode 100644 index 00000000..98683a96 --- /dev/null +++ b/option/src/commonMain/composeResources/values-fi/strings.xml @@ -0,0 +1,6 @@ + + + Valitse vähintään %1$d vaihtoehtoa + Valitse enintään %1$d vaihtoehtoa + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-fr/strings.xml b/option/src/commonMain/composeResources/values-fr/strings.xml new file mode 100644 index 00000000..ff7a40ae --- /dev/null +++ b/option/src/commonMain/composeResources/values-fr/strings.xml @@ -0,0 +1,6 @@ + + + Sélectionnez au moins %1$d options. + Sélectionnez au maximum %1$d options + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ga/strings.xml b/option/src/commonMain/composeResources/values-ga/strings.xml new file mode 100644 index 00000000..ab4087fc --- /dev/null +++ b/option/src/commonMain/composeResources/values-ga/strings.xml @@ -0,0 +1,6 @@ + + + Roghnaigh ar a laghad %1$d rogha + Roghnaigh ar a máthair %1$d rogha agus gan níos mó. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-gd/strings.xml b/option/src/commonMain/composeResources/values-gd/strings.xml new file mode 100644 index 00000000..4de10523 --- /dev/null +++ b/option/src/commonMain/composeResources/values-gd/strings.xml @@ -0,0 +1,6 @@ + + + Tagh air a bheil %1$d roghainnean aig a mhìnmeanadh + Tagh air feadh gun tèid barrachd na %1$d roghainn a thaghadh + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-hi/strings.xml b/option/src/commonMain/composeResources/values-hi/strings.xml new file mode 100644 index 00000000..6d368298 --- /dev/null +++ b/option/src/commonMain/composeResources/values-hi/strings.xml @@ -0,0 +1,6 @@ + + + कम से कम %1$d विकल्प चुनें + अधिकतम %1$d विकल्पों में से चयन करें + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-hr/strings.xml b/option/src/commonMain/composeResources/values-hr/strings.xml new file mode 100644 index 00000000..67d4af76 --- /dev/null +++ b/option/src/commonMain/composeResources/values-hr/strings.xml @@ -0,0 +1,6 @@ + + + Odaberite barem %1$d opcija + Odaberite najviše %1$d opcija + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-hu/strings.xml b/option/src/commonMain/composeResources/values-hu/strings.xml new file mode 100644 index 00000000..a566eff5 --- /dev/null +++ b/option/src/commonMain/composeResources/values-hu/strings.xml @@ -0,0 +1,6 @@ + + + Válaszd ki legalább %1$d lehetőséget + Válasszon legfeljebb %1$d lehetőséget + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-in-rID/strings.xml b/option/src/commonMain/composeResources/values-in-rID/strings.xml new file mode 100644 index 00000000..ba3c8c14 --- /dev/null +++ b/option/src/commonMain/composeResources/values-in-rID/strings.xml @@ -0,0 +1,6 @@ + + + Pilih setidaknya %1$d opsi. + Pilih maksimal %1$d pilihan + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-is/strings.xml b/option/src/commonMain/composeResources/values-is/strings.xml new file mode 100644 index 00000000..14e09e16 --- /dev/null +++ b/option/src/commonMain/composeResources/values-is/strings.xml @@ -0,0 +1,6 @@ + + + Velja þarf að minnsta kosti %1$d möguleika. + Veldu allra mest $1$d möguleika + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-it/strings.xml b/option/src/commonMain/composeResources/values-it/strings.xml new file mode 100644 index 00000000..9814f649 --- /dev/null +++ b/option/src/commonMain/composeResources/values-it/strings.xml @@ -0,0 +1,6 @@ + + + Seleziona almeno %1$d opzioni + Seleziona al massimo %1$d opzioni + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-iw/strings.xml b/option/src/commonMain/composeResources/values-iw/strings.xml new file mode 100644 index 00000000..45151876 --- /dev/null +++ b/option/src/commonMain/composeResources/values-iw/strings.xml @@ -0,0 +1,6 @@ + + + בחר לפחות %1$d אפשרויות + בחר לכל היותר %1$d אפשרויות + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ja/strings.xml b/option/src/commonMain/composeResources/values-ja/strings.xml new file mode 100644 index 00000000..c8275e85 --- /dev/null +++ b/option/src/commonMain/composeResources/values-ja/strings.xml @@ -0,0 +1,6 @@ + + + 少なくとも%1$d個のオプションを選択してください。 + 最大%1$d個のオプションを選択してください。 + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-jv/strings.xml b/option/src/commonMain/composeResources/values-jv/strings.xml new file mode 100644 index 00000000..0f4878eb --- /dev/null +++ b/option/src/commonMain/composeResources/values-jv/strings.xml @@ -0,0 +1,6 @@ + + + Pilih setidaknya %1$d opsi. + Pilih paling sejene %1$d pilihan + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-kk/strings.xml b/option/src/commonMain/composeResources/values-kk/strings.xml new file mode 100644 index 00000000..a0ba1718 --- /dev/null +++ b/option/src/commonMain/composeResources/values-kk/strings.xml @@ -0,0 +1,6 @@ + + + %1$d опцияларды таңдау. + %1$d ондағы опцияларды таңдау + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ko/strings.xml b/option/src/commonMain/composeResources/values-ko/strings.xml new file mode 100644 index 00000000..c31000b4 --- /dev/null +++ b/option/src/commonMain/composeResources/values-ko/strings.xml @@ -0,0 +1,6 @@ + + + 적어도 %1$d개의 옵션을 선택하세요. + 최대 %1$d 개의 옵션을 선택하세요. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ku/strings.xml b/option/src/commonMain/composeResources/values-ku/strings.xml new file mode 100644 index 00000000..9aa1aace --- /dev/null +++ b/option/src/commonMain/composeResources/values-ku/strings.xml @@ -0,0 +1,6 @@ + + + تکایە کمێک لە %1$d هەڵبژێرە + هەڵبژاردنی %1$d هەڵبژارد بۆ دیاربکاتەوە + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-lb/strings.xml b/option/src/commonMain/composeResources/values-lb/strings.xml new file mode 100644 index 00000000..e5a8b7a3 --- /dev/null +++ b/option/src/commonMain/composeResources/values-lb/strings.xml @@ -0,0 +1,6 @@ + + + Wielt mindestens %1$d Optiounen aus. + Wielt maximal %1$d Optiounen aus + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-lo/strings.xml b/option/src/commonMain/composeResources/values-lo/strings.xml new file mode 100644 index 00000000..fc25bd0c --- /dev/null +++ b/option/src/commonMain/composeResources/values-lo/strings.xml @@ -0,0 +1,6 @@ + + + ເລືອກຢ່າງໜຶ່ງສູງສຸດຫຼາຍເກີນຫນ້າ %1$d ທາງເພື່ອແລະປ່ຽນສາມາດໂຕະມັນໄດ້ໄດ້ເອງ + ເລືອກໄວ້ແລ້ວທີ່ສາມາດເລືອກໄດ້ນີ້ບໍ່ໜ້ອຍ %1$d ຕົວເລືອດ + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-lt/strings.xml b/option/src/commonMain/composeResources/values-lt/strings.xml new file mode 100644 index 00000000..8644de11 --- /dev/null +++ b/option/src/commonMain/composeResources/values-lt/strings.xml @@ -0,0 +1,6 @@ + + + Pasirinkite bent jau %1$d parinktis + Pasirinkite daugiausiai %1$d parinktis + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-lv/strings.xml b/option/src/commonMain/composeResources/values-lv/strings.xml new file mode 100644 index 00000000..fc051caa --- /dev/null +++ b/option/src/commonMain/composeResources/values-lv/strings.xml @@ -0,0 +1,6 @@ + + + Izvēlieties vismaz %1$d opcijas + Izvēlieties ne vairāk kā %1$d opcijas. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ms/strings.xml b/option/src/commonMain/composeResources/values-ms/strings.xml new file mode 100644 index 00000000..70264322 --- /dev/null +++ b/option/src/commonMain/composeResources/values-ms/strings.xml @@ -0,0 +1,6 @@ + + + Pilih sekurang-kurangnya %1$d pilihan + Pilih paling banyak %1$d pilihan + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ne/strings.xml b/option/src/commonMain/composeResources/values-ne/strings.xml new file mode 100644 index 00000000..fd58e722 --- /dev/null +++ b/option/src/commonMain/composeResources/values-ne/strings.xml @@ -0,0 +1,6 @@ + + + कमैले कमै %1$d पर्याप्त विकल्पहरू छान्नुहोस्। + कम्तिमा %1$d विकल्पहरू छनिनेछन्। + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-nl/strings.xml b/option/src/commonMain/composeResources/values-nl/strings.xml new file mode 100644 index 00000000..f5952cd0 --- /dev/null +++ b/option/src/commonMain/composeResources/values-nl/strings.xml @@ -0,0 +1,6 @@ + + + Selecteer ten minste %1$d opties. + Selecteer maximaal %1$d opties + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-no/strings.xml b/option/src/commonMain/composeResources/values-no/strings.xml new file mode 100644 index 00000000..99c7765a --- /dev/null +++ b/option/src/commonMain/composeResources/values-no/strings.xml @@ -0,0 +1,6 @@ + + + Velg minst %1$d alternativer + Velg maksimalt %1$d alternativer + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-pl/strings.xml b/option/src/commonMain/composeResources/values-pl/strings.xml new file mode 100644 index 00000000..0aec1b29 --- /dev/null +++ b/option/src/commonMain/composeResources/values-pl/strings.xml @@ -0,0 +1,6 @@ + + + Wybierz co najmniej %1$d opcje + Wybierz maksymalnie %1$d opcje. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-pt/strings.xml b/option/src/commonMain/composeResources/values-pt/strings.xml new file mode 100644 index 00000000..463cf567 --- /dev/null +++ b/option/src/commonMain/composeResources/values-pt/strings.xml @@ -0,0 +1,6 @@ + + + Selecione pelo menos %1$d opções. + Selecione no máximo %1$d opções + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-ru/strings.xml b/option/src/commonMain/composeResources/values-ru/strings.xml new file mode 100644 index 00000000..cbecf79a --- /dev/null +++ b/option/src/commonMain/composeResources/values-ru/strings.xml @@ -0,0 +1,6 @@ + + + Выберите как минимум %1$d вариант(а) + Выберите не более %1$d опций + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-sk/strings.xml b/option/src/commonMain/composeResources/values-sk/strings.xml new file mode 100644 index 00000000..5ff2043a --- /dev/null +++ b/option/src/commonMain/composeResources/values-sk/strings.xml @@ -0,0 +1,6 @@ + + + Vyberte aspoň %1$d možnosti. + Vyberte maximálne %1$d možnosti. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-sl/strings.xml b/option/src/commonMain/composeResources/values-sl/strings.xml new file mode 100644 index 00000000..c02b6446 --- /dev/null +++ b/option/src/commonMain/composeResources/values-sl/strings.xml @@ -0,0 +1,6 @@ + + + Izberi vsaj %1$d možnosti. + Izberite največ %1$d možnosti. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-sr/strings.xml b/option/src/commonMain/composeResources/values-sr/strings.xml new file mode 100644 index 00000000..a32f4d62 --- /dev/null +++ b/option/src/commonMain/composeResources/values-sr/strings.xml @@ -0,0 +1,6 @@ + + + Izaberite najmanje %1$d opciju + Odaberite najviše %1$d opcija + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-sv/strings.xml b/option/src/commonMain/composeResources/values-sv/strings.xml new file mode 100644 index 00000000..420fab4c --- /dev/null +++ b/option/src/commonMain/composeResources/values-sv/strings.xml @@ -0,0 +1,6 @@ + + + Välj åtminstone %1$d alternativ + Välj högst %1$d alternativ. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-th/strings.xml b/option/src/commonMain/composeResources/values-th/strings.xml new file mode 100644 index 00000000..486e1637 --- /dev/null +++ b/option/src/commonMain/composeResources/values-th/strings.xml @@ -0,0 +1,6 @@ + + + เลือกอย่างน้อย %1$d ตัวเลือก + เลือกได้มากที่สุด %1$d ตัวเลือก + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-tr/strings.xml b/option/src/commonMain/composeResources/values-tr/strings.xml new file mode 100644 index 00000000..d8cb4e69 --- /dev/null +++ b/option/src/commonMain/composeResources/values-tr/strings.xml @@ -0,0 +1,6 @@ + + + En azından %1$d seçenek seçin. + En fazla %1$d seçeneği seçin. + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-uk/strings.xml b/option/src/commonMain/composeResources/values-uk/strings.xml new file mode 100644 index 00000000..bf2b9095 --- /dev/null +++ b/option/src/commonMain/composeResources/values-uk/strings.xml @@ -0,0 +1,6 @@ + + + Виберіть принаймні %1$d опцій + Оберіть не більше %1$d варіантів + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-vi/strings.xml b/option/src/commonMain/composeResources/values-vi/strings.xml new file mode 100644 index 00000000..5e9092b8 --- /dev/null +++ b/option/src/commonMain/composeResources/values-vi/strings.xml @@ -0,0 +1,6 @@ + + + Hãy chọn ít nhất %1$d lựa chọn + Chọn tối đa %1$d tùy chọn + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-zh-rCN/strings.xml b/option/src/commonMain/composeResources/values-zh-rCN/strings.xml new file mode 100644 index 00000000..6702caee --- /dev/null +++ b/option/src/commonMain/composeResources/values-zh-rCN/strings.xml @@ -0,0 +1,6 @@ + + + 至少选择%1$d个选项 + 最多选择 %1$d 个选项 + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values-zh-rTW/strings.xml b/option/src/commonMain/composeResources/values-zh-rTW/strings.xml new file mode 100644 index 00000000..bd161f9e --- /dev/null +++ b/option/src/commonMain/composeResources/values-zh-rTW/strings.xml @@ -0,0 +1,6 @@ + + + 至少選擇 %1$d 選項 + 選擇最多 %1$d 選項 + + \ No newline at end of file diff --git a/option/src/commonMain/composeResources/values/strings.xml b/option/src/commonMain/composeResources/values/strings.xml new file mode 100644 index 00000000..1b89daf0 --- /dev/null +++ b/option/src/commonMain/composeResources/values/strings.xml @@ -0,0 +1,6 @@ + + + Select at least %1$d options + Select at most %1$d options + + diff --git a/option/src/main/java/com/maxkeppeler/sheets/option/OptionDialog.kt b/option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionDialog.kt similarity index 95% rename from option/src/main/java/com/maxkeppeler/sheets/option/OptionDialog.kt rename to option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionDialog.kt index 9edbfa16..d251f5a2 100644 --- a/option/src/main/java/com/maxkeppeler/sheets/option/OptionDialog.kt +++ b/option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionDialog.kt @@ -23,6 +23,7 @@ import androidx.compose.ui.window.DialogProperties import com.maxkeppeker.sheets.core.models.base.Header import com.maxkeppeker.sheets.core.models.base.UseCaseState import com.maxkeppeker.sheets.core.views.base.DialogBase +import com.maxkeppeler.sheets.option.models.OptionBody import com.maxkeppeler.sheets.option.models.OptionConfig import com.maxkeppeler.sheets.option.models.OptionSelection @@ -41,6 +42,7 @@ fun OptionDialog( selection: OptionSelection, config: OptionConfig = OptionConfig(), header: Header? = null, + body: OptionBody? = null, properties: DialogProperties = DialogProperties(), ) { @@ -53,6 +55,7 @@ fun OptionDialog( selection = selection, config = config, header = header, + body = body ) } } \ No newline at end of file diff --git a/option/src/main/java/com/maxkeppeler/sheets/option/OptionPopup.kt b/option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionPopup.kt similarity index 95% rename from option/src/main/java/com/maxkeppeler/sheets/option/OptionPopup.kt rename to option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionPopup.kt index bf4dcddf..4e52eac5 100644 --- a/option/src/main/java/com/maxkeppeler/sheets/option/OptionPopup.kt +++ b/option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionPopup.kt @@ -25,6 +25,7 @@ import androidx.compose.ui.window.PopupProperties import com.maxkeppeker.sheets.core.models.base.Header import com.maxkeppeker.sheets.core.models.base.UseCaseState import com.maxkeppeker.sheets.core.views.base.PopupBase +import com.maxkeppeler.sheets.option.models.OptionBody import com.maxkeppeler.sheets.option.models.OptionConfig import com.maxkeppeler.sheets.option.models.OptionSelection @@ -45,6 +46,7 @@ fun OptionPopup( selection: OptionSelection, config: OptionConfig = OptionConfig(), header: Header? = null, + body: OptionBody? = null, alignment: Alignment = Alignment.TopStart, offset: IntOffset = IntOffset(0, 0), properties: PopupProperties = PopupProperties(), @@ -61,6 +63,7 @@ fun OptionPopup( selection = selection, config = config, header = header, + body = body ) } } diff --git a/option/src/main/java/com/maxkeppeler/sheets/option/OptionState.kt b/option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionState.kt similarity index 97% rename from option/src/main/java/com/maxkeppeler/sheets/option/OptionState.kt rename to option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionState.kt index 71561e84..cfe16d27 100644 --- a/option/src/main/java/com/maxkeppeler/sheets/option/OptionState.kt +++ b/option/src/commonMain/kotlin/com/maxkeppeler/sheets/option/OptionState.kt @@ -21,11 +21,12 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.Saver import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import com.maxkeppeker.sheets.core.utils.JvmSerializable import com.maxkeppeker.sheets.core.views.BaseTypeState import com.maxkeppeler.sheets.option.models.Option import com.maxkeppeler.sheets.option.models.OptionConfig import com.maxkeppeler.sheets.option.models.OptionSelection -import java.io.Serializable +import kotlinx.serialization.Serializable /** * Handles the option state. @@ -132,9 +133,10 @@ internal class OptionState( * Data class that stores the important information of the current state * and can be used by the [Saver] to save and restore the state. */ + @Serializable data class OptionStateData( val options: List