More search functionality

This commit is contained in:
Pieter Vander Vennet 2024-08-22 22:50:37 +02:00
parent 5d0de8520b
commit 1c46a65c84
25 changed files with 962 additions and 846 deletions

View file

@ -16,6 +16,8 @@
export let layer: LayerConfig
export let config: TagRenderingConfig
export let extraClasses: string | undefined = undefined
export let defaultSize = "w-full"
export let noIcons = false
export let id: string = undefined
@ -28,7 +30,7 @@
</script>
{#if config !== undefined && (config?.condition === undefined || config.condition.matchesProperties($tags))}
<div {id} class={twMerge("link-underline flex h-full w-full flex-col", extraClasses)}>
<div {id} class={twMerge("link-underline flex h-full flex-col", defaultSize, extraClasses)}>
{#if $trs.length === 1}
<TagRenderingMapping
mapping={$trs[0]}
@ -37,13 +39,14 @@
{selectedElement}
{layer}
clss={config?.classes?.join(" ") ?? ""}
{noIcons}
/>
{/if}
{#if $trs.length > 1}
<ul>
{#each $trs as mapping}
<li>
<TagRenderingMapping {mapping} {tags} {state} {selectedElement} {layer} />
<TagRenderingMapping {mapping} {tags} {state} {selectedElement} {layer} {noIcons}/>
</li>
{/each}
</ul>

View file

@ -12,6 +12,7 @@
export let tags: UIEventSource<Record<string, string>>
export let state: SpecialVisualizationState
export let layer: LayerConfig
export let noIcons = false
/**
* Css classes to apply
@ -32,7 +33,7 @@
}
</script>
{#if mapping.icon !== undefined}
{#if mapping.icon !== undefined && !noIcons}
<div class="inline-flex items-center">
<Marker
icons={mapping.icon}