Giter Club home page Giter Club logo

kotlin-js-wrappers's Introduction

This repository is no longer mantained


Kotlin

Introduction

This repository hosts a number of Kotlin JS wrappers for popular JavaScript libraries.

README Version
kotlin-antd v4.8.6-pre.16-kotlin-1.6.10 (Discontinued)
kotlin-moment v2.29.1-pre.15-kotlin-1.6.10 (Discontinued)
kotlin-react-intl Maven Central
kotlin-react-responsive Maven Central
kotlin-uikit Maven Central

Artifacts using Maven and Gradle are published to Maven Central.

All packages require JDK 8 to be installed.

Important: versions starting from the Kotlin v1.5.21 are being published with the new group ID io.sunland, since the repository has been transferred from samgarasx GitHub.

Also see official JetBrains Kotlin Wrappers, they are including more and more wrappers in their list.

kotlin-js-wrappers's People

Contributors

oxiadenine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kotlin-js-wrappers's Issues

Unresolved reference: antd

Hi. Please help me.
I am not a very experienced developer and I am trying to create a simple project to explore the possibilities of Kotlin multiplatform
When I try to use your framework, i get the following error:

> Task :client:compileKotlinJs FAILED
e: /home/user/freedom/chalenge/kotlin-full-stack-application-demo/client/src/main/kotlin/components/Vertical.kt: (3, 8): Unresolved reference: antd
e: /home/user/freedom/chalenge/kotlin-full-stack-application-demo/client/src/main/kotlin/components/Vertical.kt: (9, 26): Unresolved reference: MenuClickEventHandler
e: /home/user/freedom/chalenge/kotlin-full-stack-application-demo/client/src/main/kotlin/components/Vertical.kt: (9, 52): Cannot infer a type for this parameter. Please specify it explicitly.

FAILURE: Build failed with an exception.

I only copied your sample

import antd.menu.MenuClickEventHandler
import react.RBuilder
import styled.css
import styled.styledDiv


private val handleClick: MenuClickEventHandler = { info ->
    console.log("click ", info)
}

fun RBuilder.vertical() {
    styledDiv {
        css { +MenuStyles.vertical }
    }
}

my build.gradle.kts for js code in multyplatform project:

plugins {
    kotlin("js")
}

val kotlinxHtmlVersion = "0.7.2"
val kotlinxSerializationVersion = "1.0.0-RC"
val kotlinxCoroutinesVersion = "1.3.9" 
val kotlinWrappersSuffix = "pre.148-kotlin-1.4.30"

kotlin {
    js {
        useCommonJs()
        browser {
        }
        binaries.executable()
    }
}

dependencies {
    implementation("org.jetbrains.kotlin:kotlin-stdlib-js")

    implementation("org.jetbrains.kotlinx:kotlinx-serialization-core-js:$kotlinxSerializationVersion")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$kotlinxCoroutinesVersion")

    implementation(project(":shared"))

    implementation(npm("core-js", "2.6.5"))
    implementation(npm("svg-inline-loader", "0.8.0"))
    implementation("org.jetbrains.kotlinx:kotlinx-html:$kotlinxHtmlVersion")
    implementation("org.jetbrains:kotlin-react:17.0.1-$kotlinWrappersSuffix")
    implementation(npm("react", "17.0.1"))
    implementation(npm("react-dom", "17.0.1"))
    implementation(npm("react-is", "17.0.1"))
    implementation("org.jetbrains:kotlin-react-dom:17.0.1-$kotlinWrappersSuffix")
    implementation("org.jetbrains:kotlin-styled:5.2.1-$kotlinWrappersSuffix")
    implementation("org.jetbrains:kotlin-extensions:1.0.1-$kotlinWrappersSuffix")
    implementation("org.jetbrains:kotlin-css:1.0.0-$kotlinWrappersSuffix")
    implementation(npm("styled-components", "4.3.2"))
    implementation("org.jetbrains:kotlin-react-router-dom:5.2.0-pre.148-kotlin-1.4.30")
    implementation("com.github.samgarasx:kotlin-antd:4.8.6-pre.5-kotlin-1.4.30")
    implementation(npm("antd", "4.8.6"))
}

tasks.named("run") {
    dependsOn(":server:prepareDevServer")
}

I would be very grateful if you take the time to help me connect your project.

could not find module antd/lib/mention

When I try to use this framework, i get the following error:

Module not found: Error: Can't resolve 'antd/lib/mention' in 'C:\Projects\repoui\build\js\packages_imported\kotlin-js-wrappers-kotlin-antd\3.20.3-pre.2-kotlin-1.3.61'

As far as I could gather it's because the (old) 2.x Metion Component was replaced by the 4.x MentionS Component.
But when i downgrade my antd, I get other module not founds like Typography which was introduced in 4.x.
Can you help me resolve this?

Edit: I installed antd 3.20.3 and it worked.

bump antd version

hey thanks for writing this wrapper its been incredibly useful. do you have any plans to bump the version? antd is currently in beta for v5 IIRC and this is pinned to 3.20.x.

Mention component is obsolete in current Antd version

The wrapper still references the Mention component, which is not in the current Antd version anymore.

ERROR in ./kotlin-dce/kotlin-js-wrappers-kotlin-antd.js
  Module not found: Error: Can't resolve 'antd/lib/mention'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.