Lars Erik Rojeras
09/01/2021, 8:44 AMsetOf(TableType.BORDERED, TableType.SMALL, TableType.STRIPED, TableType.HOVER)
But it is rendered as a plain table without borders, stripes etc.
When I use Intellij to check the documentation of BORDERED I see:
io.kvision.table.TableType
enum entry BORDERED
Enum constant ordinal: 1
Gradle: io.kvision:kvision-bootstrap:5.1.0
If I check to the table definition i Showcase/BasicTab (which renders correctly) it says:
io.kvision.table.TableType
enum entry BORDERED
Enum constant ordinal: 1
Gradle: io.kvision:kvision-bootstrap:klib:5.1.0
I seem to be missing a klib. How can I fix this?UNuX
09/02/2021, 1:28 PMval tabulatorRowIndex = ((event.detail as io.kvision.tabulator.js.Tabulator.RowComponent).getIndex() as Int) - 1
But on the third its failing on cast exceptionUNuX
09/02/2021, 2:34 PMSerializer for class 'null' is not found.
rocketraman
09/14/2021, 1:23 PMTomas Kormanak
09/15/2021, 3:23 PMdata class Comment(val title: String val note: String, author_id: Int)
And I the form contains only title and note, when I call form,getData()
I get an error saying author_id
is required.ashmelev
09/16/2021, 9:07 PM/api/v1/image/upload
. The server-side is reacting correctly and the file is uploading properly and the server returns a Flux<String> with success/fail messages. The problem is that I cannot sort out how to capture that response stream and navigate the UI to a page where I can display results. Rather, the browser navigates to /api/v1/image/upload
and displays the results as text there. If I then hit the "Back button" in the browser I am back to normal Frontend code. In the JQuery docs there should be a success
handler that would catch the servers response data, but I have been unable to sort out where to hook into that in KVision. I'm putting sa sample of my "upload" Frontend code into the thread.UNuX
09/22/2021, 5:43 AMUNuX
09/22/2021, 10:55 AMRobert Jaros
09/25/2021, 11:22 AMIvan Pavlov
09/28/2021, 9:07 PMbind
function, probably I just don't understand how should I work with it. Details in threadIvan Pavlov
09/29/2021, 4:18 PMProps
interface as var emptySymbol: dynamic
. It should accept react element, but I have no idea how can I do it. I tried few things without success, details in threadrocketraman
10/07/2021, 6:15 PMaddressbook-fullstack-ktor
example and getting this error on `frontendRun`:
> [webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
[webpack-cli] TypeError: options.forEach is not a function
at WebpackCLI.makeCommand (/home/raman/source_ext/kvision-examples/addressbook-fullstack-ktor/build/js/node_modules/webpack-cli/lib/webpack-cli.js:173:21)
at ServeCommand.apply (/home/raman/source_ext/kvision-examples/addressbook-fullstack-ktor/build/js/node_modules/@webpack-cli/serve/lib/index.js:41:19)
at loadCommandByName (/home/raman/source_ext/kvision-examples/addressbook-fullstack-ktor/build/js/node_modules/webpack-cli/lib/webpack-cli.js:907:35)
at async Command.<anonymous> (/home/raman/source_ext/kvision-examples/addressbook-fullstack-ktor/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1462:17)
at async Promise.all (index 0)
at async WebpackCLI.run (/home/raman/source_ext/kvision-examples/addressbook-fullstack-ktor/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1500:9)
at async runCLI (/home/raman/source_ext/kvision-examples/addressbook-fullstack-ktor/build/js/node_modules/webpack-cli/lib/bootstrap.js:11:9)
Tomas Kormanak
10/19/2021, 9:54 AMWidget.dispose()
is called?Hywel Bennett
10/28/2021, 7:18 PMimplementation("io.kvision:kvision:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-css:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-spinner:$kvisionVersion")
implementation("io.kvision:kvision-react:$kvisionVersion")
implementation("io.kvision:kvision-spinner:$kvisionVersion")
implementation("io.kvision:kvision-redux:$kvisionVersion")
but IntelliJ is failing to find io.kvision.form.spinner.Spinnerpaoloconte
11/02/2021, 2:12 PMval counter = ObservableValue(0)
simplePanel().bind(counter) { count ->
span("Counter is $count")
}
When the value of counter changes, the span element gets removed from the dom and a new one is created.
Using snabbdom directly, instead, when the state changes, it traverses the existing dom and make changes to itIvan Pavlov
11/03/2021, 11:22 AMval scope = kvscope.unsafeCast<CoroutineScope>()
Ivan Pavlov
11/03/2021, 2:23 PMMarius Kotsbak
11/08/2021, 8:51 AMJörg Rade
11/11/2021, 11:20 AMJörg Rade
11/11/2021, 2:01 PMMikaël
11/14/2021, 3:59 PM./gradlew frontendRun
to see my changes.
Perhaps I missed some part of the documentation.Lars Erik Rojeras
11/26/2021, 9:47 AM[webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
[webpack-cli] TypeError: options.forEach is not a function
at WebpackCLI.makeCommand (/home/leo/tmp/dev/tkview/build/js/node_modules/webpack-cli/lib/webpack-cli.js:173:21)
at ServeCommand.apply (/home/leo/tmp/dev/tkview/build/js/node_modules/@webpack-cli/serve/lib/index.js:41:19)
at loadCommandByName (/home/leo/tmp/dev/tkview/build/js/node_modules/webpack-cli/lib/webpack-cli.js:907:35)
at async Command.<anonymous> (/home/leo/tmp/dev/tkview/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1462:17)
at async Promise.all (index 0)
at async WebpackCLI.run (/home/leo/tmp/dev/tkview/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1500:9)
at async runCLI (/home/leo/tmp/dev/tkview/build/js/node_modules/webpack-cli/lib/bootstrap.js:11:9)
Any ideas whats wrong?Mikaël
11/28/2021, 3:54 PMashmelev
11/29/2021, 7:37 PMTomas Kormanak
12/09/2021, 8:38 AMJörg Rade
12/09/2021, 11:25 AMdropDown(tr("Dropdown with custom list"), icon = "far fa-image", style = ButtonStyle.WARNING) {
minWidth = 250.px
image(require("img/cat.jpg")) { height = 170.px; margin = 10.px; title = "Cat" }
separator()
image(require("img/dog.jpg")) { height = 170.px; margin = 10.px; title = "Dog" }
}
suggests I can have either a FontAwesome icon plus text or an image.
What I want is a custom image with text.João Paulo Figueira
12/13/2021, 12:28 PM./gradlew frontendRun -t
on the wizard-generated KVision project. On the browser, the errors look like:
Compiled with problems:
ERROR in ../../node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css 1:0
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
> @charset "UTF-8";
| .abc-checkbox {
| cursor: default;
Any idea of what I might be doing wrong?Jörg Rade
12/21/2021, 1:40 PMTask with name 'frontendBrowserProductionWebpack' not found in root project 'kroviz'.
build.gradle.kts reads:
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
plugins {
val kotlinVersion: String by System.getProperties()
kotlin("plugin.serialization") version kotlinVersion
kotlin("js") version kotlinVersion
val kvisionVersion: String by System.getProperties()
id("io.kvision") version kvisionVersion
}
version = "2.0.0-SNAPSHOT"
group = "org.apache.isis.client"
kotlin.sourceSets.all {
languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn")
}
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
// Versions
val kotlinVersion: String by System.getProperties()
val kvisionVersion: String by System.getProperties()
// Custom Properties
val webDir = file("src/main/web")
kotlin {
js {
browser {
runTask {
outputFileName = "main.bundle.js"
sourceMaps = false
devServer = KotlinWebpackConfig.DevServer(
open = false,
port = 3000,
proxy = mutableMapOf(
"/kv/*" to "<http://localhost:8080>",
"/kvws/*" to mapOf("target" to "<ws://localhost:8080>", "ws" to true)
),
static = mutableListOf("$buildDir/processedResources/js/main")
)
}
webpackTask {
outputFileName = "main.bundle.js"
}
testTask {
useKarma {
useChromeHeadless()
}
}
}
binaries.executable()
}
sourceSets["main"].dependencies {
implementation(npm("react-awesome-button", "*"))
implementation(npm("prop-types", "*"))
implementation("io.kvision:kvision:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-css:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-datetime:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-select:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-spinner:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-upload:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-dialog:$kvisionVersion")
implementation("io.kvision:kvision-bootstrap-typeahead:$kvisionVersion")
implementation("io.kvision:kvision-fontawesome:$kvisionVersion")
implementation("io.kvision:kvision-i18n:$kvisionVersion")
implementation("io.kvision:kvision-richtext:$kvisionVersion")
implementation("io.kvision:kvision-handlebars:$kvisionVersion")
implementation("io.kvision:kvision-datacontainer:$kvisionVersion")
implementation("io.kvision:kvision-chart:$kvisionVersion")
implementation("io.kvision:kvision-tabulator:$kvisionVersion")
implementation("io.kvision:kvision-pace:$kvisionVersion")
implementation("io.kvision:kvision-toast:$kvisionVersion")
implementation("io.kvision:kvision-react:$kvisionVersion")
implementation("io.kvision:kvision-routing-navigo:$kvisionVersion")
implementation("io.kvision:kvision-state:$kvisionVersion")
implementation("io.kvision:kvision-rest:$kvisionVersion")
implementation("io.kvision:kvision-moment:$kvisionVersion")
implementation("io.kvision:kvision-maps:$kvisionVersion")
implementation(npm("xmltojson", "1.3.5", false))
implementation(npm("flatted", "3.2.2", false))
implementation(npm("diff", "5.0.0", false))
implementation(npm("diff2html", "3.4.13", false))
implementation(npm("xml-beautify", "1.1.2", false))
implementation(npm("xterm", "4.15.0", false))
}
sourceSets["test"].dependencies {
implementation(kotlin("test-js"))
implementation("io.kvision:kvision-testutils:$kvisionVersion")
}
sourceSets["main"].resources.srcDir(webDir)
}
afterEvaluate {
tasks {
create("frontendArchive", Jar::class).apply {
dependsOn("frontendBrowserProductionWebpack")
group = "package"
archiveAppendix.set("frontend")
val distribution =
project.tasks.getByName("frontendBrowserProductionWebpack", KotlinWebpack::class).destinationDirectory!!
from(distribution) {
include("*.*")
}
from(webDir)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
into("/assets")
inputs.files(distribution, webDir)
outputs.file(archiveFile)
manifest {
attributes(
mapOf(
"Implementation-Title" to rootProject.name,
"Implementation-Group" to rootProject.group,
"Implementation-Version" to rootProject.version,
"Timestamp" to System.currentTimeMillis()
)
)
}
val dependencies =
project.tasks["frontendArchive"].outputs.files
dependencies.forEach {
if (it.isDirectory) from(it) else from(zipTree(it))
}
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
inputs.files(dependencies)
outputs.file(archiveFile)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
}
What am I missingTomas Kormanak
12/22/2021, 10:15 AMinterface Container
returns Container? I can't see any usecase where it could be useful and I don't think it's a good pattern (fluent interface). I think they should return Unit
The only case I can imagine return something else is method add. It can return added component to support this shortcut:
val mycomponent = add(MyComponent())
pambrose
12/23/2021, 5:04 AM> Could not find node-14.17.0-darwin-arm64.tar.gz (org.nodejs:node:14.17.0).
Searched in the following locations:
<https://nodejs.org/dist/v14.17.0/node-v14.17.0-darwin-arm64.tar.gz>
The 14.17.0 version of node does not have M1 support, but newer versions do. Can you tell me where the reference to that version of node is coming from?
Interestingly, I did not have this issue with kvision 5.5.1 and kotlin 1.5.31.
Thanks again,
Paul