diff --git a/lxl-web/src/lib/components/find/SearchMapping.svelte b/lxl-web/src/lib/components/find/SearchMapping.svelte index 73de9b103..46ec4a16f 100644 --- a/lxl-web/src/lib/components/find/SearchMapping.svelte +++ b/lxl-web/src/lib/components/find/SearchMapping.svelte @@ -54,6 +54,7 @@ class="mapping-item {m.children ? 'pill-group' : 'pill'} pill-{m.operator}" class:wildcard={m.operator === 'equals' && m.display === '*'} class:outer={depth === 0} + class:free-text={m?.['@id'] === 'https://id.kb.se/vocab/textQuery'} > {#if 'children' in m} @@ -162,4 +163,15 @@ .pill-between:last-of-type { @apply hidden; } + + .free-text { + & > .pill-label { + display: none; + } + + & > .pill-value::before, + & > .pill-value::after { + content: '"'; + } + } diff --git a/lxl-web/src/lib/types/search.ts b/lxl-web/src/lib/types/search.ts index 1aa2f86dc..fc8903da4 100644 --- a/lxl-web/src/lib/types/search.ts +++ b/lxl-web/src/lib/types/search.ts @@ -58,6 +58,7 @@ export interface MultiSelectFacet extends Facet { } export interface DisplayMapping { + '@id'?: string; display?: DisplayDecorated; up?: Link; children?: DisplayMapping[]; @@ -126,7 +127,9 @@ export interface SearchMapping extends MappingObj { up: { '@id': string }; } -interface ObjectProperty {} +interface ObjectProperty { + '@id'?: string; +} export interface DatatypeProperty { '@type': 'DataTypeProperty'; diff --git a/lxl-web/src/lib/utils/search.ts b/lxl-web/src/lib/utils/search.ts index d1e12225e..63cf1c111 100644 --- a/lxl-web/src/lib/utils/search.ts +++ b/lxl-web/src/lib/utils/search.ts @@ -78,6 +78,7 @@ function displayMappings( if ('property' in m && operator) { const property = m[operator] as FramedData; return { + ...(isObject(m.property) && { '@id': m.property['@id'] }), display: displayUtil.lensAndFormat(property, LensType.Chip, locale), label: m.alias ? translate(`facet.${m.alias}`) diff --git a/lxl-web/src/routes/(app)/[[lang=lang]]/help/en.md b/lxl-web/src/routes/(app)/[[lang=lang]]/help/en.md index ac37e3ef4..f6804ef87 100644 --- a/lxl-web/src/routes/(app)/[[lang=lang]]/help/en.md +++ b/lxl-web/src/routes/(app)/[[lang=lang]]/help/en.md @@ -8,6 +8,10 @@ title: 'Hjälp' Here we will continuously provide information about newly added features and planned developments: +### 2024-06-26 + +- Hide labels for free text queries and add quotes instead + ### 2024-06-12 - Improved help text diff --git a/lxl-web/src/routes/(app)/[[lang=lang]]/help/sv.md b/lxl-web/src/routes/(app)/[[lang=lang]]/help/sv.md index c36d189eb..df68fd400 100644 --- a/lxl-web/src/routes/(app)/[[lang=lang]]/help/sv.md +++ b/lxl-web/src/routes/(app)/[[lang=lang]]/help/sv.md @@ -8,6 +8,10 @@ title: 'Hjälp' Här kommer vi kontinuerligt berätta om nytillkomna funktioner och planerad utveckling: +### 2024-06-26 + +- Dölj etikett för fritext-sökningar och lägg till citattecken istället + ### 2024-06-12 - Förbättrad hjälptext