File tree Expand file tree Collapse file tree 8 files changed +58
-7
lines changed
frontends/dashboard/src/pages/dataset Expand file tree Collapse file tree 8 files changed +58
-7
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ declare module "solid-js" {
7878| datasetId | string | '' |
7979| apiKey | string | '' |
8080| baseUrl | string | "https://api.trieve.ai" |
81+ | type | "docs" | "ecommerce" | "docs" |
82+ | useGroupSearch | boolean | false |
8183| chat | boolean | true |
8284| analytics | boolean | true |
8385| placeholder | string | "Search..." |
Original file line number Diff line number Diff line change 1143411434 ],
1143511435 "nullable" : true
1143611436 },
11437+ "type" : {
11438+ "type" : " string" ,
11439+ "nullable" : true
11440+ },
1143711441 "useGroupSearch" : {
1143811442 "type" : " boolean" ,
1143911443 "nullable" : true
Original file line number Diff line number Diff line change @@ -1820,6 +1820,7 @@ export type PublicPageParameters = {
18201820 searchOptions ?: ( ( PublicPageSearchOptions ) | null ) ;
18211821 suggestedQueries ?: ( boolean ) | null ;
18221822 theme ?: ( ( PublicPageTheme ) | null ) ;
1823+ type ?: ( string ) | null ;
18231824 useGroupSearch ?: ( boolean ) | null ;
18241825} ;
18251826
Original file line number Diff line number Diff line change @@ -357,6 +357,49 @@ export const PublicPageSettings = () => {
357357 class = "block w-4 rounded border border-neutral-300 px-3 py-1.5 shadow-sm placeholder:text-neutral-400 focus:outline-magenta-500 sm:text-sm sm:leading-6"
358358 />
359359 </ div >
360+ < div class = "flex gap-2" >
361+ < div class = "flex items-center gap-1" >
362+ < label class = "block" for = "" >
363+ Ecommerce Mode
364+ </ label >
365+ < Tooltip
366+ tooltipText = "Use the component in ecommerce mode"
367+ body = { < FaRegularCircleQuestion class = "h-3 w-3 text-black" /> }
368+ />
369+ </ div >
370+ < input
371+ placeholder = "Search..."
372+ checked = { extraParams . type === "ecommerce" || false }
373+ type = "checkbox"
374+ onChange = { ( e ) => {
375+ setExtraParams (
376+ "type" ,
377+ e . currentTarget . checked ? "ecommerce" : "docs" ,
378+ ) ;
379+ } }
380+ class = "block w-4 rounded border border-neutral-300 px-3 py-1.5 shadow-sm placeholder:text-neutral-400 focus:outline-magenta-500 sm:text-sm sm:leading-6"
381+ />
382+ </ div >
383+ < div class = "flex gap-2" >
384+ < div class = "flex items-center gap-1" >
385+ < label class = "block" for = "" >
386+ Use Grouping
387+ </ label >
388+ < Tooltip
389+ tooltipText = "Use search over groups instead of chunk-level search"
390+ body = { < FaRegularCircleQuestion class = "h-3 w-3 text-black" /> }
391+ />
392+ </ div >
393+ < input
394+ placeholder = "Search..."
395+ checked = { extraParams . useGroupSearch || true }
396+ type = "checkbox"
397+ onChange = { ( e ) => {
398+ setExtraParams ( "useGroupSearch" , e . currentTarget . checked ) ;
399+ } }
400+ class = "block w-4 rounded border border-neutral-300 px-3 py-1.5 shadow-sm placeholder:text-neutral-400 focus:outline-magenta-500 sm:text-sm sm:leading-6"
401+ />
402+ </ div >
360403 </ div >
361404 </ div >
362405
Original file line number Diff line number Diff line change @@ -2720,6 +2720,7 @@ impl DatasetConfigurationDTO {
27202720 base_url : page_parameters_self
27212721 . base_url
27222722 . or ( page_parameters_curr. base_url ) ,
2723+ r#type : page_parameters_self. r#type . or ( page_parameters_curr. r#type ) ,
27232724 api_key : page_parameters_self
27242725 . api_key
27252726 . or ( page_parameters_curr. api_key ) ,
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ pub struct PublicPageParameters {
114114 #[ serde( skip_serializing_if = "Option::is_none" ) ]
115115 pub base_url : Option < String > ,
116116 #[ serde( skip_serializing_if = "Option::is_none" ) ]
117+ pub r#type : Option < String > ,
118+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
117119 pub api_key : Option < String > ,
118120 #[ serde( skip_serializing_if = "Option::is_none" ) ]
119121 pub analytics : Option < bool > ,
Original file line number Diff line number Diff line change 22< html >
33
44< head >
5- < link rel ="stylesheet " href ="https://unpkg.com/trieve-search-component@0.0.65 /dist/index.css " />
5+ < link rel ="stylesheet " href ="https://unpkg.com/trieve-search-component@0.1.1 /dist/index.css " />
66 < link rel ="preconnect " href ="https://fonts.googleapis.com " />
77 < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin />
88 < link href ="
https://fonts.googleapis.com/css2?family=Maven+Pro:[email protected] &display=swap "
rel ="
stylesheet "
> 9999 {% if params.baseUrl -%}
100100 baseUrl="{{ params.baseUrl }}"
101101 {% endif -%}
102+ {% if params.type -%}
103+ type="{{ params.type }}"
104+ {% endif -%}
102105 {% if params.suggestedQueries -%}
103106 suggestedQueries={{ params.suggestedQueries }}
104107 {% endif -%}
Original file line number Diff line number Diff line change @@ -7116,13 +7116,8 @@ totalist@^3.0.0:
71167116 resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8"
71177117 integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==
71187118
7119- trieve-ts-sdk@^0.0.28 :
7120- version "0.0.28"
7121- resolved "https://registry.yarnpkg.com/trieve-ts-sdk/-/trieve-ts-sdk-0.0.28.tgz#e8a943727e36f6ac8ad4ead7c1d4ce5effe1329b"
7122- integrity sha512-vYJRpWSav4wNdhloUpjWhQaPB+2yLKccP3MqbR2HEca02rUc3okomx9cA9yt+42g6ueYqJ0oomRUYR6mVBAnfw==
7123-
71247119" trieve-ts-sdk@file:clients/ts-sdk " :
7125- version "0.0.14 "
7120+ version "0.0.28 "
71267121
71277122trim-lines@^3.0.0 :
71287123 version "3.0.1"
You can’t perform that action at this time.
0 commit comments