(selectedLib = e.target.value)}> {#each componentLibraries as lib}
{lib.libName}
{/each}
{#if componentLibrary} {#each generate_components_list(componentLibrary.components) as component}
onComponentChosen(component)}>
{splitName(component.name).componentName}
{#if (component.presets || templatesByComponent[component.name]) && component.name === selectedComponent}
{#if component.presets}
{splitName(component.name).componentName} Presets
{#each Object.keys(component.presets) as preset}
onComponentChosen(component, preset)}> {preset}
{/each} {/if} {#if templatesByComponent[component.name]}
{splitName(component.name).componentName} Templates
{#each templatesByComponent[component.name] as template}
onTemplateChosen(template)}> {template.description}
{/each} {/if}
{/if}
{#if component.presets || templatesByComponent[component.name]}
{ selectedComponent = selectedComponent ? null : component.name }}>
...
{/if}
{/each} {/if}
(selectedComponent = null)} onOk={onTemplateInstanceChosen}> {#each templateInstances.map(i => i.name) as instance}
{instance}
{/each}