Initial commit
This commit is contained in:
10
web/js/kotlin/komp-todo.js
Normal file
10
web/js/kotlin/komp-todo.js
Normal file
@@ -0,0 +1,10 @@
|
||||
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'.");
|
||||
}
|
||||
this['komp-todo'] = function (_, Kotlin) {
|
||||
'use strict';
|
||||
Kotlin.defineModule('komp-todo', _);
|
||||
return _;
|
||||
}(typeof this['komp-todo'] === 'undefined' ? {} : this['komp-todo'], kotlin);
|
||||
|
||||
//@ sourceMappingURL=komp-todo.js.map
|
||||
1
web/js/kotlin/komp-todo.js.map
Normal file
1
web/js/kotlin/komp-todo.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"komp-todo.js","sources":[],"names":[],"mappings":";;;;;;;;"}
|
||||
1
web/js/kotlin/komp-todo.meta.js
Normal file
1
web/js/kotlin/komp-todo.meta.js
Normal file
@@ -0,0 +1 @@
|
||||
// Kotlin.kotlin_module_metadata(1, "komp-todo", "H4sIAAAAAAAAAI1WbW7TQBB1bedr2tJgoC0pEqKIbyiIIkQRCCFxAYQ4gOtukk3s3bC7bsI1+NWj5HYwaxon3mRt54cVyTPzZt68mbETPAAncHqHV+2/i9/WvLP8/6ftBI9gB5pjrmLKwB3JAMDtOuC3ne5Wr3nVRvvM7BRug8tiaIdSiZCkEvwxTyZBd2mOz62uq53cecfVTq9hP4+9Q2YTImhCmApjG8orRFk4QMgYV6GinNnMH8Nubu5d8MRm9wRu5Ha+IlLZDN/DAXhcDMCbnkawjQn3uUhCFpHyQjVAgR0bwAnsrQB4s6EoD/wVjpeERFzwVFFGpMFmaYiHAEtIW15v4OZKXo0+jYmsLjnzaI2HgjNuLdkgf2Yl/x50MFhmOAt8baPfOvOOk+t09Csl4je4KbUTfCdH245QoaGgkjNrdh/gbg4K/lAl2ETKRiRSvKI1Z9AzPTsRIqUJERXcfSrITCsXmuQSeymDfdMPn27X097evONp7wPwtdjWKXqOTVzU3joXfCqJsNV9hpNmpOClIq6D/wy6OUxThGxArOy+hVsrKK0pF+NKco6gvWj0eom6XcuAu7ggaJ9G2ZKoCLupYHk5qFPwuxVNtQTpx6iObFeWAhpKjLUXLVHiCwhye5SgIoLZF6Um1hBfjYT2DAbK7Q+hkdlbZnFxMyivtc2Xy8tm/gNOqncdAFIjKJM0qjUs+m4ZRFVXnknwv9N68Tj10Pj+k1G1/s5co0RFw3KowgkbXVpPmL5MRh1NvDUkrChlk+wjWYu6QvsmgmMTFLW37yMcmRlCqLBX56mqOibf4P7GCVsZhBoJP0WBFzOw5foSx2eB15EElw2eeGtlev4Lpw4aU3I+qLi7hW18XVMZgsGdT5NJBYIewyyvxijVcrQE/4KHasOnGx5jfsHr8PoZDk0NtfCuSsrqrM/eNQn/AKPbfFOOCgAA");
|
||||
103
web/js/kotlin/komp.js
Normal file
103
web/js/kotlin/komp.js
Normal file
@@ -0,0 +1,103 @@
|
||||
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_eho435$ = function (parent, component) {
|
||||
var element = component.create();
|
||||
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
web/js/kotlin/komp.meta.js
Normal file
1
web/js/kotlin/komp.meta.js
Normal file
@@ -0,0 +1 @@
|
||||
// Kotlin.kotlin_module_metadata(1, "komp", "H4sIAAAAAAAAAI1W3XLbRBSWJVlaHf9tlCZxlZYM6RBKIcWTMgxl4KI/zIRAmKG0TG8VZW3LkSWzkpL0thd9gF7lBbjhCfwEvBacVWzZVrKWc6Hsz/nf73zHiv0pKLbitK/If9O/ytiarT8Sxf4M6mCcRUngh6AOYhtApQroRKEVx7giKJ+J/V2FDyqoYQDEjRPusjQG/SwajqBxmAyDF7iKQhYmuS3tWfgOTBawoTjVIt4D7eKJB9ppNITa4evjX3+a3BkeZ27CwOSsy1ncB/1N6OMxZ+Ep40C8KIzTIa7Ma9OXoPfRJdReu70X0zv9FxELmfiLoeZFQcC8xEcBgOM0cU8CduyOwBi5XHi1vFnIp6zrh0x4HEbnTJQBjKP4N3fIQA/F1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/H/ob0eB9EMAAA=");
|
||||
33606
web/js/kotlin/kotlin.js
Normal file
33606
web/js/kotlin/kotlin.js
Normal file
File diff suppressed because it is too large
Load Diff
1
web/js/kotlin/kotlin.meta.js
Normal file
1
web/js/kotlin/kotlin.meta.js
Normal file
File diff suppressed because one or more lines are too long
15794
web/js/kotlin/kotlinx-html-js.js
Normal file
15794
web/js/kotlin/kotlinx-html-js.js
Normal file
File diff suppressed because it is too large
Load Diff
1
web/js/kotlin/kotlinx-html-js.meta.js
Normal file
1
web/js/kotlin/kotlinx-html-js.meta.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user