Skip to content

Commit

Permalink
[Enhancement #536] Support search by examples in faceted search.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledsoft committed Oct 21, 2024
1 parent d329dea commit e98a767
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions src/component/search/facet/FacetedSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ INITIAL_STATE[VocabularyUtils.SKOS_NOTATION] = {
value: [""],
matchType: MatchType.EXACT_MATCH,
};
INITIAL_STATE[VocabularyUtils.SKOS_EXAMPLE] = {
property: VocabularyUtils.SKOS_EXAMPLE,
value: [""],
matchType: MatchType.SUBSTRING,
};
INITIAL_STATE[VocabularyUtils.RDF_TYPE] = {
property: VocabularyUtils.RDF_TYPE,
value: [],
Expand Down Expand Up @@ -96,33 +101,43 @@ const FacetedSearch: React.FC = () => {
<Card className="mb-0">
<CardBody>
<Row>
<Col xl={3} xs={6}>
<TextFacet
id="faceted-search-notation"
label={i18n("term.metadata.notation.label")}
value={params[VocabularyUtils.SKOS_NOTATION]}
onChange={onChange}
/>
</Col>
<Col xl={3} xs={6}>
<Col xl={4} xs={6}>
<VocabularyFacet
value={params[VocabularyUtils.IS_TERM_FROM_VOCABULARY]}
onChange={onChange}
/>
</Col>
<Col xl={3} xs={6}>
<Col xl={4} xs={6}>
<TermTypeFacet
value={params[VocabularyUtils.RDF_TYPE]}
onChange={onChange}
/>
</Col>
<Col xl={3} xs={6}>
<Col xl={4} xs={6}>
<TermStateFacet
value={params[VocabularyUtils.HAS_TERM_STATE]}
onChange={onChange}
/>
</Col>
</Row>
<Row>
<Col xl={4} xs={6}>
<TextFacet
id="faceted-search-notation"
label={i18n("term.metadata.notation.label")}
value={params[VocabularyUtils.SKOS_NOTATION]}
onChange={onChange}
/>
</Col>
<Col xl={4} xs={6}>
<TextFacet
id="faceted-search-examples"
label={i18n("term.metadata.example.label")}
value={params[VocabularyUtils.SKOS_EXAMPLE]}
onChange={onChange}
/>
</Col>
</Row>
</CardBody>
</Card>
<Card>
Expand Down

0 comments on commit e98a767

Please sign in to comment.