Komponent 0.0.4 with minimize
This commit is contained in:
@@ -11,7 +11,7 @@ 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 HtmlComponent = $module$komp.nl.astraeus.komp.HtmlComponent;
|
||||
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$;
|
||||
@@ -35,10 +35,9 @@ this['komp-todo'] = function (_, Kotlin, $module$komp, $module$kotlinx_html_js)
|
||||
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 komp_0 = $module$komp.nl.astraeus.komp;
|
||||
Selection.prototype = Object.create(Enum.prototype);
|
||||
Selection.prototype.constructor = Selection;
|
||||
TodoApp.prototype = Object.create(HtmlComponent.prototype);
|
||||
TodoApp.prototype = Object.create(Komponent.prototype);
|
||||
TodoApp.prototype.constructor = TodoApp;
|
||||
function Todo(dataId, title, completed, editing) {
|
||||
if (completed === void 0)
|
||||
@@ -105,7 +104,7 @@ this['komp-todo'] = function (_, Kotlin, $module$komp, $module$kotlinx_html_js)
|
||||
}
|
||||
Selection.valueOf_61zpoe$ = Selection$valueOf;
|
||||
function TodoApp() {
|
||||
HtmlComponent.call(this);
|
||||
Komponent.call(this);
|
||||
this.todoList = ArrayList_init_0();
|
||||
this.selected = Selection$ALL_getInstance();
|
||||
}
|
||||
@@ -169,7 +168,7 @@ this['komp-todo'] = function (_, Kotlin, $module$komp, $module$kotlinx_html_js)
|
||||
this.refresh();
|
||||
};
|
||||
TodoApp.prototype.refresh = function () {
|
||||
HtmlComponent.prototype.refresh.call(this);
|
||||
Komponent.prototype.refresh.call(this);
|
||||
var inputBox = document.getElementById('todo_input');
|
||||
if (Kotlin.isType(inputBox, HTMLInputElement)) {
|
||||
inputBox.focus();
|
||||
@@ -367,11 +366,11 @@ this['komp-todo'] = function (_, Kotlin, $module$komp, $module$kotlinx_html_js)
|
||||
TodoApp.$metadata$ = {
|
||||
kind: Kotlin.Kind.CLASS,
|
||||
simpleName: 'TodoApp',
|
||||
interfaces: [HtmlComponent]
|
||||
interfaces: [Komponent]
|
||||
};
|
||||
function main(args) {
|
||||
var tmp$;
|
||||
komp_0.Komp.create_og2ns8$((tmp$ = document.body) != null ? tmp$ : Kotlin.throwNPE(), new TodoApp(), true);
|
||||
Komponent.Companion.create_nkol39$((tmp$ = document.body) != null ? tmp$ : Kotlin.throwNPE(), new TodoApp(), true);
|
||||
}
|
||||
var package$nl = _.nl || (_.nl = {});
|
||||
var package$astraeus = package$nl.astraeus || (package$nl.astraeus = {});
|
||||
@@ -390,9 +389,9 @@ this['komp-todo'] = function (_, Kotlin, $module$komp, $module$kotlinx_html_js)
|
||||
package$todo.Selection = Selection;
|
||||
package$todo.TodoApp = TodoApp;
|
||||
package$todo.main_kand9s$ = main;
|
||||
Kotlin.defineModule('komp-todo', _);
|
||||
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
|
||||
//# sourceMappingURL=komp-todo.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
// Kotlin.kotlin_module_metadata(1, "komp-todo", "H4sIAAAAAAAAAI1XSVPjRhSWJVmWnrdGbEbMhAyzLzCOJ5XKpJIDeFwFlKkkQFJzF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EsNxa3W8ZYw4cSnM+CtfLaHo8n7uqESqkYcqqSHdPFLJffGO+1/H+zJS82iD1Kdxyb5KHiCtHunkoTh/t4HIR7jawpg9iWO21biD+yXyIpawi1TB95fxez2SVCKvpjWiyesCJ6wvkkosymysfhFTSsL/x76HarqyNPzCDTFbl7XeWtxKalGnqZXj+tgV5bHbC/8HWmK8ePANAAA=");
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
if (typeof kotlin === 'undefined') {
|
||||
throw new Error("Error loading module 'komp'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'komp'.");
|
||||
}
|
||||
if (typeof this['kotlinx-html-js'] === 'undefined') {
|
||||
throw new Error("Error loading module 'komp'. Its dependency 'kotlinx-html-js' was not found. Please, check whether 'kotlinx-html-js' is loaded prior to 'komp'.");
|
||||
}
|
||||
var komp = function (_, Kotlin, $module$kotlinx_html_js) {
|
||||
'use strict';
|
||||
var TagConsumer = $module$kotlinx_html_js.kotlinx.html.TagConsumer;
|
||||
var get_create = $module$kotlinx_html_js.kotlinx.html.dom.get_create_4wc2mh$;
|
||||
var HashMap_init = Kotlin.kotlin.collections.HashMap_init_q3lmfv$;
|
||||
function include($receiver, component) {
|
||||
var tmp$;
|
||||
var result = component.render_q0cphf$(Kotlin.isType(tmp$ = $receiver.consumer, TagConsumer) ? tmp$ : Kotlin.throwCCE());
|
||||
component.element = result;
|
||||
Komp_getInstance().define_eho435$(result, component);
|
||||
}
|
||||
function HtmlComponent() {
|
||||
this.element = null;
|
||||
}
|
||||
HtmlComponent.prototype.create = function () {
|
||||
var elem = this.element;
|
||||
if (elem != null) {
|
||||
Komp_getInstance().remove_lt8gi4$(elem);
|
||||
}
|
||||
elem = this.render_q0cphf$(get_create(document));
|
||||
Komp_getInstance().define_eho435$(elem, this);
|
||||
this.element = elem;
|
||||
return elem;
|
||||
};
|
||||
HtmlComponent.prototype.refresh = function () {
|
||||
Komp_getInstance().refresh_y4uc7f$(this.element);
|
||||
};
|
||||
HtmlComponent.$metadata$ = {
|
||||
kind: Kotlin.Kind.CLASS,
|
||||
simpleName: 'HtmlComponent',
|
||||
interfaces: []
|
||||
};
|
||||
function Komp() {
|
||||
Komp_instance = this;
|
||||
this.elements_0 = HashMap_init();
|
||||
}
|
||||
Komp.prototype.define_eho435$ = function (element, component) {
|
||||
this.elements_0.put_xwzc9p$(element, component);
|
||||
};
|
||||
Komp.prototype.create_og2ns8$ = function (parent, component, insertAsFirst) {
|
||||
if (insertAsFirst === void 0)
|
||||
insertAsFirst = false;
|
||||
var element = component.create();
|
||||
if (insertAsFirst && parent.childElementCount > 0) {
|
||||
parent.insertBefore(element, parent.firstChild);
|
||||
}
|
||||
else {
|
||||
parent.appendChild(element);
|
||||
}
|
||||
this.elements_0.put_xwzc9p$(element, component);
|
||||
};
|
||||
Komp.prototype.remove_lt8gi4$ = function (element) {
|
||||
this.elements_0.remove_11rb$(element);
|
||||
};
|
||||
Komp.prototype.remove = function (component) {
|
||||
var tmp$_0;
|
||||
tmp$_0 = this.elements_0.entries.iterator();
|
||||
while (tmp$_0.hasNext()) {
|
||||
var tmp$ = tmp$_0.next();
|
||||
var key = tmp$.key;
|
||||
var value = tmp$.value;
|
||||
if (Kotlin.equals(value, component)) {
|
||||
this.elements_0.remove_11rb$(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
Komp.prototype.refresh_ap2bc9$ = function (component) {
|
||||
this.refresh_y4uc7f$(component.element);
|
||||
};
|
||||
Komp.prototype.refresh_y4uc7f$ = function (element) {
|
||||
if (element != null) {
|
||||
var comp = this.elements_0.get_11rb$(element);
|
||||
if (Kotlin.isType(element, HTMLElement) && comp != null) {
|
||||
var parent = element.parentElement;
|
||||
var newElement = comp.create();
|
||||
parent != null ? parent.replaceChild(newElement, element) : null;
|
||||
}
|
||||
}
|
||||
};
|
||||
Komp.$metadata$ = {
|
||||
kind: Kotlin.Kind.OBJECT,
|
||||
simpleName: 'Komp',
|
||||
interfaces: []
|
||||
};
|
||||
var Komp_instance = null;
|
||||
function Komp_getInstance() {
|
||||
if (Komp_instance === null) {
|
||||
new Komp();
|
||||
}
|
||||
return Komp_instance;
|
||||
}
|
||||
var package$nl = _.nl || (_.nl = {});
|
||||
var package$astraeus = package$nl.astraeus || (package$nl.astraeus = {});
|
||||
var package$komp = package$astraeus.komp || (package$astraeus.komp = {});
|
||||
package$komp.include_dqcce7$ = include;
|
||||
package$komp.HtmlComponent = HtmlComponent;
|
||||
Object.defineProperty(package$komp, 'Komp', {
|
||||
get: Komp_getInstance
|
||||
});
|
||||
Kotlin.defineModule('komp', _);
|
||||
return _;
|
||||
}(typeof komp === 'undefined' ? {} : komp, kotlin, this['kotlinx-html-js']);
|
||||
|
||||
//@ sourceMappingURL=komp.js.map
|
||||
@@ -1 +0,0 @@
|
||||
// Kotlin.kotlin_module_metadata(1, "komp", "H4sIAAAAAAAAAI1WS3PjRBCWJVkatR+ZKC+vkiW7oQjLQhZXlqJYCg7ZDVQwhKp9QO1VUSa2HHlkRnKSvXLgwHFPOfErOPgXcOcXQY9iy7YSWdZBNZru6a+7p/trKfZDUGzFaVyT/8ZPaWhN1u+JYn8EVTDOwzjwOajdyAZQqQI6UWjJMa4J6idq/5bhLxVUHgBxo1i4bBCBfh72+lA7invBC1yFnPE4taUd8HdgsoD15K4WijZol0890E7DHlSO3hz/9N1IZniCuTEDU7AzwaIO6L9wH7cF46dMAPFCHg16uDJvTF+B3kFIqLxx2y/GMv1H6QsZ4UVQ8cIgYF7sowLA8SB2TwJ27PbB6LtColpe6nLN5xET8UH0vS+iGMznYRgwl4Nxys58zqQnvfCCyfSA0Yp+dnsMdC7fps+9YHDKQDv84Vf7z9Ikd/guURUMolKtoeC+jmudlpO1iVKDEnyb1MJ9QgH3pbyWyClKKnQZd6rUTiQqXWlIyzpdw68luj7Sd0a79/HLph8ku1X6sKE49501+sBRm/BYba7uG7SBa21IlGuiDi1155DsNrR9tVl+rrQMWkGh1SK0Kg8crbfWaV3u7FfpkkNs3cZ1s3a0+6pCDUdvlJrW2z/qaGvn7xL5R23UEzsqUVsPEkuAcBvJ+RHsPsEA7uFqGS1vjjSMaY1W/QY7/aajbzJGbG3TrWmNI/M9qZIVm5BtWyfk0Raa2Jo2/WqNrjr1G+eTt9akb3/XhwTrWQcFO+NzWE/Ltcqu+kz4snjcIK8J9mA1PQAu52HsygLLU9+F2qQdsOzz9D6GeqqnxyyK8xS/hI2pTqqgw2eh6LncYzbNlp48J296DDDTunkAT2BpulWvOmK+4QPYmSTEC0U4iLFhokw255r4EGACmedXE5an/Cqf+QGLikNOTpjnHRHyMDfkTPKvcpO/BVbKQLYudaRUGVpKSqPd3wZMvAN14OcneC1Fq0gGcoUfIUXl6X8F97K0R3zeRWILC67mGTjZk9aYSQty981MmSWEbbALSav2+i2G0yXDydPa0NLk6Q3QZbHdTtFjvMRx7OaJCC+RdPPifoadlnFBG4hgEfxPgKYwhnB5m+Vmdx9WplDMy1CcFyZnE8j4om+HKK9rYrCGBOGf+V5CEgVm7wo4umgvEvAXUzUlZ6gce8konwuYqcR0WObl6lOwU30swZgJnk+UMrGZ4lvAoaVMBubrN6Cc6Of04viXxg8XYvMJeeWpv4YnxVwHgKkR+D/hews1y1P0IZOo4siTErw5dDt47Hoov5R/ULdlWRplsdeZDzUzwroXuSNMTqZMHAbOGuYWhHJX2XvRQqmbub6+CPESYj//+r6GzayH4MZ4VyeDuGiYHML2nR021QgLOPwIC3zWgzxfP8P2GeNZEUOywRGfG5ns/5lRB+VLdtIumLszbDyKaR5CJne63+sXIMg2TPwqdweyHHOMfwuNbAmYOBYjny/Cfs4oBmdp5N+edG+vG/0PIllWXv0MAAA=");
|
||||
33606
web/js/kotlin/kotlin.js
33606
web/js/kotlin/kotlin.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user