@@ -112,7 +112,7 @@ const demoConfig: FairDOConfig = {
112112 ] ,
113113 sortOptions : [
114114 { field : "_score" , direction : "desc" , label : "Relevance" } ,
115- { field : "name.keyword" , direction : "asc" , label : "Name (ascending)" } ,
115+ { field : "name.keyword" , direction : "asc" , label : "Name (ascending)" , default : true } ,
116116 { field : "name.keyword" , direction : "desc" , label : "Name (descending)" } ,
117117 { field : "Compound.Molar_mass" , direction : "asc" , label : "Molar Mass (ascending)" } ,
118118 { field : "Compound.Molar_mass" , direction : "desc" , label : "Molar Mass (descending)" } ,
@@ -121,14 +121,6 @@ const demoConfig: FairDOConfig = {
121121 { field : "dateModified" , direction : "asc" , label : "Date Modified (ascending)" } ,
122122 { field : "dateModified" , direction : "desc" , label : "Date Modified (descending)" }
123123 ] ,
124- initialState : {
125- sortList : [
126- {
127- field : "name.keyword" ,
128- direction : "asc"
129- }
130- ]
131- } ,
132124 disjunctiveFacets : [
133125 "NMR_Method.keyword" ,
134126 "resourceType.keyword" ,
@@ -139,45 +131,6 @@ const demoConfig: FairDOConfig = {
139131 imageProxy : ( src ) => `https://wsrv.nl/?url=${ src } &h=1000&output=webp&ll`
140132}
141133
142- // const demoConfigWithCompound: FairDOConfig = {
143- // debug: false,
144- // alwaysSearchOnInitialLoad: true,
145- // // host: "https://matwerk.datamanager.kit.edu/search-proxy/api/v1",
146- // host: "https://ddaa9283-f114-4496-b6ed-af12ee34b107.ka.bw-cloud-instance.org:9200",
147- // apiKey: "UGNoTW1KUUJ3WmluUHBTcEVpalo6cGloOUVKZ0tTdnlMYVlpTzV4SXBrUQ==",
148- // indices: [
149- // {
150- // name: "fdo-prod",
151- // facets: [
152- // {
153- // key: "Compound.Molar_mass",
154- // label: "Compound",
155- // type: "min-max-slider"
156- // }
157- // ],
158- // resultFields: [], // Leave empty to get all fields
159- // searchFields: ["name", "pid", "hasMetadata", "isMetadataFor", "NMR_Method"]
160- // }
161- // ],
162- // initialState: {
163- // sortList: [
164- // {
165- // field: "_score",
166- // direction: "desc"
167- // },
168- // {
169- // field: "name.keyword",
170- // direction: "asc"
171- // },
172- // {
173- // field: "locationPreview/Sample.keyword",
174- // direction: "asc"
175- // }
176- // ]
177- // },
178- // disjunctiveFacets: ["NMR_Method.keyword"]
179- // }
180-
181134export const NoResultRenderer : Story = {
182135 args : {
183136 config : demoConfig ,
@@ -267,50 +220,3 @@ export const GenericResultRenderer: Story = {
267220 )
268221 }
269222}
270-
271- // export const CompoundSlider: Story = {
272- // args: {
273- // config: demoConfigWithCompound,
274- // resultView: (props) => (
275- // <GenericResultView
276- // result={props.result}
277- // invertImageInDarkMode
278- // tags={[
279- // {
280- // icon: <GraduationCap className="rfs-shrink-0 rfs-size-4 rfs-mr-2" />,
281- // label: "Resource Type",
282- // field: "resourceType"
283- // },
284- // {
285- // icon: <GlobeIcon className="rfs-shrink-0 rfs-size-4 rfs-mr-2" />,
286- // field: "hadPrimarySource",
287- // valueMapper: (v) => tryURLPrettyPrint(v + ""),
288- // label: "Source"
289- // },
290- // {
291- // icon: <ScaleIcon className="rfs-shrink-0 rfs-size-4 rfs-mr-2" />,
292- // field: "licenseURL",
293- // valueMapper: (v) => tryURLPrettyPrint(v + ""),
294- // label: "License URL"
295- // },
296- // {
297- // icon: <AtomIcon className="rfs-shrink-0 rfs-size-4 rfs-mr-2" />,
298- // field: "Compound.Molar_mass",
299- // label: "Molar Mass",
300- // valueMapper: (v) => v + " g/mol"
301- // }
302- // ]}
303- // titleField="name"
304- // creationDateField="dateCreatedRfc3339"
305- // additionalIdentifierField="identifier"
306- // digitalObjectLocationField="digitalObjectLocation"
307- // imageField="locationPreview/Sample"
308- // parentItemPidField="hasMetadata"
309- // relatedItemPidsField="isMetadataFor"
310- // pidField="pid"
311- // relatedItemsPrefetch={{ searchFields: { pid: {} } }}
312- // showOpenInFairDoScope
313- // />
314- // )
315- // }
316- // }
0 commit comments