diff --git a/build.gradle.kts b/build.gradle.kts index 0822fa2f..73b88aa5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,6 +17,9 @@ allprojects { repositories { maven("https://dl.bintray.com/pdvrieze/maven") maven("http://maven.jzy3d.org/releases") + maven("https://kotlin.bintray.com/js-externals") +// maven("https://dl.bintray.com/gbaldeck/kotlin") +// maven("https://dl.bintray.com/rjaros/kotlin") } group = "hep.dataforge" diff --git a/dataforge-vis-common/build.gradle.kts b/dataforge-vis-common/build.gradle.kts index 9306c687..669fd43f 100644 --- a/dataforge-vis-common/build.gradle.kts +++ b/dataforge-vis-common/build.gradle.kts @@ -10,6 +10,7 @@ scientifik{ } val dataforgeVersion: String by rootProject.extra +//val kvisionVersion: String by rootProject.extra("2.0.0-M1") kotlin { jvm{ @@ -31,9 +32,9 @@ kotlin { jsMain{ dependencies { api("hep.dataforge:dataforge-output-html:$dataforgeVersion") + api("kotlin.js.externals:kotlin-js-jquery:3.2.0-0") api(npm("text-encoding")) - api("org.jetbrains:kotlin-extensions:1.0.1-pre.83-kotlin-1.3.50") - api(npm("core-js")) + api(npm("bootstrap","4.3.1")) } } } diff --git a/dataforge-vis-common/src/commonMain/kotlin/hep/dataforge/vis/common/MutableVisualGroup.kt b/dataforge-vis-common/src/commonMain/kotlin/hep/dataforge/vis/common/MutableVisualGroup.kt index e2682817..1c99e6f6 100644 --- a/dataforge-vis-common/src/commonMain/kotlin/hep/dataforge/vis/common/MutableVisualGroup.kt +++ b/dataforge-vis-common/src/commonMain/kotlin/hep/dataforge/vis/common/MutableVisualGroup.kt @@ -52,6 +52,8 @@ interface VisualGroup : Provider, Iterable, VisualObject { } } +val VisualGroup.isEmpty: Boolean get() = this.children.isEmpty() + interface MutableVisualGroup : VisualGroup { /** diff --git a/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/vis/HMR.kt b/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/js/Application.kt similarity index 63% rename from dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/vis/HMR.kt rename to dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/js/Application.kt index 5353fb03..53734c31 100644 --- a/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/vis/HMR.kt +++ b/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/js/Application.kt @@ -1,14 +1,10 @@ -package hep.dataforge.vis +package hep.dataforge.js import kotlin.browser.document import kotlin.dom.hasClass external val module: Module -external interface Module { - val hot: Hot? -} - external interface Hot { val data: dynamic @@ -19,17 +15,31 @@ external interface Hot { fun dispose(callback: (data: dynamic) -> Unit) } -external fun require(name: String): dynamic - -abstract class ApplicationBase { - open val stateKeys: List get() = emptyList() - - abstract fun start(state: Map) - open fun dispose(): Map = emptyMap() +external interface Module { + val hot: Hot? } -fun startApplication(builder: () -> ApplicationBase) { - fun start(state: dynamic): ApplicationBase? { +/** + * Base interface for applications. + * + * Base interface for applications supporting Hot Module Replacement (HMR). + */ +interface Application { + /** + * Starting point for an application. + * @param state Initial state between Hot Module Replacement (HMR). + */ + fun start(state: Map) + + /** + * Ending point for an application. + * @return final state for Hot Module Replacement (HMR). + */ + fun dispose(): Map = emptyMap() +} + +fun startApplication(builder: () -> Application) { + fun start(state: dynamic): Application? { return if (document.body?.hasClass("testApp") == true) { val application = builder() @@ -42,7 +52,7 @@ fun startApplication(builder: () -> ApplicationBase) { } } - var application: ApplicationBase? = null + var application: Application? = null val state: dynamic = module.hot?.let { hot -> hot.accept() diff --git a/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/vis/jsExtra.kt b/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/js/jsExtra.kt similarity index 88% rename from dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/vis/jsExtra.kt rename to dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/js/jsExtra.kt index 56751272..ad94873d 100644 --- a/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/vis/jsExtra.kt +++ b/dataforge-vis-common/src/jsMain/kotlin/hep/dataforge/js/jsExtra.kt @@ -1,4 +1,6 @@ -package hep.dataforge.vis +package hep.dataforge.js + +external fun require(name: String): dynamic inline fun jsObject(builder: T.() -> Unit): T { val obj: T = js("({})") as T diff --git a/dataforge-vis-common/src/jsMain/resources/css/common.css b/dataforge-vis-common/src/jsMain/resources/css/common.css new file mode 100644 index 00000000..c5efcd40 --- /dev/null +++ b/dataforge-vis-common/src/jsMain/resources/css/common.css @@ -0,0 +1,23 @@ +/* Remove default bullets */ +ul, .objTree-subtree { + list-style-type: none; +} + +/* Style the caret/arrow */ +.objTree-caret { + cursor: pointer; + user-select: none; /* Prevent text selection */ +} + +/* Create the caret/arrow with a unicode, and style it */ +.objTree-caret::before { + content: "\25B6"; + color: black; + display: inline-block; + margin-right: 6px; +} + +/* Rotate the caret/arrow icon when clicked on (using JavaScript) */ +.objTree-caret-down::before { + transform: rotate(90deg); +} diff --git a/dataforge-vis-spatial-gdml/src/jsMain/kotlin/hep/dataforge/vis/spatial/gdml/demo/GDMLDemoApp.kt b/dataforge-vis-spatial-gdml/src/jsMain/kotlin/hep/dataforge/vis/spatial/gdml/demo/GDMLDemoApp.kt index cacc796b..0c1da7ed 100644 --- a/dataforge-vis-spatial-gdml/src/jsMain/kotlin/hep/dataforge/vis/spatial/gdml/demo/GDMLDemoApp.kt +++ b/dataforge-vis-spatial-gdml/src/jsMain/kotlin/hep/dataforge/vis/spatial/gdml/demo/GDMLDemoApp.kt @@ -1,7 +1,10 @@ package hep.dataforge.vis.spatial.gdml.demo import hep.dataforge.context.Global -import hep.dataforge.vis.ApplicationBase +import hep.dataforge.js.Application +import hep.dataforge.js.objectTree +import hep.dataforge.js.startApplication +import hep.dataforge.names.NameToken import hep.dataforge.vis.spatial.Material3D.Companion.OPACITY_KEY import hep.dataforge.vis.spatial.Visual3DPlugin import hep.dataforge.vis.spatial.VisualGroup3D @@ -9,13 +12,11 @@ import hep.dataforge.vis.spatial.VisualObject3D import hep.dataforge.vis.spatial.attachChildren import hep.dataforge.vis.spatial.editor.propertyEditor import hep.dataforge.vis.spatial.editor.threeOutputConfig -import hep.dataforge.vis.spatial.editor.visualObjectTree import hep.dataforge.vis.spatial.gdml.GDMLTransformer import hep.dataforge.vis.spatial.gdml.LUnit import hep.dataforge.vis.spatial.gdml.toVisual import hep.dataforge.vis.spatial.three.ThreePlugin import hep.dataforge.vis.spatial.three.output -import hep.dataforge.vis.startApplication import kotlinx.html.dom.append import kotlinx.html.js.p import org.w3c.dom.DragEvent @@ -29,7 +30,7 @@ import kotlin.browser.document import kotlin.browser.window import kotlin.dom.clear -private class GDMLDemoApp : ApplicationBase() { +private class GDMLDemoApp : Application { /** * Handle mouse drag according to https://www.html5rocks.com/en/tutorials/file/dndfiles/ */ @@ -46,7 +47,6 @@ private class GDMLDemoApp : ApplicationBase() { event.stopPropagation() event.preventDefault() - val file = (event.dataTransfer?.files as FileList)[0] ?: throw RuntimeException("Failed to load file") @@ -153,7 +153,9 @@ private class GDMLDemoApp : ApplicationBase() { output.camera.layers.set(0) layers.threeOutputConfig(output) - tree.visualObjectTree(visual, editor::propertyEditor) + //tree.visualObjectTree(visual, editor::propertyEditor) + tree.objectTree(NameToken("World"),visual, editor::propertyEditor) + output.render(visual) message(null) @@ -166,10 +168,6 @@ private class GDMLDemoApp : ApplicationBase() { } } - - override fun dispose(): Map { - return super.dispose() - } } fun main() { diff --git a/dataforge-vis-spatial-gdml/src/jsMain/web/css/inspire-tree-dark.min.css b/dataforge-vis-spatial-gdml/src/jsMain/web/css/inspire-tree-dark.min.css deleted file mode 100644 index ab9837b9..00000000 --- a/dataforge-vis-spatial-gdml/src/jsMain/web/css/inspire-tree-dark.min.css +++ /dev/null @@ -1 +0,0 @@ -.inspire-tree .btn{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:3px;display:inline-block;height:20px;transition:all .15s linear;width:20px}.inspire-tree .btn:hover{box-shadow:0 2px 3px rgba(0,0,0,.1)}.inspire-tree .btn+.btn{margin-left:5px}.inspire-tree .btn.icon{position:relative}.inspire-tree .btn.icon:before{display:block;height:14px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:14px}.inspire-tree .btn-group{display:inline-block;height:25px;line-height:25px}.itree-menu{background:#ddd;border:1px solid #c4c4c4;border-radius:3px;font-family:sans-serif;list-style:none;margin:0;min-width:150px;padding:0;position:absolute;z-index:4}.itree-menu a{display:block;padding:3px 8px}.itree-menu a:hover{background:hsla(0,0%,39%,.5);color:rgba(74,110,116,.5)}.inspire-tree{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.inspire-tree:focus{outline:none}.inspire-tree,.inspire-tree *{box-sizing:border-box}.inspire-tree ol{list-style:none;margin:0;padding:0}.inspire-tree ol ol{padding-left:20px}.inspire-tree .collapsed>ol,.inspire-tree .hidden{display:none}.inspire-tree li>.title-wrap{min-height:25px;position:relative;z-index:2}.inspire-tree .toggle{height:25px;left:0;position:absolute;top:0;width:25px;z-index:2}.inspire-tree .toggle:before{display:block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.inspire-tree [type=checkbox]{left:18px;position:absolute;top:4px;vertical-align:middle;width:20px;z-index:2}.inspire-tree .title{cursor:default;display:block;height:25px;line-height:25px;overflow:hidden;padding-left:42px;position:relative;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;z-index:1}.inspire-tree .title.load-more{color:#476cb8;cursor:pointer}.inspire-tree .title.load-more:hover{text-decoration:underline}.inspire-tree .title:before{left:24px;position:absolute;top:50%;transform:translateY(-50%);vertical-align:top}.inspire-tree .title:focus{outline:none}.inspire-tree.drag-and-drop li:not(.drop-target){opacity:.5}.drag-targeting.drag-targeting-insert.inspire-tree,.drag-targeting.drag-targeting-insert>.title-wrap>.title{border:1px solid #2dadc5}.drag-targeting.drag-targeting-above>.title-wrap>.title{border-top:3px solid #2dadc5}.drag-targeting.drag-targeting-below>.title-wrap>.title{border-bottom:3px solid #2dadc5}.inspire-tree .editable form{display:inline-block;height:25px;line-height:25px;padding-top:2px}.inspire-tree .editable form input{height:20px}.inspire-tree .editable form .btn,.inspire-tree .editable form input{vertical-align:top}.inspire-tree .editable>.btn-group{display:none;padding-top:2px;position:absolute;right:10px;z-index:3}.inspire-tree .editable:hover>.btn-group{display:block}.inspire-tree input+.btn-group{margin-left:10px}.inspire-tree>.btn.icon{margin-left:2px}.inspire-tree>ol>.folder:first-child:not(:only-child){background-position:11px 13px}.inspire-tree .folder:last-child:not(:only-child),.inspire-tree>ol>.folder:first-child:not(:only-child),.inspire-tree li .folder:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMCAYAAACji9dXAAAAFUlEQVQIW2M8d+HSf0YGBgYGRpJZAJ2uFKcp4HfpAAAAAElFTkSuQmCC");background-repeat:no-repeat}.inspire-tree .folder:last-child:not(:only-child),.inspire-tree li .folder:last-child{background-position:11px 0}.inspire-tree.editable-add>ol>.folder:last-child:not(:only-child){background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAFUlEQVQIW2M8d+HSf0YGBgYGRrqyABKeKU0SV+t2AAAAAElFTkSuQmCC");background-repeat:repeat-y}.inspire-tree>ol .expanded:not(:last-child):not(:first-child),.inspire-tree li:not(:last-child){background-repeat:no-repeat}.inspire-tree>ol .expanded:not(:last-child):not(:first-child),.inspire-tree li.expanded:not(:last-child)>ol,.inspire-tree li:not(:last-child){background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAFUlEQVQIW2M8d+HSf0YGBgYGRrqyABKeKU0SV+t2AAAAAElFTkSuQmCC");background-position:11px 0}.inspire-tree li.expanded:not(:last-child)>ol{background-repeat:repeat-y}.inspire-tree li.expanded.folder:not(.loading)>.title-wrap{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMCAYAAACji9dXAAAAFUlEQVQIW2M8d+HSf0YGBgYGRpJZAJ2uFKcp4HfpAAAAAElFTkSuQmCC");background-position:31px 13px;background-repeat:no-repeat}.inspire-tree .leaf:not(:last-child):not(.detached){background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAYCAYAAAAh8HdUAAAAN0lEQVQ4T2M8d+HSfyMDPUYGEgBJimHmMo7aBAmK0dCDJgl4ioClDGLo0dBDDz0SMu5o2oMFFgBXbEeI0XwYIwAAAABJRU5ErkJgggAA");background-position:11px 0;background-repeat:no-repeat}.inspire-tree .leaf:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAKklEQVQoU2M8d+HSfyMDPUYGEgBJimHmMo7aBAmK0dCDJgl4ioClDGJoAGUZM32Z0U8tAAAAAElFTkSuQmCC");background-position:11px 0;background-repeat:no-repeat}.inspire-tree .leaf.detached:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMCAYAAACji9dXAAAAFUlEQVQIW2M8d+HSf0YGBgYGRpJZAJ2uFKcp4HfpAAAAAElFTkSuQmCC");background-position:11px 0;background-repeat:no-repeat}.inspire-tree.editable-add>ol>.leaf:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAYCAYAAAAh8HdUAAAAN0lEQVQ4T2M8d+HSfyMDPUYGEgBJimHmMo7aBAmK0dCDJgl4ioClDGLo0dBDDz0SMu5o2oMFFgBXbEeI0XwYIwAAAABJRU5ErkJgggAA")}.inspire-tree .icon:before{background-position:0 0;background-repeat:no-repeat;content:"";display:inline-block;height:14px;width:14px}.inspire-tree .icon-check:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M27%204l-15%2015-7-7-5%205%2012%2012%2020-20z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-check:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%230ccc0a%22%20d%3D%22M27%204l-15%2015-7-7-5%205%2012%2012%2020-20z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-collapse:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23aaa%22%20d%3D%22M4%201h16q1.242%200%202.121%200.879t0.879%202.121v16q0%201.242-0.879%202.121t-2.121%200.879h-16q-1.242%200-2.121-0.879t-0.879-2.121v-16q0-1.242%200.879-2.121t2.121-0.879zM20%203h-16q-0.414%200-0.707%200.293t-0.293%200.707v16q0%200.414%200.293%200.707t0.707%200.293h16q0.414%200%200.707-0.293t0.293-0.707v-16q0-0.414-0.293-0.707t-0.707-0.293zM8%2011h8q0.414%200%200.707%200.293t0.293%200.707-0.293%200.707-0.707%200.293h-8q-0.414%200-0.707-0.293t-0.293-0.707%200.293-0.707%200.707-0.293z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");background-color:#000;border-radius:3px;margin-left:-1px}.inspire-tree .icon-cross:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M31.708%2025.708c-0-0-0-0-0-0l-9.708-9.708%209.708-9.708c0-0%200-0%200-0%200.105-0.105%200.18-0.227%200.229-0.357%200.133-0.356%200.057-0.771-0.229-1.057l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.13%200.048-0.252%200.124-0.357%200.228%200%200-0%200-0%200l-9.708%209.708-9.708-9.708c-0-0-0-0-0-0-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057%200.229l-4.586%204.586c-0.286%200.286-0.361%200.702-0.229%201.057%200.049%200.13%200.124%200.252%200.229%200.357%200%200%200%200%200%200l9.708%209.708-9.708%209.708c-0%200-0%200-0%200-0.104%200.105-0.18%200.227-0.229%200.357-0.133%200.355-0.057%200.771%200.229%201.057l4.586%204.586c0.286%200.286%200.702%200.361%201.057%200.229%200.13-0.049%200.252-0.124%200.357-0.229%200-0%200-0%200-0l9.708-9.708%209.708%209.708c0%200%200%200%200%200%200.105%200.105%200.227%200.18%200.357%200.229%200.356%200.133%200.771%200.057%201.057-0.229l4.586-4.586c0.286-0.286%200.362-0.702%200.229-1.057-0.049-0.13-0.124-0.252-0.229-0.357z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-cross:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23c00%22%20d%3D%22M31.708%2025.708c-0-0-0-0-0-0l-9.708-9.708%209.708-9.708c0-0%200-0%200-0%200.105-0.105%200.18-0.227%200.229-0.357%200.133-0.356%200.057-0.771-0.229-1.057l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.13%200.048-0.252%200.124-0.357%200.228%200%200-0%200-0%200l-9.708%209.708-9.708-9.708c-0-0-0-0-0-0-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057%200.229l-4.586%204.586c-0.286%200.286-0.361%200.702-0.229%201.057%200.049%200.13%200.124%200.252%200.229%200.357%200%200%200%200%200%200l9.708%209.708-9.708%209.708c-0%200-0%200-0%200-0.104%200.105-0.18%200.227-0.229%200.357-0.133%200.355-0.057%200.771%200.229%201.057l4.586%204.586c0.286%200.286%200.702%200.361%201.057%200.229%200.13-0.049%200.252-0.124%200.357-0.229%200-0%200-0%200-0l9.708-9.708%209.708%209.708c0%200%200%200%200%200%200.105%200.105%200.227%200.18%200.357%200.229%200.356%200.133%200.771%200.057%201.057-0.229l4.586-4.586c0.286-0.286%200.362-0.702%200.229-1.057-0.049-0.13-0.124-0.252-0.229-0.357z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-expand:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23aaa%22%20d%3D%22M4%201h16q1.242%200%202.121%200.879t0.879%202.121v16q0%201.242-0.879%202.121t-2.121%200.879h-16q-1.242%200-2.121-0.879t-0.879-2.121v-16q0-1.242%200.879-2.121t2.121-0.879zM20%203h-16q-0.414%200-0.707%200.293t-0.293%200.707v16q0%200.414%200.293%200.707t0.707%200.293h16q0.414%200%200.707-0.293t0.293-0.707v-16q0-0.414-0.293-0.707t-0.707-0.293zM12%207q0.414%200%200.707%200.293t0.293%200.707v3h3q0.414%200%200.707%200.293t0.293%200.707-0.293%200.707-0.707%200.293h-3v3q0%200.414-0.293%200.707t-0.707%200.293-0.707-0.293-0.293-0.707v-3h-3q-0.414%200-0.707-0.293t-0.293-0.707%200.293-0.707%200.707-0.293h3v-3q0-0.414%200.293-0.707t0.707-0.293z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");background-color:#000;border-radius:3px;margin-left:-1px}.inspire-tree .icon-file-empty:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23a5a5a5%22%20d%3D%22M28.681%207.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378%200-2.5%201.121-2.5%202.5v27c0%201.378%201.122%202.5%202.5%202.5h23c1.378%200%202.5-1.122%202.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543%205.457c0.959%200.959%201.712%201.825%202.268%202.543h-4.811v-4.811c0.718%200.556%201.584%201.309%202.543%202.268zM28%2029.5c0%200.271-0.229%200.5-0.5%200.5h-23c-0.271%200-0.5-0.229-0.5-0.5v-27c0-0.271%200.229-0.5%200.5-0.5%200%200%2015.499-0%2015.5%200v7c0%200.552%200.448%201%201%201h7v19.5z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-folder:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M14%204l4%204h14v22h-32v-26z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-folder-open:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M26%2030l6-16h-26l-6%2016zM4%2012l-4%2018v-26h9l4%204h13v4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .icon-minus:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M0%2013v6c0%200.552%200.448%201%201%201h30c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1h-30c-0.552%200-1%200.448-1%201z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-minus:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23c00%22%20d%3D%22M0%2013v6c0%200.552%200.448%201%201%201h30c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1h-30c-0.552%200-1%200.448-1%201z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-more:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M12%209.984c1.078%200%202.016%200.938%202.016%202.016s-0.938%202.016-2.016%202.016-2.016-0.938-2.016-2.016%200.938-2.016%202.016-2.016zM18%209.984c1.078%200%202.016%200.938%202.016%202.016s-0.938%202.016-2.016%202.016-2.016-0.938-2.016-2.016%200.938-2.016%202.016-2.016zM6%209.984c1.078%200%202.016%200.938%202.016%202.016s-0.938%202.016-2.016%202.016-2.016-0.938-2.016-2.016%200.938-2.016%202.016-2.016z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-pencil:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M27%200c2.761%200%205%202.239%205%205%200%201.126-0.372%202.164-1%203l-2%202-7-7%202-2c0.836-0.628%201.874-1%203-1zM2%2023l-2%209%209-2%2018.5-18.5-7-7-18.5%2018.5zM22.362%2011.362l-14%2014-1.724-1.724%2014-14%201.724%201.724z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .icon-pencil:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%230ccc0a%22%20d%3D%22M27%200c2.761%200%205%202.239%205%205%200%201.126-0.372%202.164-1%203l-2%202-7-7%202-2c0.836-0.628%201.874-1%203-1zM2%2023l-2%209%209-2%2018.5-18.5-7-7-18.5%2018.5zM22.362%2011.362l-14%2014-1.724-1.724%2014-14%201.724%201.724z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .icon-plus:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M31%2012h-11v-11c0-0.552-0.448-1-1-1h-6c-0.552%200-1%200.448-1%201v11h-11c-0.552%200-1%200.448-1%201v6c0%200.552%200.448%201%201%201h11v11c0%200.552%200.448%201%201%201h6c0.552%200%201-0.448%201-1v-11h11c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-plus:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%230ccc0a%22%20d%3D%22M31%2012h-11v-11c0-0.552-0.448-1-1-1h-6c-0.552%200-1%200.448-1%201v11h-11c-0.552%200-1%200.448-1%201v6c0%200.552%200.448%201%201%201h11v11c0%200.552%200.448%201%201%201h6c0.552%200%201-0.448%201-1v-11h11c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .selected>.title-wrap .icon-folder:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%2366a0a9%22%20d%3D%22M14%204l4%204h14v22h-32v-26z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .selected>.title-wrap .icon-folder-open:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%2366a0a9%22%20d%3D%22M26%2030l6-16h-26l-6%2016zM4%2012l-4%2018v-26h9l4%204h13v4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .selected>.title-wrap .icon-file-empty:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%2366a0a9%22%20d%3D%22M28.681%207.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378%200-2.5%201.121-2.5%202.5v27c0%201.378%201.122%202.5%202.5%202.5h23c1.378%200%202.5-1.122%202.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543%205.457c0.959%200.959%201.712%201.825%202.268%202.543h-4.811v-4.811c0.718%200.556%201.584%201.309%202.543%202.268zM28%2029.5c0%200.271-0.229%200.5-0.5%200.5h-23c-0.271%200-0.5-0.229-0.5-0.5v-27c0-0.271%200.229-0.5%200.5-0.5%200%200%2015.499-0%2015.5%200v7c0%200.552%200.448%201%201%201h7v19.5z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .loading>.title-wrap input{display:none}.inspire-tree .loading>.title-wrap .title:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2714px%27%20height%3D%2714px%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%20preserveAspectRatio%3D%22xMidYMid%22%20class%3D%22uil-ring%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%22100%22%20height%3D%22100%22%20fill%3D%22none%22%20class%3D%22bk%22%3E%3C%2Frect%3E%3Cdefs%3E%3Cfilter%20id%3D%22uil-ring-shadow%22%20x%3D%22-100%25%22%20y%3D%22-100%25%22%20width%3D%22300%25%22%20height%3D%22300%25%22%3E%3CfeOffset%20result%3D%22offOut%22%20in%3D%22SourceGraphic%22%20dx%3D%220%22%20dy%3D%220%22%3E%3C%2FfeOffset%3E%3CfeGaussianBlur%20result%3D%22blurOut%22%20in%3D%22offOut%22%20stdDeviation%3D%220%22%3E%3C%2FfeGaussianBlur%3E%3CfeBlend%20in%3D%22SourceGraphic%22%20in2%3D%22blurOut%22%20mode%3D%22normal%22%3E%3C%2FfeBlend%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M10%2C50c0%2C0%2C0%2C0.5%2C0.1%2C1.4c0%2C0.5%2C0.1%2C1%2C0.2%2C1.7c0%2C0.3%2C0.1%2C0.7%2C0.1%2C1.1c0.1%2C0.4%2C0.1%2C0.8%2C0.2%2C1.2c0.2%2C0.8%2C0.3%2C1.8%2C0.5%2C2.8%20c0.3%2C1%2C0.6%2C2.1%2C0.9%2C3.2c0.3%2C1.1%2C0.9%2C2.3%2C1.4%2C3.5c0.5%2C1.2%2C1.2%2C2.4%2C1.8%2C3.7c0.3%2C0.6%2C0.8%2C1.2%2C1.2%2C1.9c0.4%2C0.6%2C0.8%2C1.3%2C1.3%2C1.9%20c1%2C1.2%2C1.9%2C2.6%2C3.1%2C3.7c2.2%2C2.5%2C5%2C4.7%2C7.9%2C6.7c3%2C2%2C6.5%2C3.4%2C10.1%2C4.6c3.6%2C1.1%2C7.5%2C1.5%2C11.2%2C1.6c4-0.1%2C7.7-0.6%2C11.3-1.6%20c3.6-1.2%2C7-2.6%2C10-4.6c3-2%2C5.8-4.2%2C7.9-6.7c1.2-1.2%2C2.1-2.5%2C3.1-3.7c0.5-0.6%2C0.9-1.3%2C1.3-1.9c0.4-0.6%2C0.8-1.3%2C1.2-1.9%20c0.6-1.3%2C1.3-2.5%2C1.8-3.7c0.5-1.2%2C1-2.4%2C1.4-3.5c0.3-1.1%2C0.6-2.2%2C0.9-3.2c0.2-1%2C0.4-1.9%2C0.5-2.8c0.1-0.4%2C0.1-0.8%2C0.2-1.2%20c0-0.4%2C0.1-0.7%2C0.1-1.1c0.1-0.7%2C0.1-1.2%2C0.2-1.7C90%2C50.5%2C90%2C50%2C90%2C50s0%2C0.5%2C0%2C1.4c0%2C0.5%2C0%2C1%2C0%2C1.7c0%2C0.3%2C0%2C0.7%2C0%2C1.1%20c0%2C0.4-0.1%2C0.8-0.1%2C1.2c-0.1%2C0.9-0.2%2C1.8-0.4%2C2.8c-0.2%2C1-0.5%2C2.1-0.7%2C3.3c-0.3%2C1.2-0.8%2C2.4-1.2%2C3.7c-0.2%2C0.7-0.5%2C1.3-0.8%2C1.9%20c-0.3%2C0.7-0.6%2C1.3-0.9%2C2c-0.3%2C0.7-0.7%2C1.3-1.1%2C2c-0.4%2C0.7-0.7%2C1.4-1.2%2C2c-1%2C1.3-1.9%2C2.7-3.1%2C4c-2.2%2C2.7-5%2C5-8.1%2C7.1%20c-0.8%2C0.5-1.6%2C1-2.4%2C1.5c-0.8%2C0.5-1.7%2C0.9-2.6%2C1.3L66%2C87.7l-1.4%2C0.5c-0.9%2C0.3-1.8%2C0.7-2.8%2C1c-3.8%2C1.1-7.9%2C1.7-11.8%2C1.8L47%2C90.8%20c-1%2C0-2-0.2-3-0.3l-1.5-0.2l-0.7-0.1L41.1%2C90c-1-0.3-1.9-0.5-2.9-0.7c-0.9-0.3-1.9-0.7-2.8-1L34%2C87.7l-1.3-0.6%20c-0.9-0.4-1.8-0.8-2.6-1.3c-0.8-0.5-1.6-1-2.4-1.5c-3.1-2.1-5.9-4.5-8.1-7.1c-1.2-1.2-2.1-2.7-3.1-4c-0.5-0.6-0.8-1.4-1.2-2%20c-0.4-0.7-0.8-1.3-1.1-2c-0.3-0.7-0.6-1.3-0.9-2c-0.3-0.7-0.6-1.3-0.8-1.9c-0.4-1.3-0.9-2.5-1.2-3.7c-0.3-1.2-0.5-2.3-0.7-3.3%20c-0.2-1-0.3-2-0.4-2.8c-0.1-0.4-0.1-0.8-0.1-1.2c0-0.4%2C0-0.7%2C0-1.1c0-0.7%2C0-1.2%2C0-1.7C10%2C50.5%2C10%2C50%2C10%2C50z%22%20fill%3D%22%23013138%22%20filter%3D%22url(%23uil-ring-shadow)%22%3E%3CanimateTransform%20attributeName%3D%22transform%22%20type%3D%22rotate%22%20from%3D%220%2050%2050%22%20to%3D%22360%2050%2050%22%20repeatCount%3D%22indefinite%22%20dur%3D%221s%22%3E%3C%2FanimateTransform%3E%3C%2Fpath%3E%3C%2Fsvg%3E");content:"";height:14px;width:14px}.inspire-tree>ol{position:relative}.inspire-tree .wholerow{height:25px;left:0;margin-top:-25px;position:absolute;width:100%;z-index:1}.inspire-tree .focused>.wholerow{border:1px dotted #fff}.inspire-tree .title-wrap:hover+.wholerow,.inspire-tree .wholerow:hover{background-color:hsla(0,0%,39%,.5)}.inspire-tree .selected>.title-wrap:hover+.wholerow,.inspire-tree .selected>.wholerow,.inspire-tree .selected>.wholerow:hover{background-color:rgba(74,110,116,.5)}.inspire-tree .matched>.title-wrap:hover+.wholerow,.inspire-tree .matched>.wholerow,.inspire-tree .matched>.wholerow:hover{background-color:rgba(247,255,170,.5)} \ No newline at end of file diff --git a/dataforge-vis-spatial-gdml/src/jsMain/web/css/inspire-tree-light.min.css b/dataforge-vis-spatial-gdml/src/jsMain/web/css/inspire-tree-light.min.css deleted file mode 100644 index 2b6d5f51..00000000 --- a/dataforge-vis-spatial-gdml/src/jsMain/web/css/inspire-tree-light.min.css +++ /dev/null @@ -1 +0,0 @@ -.inspire-tree .btn{background-color:hsla(0,0%,100%,.4);border:1px solid rgba(0,0,0,.2);border-radius:3px;display:inline-block;height:20px;transition:all .15s linear;width:20px}.inspire-tree .btn:hover{box-shadow:0 2px 3px rgba(0,0,0,.1)}.inspire-tree .btn+.btn{margin-left:5px}.inspire-tree .btn.icon{position:relative}.inspire-tree .btn.icon:before{display:block;height:14px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:14px}.inspire-tree .btn-group{display:inline-block;height:25px;line-height:25px}.itree-menu{background:#ddd;border:1px solid #c4c4c4;border-radius:3px;font-family:sans-serif;list-style:none;margin:0;min-width:150px;padding:0;position:absolute;z-index:4}.itree-menu a{display:block;padding:3px 8px}.itree-menu a:hover{background:rgba(218,250,255,.5);color:rgba(164,234,245,.5)}.inspire-tree{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.inspire-tree:focus{outline:none}.inspire-tree,.inspire-tree *{box-sizing:border-box}.inspire-tree ol{list-style:none;margin:0;padding:0}.inspire-tree ol ol{padding-left:20px}.inspire-tree .collapsed>ol,.inspire-tree .hidden{display:none}.inspire-tree li>.title-wrap{min-height:25px;position:relative;z-index:2}.inspire-tree .toggle{height:25px;left:0;position:absolute;top:0;width:25px;z-index:2}.inspire-tree .toggle:before{display:block;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.inspire-tree [type=checkbox]{left:18px;position:absolute;top:4px;vertical-align:middle;width:20px;z-index:2}.inspire-tree .title{cursor:default;display:block;height:25px;line-height:25px;overflow:hidden;padding-left:42px;position:relative;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;z-index:1}.inspire-tree .title.load-more{color:#476cb8;cursor:pointer}.inspire-tree .title.load-more:hover{text-decoration:underline}.inspire-tree .title:before{left:24px;position:absolute;top:50%;transform:translateY(-50%);vertical-align:top}.inspire-tree .title:focus{outline:none}.inspire-tree.drag-and-drop li:not(.drop-target){opacity:.5}.drag-targeting.drag-targeting-insert.inspire-tree,.drag-targeting.drag-targeting-insert>.title-wrap>.title{border:1px solid #2dadc5}.drag-targeting.drag-targeting-above>.title-wrap>.title{border-top:3px solid #2dadc5}.drag-targeting.drag-targeting-below>.title-wrap>.title{border-bottom:3px solid #2dadc5}.inspire-tree .editable form{display:inline-block;height:25px;line-height:25px;padding-top:2px}.inspire-tree .editable form input{height:20px}.inspire-tree .editable form .btn,.inspire-tree .editable form input{vertical-align:top}.inspire-tree .editable>.btn-group{display:none;padding-top:2px;position:absolute;right:10px;z-index:3}.inspire-tree .editable:hover>.btn-group{display:block}.inspire-tree input+.btn-group{margin-left:10px}.inspire-tree>.btn.icon{margin-left:2px}.inspire-tree>ol>.folder:first-child:not(:only-child){background-position:11px 13px}.inspire-tree .folder:last-child:not(:only-child),.inspire-tree>ol>.folder:first-child:not(:only-child),.inspire-tree li .folder:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMCAYAAACji9dXAAAAFUlEQVQIW2M8d+HSf0YGBgYGRpJZAJ2uFKcp4HfpAAAAAElFTkSuQmCC");background-repeat:no-repeat}.inspire-tree .folder:last-child:not(:only-child),.inspire-tree li .folder:last-child{background-position:11px 0}.inspire-tree.editable-add>ol>.folder:last-child:not(:only-child){background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAFUlEQVQIW2M8d+HSf0YGBgYGRrqyABKeKU0SV+t2AAAAAElFTkSuQmCC");background-repeat:repeat-y}.inspire-tree>ol .expanded:not(:last-child):not(:first-child),.inspire-tree li:not(:last-child){background-repeat:no-repeat}.inspire-tree>ol .expanded:not(:last-child):not(:first-child),.inspire-tree li.expanded:not(:last-child)>ol,.inspire-tree li:not(:last-child){background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAYCAYAAAA7zJfaAAAAFUlEQVQIW2M8d+HSf0YGBgYGRrqyABKeKU0SV+t2AAAAAElFTkSuQmCC");background-position:11px 0}.inspire-tree li.expanded:not(:last-child)>ol{background-repeat:repeat-y}.inspire-tree li.expanded.folder:not(.loading)>.title-wrap{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMCAYAAACji9dXAAAAFUlEQVQIW2M8d+HSf0YGBgYGRpJZAJ2uFKcp4HfpAAAAAElFTkSuQmCC");background-position:31px 13px;background-repeat:no-repeat}.inspire-tree .leaf:not(:last-child):not(.detached){background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAYCAYAAAAh8HdUAAAAN0lEQVQ4T2M8d+HSfyMDPUYGEgBJimHmMo7aBAmK0dCDJgl4ioClDGLo0dBDDz0SMu5o2oMFFgBXbEeI0XwYIwAAAABJRU5ErkJgggAA");background-position:11px 0;background-repeat:no-repeat}.inspire-tree .leaf:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAKklEQVQoU2M8d+HSfyMDPUYGEgBJimHmMo7aBAmK0dCDJgl4ioClDGJoAGUZM32Z0U8tAAAAAElFTkSuQmCC");background-position:11px 0;background-repeat:no-repeat}.inspire-tree .leaf.detached:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAMCAYAAACji9dXAAAAFUlEQVQIW2M8d+HSf0YGBgYGRpJZAJ2uFKcp4HfpAAAAAElFTkSuQmCC");background-position:11px 0;background-repeat:no-repeat}.inspire-tree.editable-add>ol>.leaf:last-child{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAYCAYAAAAh8HdUAAAAN0lEQVQ4T2M8d+HSfyMDPUYGEgBJimHmMo7aBAmK0dCDJgl4ioClDGLo0dBDDz0SMu5o2oMFFgBXbEeI0XwYIwAAAABJRU5ErkJgggAA")}.inspire-tree .icon:before{background-position:0 0;background-repeat:no-repeat;content:"";display:inline-block;height:14px;width:14px}.inspire-tree .icon-check:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M27%204l-15%2015-7-7-5%205%2012%2012%2020-20z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-check:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%230ccc0a%22%20d%3D%22M27%204l-15%2015-7-7-5%205%2012%2012%2020-20z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-collapse:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23aaa%22%20d%3D%22M4%201h16q1.242%200%202.121%200.879t0.879%202.121v16q0%201.242-0.879%202.121t-2.121%200.879h-16q-1.242%200-2.121-0.879t-0.879-2.121v-16q0-1.242%200.879-2.121t2.121-0.879zM20%203h-16q-0.414%200-0.707%200.293t-0.293%200.707v16q0%200.414%200.293%200.707t0.707%200.293h16q0.414%200%200.707-0.293t0.293-0.707v-16q0-0.414-0.293-0.707t-0.707-0.293zM8%2011h8q0.414%200%200.707%200.293t0.293%200.707-0.293%200.707-0.707%200.293h-8q-0.414%200-0.707-0.293t-0.293-0.707%200.293-0.707%200.707-0.293z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");background-color:#fff;border-radius:3px;margin-left:-1px}.inspire-tree .icon-cross:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M31.708%2025.708c-0-0-0-0-0-0l-9.708-9.708%209.708-9.708c0-0%200-0%200-0%200.105-0.105%200.18-0.227%200.229-0.357%200.133-0.356%200.057-0.771-0.229-1.057l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.13%200.048-0.252%200.124-0.357%200.228%200%200-0%200-0%200l-9.708%209.708-9.708-9.708c-0-0-0-0-0-0-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057%200.229l-4.586%204.586c-0.286%200.286-0.361%200.702-0.229%201.057%200.049%200.13%200.124%200.252%200.229%200.357%200%200%200%200%200%200l9.708%209.708-9.708%209.708c-0%200-0%200-0%200-0.104%200.105-0.18%200.227-0.229%200.357-0.133%200.355-0.057%200.771%200.229%201.057l4.586%204.586c0.286%200.286%200.702%200.361%201.057%200.229%200.13-0.049%200.252-0.124%200.357-0.229%200-0%200-0%200-0l9.708-9.708%209.708%209.708c0%200%200%200%200%200%200.105%200.105%200.227%200.18%200.357%200.229%200.356%200.133%200.771%200.057%201.057-0.229l4.586-4.586c0.286-0.286%200.362-0.702%200.229-1.057-0.049-0.13-0.124-0.252-0.229-0.357z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-cross:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23c00%22%20d%3D%22M31.708%2025.708c-0-0-0-0-0-0l-9.708-9.708%209.708-9.708c0-0%200-0%200-0%200.105-0.105%200.18-0.227%200.229-0.357%200.133-0.356%200.057-0.771-0.229-1.057l-4.586-4.586c-0.286-0.286-0.702-0.361-1.057-0.229-0.13%200.048-0.252%200.124-0.357%200.228%200%200-0%200-0%200l-9.708%209.708-9.708-9.708c-0-0-0-0-0-0-0.105-0.104-0.227-0.18-0.357-0.228-0.356-0.133-0.771-0.057-1.057%200.229l-4.586%204.586c-0.286%200.286-0.361%200.702-0.229%201.057%200.049%200.13%200.124%200.252%200.229%200.357%200%200%200%200%200%200l9.708%209.708-9.708%209.708c-0%200-0%200-0%200-0.104%200.105-0.18%200.227-0.229%200.357-0.133%200.355-0.057%200.771%200.229%201.057l4.586%204.586c0.286%200.286%200.702%200.361%201.057%200.229%200.13-0.049%200.252-0.124%200.357-0.229%200-0%200-0%200-0l9.708-9.708%209.708%209.708c0%200%200%200%200%200%200.105%200.105%200.227%200.18%200.357%200.229%200.356%200.133%200.771%200.057%201.057-0.229l4.586-4.586c0.286-0.286%200.362-0.702%200.229-1.057-0.049-0.13-0.124-0.252-0.229-0.357z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-expand:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%23aaa%22%20d%3D%22M4%201h16q1.242%200%202.121%200.879t0.879%202.121v16q0%201.242-0.879%202.121t-2.121%200.879h-16q-1.242%200-2.121-0.879t-0.879-2.121v-16q0-1.242%200.879-2.121t2.121-0.879zM20%203h-16q-0.414%200-0.707%200.293t-0.293%200.707v16q0%200.414%200.293%200.707t0.707%200.293h16q0.414%200%200.707-0.293t0.293-0.707v-16q0-0.414-0.293-0.707t-0.707-0.293zM12%207q0.414%200%200.707%200.293t0.293%200.707v3h3q0.414%200%200.707%200.293t0.293%200.707-0.293%200.707-0.707%200.293h-3v3q0%200.414-0.293%200.707t-0.707%200.293-0.707-0.293-0.293-0.707v-3h-3q-0.414%200-0.707-0.293t-0.293-0.707%200.293-0.707%200.707-0.293h3v-3q0-0.414%200.293-0.707t0.707-0.293z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E");background-color:#fff;border-radius:3px;margin-left:-1px}.inspire-tree .icon-file-empty:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23a5a5a5%22%20d%3D%22M28.681%207.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378%200-2.5%201.121-2.5%202.5v27c0%201.378%201.122%202.5%202.5%202.5h23c1.378%200%202.5-1.122%202.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543%205.457c0.959%200.959%201.712%201.825%202.268%202.543h-4.811v-4.811c0.718%200.556%201.584%201.309%202.543%202.268zM28%2029.5c0%200.271-0.229%200.5-0.5%200.5h-23c-0.271%200-0.5-0.229-0.5-0.5v-27c0-0.271%200.229-0.5%200.5-0.5%200%200%2015.499-0%2015.5%200v7c0%200.552%200.448%201%201%201h7v19.5z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-folder:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M14%204l4%204h14v22h-32v-26z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-folder-open:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M26%2030l6-16h-26l-6%2016zM4%2012l-4%2018v-26h9l4%204h13v4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .icon-minus:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M0%2013v6c0%200.552%200.448%201%201%201h30c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1h-30c-0.552%200-1%200.448-1%201z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-minus:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23c00%22%20d%3D%22M0%2013v6c0%200.552%200.448%201%201%201h30c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1h-30c-0.552%200-1%200.448-1%201z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-more:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M12%209.984c1.078%200%202.016%200.938%202.016%202.016s-0.938%202.016-2.016%202.016-2.016-0.938-2.016-2.016%200.938-2.016%202.016-2.016zM18%209.984c1.078%200%202.016%200.938%202.016%202.016s-0.938%202.016-2.016%202.016-2.016-0.938-2.016-2.016%200.938-2.016%202.016-2.016zM6%209.984c1.078%200%202.016%200.938%202.016%202.016s-0.938%202.016-2.016%202.016-2.016-0.938-2.016-2.016%200.938-2.016%202.016-2.016z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-pencil:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M27%200c2.761%200%205%202.239%205%205%200%201.126-0.372%202.164-1%203l-2%202-7-7%202-2c0.836-0.628%201.874-1%203-1zM2%2023l-2%209%209-2%2018.5-18.5-7-7-18.5%2018.5zM22.362%2011.362l-14%2014-1.724-1.724%2014-14%201.724%201.724z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .icon-pencil:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%230ccc0a%22%20d%3D%22M27%200c2.761%200%205%202.239%205%205%200%201.126-0.372%202.164-1%203l-2%202-7-7%202-2c0.836-0.628%201.874-1%203-1zM2%2023l-2%209%209-2%2018.5-18.5-7-7-18.5%2018.5zM22.362%2011.362l-14%2014-1.724-1.724%2014-14%201.724%201.724z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .icon-plus:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%236a6a6a%22%20d%3D%22M31%2012h-11v-11c0-0.552-0.448-1-1-1h-6c-0.552%200-1%200.448-1%201v11h-11c-0.552%200-1%200.448-1%201v6c0%200.552%200.448%201%201%201h11v11c0%200.552%200.448%201%201%201h6c0.552%200%201-0.448%201-1v-11h11c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .icon-plus:hover:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%230ccc0a%22%20d%3D%22M31%2012h-11v-11c0-0.552-0.448-1-1-1h-6c-0.552%200-1%200.448-1%201v11h-11c-0.552%200-1%200.448-1%201v6c0%200.552%200.448%201%201%201h11v11c0%200.552%200.448%201%201%201h6c0.552%200%201-0.448%201-1v-11h11c0.552%200%201-0.448%201-1v-6c0-0.552-0.448-1-1-1z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .selected>.title-wrap .icon-folder:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23179bb9%22%20d%3D%22M14%204l4%204h14v22h-32v-26z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .selected>.title-wrap .icon-folder-open:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23179bb9%22%20d%3D%22M26%2030l6-16h-26l-6%2016zM4%2012l-4%2018v-26h9l4%204h13v4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%0A")}.inspire-tree .selected>.title-wrap .icon-file-empty:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23179bb9%22%20d%3D%22M28.681%207.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378%200-2.5%201.121-2.5%202.5v27c0%201.378%201.122%202.5%202.5%202.5h23c1.378%200%202.5-1.122%202.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543%205.457c0.959%200.959%201.712%201.825%202.268%202.543h-4.811v-4.811c0.718%200.556%201.584%201.309%202.543%202.268zM28%2029.5c0%200.271-0.229%200.5-0.5%200.5h-23c-0.271%200-0.5-0.229-0.5-0.5v-27c0-0.271%200.229-0.5%200.5-0.5%200%200%2015.499-0%2015.5%200v7c0%200.552%200.448%201%201%201h7v19.5z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E")}.inspire-tree .loading>.title-wrap input{display:none}.inspire-tree .loading>.title-wrap .title:before{background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2714px%27%20height%3D%2714px%27%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%20preserveAspectRatio%3D%22xMidYMid%22%20class%3D%22uil-ring%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%22100%22%20height%3D%22100%22%20fill%3D%22none%22%20class%3D%22bk%22%3E%3C%2Frect%3E%3Cdefs%3E%3Cfilter%20id%3D%22uil-ring-shadow%22%20x%3D%22-100%25%22%20y%3D%22-100%25%22%20width%3D%22300%25%22%20height%3D%22300%25%22%3E%3CfeOffset%20result%3D%22offOut%22%20in%3D%22SourceGraphic%22%20dx%3D%220%22%20dy%3D%220%22%3E%3C%2FfeOffset%3E%3CfeGaussianBlur%20result%3D%22blurOut%22%20in%3D%22offOut%22%20stdDeviation%3D%220%22%3E%3C%2FfeGaussianBlur%3E%3CfeBlend%20in%3D%22SourceGraphic%22%20in2%3D%22blurOut%22%20mode%3D%22normal%22%3E%3C%2FfeBlend%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M10%2C50c0%2C0%2C0%2C0.5%2C0.1%2C1.4c0%2C0.5%2C0.1%2C1%2C0.2%2C1.7c0%2C0.3%2C0.1%2C0.7%2C0.1%2C1.1c0.1%2C0.4%2C0.1%2C0.8%2C0.2%2C1.2c0.2%2C0.8%2C0.3%2C1.8%2C0.5%2C2.8%20c0.3%2C1%2C0.6%2C2.1%2C0.9%2C3.2c0.3%2C1.1%2C0.9%2C2.3%2C1.4%2C3.5c0.5%2C1.2%2C1.2%2C2.4%2C1.8%2C3.7c0.3%2C0.6%2C0.8%2C1.2%2C1.2%2C1.9c0.4%2C0.6%2C0.8%2C1.3%2C1.3%2C1.9%20c1%2C1.2%2C1.9%2C2.6%2C3.1%2C3.7c2.2%2C2.5%2C5%2C4.7%2C7.9%2C6.7c3%2C2%2C6.5%2C3.4%2C10.1%2C4.6c3.6%2C1.1%2C7.5%2C1.5%2C11.2%2C1.6c4-0.1%2C7.7-0.6%2C11.3-1.6%20c3.6-1.2%2C7-2.6%2C10-4.6c3-2%2C5.8-4.2%2C7.9-6.7c1.2-1.2%2C2.1-2.5%2C3.1-3.7c0.5-0.6%2C0.9-1.3%2C1.3-1.9c0.4-0.6%2C0.8-1.3%2C1.2-1.9%20c0.6-1.3%2C1.3-2.5%2C1.8-3.7c0.5-1.2%2C1-2.4%2C1.4-3.5c0.3-1.1%2C0.6-2.2%2C0.9-3.2c0.2-1%2C0.4-1.9%2C0.5-2.8c0.1-0.4%2C0.1-0.8%2C0.2-1.2%20c0-0.4%2C0.1-0.7%2C0.1-1.1c0.1-0.7%2C0.1-1.2%2C0.2-1.7C90%2C50.5%2C90%2C50%2C90%2C50s0%2C0.5%2C0%2C1.4c0%2C0.5%2C0%2C1%2C0%2C1.7c0%2C0.3%2C0%2C0.7%2C0%2C1.1%20c0%2C0.4-0.1%2C0.8-0.1%2C1.2c-0.1%2C0.9-0.2%2C1.8-0.4%2C2.8c-0.2%2C1-0.5%2C2.1-0.7%2C3.3c-0.3%2C1.2-0.8%2C2.4-1.2%2C3.7c-0.2%2C0.7-0.5%2C1.3-0.8%2C1.9%20c-0.3%2C0.7-0.6%2C1.3-0.9%2C2c-0.3%2C0.7-0.7%2C1.3-1.1%2C2c-0.4%2C0.7-0.7%2C1.4-1.2%2C2c-1%2C1.3-1.9%2C2.7-3.1%2C4c-2.2%2C2.7-5%2C5-8.1%2C7.1%20c-0.8%2C0.5-1.6%2C1-2.4%2C1.5c-0.8%2C0.5-1.7%2C0.9-2.6%2C1.3L66%2C87.7l-1.4%2C0.5c-0.9%2C0.3-1.8%2C0.7-2.8%2C1c-3.8%2C1.1-7.9%2C1.7-11.8%2C1.8L47%2C90.8%20c-1%2C0-2-0.2-3-0.3l-1.5-0.2l-0.7-0.1L41.1%2C90c-1-0.3-1.9-0.5-2.9-0.7c-0.9-0.3-1.9-0.7-2.8-1L34%2C87.7l-1.3-0.6%20c-0.9-0.4-1.8-0.8-2.6-1.3c-0.8-0.5-1.6-1-2.4-1.5c-3.1-2.1-5.9-4.5-8.1-7.1c-1.2-1.2-2.1-2.7-3.1-4c-0.5-0.6-0.8-1.4-1.2-2%20c-0.4-0.7-0.8-1.3-1.1-2c-0.3-0.7-0.6-1.3-0.9-2c-0.3-0.7-0.6-1.3-0.8-1.9c-0.4-1.3-0.9-2.5-1.2-3.7c-0.3-1.2-0.5-2.3-0.7-3.3%20c-0.2-1-0.3-2-0.4-2.8c-0.1-0.4-0.1-0.8-0.1-1.2c0-0.4%2C0-0.7%2C0-1.1c0-0.7%2C0-1.2%2C0-1.7C10%2C50.5%2C10%2C50%2C10%2C50z%22%20fill%3D%22%23013138%22%20filter%3D%22url(%23uil-ring-shadow)%22%3E%3CanimateTransform%20attributeName%3D%22transform%22%20type%3D%22rotate%22%20from%3D%220%2050%2050%22%20to%3D%22360%2050%2050%22%20repeatCount%3D%22indefinite%22%20dur%3D%221s%22%3E%3C%2FanimateTransform%3E%3C%2Fpath%3E%3C%2Fsvg%3E");content:"";height:14px;width:14px}.inspire-tree>ol{position:relative}.inspire-tree .wholerow{height:25px;left:0;margin-top:-25px;position:absolute;width:100%;z-index:1}.inspire-tree .focused>.wholerow{border:1px dotted #000}.inspire-tree .title-wrap:hover+.wholerow,.inspire-tree .wholerow:hover{background-color:rgba(218,250,255,.5)}.inspire-tree .selected>.title-wrap:hover+.wholerow,.inspire-tree .selected>.wholerow,.inspire-tree .selected>.wholerow:hover{background-color:rgba(164,234,245,.5)}.inspire-tree .matched>.title-wrap:hover+.wholerow,.inspire-tree .matched>.wholerow,.inspire-tree .matched>.wholerow:hover{background-color:rgba(247,255,170,.5)} \ No newline at end of file diff --git a/dataforge-vis-spatial-gdml/src/jsMain/web/css/main.css b/dataforge-vis-spatial-gdml/src/jsMain/web/css/main.css index b2bb1e78..e7f925df 100644 --- a/dataforge-vis-spatial-gdml/src/jsMain/web/css/main.css +++ b/dataforge-vis-spatial-gdml/src/jsMain/web/css/main.css @@ -11,3 +11,38 @@ 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } + +/* Remove default bullets */ +ul, .objTree-subtree { + list-style-type: none; +} + +/* Style the caret/arrow */ +.objTree-caret { + cursor: pointer; + user-select: none; /* Prevent text selection */ +} + +.objTree-label { + cursor: pointer; +} + +/* Create the caret/arrow with a unicode, and style it */ +.objTree-caret::before { + content: "\25B6"; + color: black; + display: inline-block; + margin-right: 6px; +} + +.objTree-leaf::before { + content: "\25C6"; + color: black; + display: inline-block; + margin-right: 6px; +} + +/* Rotate the caret/arrow icon when clicked on (using JavaScript) */ +.objTree-caret-down::before { + transform: rotate(90deg); +} diff --git a/dataforge-vis-spatial-gdml/src/jsMain/web/index.html b/dataforge-vis-spatial-gdml/src/jsMain/web/index.html index 22603bcf..3b2a99b2 100644 --- a/dataforge-vis-spatial-gdml/src/jsMain/web/index.html +++ b/dataforge-vis-spatial-gdml/src/jsMain/web/index.html @@ -4,13 +4,9 @@ Three js demo for particle physics - - @@ -37,12 +33,5 @@
- - - \ No newline at end of file diff --git a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsTree.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsTree.kt new file mode 100644 index 00000000..a45c1861 --- /dev/null +++ b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsTree.kt @@ -0,0 +1,75 @@ +package hep.dataforge.js + +import hep.dataforge.names.NameToken +import hep.dataforge.vis.common.VisualGroup +import hep.dataforge.vis.common.VisualObject +import hep.dataforge.vis.common.isEmpty +import hep.dataforge.vis.spatial.editor.card +import kotlinx.html.TagConsumer +import kotlinx.html.dom.append +import kotlinx.html.js.* +import org.w3c.dom.Element +import org.w3c.dom.HTMLElement +import org.w3c.dom.HTMLSpanElement +import kotlin.dom.clear + +fun Element.objectTree( + token: NameToken, + obj: VisualObject, + clickCallback: (VisualObject) -> Unit = {} +) { + clear() + append { + card("Object tree") { + subTree(token, obj, clickCallback) + } + } +} + +private fun TagConsumer.subTree( + token: NameToken, + obj: VisualObject, + clickCallback: (VisualObject) -> Unit +) { + + if (obj is VisualGroup && !obj.isEmpty) { + lateinit var toggle: HTMLSpanElement + div("d-inline-block text-truncate") { + toggle = span("objTree-caret") + label("objTree-label") { + +token.toString() + onClickFunction = { clickCallback(obj) } + } + } + val subtree = ul("objTree-subtree") + toggle.onclick = { + toggle.classList.toggle("objTree-caret-down") + subtree.apply { + if (toggle.classList.contains("objTree-caret-down")) { + obj.children.entries + .filter { !it.key.toString().startsWith("@") } + .sortedBy { (it.value as? VisualGroup)?.isEmpty ?: true } + .forEach { (token, child) -> + append { + li().apply { + subTree(token, child, clickCallback) + } + } + } + } else { + this.clear() + } + } + //jQuery(subtree).asDynamic().collapse("toggle") + } + } else { + div("d-inline-block text-truncate") { + span("objTree-leaf") + label("objTree-label") { + +token.toString() + onClickFunction = { clickCallback(obj) } + } + } + } +} + diff --git a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt deleted file mode 100644 index 13868fdf..00000000 --- a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/jsVisualTree.kt +++ /dev/null @@ -1,136 +0,0 @@ -@file:Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") - -package hep.dataforge.vis.spatial.editor - -import hep.dataforge.meta.string -import hep.dataforge.names.EmptyName -import hep.dataforge.names.Name -import hep.dataforge.names.NameToken -import hep.dataforge.vis.common.VisualGroup -import hep.dataforge.vis.common.VisualObject -import hep.dataforge.vis.common.getProperty -import hep.dataforge.vis.jsObject -import hep.dataforge.vis.spatial.Proxy -import hep.dataforge.vis.spatial.visible -import info.laht.threekt.loaders.Cache.clear -import kotlinx.html.div -import kotlinx.html.dom.append -import org.w3c.dom.Element -import kotlin.js.json - -operator fun Name.plus(other: NameToken): Name = Name(tokens + other) - - -private fun createInspireTree(block: Config.() -> Unit = {}): InspireTree { - val config = (json( - "checkbox" to json( - "autoCheckChildren" to false - ) - ) as Config).apply(block) - return InspireTree(config) -} - -private fun VisualObject.toTree(onFocus: (VisualObject?, String?) -> Unit = { _, _ -> }): InspireTree { - - val map = HashMap() - - fun generateNodeConfig(item: VisualObject, fullName: Name): NodeConfig { - val title = item.getProperty("title").string ?: fullName.last()?.toString() ?: "root" - val className = if (item is Proxy) { - item.prototype::class.toString() - } else { - item::class.toString() - }.replace("class ", "") - - val text: String = if (title.startsWith("@")) { - "[$className}]" - } else { - "$title[$className}]" - } - - return json( - "children" to if ((item as? VisualGroup)?.children?.isEmpty() != false) { - emptyArray() - } else { - true - }, - "text" to text, - "id" to fullName.toString(), - "itree" to json( - "state" to json( - "checked" to (item.visible ?: true) - ) - ) - ) as NodeConfig - - } - - fun TreeNode.fillChildren(group: VisualObject, groupName: Name) { - if(group is VisualGroup) { - group.children.forEach { (token, obj) -> - if (!token.body.startsWith("@")) { - val name = groupName + token - val nodeConfig = generateNodeConfig(obj, name) - val childNode = addChild(nodeConfig) - map[childNode.id] = obj - if (obj is VisualGroup) { - childNode.fillChildren(obj, name) - } - } - } - } - } - - val inspireTree = createInspireTree { - - } - val nodeConfig = generateNodeConfig(this, EmptyName) - val rootNode = inspireTree.addNode(nodeConfig) - map[rootNode.id] = this - rootNode.fillChildren(this, EmptyName) - -// inspireTree.on("node.selected") { node: TreeNode, isLoadEvent: Boolean -> -// if (!isLoadEvent) { -// map[node.id]?.selected = node.selected() -// } -// } -// -// inspireTree.on("node.deselect") { node: TreeNode -> -// map[node.id]?.selected = node.selected() -// } - - inspireTree.on("node.checked") { node: TreeNode, isLoadEvent: Boolean -> - if (!isLoadEvent) { - map[node.id]?.visible = node.checked() - } - } - - inspireTree.on("node.unchecked") { node: TreeNode -> - if (!node.indeterminate()) { - map[node.id]?.visible = node.checked() - } - } - - inspireTree.on("node.focused") { node: TreeNode, isLoadEvent: Boolean -> - if (!isLoadEvent) { - onFocus(map[node.id], node.id) - } - } - - inspireTree.collapseDeep() - - return inspireTree -} - -fun Element.visualObjectTree(group: VisualObject, onFocus: (VisualObject?, String?) -> Unit) { - clear() - append { - card("Visual object tree") { - val domConfig = jsObject { - target = div() - showCheckboxes = false - } - InspireTreeDOM(group.toTree(onFocus), domConfig) - } - } -} \ No newline at end of file diff --git a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/propertyEditor.kt b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/propertyEditor.kt index d718127e..f123ad4d 100644 --- a/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/propertyEditor.kt +++ b/dataforge-vis-spatial/src/jsMain/kotlin/hep/dataforge/vis/spatial/editor/propertyEditor.kt @@ -1,10 +1,10 @@ package hep.dataforge.vis.spatial.editor import hep.dataforge.io.toJson +import hep.dataforge.js.jsObject import hep.dataforge.meta.* import hep.dataforge.vis.common.VisualObject import hep.dataforge.vis.common.findStyle -import hep.dataforge.vis.jsObject import hep.dataforge.vis.spatial.Material3D.Companion.COLOR_KEY import hep.dataforge.vis.spatial.Material3D.Companion.OPACITY_KEY import hep.dataforge.vis.spatial.VisualObject3D.Companion.VISIBLE_KEY @@ -22,7 +22,7 @@ import kotlin.dom.clear fun Meta.toDynamic() = JSON.parse(toJson().toString()) -fun Element.propertyEditor(item: VisualObject?, name: String?) { +fun Element.propertyEditor(item: VisualObject?) { clear() if (item != null) { append { diff --git a/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt b/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt index a35bf4c9..7841fb30 100644 --- a/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt +++ b/spatial-js-demo/src/main/kotlin/hep/dataforge/vis/spatial/demo/ThreeDemoApp.kt @@ -1,10 +1,10 @@ package hep.dataforge.vis.spatial.demo import hep.dataforge.context.ContextBuilder -import hep.dataforge.vis.ApplicationBase +import hep.dataforge.js.Application +import hep.dataforge.js.startApplication import hep.dataforge.vis.common.Colors import hep.dataforge.vis.spatial.* -import hep.dataforge.vis.startApplication import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.delay import kotlinx.coroutines.isActive @@ -15,9 +15,7 @@ import kotlin.math.sin import kotlin.random.Random -private class ThreeDemoApp : ApplicationBase() { - - override val stateKeys: List = emptyList() +private class ThreeDemoApp : Application { override fun start(state: Map) { @@ -141,7 +139,7 @@ private class ThreeDemoApp : ApplicationBase() { thickness = 208.0 rotationX = it * PI2 / 20 color(Colors.green) - //rotationY = it * PI2 / 20 + //rotationY = it * PI2 / 20 } } }