From db22ddbe43f5ec3922eb61ae9985436775dc5ad2 Mon Sep 17 00:00:00 2001 From: Jonathan Lennox Date: Mon, 15 Jul 2024 13:35:59 -0400 Subject: [PATCH 1/5] Update versions of everything, with changes so they compile. Not yet running everywhere. --- build.gradle.kts | 44 +++++----- gradle/wrapper/gradle-wrapper.jar | Bin 58910 -> 58694 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 - gradlew.bat | 1 - src/main/kotlin/App.kt | 76 +++++++++++------- src/main/kotlin/ChartSelection.kt | 19 ++--- src/main/kotlin/ChartZoomButtons.kt | 23 +++--- src/main/kotlin/Conference.kt | 29 ++++--- src/main/kotlin/Dump.kt | 19 +++-- src/main/kotlin/DumpViewer.kt | 8 +- src/main/kotlin/Endpoint.kt | 13 +-- src/main/kotlin/FeatureToggle.kt | 30 +++---- src/main/kotlin/JicofoConference.kt | 25 +++--- src/main/kotlin/Jvb.kt | 8 +- src/main/kotlin/LiveDashboard.kt | 28 +++---- src/main/kotlin/Selector.kt | 8 +- src/main/kotlin/StatusBadge.kt | 8 +- src/main/kotlin/graphs/Chart.kt | 16 ++-- src/main/kotlin/graphs/ChartCollection.kt | 20 ++--- src/main/kotlin/highcharts/Highcharts.kt | 6 ++ src/main/kotlin/highcharts/HighchartsReact.kt | 8 +- src/main/kotlin/main.kt | 10 +-- .../kotlin/reactselect/AsyncReactSelect.kt | 8 +- src/main/kotlin/reactselect/ReactSelect.kt | 8 +- 25 files changed, 221 insertions(+), 198 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 05c20e1..65d5b2e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.jetbrains.kotlin.js") version "1.4.10" + id("org.jetbrains.kotlin.js") version "1.9.24" } group = "org.jitsi" @@ -7,50 +7,56 @@ version = "1.0-SNAPSHOT" repositories { mavenCentral() - jcenter() } dependencies { implementation(kotlin("stdlib-js")) - implementation("org.jetbrains:kotlin-react:16.13.1-pre.110-kotlin-1.4.0") - implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.110-kotlin-1.4.0") - implementation(npm("react", "16.13.1")) - implementation(npm("react-dom", "16.13.1")) + implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.3.1-pre.770") + implementation("org.jetbrains.kotlin-wrappers:kotlin-react-legacy:18.3.1-pre.770") + implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom-legacy:18.3.1-pre.770") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9") + implementation(npm("react", "18.3.1")) + implementation(npm("react-dom", "18.3.1")) - implementation(npm("highcharts", "8.2.2")) - implementation(npm("highcharts-react-official", "3.0.0")) + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1") - implementation("org.jetbrains:kotlin-styled:1.0.0-pre.110-kotlin-1.4.0") - implementation(npm("styled-components", "~5.1.1")) - implementation(npm("inline-style-prefixer", "~6.0.0")) - implementation(npm("react-select", "~3.1.0")) - implementation("org.jetbrains:kotlin-react-router-dom:5.2.0-pre.136-kotlin-1.4.10") + implementation(npm("highcharts", "11.4.6")) + implementation(npm("highcharts-react-official", "3.2.1")) + + implementation("org.jetbrains.kotlin-wrappers:kotlin-styled-next:1.2.4-pre.770") + implementation(npm("inline-style-prefixer", "~7.0.1")) + implementation(npm("react-select", "~5.8.0")) + implementation("org.jetbrains.kotlin-wrappers:kotlin-react-router-dom:6.23.1-pre.770") } kotlin { sourceSets.configureEach { languageSettings.apply { - useExperimentalAnnotation("kotlinx.coroutines.ExperimentalCoroutinesApi") - useExperimentalAnnotation("kotlin.time.ExperimentalTime") + optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") + optIn("kotlin.time.ExperimentalTime") } } js { browser { webpackTask { - cssSupport.enabled = true + cssSupport { + enabled.set(true) + } } runTask { - cssSupport.enabled = true + cssSupport { + enabled.set(true) + } } testTask { useKarma { useChromeHeadless() - webpackConfig.cssSupport.enabled = true + webpackConfig.cssSupport { + enabled.set(true) + } } }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Ql?|`KIZR%#&qOMAEpStCrEMl8R0iZLR|#8%!;8p z0VGG*J(7WAxG~ij`ISsxDD--ge}1Dh3vAj>!wtQtec=#YCHNFKz$`Il6fa~c`rYYD z(xqyH;ETfFb?fK!?^*s3`))*65xs|5*^u3Snz(6t59|0kESGze=0W7f>LL{K_sC3& z*ardr??S+*s+p>{8sni`20|xZQ#^D^AQTjp`=*)izGeFN$qoSHK6K7(lg#A*T_gM( zK|#q5@BmyU)j&wqjB*=s29ufgV)YL%VJRV>@1p)anJxE7WkARdZ36Lb~f2b6Q zlm7uK{1gU}2|U1INlYN^Cl9Dh;{WL3PjQf^)PE=rpfSw?($jsQrq#T^it69uKY15Tb~K=hm} zh{fw3iUZN>cmUlz1T^;!pw6KHjOL|4uKo}3i|5k^cjn$5g+E9&YZL(c0t7^Yyr*;k z{39mNJB|kkA^-oNpr8j6hJ*m~3oM}A&ow%Xk22_5P%a?j<^aqv(ILmiH2Q>4Owl^89`~3rMHp zp3(w1Yh0kR@38~4fW() { - override fun RBuilder.render() { - hashRouter { - switch { - route("/", exact = true) { - div { - routeLink("/dump") { - +"Dump viewer" - } - span { - +" | " - } - routeLink("/live") { - +"Live dashboard" - } - } - } - route("/dump", Dump::class, exact = true) - route("/live", LiveDashboard::class, exact = true) - } +val root = FC { + div { + Link { + to = "/dump" + +"Dump viewer" + } + span { + +" | " + } + Link { + to = "/live" + +"Live dashboard" } } } + + +private val hashRouter = createHashRouter( + routes = arrayOf( + jso { + path = "/" + Component = root + }, + jso { + path = "/dump" + Component = Dump::class.react + }, + jso { + path = "/live" + Component = LiveDashboard::class.react + } + ) +) + +val App = FC { + RouterProvider { + router = hashRouter + } +} diff --git a/src/main/kotlin/ChartSelection.kt b/src/main/kotlin/ChartSelection.kt index 85ef570..91d2bfe 100644 --- a/src/main/kotlin/ChartSelection.kt +++ b/src/main/kotlin/ChartSelection.kt @@ -3,11 +3,12 @@ import highcharts.Event import highcharts.Point import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State +import react.useRefCallback // Defines a selector and the graph itself, and acts as the 'go between' between the two -class ChartSelection : RComponent() { +class ChartSelection : RComponent() { private var currentlyGraphedKeys = listOf() private var selector: Selector? = null private var chart: Chart? = null @@ -52,8 +53,8 @@ class ChartSelection : RComponent() { onSelectedKeysChange = this@ChartSelection::selectedKeysChanged allKeys = props.allKeys } - ref { - selector = it as? Selector + ref = useRefCallback { + selector = it } } child(Chart::class) { @@ -63,8 +64,8 @@ class ChartSelection : RComponent() { graphType = props.graphType ?: "line" startZoomSeconds = props.startZoomSeconds } - ref { - chart = it as? Chart + ref = useRefCallback { + chart = it } } } @@ -97,7 +98,7 @@ class ChartSelection : RComponent() { // Leaving this here, but since it doesn't propagate these values to props, it's a bit cumbersome to use. // See https://github.com/JetBrains/kotlin-wrappers/issues/385 -// companion object : RStatics(GraphSelection::class) { +// companion object : RStatics(GraphSelection::class) { // init { // defaultProps = GraphSelectionProps().apply { // allKeys = emptyList() @@ -107,7 +108,7 @@ class ChartSelection : RComponent() { // } } -external interface GraphSelectionProps : RProps { +external interface GraphSelectionProps : PropsWithChildren { var title: String? var allKeys: List? // An optional property which can contain stored data to be graphed diff --git a/src/main/kotlin/ChartZoomButtons.kt b/src/main/kotlin/ChartZoomButtons.kt index 83aac0c..70d32ce 100644 --- a/src/main/kotlin/ChartZoomButtons.kt +++ b/src/main/kotlin/ChartZoomButtons.kt @@ -3,13 +3,14 @@ import kotlinx.css.fontWeight import kotlinx.html.js.onClickFunction import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.setState import styled.css import styled.styledButton import kotlin.time.Duration + class ChartZoomButtons : RComponent() { init { // Default to 1 minute @@ -25,14 +26,12 @@ class ChartZoomButtons : RComponent() { this.fontWeight = FontWeight.bold } } - attrs { - text(buttonDesc.title) - onClickFunction = { - setState { - currZoomSeconds = buttonDesc.zoomSeconds - } - props.onZoomChange?.invoke(buttonDesc.zoomSeconds) + attrs.text(buttonDesc.title) + attrs.onClickFunction = { + setState { + currZoomSeconds = buttonDesc.zoomSeconds } + props.onZoomChange?.invoke(buttonDesc.zoomSeconds) } } } @@ -41,11 +40,11 @@ class ChartZoomButtons : RComponent() { fun currZoomSeconds(): Int = state.currZoomSeconds } -external interface ChartZoomState : RState { +external interface ChartZoomState : State { var currZoomSeconds: Int } -external interface ChartZoomProps : RProps { +external interface ChartZoomProps : PropsWithChildren { var onZoomChange: ((Int) -> Unit)? var buttons: List? } @@ -57,4 +56,4 @@ data class ZoomButtonDesc( ) fun ZoomButtonDesc(title: String, size: Duration): ZoomButtonDesc = - ZoomButtonDesc(title, size.inSeconds.toInt()) + ZoomButtonDesc(title, size.inWholeSeconds.toInt()) diff --git a/src/main/kotlin/Conference.kt b/src/main/kotlin/Conference.kt index beb5e99..82da126 100644 --- a/src/main/kotlin/Conference.kt +++ b/src/main/kotlin/Conference.kt @@ -16,12 +16,13 @@ import kotlinx.css.pct import kotlinx.html.js.onClickFunction import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.dom.div import react.dom.h2 import react.dom.p import react.setState +import react.useRefCallback import styled.css import styled.styledDiv @@ -141,11 +142,9 @@ class Conference : RComponent() { } else { +"Conference (${props.id})" } - attrs { - onClickFunction = { _ -> - setState { - expanded = !expanded - } + attrs.onClickFunction = { _ -> + setState { + expanded = !expanded } } } @@ -168,9 +167,9 @@ class Conference : RComponent() { nonNumericalKeys = state.nonNumericalKeys data = props.confData } - ref { + ref = useRefCallback { if (it != null) { - chartCollection = it as ChartCollection + chartCollection = it } } } @@ -191,9 +190,9 @@ class Conference : RComponent() { data = existingEpData } } - ref { + ref = useRefCallback { if (it != null) { - eps[epId] = it as Endpoint + eps[epId] = it } } } @@ -215,9 +214,9 @@ class Conference : RComponent() { data = existingEpData } } - ref { + ref = useRefCallback { if (it != null) { - eps[relayId] = it as Endpoint + eps[relayId] = it } } } @@ -283,7 +282,7 @@ private fun getRelayIds(confData: dynamic): Array { keys(confData.relays) else emptyArray() } -external interface ConferenceState : RState { +external interface ConferenceState : State { var epIds: Array var relayIds: Array var name: String @@ -293,7 +292,7 @@ external interface ConferenceState : RState { var dataByEp: MutableMap>? } -external interface ConferenceProps : RProps { +external interface ConferenceProps : PropsWithChildren { var baseRestApiUrl: String? var id: String var confData: List? diff --git a/src/main/kotlin/Dump.kt b/src/main/kotlin/Dump.kt index c99f81e..fd25efe 100644 --- a/src/main/kotlin/Dump.kt +++ b/src/main/kotlin/Dump.kt @@ -1,16 +1,14 @@ -import kotlinx.html.InputType -import kotlinx.html.js.onChangeFunction import org.w3c.dom.HTMLInputElement import org.w3c.files.File import react.RBuilder import react.RComponent -import react.RProps -import react.RState -import react.dom.div -import react.dom.input +import react.PropsWithChildren +import react.State +import react.dom.html.ReactHTML.div +import react.dom.html.ReactHTML.input import react.setState -class Dump : RComponent() { +class Dump : RComponent() { init { state.file = null } @@ -18,9 +16,10 @@ class Dump : RComponent() { console.log("blah") if (state.file == null) { div { - input(type = InputType.file) { + input { attrs { - onChangeFunction = { event -> + type = js("\"file\"") + onChange = { event -> val file = (event.target as HTMLInputElement).files?.item(0) console.log("got file ", file) setState { @@ -40,6 +39,6 @@ class Dump : RComponent() { } } -external interface DumpState : RState { +external interface DumpState : State { var file: File? } diff --git a/src/main/kotlin/DumpViewer.kt b/src/main/kotlin/DumpViewer.kt index 217b095..7348851 100644 --- a/src/main/kotlin/DumpViewer.kt +++ b/src/main/kotlin/DumpViewer.kt @@ -2,8 +2,8 @@ import org.w3c.files.File import org.w3c.files.FileReader import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.setState class DumpViewer : RComponent() { @@ -103,12 +103,12 @@ private fun getConfName(data: List?): String { ?.firstOrNull { it != undefined } as? String ?: "No conf name found" } -external interface DumpViewerState : RState { +external interface DumpViewerState : State { // A list of JSON stat entries from the dump var data: List? var error: String? } -external interface DumpViewerProps : RProps { +external interface DumpViewerProps : PropsWithChildren { var file: File } diff --git a/src/main/kotlin/Endpoint.kt b/src/main/kotlin/Endpoint.kt index c47851e..72e3335 100644 --- a/src/main/kotlin/Endpoint.kt +++ b/src/main/kotlin/Endpoint.kt @@ -4,11 +4,12 @@ import kotlinx.css.paddingTop import kotlinx.css.pct import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.dom.div import react.dom.h3 import react.setState +import react.useRefCallback import styled.css import styled.styledDiv @@ -97,9 +98,9 @@ class Endpoint : RComponent() { nonNumericalKeys = state.nonNumericalKeys data = props.data } - ref { + ref = useRefCallback { if (it != null) { - chartCollection = it as ChartCollection + chartCollection = it } } } @@ -110,7 +111,7 @@ class Endpoint : RComponent() { private fun usingLiveData(): Boolean = props.baseRestApiUrl != null } -external interface EpProps : RProps { +external interface EpProps : PropsWithChildren { var entityType: String var confId: String var id: String @@ -121,7 +122,7 @@ external interface EpProps : RProps { // Endpoints don't retrieve their own data, the conference makes a single // request and updates the props of the ep components -external interface EpState : RState { +external interface EpState : State { var numericalKeys: List var nonNumericalKeys: List var statsId: String? diff --git a/src/main/kotlin/FeatureToggle.kt b/src/main/kotlin/FeatureToggle.kt index 8e29a48..4d1da3a 100644 --- a/src/main/kotlin/FeatureToggle.kt +++ b/src/main/kotlin/FeatureToggle.kt @@ -8,14 +8,16 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import kotlinx.css.Display +import kotlinx.css.Margin import kotlinx.css.display import kotlinx.css.margin +import kotlinx.css.px import kotlinx.html.js.onClickFunction import org.w3c.xhr.XMLHttpRequest import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.dom.button import react.dom.div import react.setState @@ -54,22 +56,20 @@ class FeatureToggle : RComponent() { styledDiv { css { display = Display.inlineBlock - margin = "10px" + margin = Margin(10.px) } +props.featureName div { button { val isEnabled: Boolean = state.enabled - attrs { - text(if (isEnabled) "Disable" else "Enable") - onClickFunction = { _ -> - XMLHttpRequest().apply { - open("POST", "${props.url}/${!isEnabled}", async = true) - send() - } - setState { - enabled = !state.enabled - } + attrs.text(if (isEnabled) "Disable" else "Enable") + attrs.onClickFunction = { _ -> + XMLHttpRequest().apply { + open("POST", "${props.url}/${!isEnabled}", async = true) + send() + } + setState { + enabled = !state.enabled } } } @@ -78,11 +78,11 @@ class FeatureToggle : RComponent() { } } -external interface FeatureToggleState : RState { +external interface FeatureToggleState : State { var enabled: Boolean } -external interface FeatureToggleProps : RProps { +external interface FeatureToggleProps : PropsWithChildren { var featureName: String var url: String } diff --git a/src/main/kotlin/JicofoConference.kt b/src/main/kotlin/JicofoConference.kt index c718a10..1475b2b 100644 --- a/src/main/kotlin/JicofoConference.kt +++ b/src/main/kotlin/JicofoConference.kt @@ -16,12 +16,13 @@ import kotlinx.css.pct import kotlinx.html.js.onClickFunction import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.dom.div import react.dom.h2 import react.dom.p import react.setState +import react.useRefCallback import styled.css import styled.styledDiv @@ -126,11 +127,9 @@ class JicofoConference : RComponent - setState { - expanded = !expanded - } + attrs.onClickFunction = { _ -> + setState { + expanded = !expanded } } } @@ -152,9 +151,9 @@ class JicofoConference : RComponent { if (it != null) { - chartCollection = it as ChartCollection + chartCollection = it } } } @@ -174,9 +173,9 @@ class JicofoConference : RComponent { if (it != null) { - eps[epId] = it as Endpoint + eps[epId] = it } } } @@ -235,7 +234,7 @@ private fun getEpIds(confData: dynamic): Array { keys(confData.participants) else emptyArray() } -external interface JicofoConferenceState : RState { +external interface JicofoConferenceState : State { var epIds: Array var name: String var expanded: Boolean @@ -244,7 +243,7 @@ external interface JicofoConferenceState : RState { var dataByEp: MutableMap>? } -external interface JicofoConferenceProps : RProps { +external interface JicofoConferenceProps : PropsWithChildren { var baseRestApiUrl: String? var id: String var confData: List? diff --git a/src/main/kotlin/Jvb.kt b/src/main/kotlin/Jvb.kt index d994a79..bbaae9e 100644 --- a/src/main/kotlin/Jvb.kt +++ b/src/main/kotlin/Jvb.kt @@ -12,8 +12,8 @@ import org.w3c.fetch.RequestInit import org.w3c.fetch.RequestMode import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.dom.div import react.dom.hr import react.dom.p @@ -128,12 +128,12 @@ class Jvb : RComponent() { } } -external interface JvbState : RState { +external interface JvbState : State { var state: dynamic var error: String? } -external interface JvbProps : RProps { +external interface JvbProps : PropsWithChildren { var url: String var updateIntervalMs: Long? } diff --git a/src/main/kotlin/LiveDashboard.kt b/src/main/kotlin/LiveDashboard.kt index 79da6ce..5342330 100644 --- a/src/main/kotlin/LiveDashboard.kt +++ b/src/main/kotlin/LiveDashboard.kt @@ -5,8 +5,8 @@ import kotlinx.html.js.onClickFunction import org.w3c.dom.HTMLInputElement import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.dom.button import react.dom.defaultValue import react.dom.h1 @@ -14,7 +14,7 @@ import react.dom.input import react.dom.p import react.setState -class LiveDashboard : RComponent() { +class LiveDashboard : RComponent() { init { state.jvbUrl = null } @@ -25,20 +25,16 @@ class LiveDashboard : RComponent() { p { key = "jvbUrl" input(type = InputType.text) { - attrs { - id = "jvb-url" - defaultValue = "127.0.0.1:4443" - } + attrs.id = "jvb-url" + attrs.defaultValue = "127.0.0.1:4443" } button { - attrs { - text("Set JVB") - onClickFunction = { _ -> - val inputUrl = (document.getElementById("jvb-url") as HTMLInputElement).value - console.log("setting jvb url to http://$inputUrl/debug") - setState { - jvbUrl = "http://$inputUrl/debug" - } + attrs.text("Set JVB") + attrs.onClickFunction = { _ -> + val inputUrl = (document.getElementById("jvb-url") as HTMLInputElement).value + console.log("setting jvb url to http://$inputUrl/debug") + setState { + jvbUrl = "http://$inputUrl/debug" } } } @@ -53,6 +49,6 @@ class LiveDashboard : RComponent() { } } -external interface AppState : RState { +external interface AppState : State { var jvbUrl: String? } diff --git a/src/main/kotlin/Selector.kt b/src/main/kotlin/Selector.kt index b88dd11..7a99269 100644 --- a/src/main/kotlin/Selector.kt +++ b/src/main/kotlin/Selector.kt @@ -1,11 +1,11 @@ import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import reactselect.AsyncSelect import reactselect.Option -class Selector : RComponent() { +class Selector : RComponent() { override fun RBuilder.render() { val allOptions = props.allKeys?.map { Option(it) }?.toTypedArray() ?: emptyArray() AsyncSelect { @@ -36,7 +36,7 @@ class Selector : RComponent() { } } -external interface SelectorProps : RProps { +external interface SelectorProps : PropsWithChildren { var allKeys: List? var onSelectedKeysChange: ((List) -> Unit)? } diff --git a/src/main/kotlin/StatusBadge.kt b/src/main/kotlin/StatusBadge.kt index 203f8fa..17f606f 100644 --- a/src/main/kotlin/StatusBadge.kt +++ b/src/main/kotlin/StatusBadge.kt @@ -2,8 +2,8 @@ import kotlinx.css.Color import kotlinx.css.color import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import styled.css import styled.styledDiv @@ -14,7 +14,7 @@ import styled.styledDiv abstract class StatusBadge( private val fieldName: String, private val evaluationFunc: (T) -> Status -) : RComponent, RState>() { +) : RComponent, State>() { override fun RBuilder.render() { val status = evaluationFunc(props.value) styledDiv { @@ -32,7 +32,7 @@ enum class Status(val color: Color) { RED(Color.red) } -external interface StatusBadgeProps : RProps { +external interface StatusBadgeProps : PropsWithChildren { var value: T } diff --git a/src/main/kotlin/graphs/Chart.kt b/src/main/kotlin/graphs/Chart.kt index 1583694..a6ea787 100644 --- a/src/main/kotlin/graphs/Chart.kt +++ b/src/main/kotlin/graphs/Chart.kt @@ -15,14 +15,15 @@ import highcharts.XAxis import highcharts.highcharts import react.RBuilder import react.RComponent -import react.RProps -import react.RState +import react.PropsWithChildren +import react.State import react.ReactElement import react.dom.div +import react.useRefCallback import kotlin.js.Date -class Chart : RComponent() { - private var chartRef: ReactElement? = null +class Chart : RComponent() { + private var chartRef: ReactElement? = null private val maxPoints: Int = 60 * 60 // How many seconds worth of live data we're currently displaying private var currentTimeZoomSeconds: Long = maxPoints.toLong() @@ -48,6 +49,7 @@ class Chart : RComponent() { enabled = false } step = "left" + turboThreshold = 0 } } chart = ChartOptions().apply { @@ -62,8 +64,8 @@ class Chart : RComponent() { attrs.highcharts = highcharts attrs.options = options attrs.allowChartUpdate = true - ref { - chartRef = it.unsafeCast() + ref = useRefCallback> { + chartRef = it } } } @@ -135,7 +137,7 @@ class Chart : RComponent() { } } -external interface GraphProps : RProps { +external interface GraphProps : PropsWithChildren { var title: String? var enableZoom: Boolean var graphType: String? diff --git a/src/main/kotlin/graphs/ChartCollection.kt b/src/main/kotlin/graphs/ChartCollection.kt index 5619148..507c331 100644 --- a/src/main/kotlin/graphs/ChartCollection.kt +++ b/src/main/kotlin/graphs/ChartCollection.kt @@ -14,8 +14,8 @@ import react.dom.button import react.dom.div import styled.css import styled.styledDiv -import kotlin.time.minutes -import kotlin.time.seconds +import kotlin.time.Duration.Companion.minutes +import kotlin.time.Duration.Companion.seconds class ChartCollection : RComponent() { private var chartSelectors: MutableMap = mutableMapOf() @@ -78,8 +78,8 @@ class ChartCollection : RComponent() ZoomButtonDesc("All", Int.MAX_VALUE.seconds), ) } - ref { - zoomButtons = it as? ChartZoomButtons + ref = useRefCallback { + zoomButtons = it } } } @@ -111,9 +111,9 @@ class ChartCollection : RComponent() // yet startZoomSeconds = zoomButtons?.currZoomSeconds() ?: 60 } - ref { + ref = useRefCallback { if (it != null) { - chartSelectors[chart.id] = it as ChartSelection + chartSelectors[chart.id] = it } } } @@ -131,9 +131,9 @@ class ChartCollection : RComponent() // yet startZoomSeconds = zoomButtons?.currZoomSeconds() ?: 60 } - ref { + ref = useRefCallback { if (it != null) { - chartSelectors[chart.id] = it as ChartSelection + chartSelectors[chart.id] = it } } } @@ -148,11 +148,11 @@ class ChartCollection : RComponent() private fun usingLiveData(): Boolean = props.data == null } -external interface ChartCollectionState : RState { +external interface ChartCollectionState : State { var chartInfos: List } -external interface ChartCollectionProps : RProps { +external interface ChartCollectionProps : PropsWithChildren { var numericalKeys: List var nonNumericalKeys: List // An optional property to pass pre-existing data (e.g. from a dump file) diff --git a/src/main/kotlin/highcharts/Highcharts.kt b/src/main/kotlin/highcharts/Highcharts.kt index 1f47d68..2c6ba4a 100644 --- a/src/main/kotlin/highcharts/Highcharts.kt +++ b/src/main/kotlin/highcharts/Highcharts.kt @@ -153,6 +153,12 @@ external interface PlotSeriesOptions { var step: String? get() = definedExternally set(value) = definedExternally + var boostThreshold: Number? + get() = definedExternally + set(value) = definedExternally + var turboThreshold: Number? + get() = definedExternally + set(value) = definedExternally } fun PlotSeriesOptions(): PlotSeriesOptions = js("{}") diff --git a/src/main/kotlin/highcharts/HighchartsReact.kt b/src/main/kotlin/highcharts/HighchartsReact.kt index 123fcb2..bd28f54 100644 --- a/src/main/kotlin/highcharts/HighchartsReact.kt +++ b/src/main/kotlin/highcharts/HighchartsReact.kt @@ -3,13 +3,13 @@ package highcharts -import react.RClass -import react.RProps +import react.ComponentClass +import react.PropsWithChildren @JsName("default") -external val HighchartsReact: RClass +external val HighchartsReact: ComponentClass -external interface HighchartsReactProps : RProps { +external interface HighchartsReactProps : PropsWithChildren { var highcharts: Highcharts // var options: dynamic var options: Options diff --git a/src/main/kotlin/main.kt b/src/main/kotlin/main.kt index d96489d..bdc221a 100644 --- a/src/main/kotlin/main.kt +++ b/src/main/kotlin/main.kt @@ -1,11 +1,11 @@ import highcharts.TimelineSeries import highcharts.highcharts -import kotlinx.browser.document -import react.dom.render +import react.create +import react.dom.client.createRoot +import web.dom.document fun main() { TimelineSeries(highcharts) - render(document.getElementById("root")) { - child(App::class) {} - } + val root = createRoot(document.getElementById("root")!!) + root.render(App.create()) } diff --git a/src/main/kotlin/reactselect/AsyncReactSelect.kt b/src/main/kotlin/reactselect/AsyncReactSelect.kt index 450aebd..405f71c 100644 --- a/src/main/kotlin/reactselect/AsyncReactSelect.kt +++ b/src/main/kotlin/reactselect/AsyncReactSelect.kt @@ -3,13 +3,13 @@ package reactselect -import react.RClass -import react.RProps +import react.ComponentClass +import react.PropsWithChildren @JsName("default") -external val AsyncSelect: RClass +external val AsyncSelect: ComponentClass -external interface AsyncReactSelectProps : RProps { +external interface AsyncReactSelectProps : PropsWithChildren { var loadOptions: (String /* inputValue */, (Array