diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..47bd81f --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/.idea/hotswap_agent.xml b/.idea/hotswap_agent.xml new file mode 100644 index 0000000..8a869d9 --- /dev/null +++ b/.idea/hotswap_agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..5806fb3 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__nl_astraeus_komp_0_0_5_SNAPSHOT.xml b/.idea/libraries/Gradle__nl_astraeus_komp_0_0_5_SNAPSHOT.xml deleted file mode 100644 index cceeaf9..0000000 --- a/.idea/libraries/Gradle__nl_astraeus_komp_0_0_5_SNAPSHOT.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__nl_astraeus_komp_0_0_8_SNAPSHOT.xml b/.idea/libraries/Gradle__nl_astraeus_komp_0_0_8_SNAPSHOT.xml new file mode 100644 index 0000000..4134542 --- /dev/null +++ b/.idea/libraries/Gradle__nl_astraeus_komp_0_0_8_SNAPSHOT.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_1_4.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_1_4.xml new file mode 100644 index 0000000..6052e6e --- /dev/null +++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_1_4.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_js_1_2_21.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_js_1_2_21.xml new file mode 100644 index 0000000..966de7d --- /dev/null +++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_js_1_2_21.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_html_common_0_6_4.xml b/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_html_common_0_6_4.xml new file mode 100644 index 0000000..77b682f --- /dev/null +++ b/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_html_common_0_6_4.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_html_js_0_6_4.xml b/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_html_js_0_6_4.xml new file mode 100644 index 0000000..d91d7c5 --- /dev/null +++ b/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_html_js_0_6_4.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..13e1e2c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 24fe121..c00b22a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,5 @@ -group 'nl.astraeus' -version '0.0.1-SNAPSHOT' - buildscript { - ext.kotlin_version = '1.1.4-2' + ext.kotlin_version = '1.2.21' repositories { maven { @@ -15,19 +12,27 @@ buildscript { } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "com.eriwen:gradle-js-plugin:1.12.1" } } -allprojects { - ext { - kotlin_version = '1.1.4-2' - } +plugins { + id "com.eriwen.gradle.js" version "2.14.1" } apply plugin: 'kotlin2js' apply plugin: 'kotlin-dce-js' +group 'nl.astraeus' +version '0.0.1-SNAPSHOT' + +allprojects { + ext { + kotlin_version = '1.2.21' + } +} + repositories { maven { url "http://nexus.astraeus.nl/nexus/content/groups/public" @@ -37,7 +42,7 @@ repositories { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version" - compile "nl.astraeus:komp:0.0.6-SNAPSHOT" + compile "nl.astraeus:komp:0.0.8-SNAPSHOT" } compileKotlin2Js { @@ -45,7 +50,35 @@ compileKotlin2Js { kotlinOptions.sourceMap = true kotlinOptions.sourceMapEmbedSources = "always" - kotlinOptions.outputFile = "${projectDir}/web/js/kotlin/komp-todo.js" kotlinOptions.suppressWarnings = true kotlinOptions.verbose = true } + +runDceKotlinJs.doLast { + copy { + from("build/kotlin-js-min/main") + + into("web/js/generated") + } +} + +// Create new CombineJsTasks if you have multiple sets of JS files +task combineKotlinJs(type: com.eriwen.gradle.js.tasks.CombineJsTask) { + dependsOn runDceKotlinJs + source = [ + "${projectDir}/web/js/generated/kotlin.js", + "${projectDir}/web/js/generated/min/kotlinx-html-js.js", + "${projectDir}/web/js/generated/min/komp.js", + "${projectDir}/web/js/generated/min/komp-todo.js" + ] + dest = file("${projectDir}/web/js/generated/todo.all.js") +} + +minifyJs { + source = combineKotlinJs + dest = file("${projectDir}/web/js/generated/todo.all.min.js") + closure { + warningLevel = 'QUIET' + compilerOptions.languageIn = "ECMASCRIPT5" + } +} diff --git a/komp-todo.iml b/komp-todo.iml index 4c95ce1..0c9830c 100644 --- a/komp-todo.iml +++ b/komp-todo.iml @@ -3,26 +3,26 @@ + $MODULE_DIR$/build/classes/test/komp-todo_test.js - - @@ -33,9 +33,7 @@ - - @@ -45,20 +43,20 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/minimize.gradle b/minimize.gradle deleted file mode 100644 index add39d5..0000000 --- a/minimize.gradle +++ /dev/null @@ -1,32 +0,0 @@ -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath "com.eriwen:gradle-js-plugin:1.12.1" - } -} - -plugins { - id "com.eriwen.gradle.js" version "2.14.1" -} - -// Create new CombineJsTasks if you have multiple sets of JS files -task combineKotlinJs(type: com.eriwen.gradle.js.tasks.CombineJsTask) { - source = [ - "${projectDir}/web/js/kotlin/min/kotlin.js", - "${projectDir}/web/js/kotlin/min/kotlinx-html-js.js", - "${projectDir}/web/js/kotlin/min/komp.js", - "${projectDir}/web/js/kotlin/min/komp-todo.js" - ] - dest = file("${projectDir}/web/js/generated/todo.all.js") -} - -minifyJs { - source = combineKotlinJs - dest = file("${projectDir}/web/js/generated/todo.all.min.js") - closure { - warningLevel = 'QUIET' - compilerOptions.languageIn = "ECMASCRIPT5" - } -} diff --git a/src/main/kotlin/nl/astraeus/komp/todo/Todo.kt b/src/main/kotlin/nl/astraeus/komp/todo/Todo.kt index 0c2aa1a..70788de 100644 --- a/src/main/kotlin/nl/astraeus/komp/todo/Todo.kt +++ b/src/main/kotlin/nl/astraeus/komp/todo/Todo.kt @@ -1,10 +1,30 @@ package nl.astraeus.komp.todo -import kotlinx.html.* +import kotlinx.html.InputType +import kotlinx.html.TagConsumer +import kotlinx.html.a +import kotlinx.html.button +import kotlinx.html.classes +import kotlinx.html.div import kotlinx.html.dom.create -import kotlinx.html.js.* -import nl.astraeus.komp.Komponent +import kotlinx.html.footer +import kotlinx.html.h1 +import kotlinx.html.header +import kotlinx.html.id +import kotlinx.html.input +import kotlinx.html.js.div +import kotlinx.html.js.onClickFunction +import kotlinx.html.js.onDoubleClickFunction +import kotlinx.html.js.onKeyPressFunction +import kotlinx.html.js.section +import kotlinx.html.label +import kotlinx.html.li +import kotlinx.html.section +import kotlinx.html.span +import kotlinx.html.strong +import kotlinx.html.ul import nl.astraeus.komp.DomDiffer +import nl.astraeus.komp.Komponent import org.w3c.dom.HTMLElement import org.w3c.dom.HTMLInputElement import org.w3c.dom.events.Event @@ -17,242 +37,244 @@ import kotlin.js.Date */ class Todo( - val dataId: String, - var title: String, - var completed: Boolean = false, - var editing: Boolean = false + val dataId: String, + var title: String, + var completed: Boolean = false, + var editing: Boolean = false ) enum class Selection(val title: String) { - ALL("All"), - ACTIVE("Active"), - COMPLETED("Completed") + ALL("All"), + ACTIVE("Active"), + COMPLETED("Completed") } -class TodoApp: Komponent() { - val todoList: MutableList = ArrayList() - var selected: Selection = Selection.ALL +class TodoApp : Komponent() { + val todoList: MutableList = ArrayList() + var selected: Selection = Selection.ALL - fun addTodo(e: Event) { - val target = e.target + fun addTodo(e: Event) { + val target = e.target - if (target is HTMLInputElement) { - todoList.add(Todo("${Date().getTime()}", target.value)) + if (target is HTMLInputElement) { + todoList.add(Todo("${Date().getTime()}", target.value)) - refresh() - } + refresh() + } + } + + fun editTodo(e: Event, todo: Todo) { + val target = e.target + + if (target is HTMLInputElement) { + todo.title = target.value + todo.editing = false + + refresh() } - fun editTodo(e: Event, todo: Todo) { - val target = e.target + } - if (target is HTMLInputElement) { - todo.title = target.value - todo.editing = false + fun destroyTodo(todo: Todo) { + todoList.remove(todo) - refresh() - } + refresh() + } - } + fun selectSelection(selection: Selection) { + selected = selection - fun destroyTodo(todo: Todo) { + refresh() + } + + fun clearCompleted() { + for (todo in ArrayList(todoList)) { + if (todo.completed) { todoList.remove(todo) - - refresh() + } } - fun selectSelection(selection: Selection) { - selected = selection + refresh() + } - refresh() + fun todoClicked(todo: Todo) { + todo.completed = !todo.completed + + refresh() + } + + fun getItemsLeft(): Int { + var result = 0 + for (todo in todoList) { + if (!todo.completed) { + result++ + } + } + return result + } + + fun setEditing(editTodo: Todo) { + for (todo in todoList) { + todo.editing = todo == editTodo } - fun clearCompleted() { - for (todo in ArrayList(todoList)) { - if (todo.completed) { - todoList.remove(todo) + refresh() + } + + override fun refresh() { + super.refresh() + + val inputBox = document.getElementById("todo_input") + + if (inputBox is HTMLInputElement) { + inputBox.focus() + } + } + + override fun render(consumer: TagConsumer) = consumer.section(classes = "todoapp") { + header(classes = "header") { + h1 { +"todos" } + input(classes = "new-todo") { + id = "todo_input" + placeholder = "What needs to be done?" + autoFocus = true + onKeyPressFunction = { e -> + if (e is KeyboardEvent && e.keyCode == 13) { + addTodo(e) + + val target = e.target + + if (target is HTMLInputElement) { + target.value = "" + target.defaultValue = "" } + } } - - refresh() + } } - fun todoClicked(todo: Todo) { - todo.completed = !todo.completed - - refresh() - } - - fun getItemsLeft(): Int { - var result = 0 + section(classes = "main") { + input(classes = "toggle-all") { + type = InputType.checkBox + } + label { + for_ = "toggle-all" + +"Mark all as complete" + } + ul(classes = "todo-list") { for (todo in todoList) { - if (!todo.completed) { - result++ - } - } - return result - } - - fun setEditing(editTodo: Todo) { - for (todo in todoList) { - todo.editing = todo == editTodo - } - - refresh() - } - - override fun refresh() { - super.refresh() - - val inputBox = document.getElementById("todo_input") - - if (inputBox is HTMLInputElement) { - inputBox.focus() - } - } - - override fun render(consumer: TagConsumer) = consumer.section(classes = "todoapp") { - header(classes = "header") { - h1 { + "todos" } - input(classes = "new-todo") { - id = "todo_input" - placeholder = "What needs to be done?" - autoFocus = true - onKeyPressFunction = { e -> + if (selected == Selection.ALL || + (todo.completed && selected == Selection.COMPLETED) || + (!todo.completed && selected == Selection.ACTIVE)) { + li { + if (todo.editing) { + classes += "editing" + input(classes = "edit") { + value = todo.title + onKeyPressFunction = { e -> if (e is KeyboardEvent && e.keyCode == 13) { - addTodo(e) - - val target = e.target - - if (target is HTMLInputElement) { - target.value = "" - target.defaultValue = "" - } + editTodo(e, todo) } + } } - } - } - - section(classes = "main") { - input(classes = "toggle-all") { - type = InputType.checkBox - } - label { - for_ = "toggle-all" - + "Mark all as complete" - } - ul(classes = "todo-list") { - for (todo in todoList) { - if (selected == Selection.ALL || - (todo.completed && selected == Selection.COMPLETED) || - (!todo.completed && selected == Selection.ACTIVE)) { - li { - if (todo.editing) { - classes += "editing" - input(classes = "edit") { - value = todo.title - onKeyPressFunction = { e -> - if (e is KeyboardEvent && e.keyCode == 13) { - editTodo(e, todo) - } - } - } - } else { - if (todo.completed) { - classes += "completed" - } - attributes["data-id"] = todo.dataId - div(classes = "view") { - input(classes = "toggle") { - type = InputType.checkBox - checked = todo.completed - onClickFunction = { - todoClicked(todo) - } - } - label(classes = "todo-content") { - +todo.title - - onDoubleClickFunction = { - setEditing(todo) - } - } - button(classes = "destroy") { - onClickFunction = { - destroyTodo(todo) - } - } - } - } - } + } else { + if (todo.completed) { + classes += "completed" + } + attributes["data-id"] = todo.dataId + div(classes = "view") { + input(classes = "toggle") { + type = InputType.checkBox + checked = todo.completed + onClickFunction = { + todoClicked(todo) } - } - } - } + } + label(classes = "todo-content") { + +todo.title - footer(classes = "footer") { - span(classes = "todo-count") { - strong { + "${getItemsLeft()}" } - + " item left" - } - ul(classes = "filters") { - for (selection in Selection.values()) - li { - a { - if (selection == selected) { classes += "selected" } - href = "#" - + selection.title - onClickFunction = { - selectSelection(selection) - } + onDoubleClickFunction = { + setEditing(todo) } + } + button(classes = "destroy") { + onClickFunction = { + destroyTodo(todo) + } + } } + } } - button(classes = "clear-completed") { - + "Clear completed" - onClickFunction = { - clearCompleted() - } - } + } } + } } + footer(classes = "footer") { + span(classes = "todo-count") { + strong { +"${getItemsLeft()}" } + +" item left" + } + ul(classes = "filters") { + for (selection in Selection.values()) + li { + a { + if (selection == selected) { + classes += "selected" + } + href = "#" + +selection.title + onClickFunction = { + selectSelection(selection) + } + } + } + } + button(classes = "clear-completed") { + +"Clear completed" + onClickFunction = { + clearCompleted() + } + } + } + } + } fun main(args: Array) { - Komponent.create(document.body!!, TodoApp(), true) + Komponent.create(document.body!!, TodoApp(), true) - val el1 = document.create.div { - div { - div { - id = "id1" - span { - +"Test" - } - } + val el1 = document.create.div { + div { + div { + id = "id1" + span { + +"Test" } + } } + } - val el2 = document.create.div { - div { - id = "id1" - span { - +"Test" - } - input { - name = "bla" - } - } + val el2 = document.create.div { + div { + id = "id1" + span { + +"Test" + } + input { + name = "bla" + } } + } - // println("equals ${DomDiffer.match(el1, el2)}") + // println("equals ${DomDiffer.match(el1, el2)}") - console.log("OLD", el1) - console.log("NEW", el2) + console.log("OLD", el1) + console.log("NEW", el2) - DomDiffer.replaceDiff(el2, el1) + DomDiffer.replaceDiff(el2, el1) - console.log("OLD", el1) - console.log("NEW", el2) + console.log("OLD", el1) + console.log("NEW", el2) } diff --git a/web/index_dev.html b/web/index_dev.html index dc573d5..1e997e2 100644 --- a/web/index_dev.html +++ b/web/index_dev.html @@ -12,9 +12,9 @@

Compare other javascript MVC* frameworks with TodoMVC

- - - - + + + + diff --git a/web/js/kotlin/komp-todo.js b/web/js/kotlin/komp-todo.js deleted file mode 100644 index 4802cda..0000000 --- a/web/js/kotlin/komp-todo.js +++ /dev/null @@ -1,439 +0,0 @@ -if (typeof kotlin === 'undefined') { - throw new Error("Error loading module 'komp-todo'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'komp-todo'."); -} -if (typeof komp === 'undefined') { - throw new Error("Error loading module 'komp-todo'. Its dependency 'komp' was not found. Please, check whether 'komp' is loaded prior to 'komp-todo'."); -} -if (typeof this['kotlinx-html-js'] === 'undefined') { - throw new Error("Error loading module 'komp-todo'. Its dependency 'kotlinx-html-js' was not found. Please, check whether 'kotlinx-html-js' is loaded prior to 'komp-todo'."); -} -this['komp-todo'] = function (_, Kotlin, $module$komp, $module$kotlinx_html_js) { - 'use strict'; - var Enum = Kotlin.kotlin.Enum; - var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_mqih57$; - var Komponent = $module$komp.nl.astraeus.komp.Komponent; - var h1 = $module$kotlinx_html_js.kotlinx.html.h1_vmej1w$; - var set_id = $module$kotlinx_html_js.kotlinx.html.set_id_ueiko3$; - var set_onKeyPressFunction = $module$kotlinx_html_js.kotlinx.html.js.set_onKeyPressFunction_pszlq2$; - var input = $module$kotlinx_html_js.kotlinx.html.input_e1g74z$; - var header = $module$kotlinx_html_js.kotlinx.html.header_8btlf7$; - var InputType = $module$kotlinx_html_js.kotlinx.html.InputType; - var label = $module$kotlinx_html_js.kotlinx.html.label_yd75js$; - var get_classes = $module$kotlinx_html_js.kotlinx.html.get_classes_fxodxh$; - var plus = Kotlin.kotlin.collections.plus_xfiyik$; - var set_classes = $module$kotlinx_html_js.kotlinx.html.set_classes_njy09m$; - var set_onClickFunction = $module$kotlinx_html_js.kotlinx.html.js.set_onClickFunction_pszlq2$; - var set_onDoubleClickFunction = $module$kotlinx_html_js.kotlinx.html.js.set_onDoubleClickFunction_pszlq2$; - var button = $module$kotlinx_html_js.kotlinx.html.button_whohl6$; - var div = $module$kotlinx_html_js.kotlinx.html.div_ri36nr$; - var li = $module$kotlinx_html_js.kotlinx.html.li_yzv5uh$; - var ul = $module$kotlinx_html_js.kotlinx.html.ul_pzlyaf$; - var section = $module$kotlinx_html_js.kotlinx.html.section_ac1jhf$; - var strong = $module$kotlinx_html_js.kotlinx.html.strong_okpg28$; - var span = $module$kotlinx_html_js.kotlinx.html.span_6djfml$; - var a = $module$kotlinx_html_js.kotlinx.html.a_gu26kr$; - var footer = $module$kotlinx_html_js.kotlinx.html.footer_780ap1$; - var section_0 = $module$kotlinx_html_js.kotlinx.html.js.section_ceckl$; - var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_ww73n8$; - var get_create = $module$kotlinx_html_js.kotlinx.html.dom.get_create_4wc2mh$; - var div_0 = $module$kotlinx_html_js.kotlinx.html.js.div_wkomt5$; - var komp = $module$komp.nl.astraeus.komp; - Selection.prototype = Object.create(Enum.prototype); - Selection.prototype.constructor = Selection; - TodoApp.prototype = Object.create(Komponent.prototype); - TodoApp.prototype.constructor = TodoApp; - function Todo(dataId, title, completed, editing) { - if (completed === void 0) - completed = false; - if (editing === void 0) - editing = false; - this.dataId = dataId; - this.title = title; - this.completed = completed; - this.editing = editing; - } - Todo.$metadata$ = { - kind: Kotlin.Kind.CLASS, - simpleName: 'Todo', - interfaces: [] - }; - function Selection(name, ordinal, title) { - Enum.call(this); - this.title = title; - this.name$ = name; - this.ordinal$ = ordinal; - } - function Selection_initFields() { - Selection_initFields = function () { - }; - Selection$ALL_instance = new Selection('ALL', 0, 'All'); - Selection$ACTIVE_instance = new Selection('ACTIVE', 1, 'Active'); - Selection$COMPLETED_instance = new Selection('COMPLETED', 2, 'Completed'); - } - var Selection$ALL_instance; - function Selection$ALL_getInstance() { - Selection_initFields(); - return Selection$ALL_instance; - } - var Selection$ACTIVE_instance; - function Selection$ACTIVE_getInstance() { - Selection_initFields(); - return Selection$ACTIVE_instance; - } - var Selection$COMPLETED_instance; - function Selection$COMPLETED_getInstance() { - Selection_initFields(); - return Selection$COMPLETED_instance; - } - Selection.$metadata$ = { - kind: Kotlin.Kind.CLASS, - simpleName: 'Selection', - interfaces: [Enum] - }; - function Selection$values() { - return [Selection$ALL_getInstance(), Selection$ACTIVE_getInstance(), Selection$COMPLETED_getInstance()]; - } - Selection.values = Selection$values; - function Selection$valueOf(name) { - switch (name) { - case 'ALL': - return Selection$ALL_getInstance(); - case 'ACTIVE': - return Selection$ACTIVE_getInstance(); - case 'COMPLETED': - return Selection$COMPLETED_getInstance(); - default:Kotlin.throwISE('No enum constant nl.astraeus.komp.todo.Selection.' + name); - } - } - Selection.valueOf_61zpoe$ = Selection$valueOf; - function TodoApp() { - Komponent.call(this); - this.todoList = ArrayList_init_0(); - this.selected = Selection$ALL_getInstance(); - } - TodoApp.prototype.addTodo_9ojx7i$ = function (e) { - var target = e.target; - if (Kotlin.isType(target, HTMLInputElement)) { - this.todoList.add_11rb$(new Todo((new Date()).getTime().toString(), target.value)); - this.refresh(); - } - }; - TodoApp.prototype.editTodo_y98rgd$ = function (e, todo) { - var target = e.target; - if (Kotlin.isType(target, HTMLInputElement)) { - todo.title = target.value; - todo.editing = false; - this.refresh(); - } - }; - TodoApp.prototype.destroyTodo_bcvlxp$ = function (todo) { - this.todoList.remove_11rb$(todo); - this.refresh(); - }; - TodoApp.prototype.selectSelection_uh5ef5$ = function (selection) { - this.selected = selection; - this.refresh(); - }; - TodoApp.prototype.clearCompleted = function () { - var tmp$; - tmp$ = ArrayList_init(this.todoList).iterator(); - while (tmp$.hasNext()) { - var todo = tmp$.next(); - if (todo.completed) { - this.todoList.remove_11rb$(todo); - } - } - this.refresh(); - }; - TodoApp.prototype.todoClicked_bcvlxp$ = function (todo) { - todo.completed = !todo.completed; - this.refresh(); - }; - TodoApp.prototype.getItemsLeft = function () { - var tmp$; - var result = 0; - tmp$ = this.todoList.iterator(); - while (tmp$.hasNext()) { - var todo = tmp$.next(); - if (!todo.completed) { - result = result + 1 | 0; - } - } - return result; - }; - TodoApp.prototype.setEditing_bcvlxp$ = function (editTodo) { - var tmp$; - tmp$ = this.todoList.iterator(); - while (tmp$.hasNext()) { - var todo = tmp$.next(); - todo.editing = Kotlin.equals(todo, editTodo); - } - this.refresh(); - }; - TodoApp.prototype.refresh = function () { - Komponent.prototype.refresh.call(this); - var inputBox = document.getElementById('todo_input'); - if (Kotlin.isType(inputBox, HTMLInputElement)) { - inputBox.focus(); - } - }; - function TodoApp$render$lambda$lambda$lambda($receiver) { - $receiver.unaryPlus_pdl1vz$('todos'); - } - function TodoApp$render$lambda$lambda$lambda$lambda(this$TodoApp) { - return function (e) { - if (Kotlin.isType(e, KeyboardEvent) && e.keyCode === 13) { - this$TodoApp.addTodo_9ojx7i$(e); - var target = e.target; - if (Kotlin.isType(target, HTMLInputElement)) { - target.value = ''; - target.defaultValue = ''; - } - } - }; - } - function TodoApp$render$lambda$lambda$lambda_0(this$TodoApp) { - return function ($receiver) { - set_id($receiver, 'todo_input'); - $receiver.placeholder = 'What needs to be done?'; - $receiver.autoFocus = true; - set_onKeyPressFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda(this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda(this$TodoApp) { - return function ($receiver) { - h1($receiver, void 0, TodoApp$render$lambda$lambda$lambda); - input($receiver, void 0, void 0, void 0, void 0, 'new-todo', TodoApp$render$lambda$lambda$lambda_0(this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda_1($receiver) { - $receiver.type = InputType.checkBox; - } - function TodoApp$render$lambda$lambda$lambda_2($receiver) { - $receiver.for_ = 'toggle-all'; - $receiver.unaryPlus_pdl1vz$('Mark all as complete'); - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda(closure$todo, this$TodoApp) { - return function (e) { - if (Kotlin.isType(e, KeyboardEvent) && e.keyCode === 13) { - this$TodoApp.editTodo_y98rgd$(e, closure$todo); - } - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda(closure$todo, this$TodoApp) { - return function ($receiver) { - $receiver.value = closure$todo.title; - set_onKeyPressFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda(closure$todo, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda$lambda(closure$todo, this$TodoApp) { - return function (it) { - this$TodoApp.todoClicked_bcvlxp$(closure$todo); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp) { - return function ($receiver) { - $receiver.type = InputType.checkBox; - $receiver.checked = closure$todo.completed; - set_onClickFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda$lambda(closure$todo, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp) { - return function (it) { - this$TodoApp.setEditing_bcvlxp$(closure$todo); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_1(closure$todo, this$TodoApp) { - return function ($receiver) { - $receiver.unaryPlus_pdl1vz$(closure$todo.title); - set_onDoubleClickFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda$lambda_1(closure$todo, this$TodoApp) { - return function (it) { - this$TodoApp.destroyTodo_bcvlxp$(closure$todo); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_2(closure$todo, this$TodoApp) { - return function ($receiver) { - set_onClickFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda$lambda_1(closure$todo, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp) { - return function ($receiver) { - input($receiver, void 0, void 0, void 0, void 0, 'toggle', TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp)); - label($receiver, 'todo-content', TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_1(closure$todo, this$TodoApp)); - button($receiver, void 0, void 0, void 0, 'destroy', TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_2(closure$todo, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp) { - return function ($receiver) { - if (closure$todo.editing) { - set_classes($receiver, plus(get_classes($receiver), 'editing')); - input($receiver, void 0, void 0, void 0, void 0, 'edit', TodoApp$render$lambda$lambda$lambda$lambda$lambda(closure$todo, this$TodoApp)); - } - else { - if (closure$todo.completed) { - set_classes($receiver, plus(get_classes($receiver), 'completed')); - } - var $receiver_0 = $receiver.attributes; - var value = closure$todo.dataId; - $receiver_0.put_xwzc9p$('data-id', value); - div($receiver, 'view', TodoApp$render$lambda$lambda$lambda$lambda$lambda_0(closure$todo, this$TodoApp)); - } - }; - } - function TodoApp$render$lambda$lambda$lambda_3(this$TodoApp) { - return function ($receiver) { - var tmp$; - tmp$ = this$TodoApp.todoList.iterator(); - while (tmp$.hasNext()) { - var todo = tmp$.next(); - if (this$TodoApp.selected === Selection$ALL_getInstance() || (todo.completed && this$TodoApp.selected === Selection$COMPLETED_getInstance()) || (!todo.completed && this$TodoApp.selected === Selection$ACTIVE_getInstance())) { - li($receiver, void 0, TodoApp$render$lambda$lambda$lambda$lambda_0(todo, this$TodoApp)); - } - } - }; - } - function TodoApp$render$lambda$lambda_0(this$TodoApp) { - return function ($receiver) { - input($receiver, void 0, void 0, void 0, void 0, 'toggle-all', TodoApp$render$lambda$lambda$lambda_1); - label($receiver, void 0, TodoApp$render$lambda$lambda$lambda_2); - ul($receiver, 'todo-list', TodoApp$render$lambda$lambda$lambda_3(this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda_1(this$TodoApp) { - return function ($receiver) { - $receiver.unaryPlus_pdl1vz$(this$TodoApp.getItemsLeft().toString()); - }; - } - function TodoApp$render$lambda$lambda$lambda_4(this$TodoApp) { - return function ($receiver) { - strong($receiver, void 0, TodoApp$render$lambda$lambda$lambda$lambda_1(this$TodoApp)); - $receiver.unaryPlus_pdl1vz$(' item left'); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_3(closure$selection, this$TodoApp) { - return function (it) { - this$TodoApp.selectSelection_uh5ef5$(closure$selection); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda$lambda_1(closure$selection, this$TodoApp) { - return function ($receiver) { - if (closure$selection === this$TodoApp.selected) { - set_classes($receiver, plus(get_classes($receiver), 'selected')); - } - $receiver.href = '#'; - $receiver.unaryPlus_pdl1vz$(closure$selection.title); - set_onClickFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda$lambda$lambda_3(closure$selection, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda_2(closure$selection, this$TodoApp) { - return function ($receiver) { - a($receiver, void 0, void 0, void 0, TodoApp$render$lambda$lambda$lambda$lambda$lambda_1(closure$selection, this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda$lambda_5(this$TodoApp) { - return function ($receiver) { - var tmp$, tmp$_0; - tmp$ = Selection$values(); - for (tmp$_0 = 0; tmp$_0 !== tmp$.length; ++tmp$_0) { - var selection = tmp$[tmp$_0]; - li($receiver, void 0, TodoApp$render$lambda$lambda$lambda$lambda_2(selection, this$TodoApp)); - } - }; - } - function TodoApp$render$lambda$lambda$lambda$lambda_3(this$TodoApp) { - return function (it) { - this$TodoApp.clearCompleted(); - }; - } - function TodoApp$render$lambda$lambda$lambda_6(this$TodoApp) { - return function ($receiver) { - $receiver.unaryPlus_pdl1vz$('Clear completed'); - set_onClickFunction($receiver, TodoApp$render$lambda$lambda$lambda$lambda_3(this$TodoApp)); - }; - } - function TodoApp$render$lambda$lambda_1(this$TodoApp) { - return function ($receiver) { - span($receiver, 'todo-count', TodoApp$render$lambda$lambda$lambda_4(this$TodoApp)); - ul($receiver, 'filters', TodoApp$render$lambda$lambda$lambda_5(this$TodoApp)); - button($receiver, void 0, void 0, void 0, 'clear-completed', TodoApp$render$lambda$lambda$lambda_6(this$TodoApp)); - }; - } - function TodoApp$render$lambda(this$TodoApp) { - return function ($receiver) { - header($receiver, 'header', TodoApp$render$lambda$lambda(this$TodoApp)); - section($receiver, 'main', TodoApp$render$lambda$lambda_0(this$TodoApp)); - footer($receiver, 'footer', TodoApp$render$lambda$lambda_1(this$TodoApp)); - }; - } - TodoApp.prototype.render_q0cphf$ = function (consumer) { - return section_0(consumer, 'todoapp', TodoApp$render$lambda(this)); - }; - TodoApp.$metadata$ = { - kind: Kotlin.Kind.CLASS, - simpleName: 'TodoApp', - interfaces: [Komponent] - }; - function main$lambda$lambda$lambda$lambda($receiver) { - $receiver.unaryPlus_pdl1vz$('Test'); - } - function main$lambda$lambda$lambda($receiver) { - set_id($receiver, 'id1'); - span($receiver, void 0, main$lambda$lambda$lambda$lambda); - } - function main$lambda$lambda($receiver) { - div($receiver, void 0, main$lambda$lambda$lambda); - } - function main$lambda($receiver) { - div($receiver, void 0, main$lambda$lambda); - } - function main$lambda$lambda$lambda_0($receiver) { - $receiver.unaryPlus_pdl1vz$('Test'); - } - function main$lambda$lambda$lambda_1($receiver) { - $receiver.name = 'bla'; - } - function main$lambda$lambda_0($receiver) { - set_id($receiver, 'id1'); - span($receiver, void 0, main$lambda$lambda$lambda_0); - input($receiver, void 0, void 0, void 0, void 0, void 0, main$lambda$lambda$lambda_1); - } - function main$lambda_0($receiver) { - div($receiver, void 0, main$lambda$lambda_0); - } - function main(args) { - var tmp$; - Komponent.Companion.create_nkol39$((tmp$ = document.body) != null ? tmp$ : Kotlin.throwNPE(), new TodoApp(), true); - var el1 = div_0(get_create(document), void 0, main$lambda); - var el2 = div_0(get_create(document), void 0, main$lambda_0); - console.log('OLD', el1); - console.log('NEW', el2); - komp.DomDiffer.replaceDiff_26ucz2$(el2, el1); - console.log('OLD', el1); - console.log('NEW', el2); - } - var package$nl = _.nl || (_.nl = {}); - var package$astraeus = package$nl.astraeus || (package$nl.astraeus = {}); - var package$komp = package$astraeus.komp || (package$astraeus.komp = {}); - var package$todo = package$komp.todo || (package$komp.todo = {}); - package$todo.Todo = Todo; - Object.defineProperty(Selection, 'ALL', { - get: Selection$ALL_getInstance - }); - Object.defineProperty(Selection, 'ACTIVE', { - get: Selection$ACTIVE_getInstance - }); - Object.defineProperty(Selection, 'COMPLETED', { - get: Selection$COMPLETED_getInstance - }); - package$todo.Selection = Selection; - package$todo.TodoApp = TodoApp; - package$todo.main_kand9s$ = main; - main([]); - Kotlin.defineModule('komp-todo', _); - return _; -}(typeof this['komp-todo'] === 'undefined' ? {} : this['komp-todo'], kotlin, komp, this['kotlinx-html-js']); - -//# sourceMappingURL=komp-todo.js.map diff --git a/web/js/kotlin/komp-todo.js.map b/web/js/kotlin/komp-todo.js.map deleted file mode 100644 index ebdd6d5..0000000 --- a/web/js/kotlin/komp-todo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"komp-todo.js","sources":["nl/astraeus/komp/todo/Todo.kt","collections/Maps.kt"],"sourcesContent":["package nl.astraeus.komp.todo\n\nimport kotlinx.html.*\nimport kotlinx.html.dom.create\nimport kotlinx.html.js.*\nimport nl.astraeus.komp.Komponent\nimport nl.astraeus.komp.DomDiffer\nimport org.w3c.dom.HTMLElement\nimport org.w3c.dom.HTMLInputElement\nimport org.w3c.dom.events.Event\nimport org.w3c.dom.events.KeyboardEvent\nimport kotlin.browser.document\nimport kotlin.js.Date\n\n/**\n * https://github.com/tastejs/todomvc/\n */\n\nclass Todo(\n val dataId: String,\n var title: String,\n var completed: Boolean = false,\n var editing: Boolean = false\n)\n\nenum class Selection(val title: String) {\n ALL(\"All\"),\n ACTIVE(\"Active\"),\n COMPLETED(\"Completed\")\n}\n\nclass TodoApp: Komponent() {\n val todoList: MutableList = ArrayList()\n var selected: Selection = Selection.ALL\n\n fun addTodo(e: Event) {\n val target = e.target\n\n if (target is HTMLInputElement) {\n todoList.add(Todo(\"${Date().getTime()}\", target.value))\n\n refresh()\n }\n }\n\n fun editTodo(e: Event, todo: Todo) {\n val target = e.target\n\n if (target is HTMLInputElement) {\n todo.title = target.value\n todo.editing = false\n\n refresh()\n }\n\n }\n\n fun destroyTodo(todo: Todo) {\n todoList.remove(todo)\n\n refresh()\n }\n\n fun selectSelection(selection: Selection) {\n selected = selection\n\n refresh()\n }\n\n fun clearCompleted() {\n for (todo in ArrayList(todoList)) {\n if (todo.completed) {\n todoList.remove(todo)\n }\n }\n\n refresh()\n }\n\n fun todoClicked(todo: Todo) {\n todo.completed = !todo.completed\n\n refresh()\n }\n\n fun getItemsLeft(): Int {\n var result = 0\n for (todo in todoList) {\n if (!todo.completed) {\n result++\n }\n }\n return result\n }\n\n fun setEditing(editTodo: Todo) {\n for (todo in todoList) {\n todo.editing = todo == editTodo\n }\n\n refresh()\n }\n\n override fun refresh() {\n super.refresh()\n\n val inputBox = document.getElementById(\"todo_input\")\n\n if (inputBox is HTMLInputElement) {\n inputBox.focus()\n }\n }\n\n override fun render(consumer: TagConsumer) = consumer.section(classes = \"todoapp\") {\n header(classes = \"header\") {\n h1 { + \"todos\" }\n input(classes = \"new-todo\") {\n id = \"todo_input\"\n placeholder = \"What needs to be done?\"\n autoFocus = true\n onKeyPressFunction = { e ->\n if (e is KeyboardEvent && e.keyCode == 13) {\n addTodo(e)\n\n val target = e.target\n\n if (target is HTMLInputElement) {\n target.value = \"\"\n target.defaultValue = \"\"\n }\n }\n }\n }\n }\n\n section(classes = \"main\") {\n input(classes = \"toggle-all\") {\n type = InputType.checkBox\n }\n label {\n for_ = \"toggle-all\"\n + \"Mark all as complete\"\n }\n ul(classes = \"todo-list\") {\n for (todo in todoList) {\n if (selected == Selection.ALL ||\n (todo.completed && selected == Selection.COMPLETED) ||\n (!todo.completed && selected == Selection.ACTIVE)) {\n li {\n if (todo.editing) {\n classes += \"editing\"\n input(classes = \"edit\") {\n value = todo.title\n onKeyPressFunction = { e ->\n if (e is KeyboardEvent && e.keyCode == 13) {\n editTodo(e, todo)\n }\n }\n }\n } else {\n if (todo.completed) {\n classes += \"completed\"\n }\n attributes[\"data-id\"] = todo.dataId\n div(classes = \"view\") {\n input(classes = \"toggle\") {\n type = InputType.checkBox\n checked = todo.completed\n onClickFunction = {\n todoClicked(todo)\n }\n }\n label(classes = \"todo-content\") {\n +todo.title\n\n onDoubleClickFunction = {\n setEditing(todo)\n }\n }\n button(classes = \"destroy\") {\n onClickFunction = {\n destroyTodo(todo)\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n footer(classes = \"footer\") {\n span(classes = \"todo-count\") {\n strong { + \"${getItemsLeft()}\" }\n + \" item left\"\n }\n ul(classes = \"filters\") {\n for (selection in Selection.values())\n li {\n a {\n if (selection == selected) { classes += \"selected\" }\n href = \"#\"\n + selection.title\n onClickFunction = {\n selectSelection(selection)\n }\n }\n }\n }\n button(classes = \"clear-completed\") {\n + \"Clear completed\"\n onClickFunction = {\n clearCompleted()\n }\n }\n }\n }\n\n}\n\nfun main(args: Array) {\n Komponent.create(document.body!!, TodoApp(), true)\n\n val el1 = document.create.div {\n div {\n div {\n id = \"id1\"\n span {\n +\"Test\"\n }\n }\n }\n }\n\n val el2 = document.create.div {\n div {\n id = \"id1\"\n span {\n +\"Test\"\n }\n input {\n name = \"bla\"\n }\n }\n }\n\n // println(\"equals ${DomDiffer.match(el1, el2)}\")\n\n console.log(\"OLD\", el1)\n console.log(\"NEW\", el2)\n\n DomDiffer.replaceDiff(el2, el1)\n\n console.log(\"OLD\", el1)\n console.log(\"NEW\", el2)\n}\n\n","@file:kotlin.jvm.JvmMultifileClass\n@file:kotlin.jvm.JvmName(\"MapsKt\")\n\npackage kotlin.collections\n\nprivate object EmptyMap : Map, Serializable {\n private const val serialVersionUID: Long = 8246714829545688274\n\n override fun equals(other: Any?): Boolean = other is Map<*,*> && other.isEmpty()\n override fun hashCode(): Int = 0\n override fun toString(): String = \"{}\"\n\n override val size: Int get() = 0\n override fun isEmpty(): Boolean = true\n\n override fun containsKey(key: Any?): Boolean = false\n override fun containsValue(value: Nothing): Boolean = false\n override fun get(key: Any?): Nothing? = null\n override val entries: Set> get() = EmptySet\n override val keys: Set get() = EmptySet\n override val values: Collection get() = EmptyList\n\n private fun readResolve(): Any = EmptyMap\n}\n\n/**\n * Returns an empty read-only map of specified type.\n *\n * The returned map is serializable (JVM).\n * @sample samples.collections.Maps.Instantiation.emptyReadOnlyMap\n */\npublic fun emptyMap(): Map = @Suppress(\"UNCHECKED_CAST\") (EmptyMap as Map)\n\n/**\n * Returns a new read-only map with the specified contents, given as a list of pairs\n * where the first value is the key and the second is the value.\n *\n * If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.\n *\n * Entries of the map are iterated in the order they were specified.\n *\n * The returned map is serializable (JVM).\n *\n * @sample samples.collections.Maps.Instantiation.mapFromPairs\n */\npublic fun mapOf(vararg pairs: Pair): Map = if (pairs.size > 0) pairs.toMap(LinkedHashMap(mapCapacity(pairs.size))) else emptyMap()\n\n/**\n * Returns an empty read-only map.\n *\n * The returned map is serializable (JVM).\n * @sample samples.collections.Maps.Instantiation.emptyReadOnlyMap\n */\n@kotlin.internal.InlineOnly\npublic inline fun mapOf(): Map = emptyMap()\n\n/* Not available on platform: JS */\n\n\n\n\n\n\n\n\n\n\n/**\n * Returns an empty new [MutableMap].\n *\n * The returned map preserves the entry iteration order.\n * @sample samples.collections.Maps.Instantiation.emptyMutableMap\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline fun mutableMapOf(): MutableMap = LinkedHashMap()\n\n/**\n * Returns a new [MutableMap] with the specified contents, given as a list of pairs\n * where the first component is the key and the second is the value.\n *\n * If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.\n *\n * Entries of the map are iterated in the order they were specified.\n *\n * @sample samples.collections.Maps.Instantiation.mutableMapFromPairs\n * @sample samples.collections.Maps.Instantiation.emptyMutableMap\n */\npublic fun mutableMapOf(vararg pairs: Pair): MutableMap\n = LinkedHashMap(mapCapacity(pairs.size)).apply { putAll(pairs) }\n\n/**\n * Returns an empty new [HashMap].\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline fun hashMapOf(): HashMap = HashMap()\n\n/**\n * Returns a new [HashMap] with the specified contents, given as a list of pairs\n * where the first component is the key and the second is the value.\n *\n * @sample samples.collections.Maps.Instantiation.hashMapFromPairs\n */\npublic fun hashMapOf(vararg pairs: Pair): HashMap\n = HashMap(mapCapacity(pairs.size)).apply { putAll(pairs) }\n\n/**\n * Returns an empty new [LinkedHashMap].\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline fun linkedMapOf(): LinkedHashMap = LinkedHashMap()\n\n/**\n * Returns a new [LinkedHashMap] with the specified contents, given as a list of pairs\n * where the first component is the key and the second is the value.\n *\n * If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.\n *\n * Entries of the map are iterated in the order they were specified.\n *\n * @sample samples.collections.Maps.Instantiation.linkedMapFromPairs\n */\npublic fun linkedMapOf(vararg pairs: Pair): LinkedHashMap\n = pairs.toMap(LinkedHashMap(mapCapacity(pairs.size)))\n\n/**\n * Calculate the initial capacity of a map, based on Guava's com.google.common.collect.Maps approach. This is equivalent\n * to the Collection constructor for HashSet, (c.size()/.75f) + 1, but provides further optimisations for very small or\n * very large sizes, allows support non-collection classes, and provides consistency for all map based class construction.\n */\n@PublishedApi\ninternal fun mapCapacity(expectedSize: Int): Int {\n if (expectedSize < 3) {\n return expectedSize + 1\n }\n if (expectedSize < INT_MAX_POWER_OF_TWO) {\n return expectedSize + expectedSize / 3\n }\n return Int.MAX_VALUE // any large value\n}\n\nprivate const val INT_MAX_POWER_OF_TWO: Int = Int.MAX_VALUE / 2 + 1\n\n/** Returns `true` if this map is not empty. */\n@kotlin.internal.InlineOnly\npublic inline fun Map.isNotEmpty(): Boolean = !isEmpty()\n\n/**\n * Returns the [Map] if its not `null`, or the empty [Map] otherwise.\n */\n@kotlin.internal.InlineOnly\npublic inline fun Map?.orEmpty() : Map = this ?: emptyMap()\n\n/**\n * Checks if the map contains the given key.\n *\n * This method allows to use the `x in map` syntax for checking whether an object is contained in the map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun <@kotlin.internal.OnlyInputTypes K, V> Map.contains(key: K) : Boolean = containsKey(key)\n\n/**\n * Returns the value corresponding to the given [key], or `null` if such a key is not present in the map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun <@kotlin.internal.OnlyInputTypes K, V> Map.get(key: K): V?\n = @Suppress(\"UNCHECKED_CAST\") (this as Map).get(key)\n\n/**\n * Allows to use the index operator for storing values in a mutable map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.set(key: K, value: V): Unit {\n put(key, value)\n}\n\n/**\n * Returns `true` if the map contains the specified [key].\n *\n * Allows to overcome type-safety restriction of `containsKey` that requires to pass a key of type `K`.\n */\n@kotlin.internal.InlineOnly\npublic inline fun <@kotlin.internal.OnlyInputTypes K> Map.containsKey(key: K): Boolean\n = @Suppress(\"UNCHECKED_CAST\") (this as Map).containsKey(key)\n\n/**\n * Returns `true` if the map maps one or more keys to the specified [value].\n *\n * Allows to overcome type-safety restriction of `containsValue` that requires to pass a value of type `V`.\n */\n@Suppress(\"EXTENSION_SHADOWED_BY_MEMBER\") // false warning, extension takes precedence in some cases\n@kotlin.internal.InlineOnly\npublic inline fun Map.containsValue(value: V): Boolean = this.containsValue(value)\n\n\n/**\n * Removes the specified key and its corresponding value from this map.\n *\n * @return the previous value associated with the key, or `null` if the key was not present in the map.\n\n * Allows to overcome type-safety restriction of `remove` that requires to pass a key of type `K`.\n */\n@kotlin.internal.InlineOnly\npublic inline fun <@kotlin.internal.OnlyInputTypes K, V> MutableMap.remove(key: K): V?\n = @Suppress(\"UNCHECKED_CAST\") (this as MutableMap).remove(key)\n\n/**\n * Returns the key component of the map entry.\n *\n * This method allows to use destructuring declarations when working with maps, for example:\n * ```\n * for ((key, value) in map) {\n * // do something with the key and the value\n * }\n * ```\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun Map.Entry.component1(): K = key\n\n/**\n * Returns the value component of the map entry.\n *\n * This method allows to use destructuring declarations when working with maps, for example:\n * ```\n * for ((key, value) in map) {\n * // do something with the key and the value\n * }\n * ```\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun Map.Entry.component2(): V = value\n\n/**\n * Converts entry to [Pair] with key being first component and value being second.\n */\n@kotlin.internal.InlineOnly\npublic inline fun Map.Entry.toPair(): Pair = Pair(key, value)\n\n/**\n * Returns the value for the given key, or the result of the [defaultValue] function if there was no entry for the given key.\n *\n * @sample samples.collections.Maps.Usage.getOrElse\n */\n@kotlin.internal.InlineOnly\npublic inline fun Map.getOrElse(key: K, defaultValue: () -> V): V = get(key) ?: defaultValue()\n\n\ninternal inline fun Map.getOrElseNullable(key: K, defaultValue: () -> V): V {\n val value = get(key)\n if (value == null && !containsKey(key)) {\n return defaultValue()\n } else {\n @Suppress(\"UNCHECKED_CAST\")\n return value as V\n }\n}\n\n/**\n * Returns the value for the given [key] or throws an exception if there is no such key in the map.\n *\n * If the map was created by [withDefault], resorts to its `defaultValue` provider function\n * instead of throwing an exception.\n *\n * @throws NoSuchElementException when the map doesn't contain a value for the specified key and\n * no implicit default value was provided for that map.\n */\n@SinceKotlin(\"1.1\")\npublic fun Map.getValue(key: K): V = getOrImplicitDefault(key)\n\n/**\n * Returns the value for the given key. If the key is not found in the map, calls the [defaultValue] function,\n * puts its result into the map under the given key and returns it.\n *\n * @sample samples.collections.Maps.Usage.getOrPut\n */\npublic inline fun MutableMap.getOrPut(key: K, defaultValue: () -> V): V {\n val value = get(key)\n return if (value == null) {\n val answer = defaultValue()\n put(key, answer)\n answer\n } else {\n value\n }\n}\n\n/**\n * Returns an [Iterator] over the entries in the [Map].\n *\n * @sample samples.collections.Maps.Usage.forOverEntries\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun Map.iterator(): Iterator> = entries.iterator()\n\n/* Not available on platform: JS */\n\n\n\n\n\n\n\n\n/**\n * Populates the given [destination] map with entries having the keys of this map and the values obtained\n * by applying the [transform] function to each entry in this [Map].\n */\npublic inline fun > Map.mapValuesTo(destination: M, transform: (Map.Entry) -> R): M {\n return entries.associateByTo(destination, { it.key }, transform)\n}\n\n/**\n * Populates the given [destination] map with entries having the keys obtained\n * by applying the [transform] function to each entry in this [Map] and the values of this map.\n *\n * In case if any two entries are mapped to the equal keys, the value of the latter one will overwrite\n * the value associated with the former one.\n */\npublic inline fun > Map.mapKeysTo(destination: M, transform: (Map.Entry) -> R): M {\n return entries.associateByTo(destination, transform, { it.value })\n}\n\n/**\n * Puts all the given [pairs] into this [MutableMap] with the first component in the pair being the key and the second the value.\n */\npublic fun MutableMap.putAll(pairs: Array>): Unit {\n for ((key, value) in pairs) {\n put(key, value)\n }\n}\n\n/**\n * Puts all the elements of the given collection into this [MutableMap] with the first component in the pair being the key and the second the value.\n */\npublic fun MutableMap.putAll(pairs: Iterable>): Unit {\n for ((key, value) in pairs) {\n put(key, value)\n }\n}\n\n/**\n * Puts all the elements of the given sequence into this [MutableMap] with the first component in the pair being the key and the second the value.\n */\npublic fun MutableMap.putAll(pairs: Sequence>): Unit {\n for ((key, value) in pairs) {\n put(key, value)\n }\n}\n\n/**\n * Returns a new map with entries having the keys of this map and the values obtained by applying the [transform]\n * function to each entry in this [Map].\n *\n * The returned map preserves the entry iteration order of the original map.\n *\n * @sample samples.collections.Maps.Transforms.mapValues\n */\npublic inline fun Map.mapValues(transform: (Map.Entry) -> R): Map {\n return mapValuesTo(LinkedHashMap(mapCapacity(size)), transform) // .optimizeReadOnlyMap()\n}\n\n/**\n * Returns a new Map with entries having the keys obtained by applying the [transform] function to each entry in this\n * [Map] and the values of this map.\n *\n * In case if any two entries are mapped to the equal keys, the value of the latter one will overwrite\n * the value associated with the former one.\n *\n * The returned map preserves the entry iteration order of the original map.\n *\n * @sample samples.collections.Maps.Transforms.mapKeys\n */\npublic inline fun Map.mapKeys(transform: (Map.Entry) -> R): Map {\n return mapKeysTo(LinkedHashMap(mapCapacity(size)), transform) // .optimizeReadOnlyMap()\n}\n\n/**\n * Returns a map containing all key-value pairs with keys matching the given [predicate].\n *\n * The returned map preserves the entry iteration order of the original map.\n */\npublic inline fun Map.filterKeys(predicate: (K) -> Boolean): Map {\n val result = LinkedHashMap()\n for (entry in this) {\n if (predicate(entry.key)) {\n result.put(entry.key, entry.value)\n }\n }\n return result\n}\n\n/**\n * Returns a map containing all key-value pairs with values matching the given [predicate].\n *\n * The returned map preserves the entry iteration order of the original map.\n */\npublic inline fun Map.filterValues(predicate: (V) -> Boolean): Map {\n val result = LinkedHashMap()\n for (entry in this) {\n if (predicate(entry.value)) {\n result.put(entry.key, entry.value)\n }\n }\n return result\n}\n\n\n/**\n * Appends all entries matching the given [predicate] into the mutable map given as [destination] parameter.\n *\n * @return the destination map.\n */\npublic inline fun > Map.filterTo(destination: M, predicate: (Map.Entry) -> Boolean): M {\n for (element in this) {\n if (predicate(element)) {\n destination.put(element.key, element.value)\n }\n }\n return destination\n}\n\n/**\n * Returns a new map containing all key-value pairs matching the given [predicate].\n *\n * The returned map preserves the entry iteration order of the original map.\n */\npublic inline fun Map.filter(predicate: (Map.Entry) -> Boolean): Map {\n return filterTo(LinkedHashMap(), predicate)\n}\n\n/**\n * Appends all entries not matching the given [predicate] into the given [destination].\n *\n * @return the destination map.\n */\npublic inline fun > Map.filterNotTo(destination: M, predicate: (Map.Entry) -> Boolean): M {\n for (element in this) {\n if (!predicate(element)) {\n destination.put(element.key, element.value)\n }\n }\n return destination\n}\n\n/**\n * Returns a new map containing all key-value pairs not matching the given [predicate].\n *\n * The returned map preserves the entry iteration order of the original map.\n */\npublic inline fun Map.filterNot(predicate: (Map.Entry) -> Boolean): Map {\n return filterNotTo(LinkedHashMap(), predicate)\n}\n\n/**\n * Returns a new map containing all key-value pairs from the given collection of pairs.\n *\n * The returned map preserves the entry iteration order of the original collection.\n */\npublic fun Iterable>.toMap(): Map {\n if (this is Collection) {\n return when (size) {\n 0 -> emptyMap()\n 1 -> mapOf(if (this is List) this[0] else iterator().next())\n else -> toMap(LinkedHashMap(mapCapacity(size)))\n }\n }\n return toMap(LinkedHashMap()).optimizeReadOnlyMap()\n}\n\n/**\n * Populates and returns the [destination] mutable map with key-value pairs from the given collection of pairs.\n */\npublic fun > Iterable>.toMap(destination: M): M\n = destination.apply { putAll(this@toMap) }\n\n/**\n * Returns a new map containing all key-value pairs from the given array of pairs.\n *\n * The returned map preserves the entry iteration order of the original array.\n */\npublic fun Array>.toMap(): Map = when(size) {\n 0 -> emptyMap()\n 1 -> mapOf(this[0])\n else -> toMap(LinkedHashMap(mapCapacity(size)))\n}\n\n/**\n * Populates and returns the [destination] mutable map with key-value pairs from the given array of pairs.\n */\npublic fun > Array>.toMap(destination: M): M\n = destination.apply { putAll(this@toMap) }\n\n/**\n * Returns a new map containing all key-value pairs from the given sequence of pairs.\n *\n * The returned map preserves the entry iteration order of the original sequence.\n */\npublic fun Sequence>.toMap(): Map = toMap(LinkedHashMap()).optimizeReadOnlyMap()\n\n/**\n * Populates and returns the [destination] mutable map with key-value pairs from the given sequence of pairs.\n */\npublic fun > Sequence>.toMap(destination: M): M\n = destination.apply { putAll(this@toMap) }\n\n/**\n * Returns a new read-only map containing all key-value pairs from the original map.\n *\n * The returned map preserves the entry iteration order of the original map.\n */\n@SinceKotlin(\"1.1\")\npublic fun Map.toMap(): Map = when (size) {\n 0 -> emptyMap()\n 1 -> toSingletonMap()\n else -> toMutableMap()\n}\n\n/**\n * Returns a new mutable map containing all key-value pairs from the original map.\n *\n * The returned map preserves the entry iteration order of the original map.\n */\n@SinceKotlin(\"1.1\")\npublic fun Map.toMutableMap(): MutableMap = LinkedHashMap(this)\n\n/**\n * Populates and returns the [destination] mutable map with key-value pairs from the given map.\n */\n@SinceKotlin(\"1.1\")\npublic fun > Map.toMap(destination: M): M\n = destination.apply { putAll(this@toMap) }\n\n/**\n * Creates a new read-only map by replacing or adding an entry to this map from a given key-value [pair].\n *\n * The returned map preserves the entry iteration order of the original map.\n * The [pair] is iterated in the end if it has a unique key.\n */\npublic operator fun Map.plus(pair: Pair): Map\n = if (this.isEmpty()) mapOf(pair) else LinkedHashMap(this).apply { put(pair.first, pair.second) }\n\n/**\n * Creates a new read-only map by replacing or adding entries to this map from a given collection of key-value [pairs].\n *\n * The returned map preserves the entry iteration order of the original map.\n * Those [pairs] with unique keys are iterated in the end in the order of [pairs] collection.\n */\npublic operator fun Map.plus(pairs: Iterable>): Map\n = if (this.isEmpty()) pairs.toMap() else LinkedHashMap(this).apply { putAll(pairs) }\n\n/**\n * Creates a new read-only map by replacing or adding entries to this map from a given array of key-value [pairs].\n *\n * The returned map preserves the entry iteration order of the original map.\n * Those [pairs] with unique keys are iterated in the end in the order of [pairs] array.\n */\npublic operator fun Map.plus(pairs: Array>): Map\n = if (this.isEmpty()) pairs.toMap() else LinkedHashMap(this).apply { putAll(pairs) }\n\n/**\n * Creates a new read-only map by replacing or adding entries to this map from a given sequence of key-value [pairs].\n *\n * The returned map preserves the entry iteration order of the original map.\n * Those [pairs] with unique keys are iterated in the end in the order of [pairs] sequence.\n */\npublic operator fun Map.plus(pairs: Sequence>): Map\n = LinkedHashMap(this).apply { putAll(pairs) }.optimizeReadOnlyMap()\n\n/**\n * Creates a new read-only map by replacing or adding entries to this map from another [map].\n *\n * The returned map preserves the entry iteration order of the original map.\n * Those entries of another [map] that are missing in this map are iterated in the end in the order of that [map].\n */\npublic operator fun Map.plus(map: Map): Map\n = LinkedHashMap(this).apply { putAll(map) }\n\n\n/**\n * Appends or replaces the given [pair] in this mutable map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.plusAssign(pair: Pair) {\n put(pair.first, pair.second)\n}\n\n/**\n * Appends or replaces all pairs from the given collection of [pairs] in this mutable map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.plusAssign(pairs: Iterable>) {\n putAll(pairs)\n}\n\n/**\n * Appends or replaces all pairs from the given array of [pairs] in this mutable map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.plusAssign(pairs: Array>) {\n putAll(pairs)\n}\n\n/**\n * Appends or replaces all pairs from the given sequence of [pairs] in this mutable map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.plusAssign(pairs: Sequence>) {\n putAll(pairs)\n}\n\n/**\n * Appends or replaces all entries from the given [map] in this mutable map.\n */\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.plusAssign(map: Map) {\n putAll(map)\n}\n\n/**\n * Returns a map containing all entries of the original map except the entry with the given [key].\n *\n * The returned map preserves the entry iteration order of the original map.\n */\n@SinceKotlin(\"1.1\")\npublic operator fun Map.minus(key: K): Map\n = this.toMutableMap().apply { minusAssign(key) }.optimizeReadOnlyMap()\n\n/**\n * Returns a map containing all entries of the original map except those entries\n * the keys of which are contained in the given [keys] collection.\n *\n * The returned map preserves the entry iteration order of the original map.\n */\n@SinceKotlin(\"1.1\")\npublic operator fun Map.minus(keys: Iterable): Map\n = this.toMutableMap().apply { minusAssign(keys) }.optimizeReadOnlyMap()\n\n/**\n * Returns a map containing all entries of the original map except those entries\n * the keys of which are contained in the given [keys] array.\n *\n * The returned map preserves the entry iteration order of the original map.\n */\n@SinceKotlin(\"1.1\")\npublic operator fun Map.minus(keys: Array): Map\n = this.toMutableMap().apply { minusAssign(keys) }.optimizeReadOnlyMap()\n\n/**\n * Returns a map containing all entries of the original map except those entries\n * the keys of which are contained in the given [keys] sequence.\n *\n * The returned map preserves the entry iteration order of the original map.\n */\n@SinceKotlin(\"1.1\")\npublic operator fun Map.minus(keys: Sequence): Map\n = this.toMutableMap().apply { minusAssign(keys) }.optimizeReadOnlyMap()\n\n/**\n * Removes the entry with the given [key] from this mutable map.\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.minusAssign(key: K) {\n remove(key)\n}\n\n/**\n * Removes all entries the keys of which are contained in the given [keys] collection from this mutable map.\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.minusAssign(keys: Iterable) {\n this.keys.removeAll(keys)\n}\n\n/**\n * Removes all entries the keys of which are contained in the given [keys] array from this mutable map.\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.minusAssign(keys: Array) {\n this.keys.removeAll(keys)\n}\n\n/**\n * Removes all entries from the keys of which are contained in the given [keys] sequence from this mutable map.\n */\n@SinceKotlin(\"1.1\")\n@kotlin.internal.InlineOnly\npublic inline operator fun MutableMap.minusAssign(keys: Sequence) {\n this.keys.removeAll(keys)\n}\n\n\n// do not expose for now @PublishedApi\ninternal fun Map.optimizeReadOnlyMap() = when (size) {\n 0 -> emptyMap()\n 1 -> toSingletonMapOrSelf()\n else -> this\n}\n\n/* Not available on platform: JS */\n\n\n\n\n/* Not available on platform: JS */\n\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqBE,yB;MAAA,YAAyB,K;IACzB,uB;MAAA,UAAuB,K;IAHvB,oB;IACA,kB;IACA,0B;IACA,sB;EAJQ,C;;;;;;;IAOV,e;IAAqB,kB;IAArB,iB;IAAA,uB;EAAoB,C;;IAApB,mC;IAAA,C;IACI,iDAAI,KAAJ,C;IACA,uDAAO,QAAP,C;IACA,6DAAU,WAAV,C;EAHJ,C;;;IACI,sB;IAAA,6B;EAAA,C;;;IACA,sB;IAAA,gC;EAA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SAAlB,EAA6B,2BAA7B,C;EAAT,C;;;;;;;IAoH1C,4BAAC,MAAD,C;EACJ,C;;IAHA,kBAAK,KAAL,C;IACA,wBAAK,gCAAL,C;EAGJ,C;;IALA,uBAAI,yBAAJ,C;EAMJ,C;;IAPA,uBAAI,kBAAJ,C;EAQJ,C;;IAMY,4BAAC,MAAD,C;EACJ,C;;IAEI,iBAAO,K;EACX,C;;IANA,kBAAK,KAAL,C;IACA,wBAAK,2BAAL,C;IAGA,yDAAM,2BAAN,C;EAGJ,C;;IARA,uBAAI,oBAAJ,C;EASJ,C;;IAvB0B,Q;IAA1B,mBAAU,gBAAO,CAAS,OAAT,QAAS,KAAT,oCAAP,EAAwB,aAAxB,EAAmC,IAAnC,C;IAEV,UAA0B,MAAP,WAAT,QAAS,CAAO,UAAI,WAAJ,C;IAW1B,UAA0B,MAAP,WAAT,QAAS,CAAO,UAAI,aAAJ,C;IAc1B,OAAQ,KAAI,KAAJ,EAAW,GAAX,C;IACR,OAAQ,KAAI,KAAJ,EAAW,GAAX,C;IAER,cAAU,qBAAY,GAAZ,EAAiB,GAAjB,C;IAEV,OAAQ,KAAI,KAAJ,EAAW,GAAX,C;IACR,OAAQ,KAAI,KAAJ,EAAW,GAAX,C;EACZ,C;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/web/js/kotlin/komp-todo.meta.js b/web/js/kotlin/komp-todo.meta.js deleted file mode 100644 index 9493dee..0000000 --- a/web/js/kotlin/komp-todo.meta.js +++ /dev/null @@ -1 +0,0 @@ -// Kotlin.kotlin_module_metadata(65537, "komp-todo", "H4sIAAAAAAAAAIVX3VLbRhS2JVmWj4y9CAxGkCZ1yC8hcUibTnvRGUM9E6iZZgjt5FbIi5GRJXe15ucF8gC9yps0V73oRa/7Ru1ZWZZtjZCZQWe1+53/s+fIOaMGOSNnlj9r/03+8n9oOaMBZVAvfe46Hkj9wACQSA4ULUfypvxZCzFNWAXJc0GzAs4sOgpAufQHQ4NMsfjME0lwSIL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