diff --git a/front/common/build.gradle b/front/common/build.gradle deleted file mode 100644 index ff8e10ce615..00000000000 --- a/front/common/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id "org.jetbrains.kotlin.multiplatform" -} - -apply from: "$mppJsProjectPresetPath" - -kotlin { - sourceSets { - commonMain { - dependencies { - api internalProject("micro_utils.common") - } - } - } -} diff --git a/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewAdapter.kt b/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewAdapter.kt deleted file mode 100644 index c739befcd81..00000000000 --- a/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewAdapter.kt +++ /dev/null @@ -1,38 +0,0 @@ -package dev.inmo.micro_utils.front.recycler_view - -import dev.inmo.micro_utils.common.isOnScreen -import kotlinx.browser.document -import org.w3c.dom.HTMLDivElement - -abstract class RecyclerViewAdapter( - protected val data: List, - protected val drawer: RecyclerViewDrawer, - private val visibleOutsideOfViewportElements: Int = 1 -) { - val element: HTMLDivElement = document.createElement("div") as HTMLDivElement - protected val itemsToElements = mutableMapOf() - - abstract fun createViewFactory(element: T): RecyclerViewElement - - fun updateVisibleElements() { - var firstVisibleElementIndex = -1 - var lastVisibleElementIndex = -1 - - for ((i, item) in data.withIndex()) { - itemsToElements[item] ?.let { - firstVisibleElementIndex = when { - firstVisibleElementIndex == -1 -> i - it.element.isOnScreen -> minOf(firstVisibleElementIndex, i) - else -> firstVisibleElementIndex - } - lastVisibleElementIndex = when { - lastVisibleElementIndex == -1 -> i - it.element.isOnScreen -> maxOf(lastVisibleElementIndex, i) - else -> lastVisibleElementIndex - } - } - } - - - } -} diff --git a/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewDrawer.kt b/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewDrawer.kt deleted file mode 100644 index cd49756833a..00000000000 --- a/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewDrawer.kt +++ /dev/null @@ -1,8 +0,0 @@ -package dev.inmo.micro_utils.front.recycler_view - -import org.w3c.dom.HTMLElement - -interface RecyclerViewDrawer { - fun drawBefore(what: HTMLElement, before: HTMLElement) - fun drawAfter(what: HTMLElement, after: HTMLElement) -} diff --git a/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewElement.kt b/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewElement.kt deleted file mode 100644 index 2e88db5ff87..00000000000 --- a/front/common/src/jsMain/kotlin/dev/inmo/micro_utils/front/recycler_view/RecyclerViewElement.kt +++ /dev/null @@ -1,9 +0,0 @@ -package dev.inmo.micro_utils.front.recycler_view - -import org.w3c.dom.HTMLElement - -interface RecyclerViewElement { - val element: HTMLElement - suspend fun onOutsideOfViewport() - suspend fun onInsideOfViewport() -} diff --git a/mppJsProject b/mppJsProject deleted file mode 100644 index 30529169b5d..00000000000 --- a/mppJsProject +++ /dev/null @@ -1,30 +0,0 @@ -project.version = "$version" -project.group = "$group" - -apply from: "$publishGradlePath" - -kotlin { - js (BOTH) { - browser() - } - - sourceSets { - commonMain { - dependencies { - implementation kotlin('stdlib') - } - } - commonTest { - dependencies { - implementation kotlin('test-common') - implementation kotlin('test-annotations-common') - } - } - jsTest { - dependencies { - implementation kotlin('test-js') - implementation kotlin('test-junit') - } - } - } -}