@searchcraft/javascript-sdk 0.2.7 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/cjs/index.cjs.js +5 -6
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{searchcraft-auto-search-form_18.cjs.entry.js → searchcraft-auto-search-form_19.cjs.entry.js} +120 -97
  5. package/dist/cjs/searchcraft-auto-search-form_19.cjs.entry.js.map +1 -0
  6. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +2 -2
  7. package/dist/cjs/searchcraft-button.cjs.entry.js +1 -1
  8. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +1 -1
  9. package/dist/{esm/store-9e0b0710.js → cjs/store-f3bec622.js} +99 -3
  10. package/dist/cjs/store-f3bec622.js.map +1 -0
  11. package/dist/collection/assets/searchcraft-dash-icon.js +9 -0
  12. package/dist/collection/assets/searchcraft-dash-icon.js.map +1 -0
  13. package/dist/collection/collection-manifest.json +1 -0
  14. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +23 -9
  15. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -1
  16. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js +1 -1
  17. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +3 -3
  18. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +1 -3
  19. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
  20. package/dist/collection/components/searchcraft-button/searchcraft-button.js +1 -1
  21. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +1 -1
  22. package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +73 -71
  23. package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +1 -1
  24. package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.module.css +24 -0
  25. package/dist/collection/components/searchcraft-input/searchcraft-input.js +1 -1
  26. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +1 -1
  27. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +1 -1
  28. package/dist/collection/provider/store.js +3 -1
  29. package/dist/collection/provider/store.js.map +1 -1
  30. package/dist/collection/utils/utils.js +17 -6
  31. package/dist/collection/utils/utils.js.map +1 -1
  32. package/dist/components/index.js +4 -2
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/components/{p-0eb562da.js → p-07edaa9b.js} +3 -3
  35. package/dist/components/{p-0eb562da.js.map → p-07edaa9b.js.map} +1 -1
  36. package/dist/components/{p-52b81ff4.js → p-4468fba3.js} +3 -3
  37. package/dist/components/{p-52b81ff4.js.map → p-4468fba3.js.map} +1 -1
  38. package/dist/components/{p-14f328f4.js → p-498c7ef9.js} +2 -2
  39. package/dist/components/{p-14f328f4.js.map → p-498c7ef9.js.map} +1 -1
  40. package/dist/{cjs/utils-2dc6115c.js → components/p-7d1bcd2d.js} +19 -15
  41. package/dist/components/p-7d1bcd2d.js.map +1 -0
  42. package/dist/components/{p-9952c9ba.js → p-bc3f9025.js} +2 -2
  43. package/dist/components/{p-9952c9ba.js.map → p-bc3f9025.js.map} +1 -1
  44. package/dist/components/{p-bdf84774.js → p-bfb22305.js} +2 -2
  45. package/dist/components/{p-bdf84774.js.map → p-bfb22305.js.map} +1 -1
  46. package/dist/components/{p-1b18e9fe.js → p-c31274dd.js} +4 -4
  47. package/dist/components/{p-1b18e9fe.js.map → p-c31274dd.js.map} +1 -1
  48. package/dist/components/{p-643cfdcf.js → p-dd2a4022.js} +6 -6
  49. package/dist/components/{p-643cfdcf.js.map → p-dd2a4022.js.map} +1 -1
  50. package/dist/components/p-e5471fcf.js +29 -0
  51. package/dist/components/p-e5471fcf.js.map +1 -0
  52. package/dist/components/{p-157e5b1a.js → p-ff049f0a.js} +5 -2
  53. package/dist/components/p-ff049f0a.js.map +1 -0
  54. package/dist/components/searchcraft-auto-search-form.js +30 -16
  55. package/dist/components/searchcraft-auto-search-form.js.map +1 -1
  56. package/dist/components/searchcraft-base-search-form.js +8 -8
  57. package/dist/components/searchcraft-base-search-result.js +1 -1
  58. package/dist/components/searchcraft-base-search-results.js +5 -7
  59. package/dist/components/searchcraft-base-search-results.js.map +1 -1
  60. package/dist/components/searchcraft-button.js +1 -1
  61. package/dist/components/searchcraft-clear-input-button.js +1 -1
  62. package/dist/components/searchcraft-dash-icon.d.ts +11 -0
  63. package/dist/components/searchcraft-dash-icon.js +8 -0
  64. package/dist/components/searchcraft-dash-icon.js.map +1 -0
  65. package/dist/components/searchcraft-error-message.js +1 -1
  66. package/dist/components/searchcraft-filters-list.js +84 -76
  67. package/dist/components/searchcraft-filters-list.js.map +1 -1
  68. package/dist/components/searchcraft-input.js +1 -1
  69. package/dist/components/searchcraft-results-info.js +1 -1
  70. package/dist/components/searchcraft-slider.js +1 -1
  71. package/dist/components/searchcraft-spinner-dark.js +1 -1
  72. package/dist/components/searchcraft-spinner-light.js +1 -1
  73. package/dist/components/searchcraft-toggle-button.js +1 -1
  74. package/dist/esm/index.js +1 -2
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/esm/{searchcraft-auto-search-form_18.entry.js → searchcraft-auto-search-form_19.entry.js} +114 -92
  78. package/dist/esm/searchcraft-auto-search-form_19.entry.js.map +1 -0
  79. package/dist/esm/searchcraft-base-search-form.entry.js +2 -2
  80. package/dist/esm/searchcraft-button.entry.js +1 -1
  81. package/dist/esm/searchcraft-javascript-sdk.js +1 -1
  82. package/dist/{cjs/store-c44c58ab.js → esm/store-6af9ea01.js} +88 -6
  83. package/dist/esm/store-6af9ea01.js.map +1 -0
  84. package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
  85. package/dist/searchcraft-javascript-sdk/{p-d9efd790.entry.js → p-05416a3e.entry.js} +2 -2
  86. package/dist/searchcraft-javascript-sdk/p-1ab836bf.js +11 -0
  87. package/dist/searchcraft-javascript-sdk/p-1ab836bf.js.map +1 -0
  88. package/dist/searchcraft-javascript-sdk/{p-66f38e89.entry.js → p-3cb77ee1.entry.js} +2 -2
  89. package/dist/searchcraft-javascript-sdk/p-6c007e2e.entry.js +2 -0
  90. package/dist/searchcraft-javascript-sdk/p-6c007e2e.entry.js.map +1 -0
  91. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
  92. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  93. package/dist/types/assets/searchcraft-dash-icon.d.ts +3 -0
  94. package/dist/types/components/searchcraft-filters-list/searchcraft-filters-list.d.ts +13 -5
  95. package/dist/types/components.d.ts +13 -0
  96. package/dist/types/utils/utils.d.ts +3 -0
  97. package/package.json +1 -1
  98. package/dist/cjs/searchcraft-auto-search-form_18.cjs.entry.js.map +0 -1
  99. package/dist/cjs/store-c44c58ab.js.map +0 -1
  100. package/dist/cjs/utils-2dc6115c.js.map +0 -1
  101. package/dist/components/p-157e5b1a.js.map +0 -1
  102. package/dist/components/p-2bda632c.js +0 -77
  103. package/dist/components/p-2bda632c.js.map +0 -1
  104. package/dist/esm/searchcraft-auto-search-form_18.entry.js.map +0 -1
  105. package/dist/esm/store-9e0b0710.js.map +0 -1
  106. package/dist/esm/utils-a3373179.js +0 -77
  107. package/dist/esm/utils-a3373179.js.map +0 -1
  108. package/dist/searchcraft-javascript-sdk/p-2bda632c.js +0 -2
  109. package/dist/searchcraft-javascript-sdk/p-2bda632c.js.map +0 -1
  110. package/dist/searchcraft-javascript-sdk/p-67cc5ccb.entry.js +0 -2
  111. package/dist/searchcraft-javascript-sdk/p-67cc5ccb.entry.js.map +0 -1
  112. package/dist/searchcraft-javascript-sdk/p-901fee50.js +0 -11
  113. package/dist/searchcraft-javascript-sdk/p-901fee50.js.map +0 -1
  114. /package/dist/searchcraft-javascript-sdk/{p-d9efd790.entry.js.map → p-05416a3e.entry.js.map} +0 -0
  115. /package/dist/searchcraft-javascript-sdk/{p-66f38e89.entry.js.map → p-3cb77ee1.entry.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,F as n}from"./p-0880cfbb.js";import{u as s,g as r,p as a,a as o,s as h,e as c,c as l,f as p}from"./p-1ab836bf.js";import{c as d}from"./p-5cdc6210.js";const f=":root{--font-stack:Helvetica, Arial, sans-serif}.formLTR{font-family:var(--font-stack);text-align:left;width:100%}.formRTL{font-family:var(--font-stack);text-align:right;width:100%}";const g=f;const u=class{constructor(e){t(this,e);this.inputClearedOrNoResults=i(this,"inputClearedOrNoResults",7);this.querySubmit=i(this,"querySubmit",7);this.debounceTimeout=null;this.debounceDelay=0;this.searchStore=s.getState();this.handleInputChange=t=>{this.query=t.detail;this.searchStore.setQuery(this.query);if(this.query.trim()===""){this.searchResults=null;this.searchStore.setSearchResults(null)}else{this.querySubmit.emit(this.query)}};this.handleInputKeyUp=t=>{const i=t.detail;if(i===this.query){return}this.query=i;if(this.debounceTimeout){clearTimeout(this.debounceTimeout)}this.debounceTimeout=setTimeout((()=>{if(this.query.trim()===""){this.searchResults=null;this.searchStore.setSearchResults(null)}else{this.searchStore.setQuery(this.query);this.querySubmit.emit(this.query);this.runSearch()}}),this.debounceDelay)};this.handleClearInput=()=>{this.query="";this.searchResults=null;this.searchStore.setQuery("");this.searchStore.setSearchResults(null);if(typeof this.clearInput==="function"){this.clearInput()}if(this.debounceTimeout){clearTimeout(this.debounceTimeout)}this.error=false;this.inputClearedOrNoResults.emit()};this.runSearch=async()=>{if(this.query.trim()===""){this.error=true;this.inputClearedOrNoResults.emit()}else{this.error=false;this.searchStore.setQuery(this.query);this.searchStore.setSelectedFilters([]);try{await this.searchStore.search()}catch(t){this.error=true;this.inputClearedOrNoResults.emit()}}};this.handleFormSubmit=async t=>{t.preventDefault();await this.runSearch()};this.autoSearchFormClass="";this.clearInput=()=>{};this.config={apiKey:"",endpointURL:"",index:[]};this.customStylesForInput={};this.inputCaptionValue="";this.inputIconHeight=20;this.inputIconWidth=20;this.labelForInput="";this.placeholderValue="Search here";this.rightToLeftOrientation=false;this.searchContainerClass="";this.error=false;this.isRequesting=false;this.query="";this.searchResults=null}componentDidLoad(){const t=new r(this.config);this.searchStore.initialize(t,true);this.unsubscribe=s.subscribe((t=>{this.isRequesting=t.isRequesting;this.searchResults=Object.assign({},t.searchResults)}))}disconnectedCallback(){if(this.unsubscribe){this.unsubscribe()}}render(){const t=this.rightToLeftOrientation?"formRTL":"formLTR";const i=a(this.customStylesForInput);return e("form",{key:"2421495aa88b52a47658af9b682e172da7d23691",class:`${t}`,onSubmit:this.handleFormSubmit},e("searchcraft-input-label",{key:"032e7e3a7f83af11422b64b023a38c2f433d3809",label:this.labelForInput}),e("searchcraft-input",{key:"a3a286e6b5ade795a157a1a046278477731684b4",customStyles:i,"input-caption-value":this.inputCaptionValue,"input-icon-height":this.inputIconHeight,"input-icon-width":this.inputIconWidth,"is-requesting":this.isRequesting,onClearInput:this.handleClearInput,onInputKeyUp:this.handleInputKeyUp,onSearchInputChange:this.handleInputChange,"placeholder-value":this.placeholderValue,query:this.query,"right-to-left-orientation":this.rightToLeftOrientation}),this.error&&e("searchcraft-error-message",{key:"4588522cf331cc8165e789bb3d58f35ef5148f11",errorMessage:"Please enter a search query."}))}};u.style=g;const x='@charset "UTF-8";:root{--font-stack:Helvetica, Arial, sans-serif}.interactiveResultContainerLight{align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;position:relative;background-color:#FAFAFA}@media (min-width: 600px){.interactiveResultContainerLight{flex-direction:row}}.interactiveResultContainerDark{align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;position:relative;background-color:#2E2E2E}@media (min-width: 600px){.interactiveResultContainerDark{flex-direction:row}}.resultContainer{align-items:flex-start;display:flex;flex-direction:column;gap:16px}@media (min-width: 600px){.resultContainer{flex-direction:row}}.interactiveIconLarge{display:inline-block;position:absolute;right:5px;top:8px}@media (max-width: 600px){.interactiveIconLarge{display:none}}.interactiveIconSmall{display:inline-block;position:absolute;right:5px;top:-2px}@media (min-width: 600px){.interactiveIconSmall{display:none}}.imageContainer{max-width:100%}.contentContainer{max-height:100%;max-width:100%}@media (min-width: 600px){.contentContainer{max-width:50%}}.secondaryContentContainer{display:flex}.imageLight{border-radius:8px;max-height:100%;max-width:100%;border:1px solid #D9D9D9}.imageDark{border-radius:8px;max-height:100%;max-width:100%;border:1px solid #333}.headingLight{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0;position:relative;-webkit-font-smoothing:antialiased;color:#292929}.headingDark{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0;position:relative;-webkit-font-smoothing:antialiased;color:#FFF}.subheadingLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#737373}.subheadingDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#BFBFBF}.primaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#404040}.primaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#E6E6E6}.secondaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#404040}.secondaryContentLight::after{content:"•";color:#404040;font-size:1em;margin-left:5px;margin-right:5px}.secondaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#E6E6E6}.tertiaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#404040}.tertiaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;-webkit-font-smoothing:antialiased;color:#E6E6E6}';const b=x;const k=class{constructor(e){t(this,e);this.buttonCallback=i(this,"buttonCallback",7);this.keyDownCallback=i(this,"keyDownCallback",7);this.resultCallback=i(this,"resultCallback",7);this.buttonCallback=()=>{};this.keyDownCallback=()=>{};this.resultCallback=()=>{};this.handleButtonClick=()=>{this.buttonCallback()};this.handleContainerClick=()=>{if(this.isInteractive){this.resultCallback()}};this.buttonText="";this.customStyles="{}";this.headingText="";this.imageDescription="";this.imageSource="";this.isInteractive=false;this.primaryContent="";this.secondaryContent="";this.subheadingText="";this.tertiaryContent="";this.themeMode="light";this.placeImageRight=false}parseStyles(){try{return JSON.parse(this.customStyles)}catch(t){console.error("Error parsing custom styles:",t);return{}}}render(){const t=this.themeMode==="light";const i=this.parseStyles();const s=this.imageSource&&e("div",{key:"5446a636265cf330a7e67f7539dad7e25077ecda",class:"imageContainer"},e("img",{key:"59529cce35008eb171f4ee634ed94ff96e716dad",alt:this.imageDescription,class:t?"imageLight":"imageDark",src:this.imageSource,style:i.image||{}}));const r=e("div",{key:"fd052ef1e3dedcf5b1467b6b0760d0be349c1faf",class:"contentContainer"},e("h2",{key:"1d1eca475651641b34d477ea7e2ea2f3eb7a2c49",class:t?"headingLight":"headingDark",style:i.heading||{}},this.headingText),e("h3",{key:"9fcf054f634d088b72b67a2675b67a89f651285b",class:t?"subheadingLight":"subheadingDark",style:i.subheading||{}},this.subheadingText),e("p",{key:"477078081008771a462abb042232b84f1e72ddd5",class:t?"primaryContentLight":"primaryContentDark",style:i.primaryContent||{}},this.primaryContent),e("div",{key:"716ea0fe1efbd18f0b6313baac80834fbab53001",class:"secondaryContentContainer"},e("p",{key:"340dad3f568e5cc2b0a1b412b92a335b9afb7a0f",class:t?"secondaryContentLight":"secondaryContentDark",style:i.secondaryContent||{}},this.secondaryContent),e("p",{key:"b0c940aab4b48d4e560aabe7551b3c1a0a4ef3ae",class:t?"tertiaryContentLight":"tertiaryContentDark",style:i.tertiaryContent||{}},this.tertiaryContent)),this.buttonText&&e("button",{key:"d9a08ff62c8bc7d2b13bb42872e2391290de0712",onClick:this.handleButtonClick,style:i.button||{},type:"button"},this.buttonText));return e("div",{key:"310676a0e48c3a3d76559b3e3012db1681a55499",class:this.isInteractive?t?"interactiveResultContainerLight":"interactiveResultContainerDark":"resultContainer",onKeyDown:this.keyDownCallback,onClick:this.handleContainerClick,style:i.container||{},tabindex:"0"},this.placeImageRight?e(n,null,r,s):e(n,null,s,r))}};k.style=b;const m=":root{--font-stack:Helvetica, Arial, sans-serif}.resultsContainer{display:flex;flex-direction:column;justify-content:center;margin:16px 0}.resultsContainer>p{align-self:center}.resultsContainer>div{margin-bottom:20px}.resultsContainer>div img{height:300px;width:200px}.adSection{align-items:center;background-color:#F1F1F1;border:1px solid #DCDDDE;border-radius:16px;display:flex;flex-direction:column;font-size:16px;justify-content:center;margin:auto;min-height:150px;text-align:center;width:100%}.adSection p{margin-top:5px}.emptyState{text-align:center;width:100%}.errorMessageContainer{text-align:center}";const y=m;const v=class{constructor(i){t(this,i);this.adInterval=4;this.customStylesForResults={};this.documentAttributesForDisplay="";this.fallbackElement=null;this.formatTime=true;this.placeAdAtEnd=false;this.placeAdAtStart=true;this.placeResultImageRight=false;this.hasSearched=false;this.query="";this.searchResults=null}componentDidLoad(){if(!this.documentAttributesForDisplay||this.documentAttributesForDisplay.length===0){console.warn("No document attributes provided; using empty keys array.");this.documentAttributesForDisplay=""}this.unsubscribe=s.subscribe((t=>{if(t.query.length>0){this.hasSearched=true}else{this.hasSearched=false}this.searchResults=Object.assign({},t.searchResults);this.query=t.query}));const{searchResults:t,query:i}=s.getState();this.searchResults=t;this.query=i}disconnectedCallback(){if(this.unsubscribe){this.unsubscribe()}}render(){var t,i,n,s,r,a,p;if(!this.hasSearched){return e("div",{class:"emptyState"},e("slot",{name:"empty-search"}))}if(!((t=this.searchResults)===null||t===void 0?void 0:t.data)){return}const d=o(this.documentAttributesForDisplay);const f=typeof this.customStylesForResults==="string"?this.customStylesForResults:h(this.customStylesForResults);const g=(s=(n=(i=this.searchResults)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.hits)===null||s===void 0?void 0:s.map(((t,i)=>{const{doc:n}=t;const s=c(n,d);if(this.formatTime){for(const t of d){if(s[t]){const i=s[t];if(typeof i==="string"&&!Number.isNaN(Date.parse(i))){s[t]=l(i)}}}}return e("searchcraft-base-search-result",{"button-callback":()=>console.log("button callback"),"custom-styles":f,"image-source":s[d[d.length-1]],"is-interactive":true,key:`${t.document_id}-${i}`,"keydown-callback":()=>console.log("keydown"),"heading-text":s[d[0]],"place-image-right":this.placeResultImageRight,"primary-content":s[d[2]],"result-callback":()=>console.log("interactive element"),"secondary-content":s[d[3]],"subheading-text":s[d[1]],"tertiary-content":s[d[4]]})}));const u=[];if(this.placeAdAtStart){u.push(e("div",{key:"ad-section-start",class:"adSection"},e("span",null,"##"),e("p",null," Ad Impressions")))}if(this.adInterval>0){g.forEach(((t,i)=>{u.push(t);if((i+1)%this.adInterval===0){u.push(e("div",{key:`ad-section-${i+1}`,class:"adSection"},e("span",null,"##"),e("p",null," Ad Impressions")))}}))}else{u.push(...g)}if(this.placeAdAtEnd){u.push(e("div",{key:"ad-section-end",class:"adSection"},e("span",null,"##"),e("p",null," Ad Impressions")))}return e("div",{class:"resultsContainer"},u,this.query.length>0&&((p=(a=(r=this.searchResults)===null||r===void 0?void 0:r.data)===null||a===void 0?void 0:a.hits)===null||p===void 0?void 0:p.length)===0&&e("div",{class:"errorMessageContainer"},e("searchcraft-error-message",{"error-message":`No search results found for "${this.query}" query`})))}};v.style=y;const w=class{constructor(i){t(this,i)}render(){return e("svg",{key:"3db200942b79612a38293544a029c6854dfa4beb",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e("title",{key:"b7b6af8651edb5cc0e054ed775b9029c6c93535e"},"Checkbox Check"),e("path",{key:"7c74edc45f007245e4c6e4fd5d37dbc6dad20de0",d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}))}};const L=class{constructor(i){t(this,i);this.type="clear-light"}render(){switch(this.type){case"clear-light":return e("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},e("title",{id:"icon-title"},"Searchcraft Clear Input Icon Light"),e("path",{d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"black","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));case"clear-dark":return e("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},e("title",{id:"icon-title"},"Searchcraft Clear Input Icon Dark"),e("path",{d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));case"arrow-light":return e("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},e("title",{id:"icon-title"},"Searchcraft Arrow Right Icon Light"),e("path",{d:"M7.5 15.0444L12.5 10.0444L7.5 5.04443",stroke:"#737373","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));case"arrow-dark":return e("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},e("title",{id:"icon-title"},"Searchcraft Arrow Right Icon Dark"),e("path",{d:"M1.5 11L6.5 6L1.5 1",stroke:"#BFBFBF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));default:return null}}};const C=":root{--font-stack:Helvetica, Arial, sans-serif}.inputClearButtonLTR{align-items:center;background:none;border:none;display:flex;height:20px;justify-content:center;padding:0;position:absolute;right:0;top:50%;transform:translateY(-50%);width:20px}.inputClearButtonRTL{align-items:center;background:none;border:none;display:flex;height:20px;justify-content:center;left:0px;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:20px}";const F=C;const D=class{constructor(e){t(this,e);this.clearInput=i(this,"clearInput",7);this.handleClearClick=t=>{t.preventDefault();this.clearInput.emit()};this.isRequesting=false;this.rightToLeftOrientation=false;this.theme="light"}isLightTheme(){return this.theme==="light"}render(){return this.rightToLeftOrientation?e("button",{class:d("inputClearButtonRTL",".sc-clear-input-button-rtl"),onClick:this.handleClearClick,type:"button"},this.isRequesting?this.isLightTheme?e("searchcraft-spinner-light",null):e("searchcraft-spinner-dark",null):this.isLightTheme?e("searchcraft-clear-icon-set",{type:"clear-light"}):e("searchcraft-clear-icon-set",{type:"clear-dark"})):e("button",{class:d("inputClearButtonLTR",".sc-clear-input-button-ltr"),onClick:this.handleClearClick,type:"button"},this.isRequesting?this.isLightTheme?e("searchcraft-spinner-light",null):e("searchcraft-spinner-dark",null):this.isLightTheme?e("searchcraft-clear-icon-set",{type:"clear-light"}):e("searchcraft-clear-icon-set",{type:"clear-dark"}))}};D.style=F;const R=class{constructor(i){t(this,i)}render(){return e("svg",{key:"4d0c3ab69a973ec8b1d89f52082e4b98ce17e39d",width:"14",height:"3",viewBox:"0 0 14 3",fill:"none"},e("title",{key:"99a099dcd6a163ba5b8c1f5b80f9ebfde2152778"},"Checkbox Dash"),e("line",{key:"49f030f69ff1d37139f868ffb94b5f24442dce37",x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))}};const T=":root{--font-stack:Helvetica, Arial, sans-serif}.errorMessageLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000}.errorMessageDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3}";const E=T;const B=class{constructor(i){t(this,i);this.errorMessage=undefined;this.theme="light"}render(){const t=this.theme==="light"?"errorMessageLight":"errorMessageDark";return e("p",{key:"7c26f9a1b2589d57a81f7909c456e712d9b7fe79",class:d(t)},this.errorMessage||"Search term is required.")}};B.style=E;const S='.filtersList{width:100%}.checkboxLabel{align-items:center;color:#292929;display:flex;font-family:"Source Sans Pro";font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.checkboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:#EDEDED;border:1px solid #D9D9D9;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.checkboxLabel input[type=checkbox]:checked{background-color:#000;position:relative}.checkboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.checkboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.remainingFilterListCheckbox{margin-left:16px}.childCheckboxLabel{align-items:center;color:#292929;display:flex;font-family:"Source Sans Pro";font-size:14px;font-weight:600;gap:12px;position:relative}.childCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:#EDEDED;border:1px solid #D9D9D9;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childCheckboxLabel input[type=checkbox]:checked{background-color:#000;position:relative}.childCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:10px;left:7px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:5px;left:9px}.loading{align-items:center;display:flex;justify-content:center;margin:100px}';const z=S;const _=class{constructor(e){t(this,e);this.filtersUpdated=i(this,"filtersUpdated",7);this.searchStore=s.getState();this.autoSearchFormElement=null;this.handleSearchRequest=()=>{this.selectedFilters=[];this.searchStore.setSelectedFilters([]);this.emitFiltersUpdate()};this.filters=[];this.dynamicFilters=[];this.selectedFilters=[];this.query="";this.isRequesting=false;this.resultsCount=0}connectedCallback(){var t;const i=this.searchStore;const e=(t=i.searchResults)===null||t===void 0?void 0:t.data.facets;if(e){this.populateFiltersFromFacets(e)}this.unsubscribe=s.subscribe((t=>{var i,e,n,s,r;const a=(i=t.query)===null||i===void 0?void 0:i.trim();const o=(e=t.searchResults)===null||e===void 0?void 0:e.data.facets;this.query=a||"";this.isRequesting=t.isRequesting;this.resultsCount=((r=(s=(n=t.searchResults)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.hits)===null||r===void 0?void 0:r.length)||0;if(o&&this.selectedFilters.length===0){this.populateFiltersFromFacets(o)}}));this.autoSearchFormElement=document.querySelector("searchcraft-auto-search-form");if(this.autoSearchFormElement){this.autoSearchFormElement.addEventListener("querySubmit",this.handleSearchRequest)}}disconnectedCallback(){if(this.unsubscribe){this.unsubscribe()}if(this.autoSearchFormElement){this.autoSearchFormElement.removeEventListener("querySubmit",this.handleSearchRequest)}}populateFiltersFromFacets(t){var i;const e=p(((i=t[0])===null||i===void 0?void 0:i.section)||[]);this.dynamicFilters=e.map((t=>({label:t.label,value:t.value,count:t.count,children:t.children||[]})))}handleCheckboxChange(t,i,e=false){var n;if(e){const e=this.dynamicFilters.find((i=>i.value===t));const s=((n=e===null||e===void 0?void 0:e.children)===null||n===void 0?void 0:n.map((t=>t.value)))||[];if(!i){this.selectedFilters=this.selectedFilters.filter((i=>i!==t&&!s.includes(i)))}else{this.selectedFilters=[...this.selectedFilters,t]}}else{this.selectedFilters=i?[...this.selectedFilters,t]:this.selectedFilters.filter((i=>i!==t))}this.emitFiltersUpdate()}emitFiltersUpdate(){this.filtersUpdated.emit(this.selectedFilters);this.searchStore.setSelectedFilters(this.selectedFilters);this.searchStore.search()}formatLabel(t,i){return`${t.replace(/-/g," ").replace(/\b\w/g,(t=>t.toUpperCase()))} (${i})`}render(){if(!this.query||this.resultsCount===0){return null}return e("div",{class:"filtersList"},this.dynamicFilters.map((t=>{const i=t.children?t.children.some((t=>this.selectedFilters.includes(t.value))):false;return e("div",{key:t.value,class:"filterItem"},e("label",{class:"checkboxLabel"},e("input",{type:"checkbox",checked:this.selectedFilters.includes(t.value),onChange:i=>this.handleCheckboxChange(t.value,i.target.checked,true)}),i?e("div",{class:"dashContainer"},e("searchcraft-dash-icon",null)):e("div",{class:"checkContainer"},e("searchcraft-check-icon",null)),this.formatLabel(t.label,t.count)),t.children&&t.children.length>0&&e("div",{class:"childrenContainer"},t.children.map((i=>e("label",{key:i.value,class:"childCheckboxLabel",style:{marginLeft:"20px",display:this.selectedFilters.includes(t.value)?"flex":"none"}},e("input",{type:"checkbox",checked:this.selectedFilters.includes(i.value),onChange:t=>this.handleCheckboxChange(i.value,t.target.checked)}),e("div",{class:"checkContainer"},e("searchcraft-check-icon",null)),this.formatLabel(i.label.includes("/")?i.label.split("/").pop()||i.label:i.label,i.count))))))})))}};_.style=z;const I=":root{--font-stack:Helvetica, Arial, sans-serif}.inputContainerLTR{position:relative;width:100%}.inputContainerRTL{position:relative;width:100%;margin-left:8px}.inputLightLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#EDEDED;color:#292929;margin-right:8px;padding-left:36px;padding-right:16px}.inputLightLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputLightLTR::placeholder{color:#737373}.inputLightLTR:focus{outline:2px solid #000}.inputDarkLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;margin-right:8px;padding-left:36px;padding-right:16px}.inputDarkLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputDarkLTR::placeholder{color:#BFBFBF}.inputDarkLTR:focus{outline:2px solid #FFF}.inputErrorLightLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#EDEDED;color:#292929;outline:2px solid #c00;margin-right:8px;padding-left:36px;padding-right:16px}.inputErrorLightLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorLightLTR::placeholder{color:#737373}.inputErrorLightLTR:focus{outline:2px solid #000}.inputErrorLightLTR:focus-visible{outline:2px solid #c00}.inputErrorDarkLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;outline:2px solid #FFB3B3;margin-right:8px;padding-left:36px;padding-right:16px}.inputErrorDarkLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorDarkLTR::placeholder{color:#BFBFBF}.inputErrorDarkLTR:focus{outline:2px solid #FFF}.inputErrorDarkLTR:focus-visible{outline:2px solid #FFB3B3}.inputLightRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#EDEDED;color:#292929;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputLightRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputLightRTL::placeholder{color:#737373}.inputLightRTL:focus{outline:2px solid #000}.inputDarkRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputDarkRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputDarkRTL::placeholder{color:#BFBFBF}.inputDarkRTL:focus{outline:2px solid #FFF}.inputErrorLightRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#EDEDED;color:#292929;outline:2px solid #c00;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputErrorLightRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorLightRTL::placeholder{color:#737373}.inputErrorLightRTL:focus{outline:2px solid #000}.inputErrorLightRTL:focus-visible{outline:2px solid #c00}.inputErrorDarkRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;outline:2px solid #FFB3B3;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputErrorDarkRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorDarkRTL::placeholder{color:#BFBFBF}.inputErrorDarkRTL:focus{outline:2px solid #FFF}.inputErrorDarkRTL:focus-visible{outline:2px solid #FFB3B3}.inputWrapper{align-items:center;display:flex;position:relative;width:100%}";const A=I;const M=class{constructor(e){t(this,e);this.clearInput=i(this,"clearInput",7);this.searchInputChange=i(this,"searchInputChange",7);this.inputKeyUp=i(this,"inputKeyUp",7);this.customStyles={};this.error=false;this.formClassName="";this.inputCaptionClassName="";this.inputCaptionValue="";this.inputClassName="";this.inputIconHeight=20;this.inputIconWidth=20;this.isRequesting=false;this.placeholderValue="Enter Search";this.rightToLeftOrientation=false;this.query="";this.theme="light"}get isLightTheme(){return this.theme==="light"}handleInputChange(t){const i=t.target;this.searchInputChange.emit(i.value)}handleInputKeyUp(t){const i=t.target;this.inputKeyUp.emit(i.value)}handleClearInput(){if(this.clearInput){this.clearInput.emit()}}render(){const t=this.rightToLeftOrientation?"inputContainerRTL":"inputContainerLTR";const i=d(this.error?this.isLightTheme?"inputErrorLightRTL":"inputErrorDarkRTL":this.isLightTheme?"inputLightLTR":"inputDarkLTR","searchcraft-input");const s=a(this.customStyles);const r={fontSize:s.placeholderFontSize||"16px"};return e("div",{key:"0eea589d7f78b4ae830b1950ab193f9c72797625",class:d(t,this.formClassName,"searchcraft-input-form")},this.rightToLeftOrientation?e(n,null,e("input",{autoComplete:"off",class:d(i,"searchcraft-input"),id:"searchcraft-input-id",onChange:this.handleInputChange.bind(this),onKeyUp:this.handleInputKeyUp.bind(this),placeholder:this.placeholderValue,type:"text",value:this.query,style:s}),e("style",null,`\n #searchcraft-input-id::placeholder {\n font-size: ${r.fontSize};\n }\n `),this.inputCaptionValue&&e("searchcraft-input-caption",{inputCaptionClassName:this.inputCaptionClassName,inputCaptionValue:this.inputCaptionValue,rightToLeftOrientation:this.rightToLeftOrientation}),this.query.length>0&&e("searchcraft-clear-input-button",{isRequesting:this.isRequesting,onClearInput:this.handleClearInput,rightToLeftOrientation:this.rightToLeftOrientation}),e("searchcraft-input-icon",{error:this.error,height:this.inputIconHeight,rightToLeftOrientation:this.rightToLeftOrientation,width:this.inputIconWidth})):e(n,null,e("searchcraft-input-icon",{error:this.error,height:this.inputIconHeight,rightToLeftOrientation:this.rightToLeftOrientation,width:this.inputIconWidth}),e("input",{autoComplete:"off",class:d(i,"searchcraft-input"),id:"searchcraft-input-id",onChange:this.handleInputChange.bind(this),onKeyUp:this.handleInputKeyUp.bind(this),placeholder:this.placeholderValue,type:"text",value:this.query,style:s}),e("style",null,`\n #searchcraft-input-id::placeholder {\n font-size: ${r.fontSize};\n }\n `),this.inputCaptionValue&&e("searchcraft-input-caption",{inputCaptionClassName:this.inputCaptionClassName,inputCaptionValue:this.inputCaptionValue,rightToLeftOrientation:this.rightToLeftOrientation}),this.query.length>0&&e("searchcraft-clear-input-button",{isRequesting:this.isRequesting,onClearInput:this.handleClearInput,rightToLeftOrientation:this.rightToLeftOrientation})))}};M.style=A;const j=":root{--font-stack:Helvetica, Arial, sans-serif}.inputCaptionLightLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#404040}.inputCaptionDarkLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#E6E6E6}.inputCaptionErrorLightLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000}.inputCaptionErrorDarkLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3}.inputCaptionLightRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#404040;text-align:right}.inputCaptionDarkRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#E6E6E6;text-align:right}.inputCaptionErrorLightRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000;text-align:right}.inputCaptionErrorDarkRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3;text-align:right}";const $=j;const q=class{constructor(i){t(this,i);this.error=undefined;this.inputCaptionClassName="";this.inputCaptionValue="Enter Search";this.rightToLeftOrientation=false;this.theme="light"}isLightTheme(){return this.theme==="light"}render(){return this.rightToLeftOrientation?e("p",{class:d(this.error?this.isLightTheme?"inputCaptionErrorLightRTL":"inputCaptionErrorDarkRTL":this.isLightTheme?"inputCaptionLightRTL":"inputCaptionDarkRTL",this.inputCaptionClassName,".searchcraft-input-caption")},this.inputCaptionValue):e("p",{class:d(this.error?this.isLightTheme?"inputCaptionErrorLightLTR":"inputCaptionErrorDarkLTR":this.isLightTheme?"inputCaptionLightLTR":"inputCaptionDarkLTR",this.inputCaptionClassName,".searchcraft-input-caption")},this.inputCaptionValue)}};q.style=$;const O=":root{--font-stack:Helvetica, Arial, sans-serif}.inputIconLTR{left:15px;position:absolute;top:50%;transform:translateY(-50%)}.inputIconRTL{position:absolute;right:15px;top:50%;transform:translateY(-50%)}";const H=O;const N=class{constructor(i){t(this,i);this.error=undefined;this.height=20;this.rightToLeftOrientation=false;this.width=20;this.theme="light"}isLightTheme(){return this.theme==="light"}render(){return this.error?e("div",{class:this.rightToLeftOrientation?"inputIconRTL":"inputIconLTR"},this.isLightTheme()?e("searchcraft-search-icon-set",{height:this.height,type:"error-light",width:this.width}):e("searchcraft-search-icon-set",{height:this.height,type:"error-dark",width:this.width})):e("div",{class:this.rightToLeftOrientation?"inputIconRTL":"inputIconLTR"},this.isLightTheme()?e("searchcraft-search-icon-set",{height:this.height,type:"search-light",width:this.width}):e("searchcraft-search-icon-set",{height:this.height,type:"search-dark",width:this.width}))}};N.style=H;const U=":root{--font-stack:Helvetica, Arial, sans-serif}.labelLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#292929}.labelDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFF}";const K=U;const Z=class{constructor(i){t(this,i);this.inputLabelClassName="";this.label=undefined;this.theme="light"}isLightTheme(){return this.theme==="light"}render(){if(!this.label){return null}const t=this.isLightTheme()?"labelLight":"labelDark";return e("label",{class:d(t,this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}};Z.style=K;const Y=".container{border-bottom:1px solid #D9D9D9;display:flex;justify-content:flex-start;width:100%}.resultsInfo{color:#292929;font-size:18px;font-weight:600;line-height:20px;margin:0;margin-bottom:8px}";const P=Y;const V=class{constructor(i){t(this,i);this.isRequesting=false;this.resultsCount=0;this.responseTime="";this.query=""}connectedCallback(){this.unsubscribe=s.subscribe((t=>{var i,e,n,s;this.isRequesting=t.isRequesting;this.resultsCount=((e=(i=t.searchResults)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.count)||0;this.responseTime=((((s=(n=t.searchResults)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.time_taken)||0)*1e3).toFixed(2);this.query=t.query||""}))}disconnectedCallback(){if(this.unsubscribe){this.unsubscribe()}}render(){if(!this.query||this.resultsCount===0){return null}return e("div",{class:"container"},e("p",{class:"resultsInfo"},this.resultsCount," results found in ",this.responseTime,"ms"))}};V.style=P;const J=class{constructor(i){t(this,i);this.type="search-dark";this.width=20;this.height=20}render(){const{width:t,height:i}=this;switch(this.type){case"search-light":return e("svg",{width:t,height:i,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},e("title",{id:"searchcraft-title"},"Searchcraft Search Icon Light"),e("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"#404040","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));case"search-dark":return e("svg",{width:t,height:i,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},e("title",{id:"searchcraft-title"},"Searchcraft Search Icon Dark"),e("path",{d:"M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z",stroke:"#E6E6E6","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));case"error-light":return e("svg",{width:t,height:i,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},e("title",{id:"searchcraft-title"},"Searchcraft Error Search Icon Light"),e("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"#737373","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));case"error-dark":return e("svg",{width:t,height:i,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},e("title",{id:"searchcraft-title"},"Searchcraft Error Search Icon Dark"),e("path",{d:"M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z",stroke:"#BFBFBF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));default:return null}}};const Q='.sliderContainer{display:flex;flex-direction:column;gap:10px;font-family:Arial, sans-serif;align-items:center;width:100%}.rangeContainer{display:flex;position:relative;width:100%;align-items:center}.rangeContainer .activeRange{position:absolute;top:50%;transform:translateY(-50%);height:4px;background:#007DB3;z-index:0;border-radius:2px}.rangeContainer .rangeSlider{width:100%;height:4px;background:transparent;border-radius:2px;outline:none;-webkit-appearance:none;appearance:none;position:absolute;margin:0}.rangeContainer .rangeSlider::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;background-color:#FFF;border-radius:50%;border:2px solid #e6e6e6;cursor:pointer}.rangeContainer .rangeSlider::-moz-range-thumb{width:20px;height:20px;background-color:#FFF;border-radius:50%;border:2px solid #e6e6e6;cursor:pointer}.yearLabels{display:flex;justify-content:space-between;width:100%;margin-top:10px;font-size:15px;font-weight:600;font-family:"Source Sans Pro", sans-serif;color:#666}.yearLabel{min-width:30px;text-align:center}';const W=Q;const X=class{constructor(i){t(this,i);this.searchStore=s.getState();this.updateYears=async()=>{this.searchStore.setYearsRange([this.startYear,this.endYear]);try{if(typeof this.query==="string"&&this.query.trim()!==""){await this.searchStore.search()}else{console.warn("Query is missing or empty, skipping search request.")}}catch(t){console.error("Search failed:",t)}};this.handleStartYearChange=t=>{const i=Number.parseInt(t.target.value,10);this.startYear=Math.min(i,this.endYear);this.updateYears()};this.handleEndYearChange=t=>{const i=Number.parseInt(t.target.value,10);this.endYear=Math.max(i,this.startYear);this.updateYears()};this.maxYear=(new Date).getFullYear();this.minYear=2014;this.endYear=this.maxYear;this.hasSearched=false;this.query="";this.resultsCount=0;this.startYear=this.minYear}componentDidLoad(){this.unsubscribe=s.subscribe((t=>{var i,e,n;if(t.query.length>0){this.hasSearched=true;this.resultsCount=((n=(e=(i=t.searchResults)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.hits)===null||n===void 0?void 0:n.length)||0}this.query=t.query}))}disconnectedCallback(){if(this.unsubscribe){this.unsubscribe()}}render(){if(!this.query||this.resultsCount===0){return null}const t=this.minYear;const i=this.maxYear;const n=(this.startYear-t)/(i-t)*100;const s=(this.endYear-t)/(i-t)*100;return e("div",{class:"sliderContainer"},e("div",{class:"rangeContainer"},e("div",{class:"activeRange",style:{left:`${n}%`,width:`${s-n}%`}}),e("input",{class:"rangeSlider",max:this.maxYear,min:this.minYear,onInput:this.handleStartYearChange,step:"1",type:"range",value:this.startYear}),e("input",{class:"rangeSlider",max:this.maxYear,min:this.minYear,onInput:this.handleEndYearChange,step:"1",type:"range",value:this.endYear})),e("div",{class:"yearLabels"},e("span",{class:"yearLabel"},this.startYear),e("span",{class:"yearLabel"},this.endYear)))}};X.style=W;const G=".spinnerContainer{background-color:transparent;height:20px;width:20px}.spinnerDark{animation:spinning 1s linear infinite;background:conic-gradient(#000 50%, #FFFFFF);clip-path:circle(50%);height:100%;mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);width:100%}.spinnerLight{animation:spinning 1s linear infinite;background:conic-gradient(#737373 50%, #FFFFFF);clip-path:circle(50%);height:100%;mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);width:100%}@keyframes spinning{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}";const tt=G;const it=class{constructor(i){t(this,i)}render(){return e("div",{key:"be34b9a3ecec05fdc169145a5db5a4f37bbd404b",class:"spinnerContainer"},e("div",{key:"b59ffd2fe8dd3ac990003bff3085cb571c08730e",class:"spinnerDark"}))}};it.style=tt;const et=".spinnerContainer{background-color:transparent;height:20px;width:20px}.spinnerLight{animation:spinning 1s linear infinite;background:conic-gradient(#737373 50%, #FFFFFF);clip-path:circle(50%);height:100%;mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);width:100%}@keyframes spinning{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}";const nt=et;const st=class{constructor(i){t(this,i)}render(){return e("div",{key:"a4f73eee03d4d7253c04c47995315bd121e8ded3",class:"spinnerContainer"},e("div",{key:"53e3486ef7a2fa6029a6107bae2c0655b1608a12",class:"spinnerLight"}))}};st.style=nt;const rt=".toggle-wrapper{background:#ddd;border:none;border-radius:16px;box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.05);cursor:pointer;height:26px;margin-left:10px;position:relative;width:44px}.toggle-wrapper.active{background:#007DB3;box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.05)}.toggle-wrapper .toggle-switch{background:#fff;border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform 0.3s ease;width:18px}.toggle-wrapper .toggle-switch.active{transform:translateX(16px)}";const at=rt;const ot=class{constructor(i){t(this,i);this.searchStore=s.getState();this.handleToggle=async()=>{this.isActive=!this.isActive;if(this.type==="mode"){const t=this.isActive?"normal":"fuzzy";this.searchStore.setSearchParams({mode:t})}else if(this.type==="sort"){const t=this.isActive?"desc":"asc";this.searchStore.setSearchParams({sort:t})}try{await this.searchStore.search()}catch(t){console.error("Search failed:",t)}};this.type="mode";this.isActive=false;this.query="";this.resultsCount=0}componentDidLoad(){this.unsubscribe=s.subscribe((t=>{var i,e,n;this.query=t.query||"";this.resultsCount=((n=(e=(i=t.searchResults)===null||i===void 0?void 0:i.data)===null||e===void 0?void 0:e.hits)===null||n===void 0?void 0:n.length)||0}))}disconnectedCallback(){if(this.unsubscribe){this.unsubscribe()}}render(){if(!this.query||this.resultsCount===0){return null}return e("button",{class:`toggle-wrapper ${this.isActive?"active":""}`,onClick:this.handleToggle,type:"button"},e("div",{class:`toggle-switch ${this.isActive?"active":""}`}))}};ot.style=at;export{u as searchcraft_auto_search_form,k as searchcraft_base_search_result,v as searchcraft_base_search_results,w as searchcraft_check_icon,L as searchcraft_clear_icon_set,D as searchcraft_clear_input_button,R as searchcraft_dash_icon,B as searchcraft_error_message,_ as searchcraft_filters_list,M as searchcraft_input,q as searchcraft_input_caption,N as searchcraft_input_icon,Z as searchcraft_input_label,V as searchcraft_results_info,J as searchcraft_search_icon_set,X as searchcraft_slider,it as searchcraft_spinner_dark,st as searchcraft_spinner_light,ot as searchcraft_toggle_button};
2
+ //# sourceMappingURL=p-6c007e2e.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["searchcraftAutoSearchFormModuleCss","SearchcraftAutoSearchFormStyle0","SearchcraftAutoSearchForm","this","debounceTimeout","debounceDelay","searchStore","useSearchcraftStore","getState","handleInputChange","event","query","detail","setQuery","trim","searchResults","setSearchResults","querySubmit","emit","handleInputKeyUp","target","clearTimeout","setTimeout","runSearch","handleClearInput","clearInput","error","inputClearedOrNoResults","async","setSelectedFilters","search","handleFormSubmit","preventDefault","apiKey","endpointURL","index","componentDidLoad","searchcraft","SearchcraftCore","config","initialize","unsubscribe","subscribe","state","isRequesting","Object","assign","disconnectedCallback","render","formClass","rightToLeftOrientation","parsedCustomStyles","parseCustomStyles","customStylesForInput","h","key","class","onSubmit","label","labelForInput","customStyles","inputCaptionValue","inputIconHeight","inputIconWidth","onClearInput","onInputKeyUp","onSearchInputChange","placeholderValue","errorMessage","searchcraftBaseSearchResultModuleCss","SearchcraftBaseSearchResultStyle0","SearchcraftBaseSearchResult","buttonCallback","keyDownCallback","resultCallback","handleButtonClick","handleContainerClick","isInteractive","parseStyles","JSON","parse","console","isLightTheme","themeMode","styles","imageContainer","imageSource","alt","imageDescription","src","style","image","contentContainer","heading","headingText","subheading","subheadingText","primaryContent","secondaryContent","tertiaryContent","buttonText","onClick","button","type","onKeyDown","container","tabindex","placeImageRight","Fragment","searchcraftBaseSearchResultsModuleCss","SearchcraftBaseSearchResultsStyle0","SearchcraftBaseSearchResults","documentAttributesForDisplay","length","warn","hasSearched","name","_a","data","parsedSearchKeys","parseSearchKeys","serializedStyles","customStylesForResults","serializeStyles","resultsComponents","_d","_c","_b","hits","map","document","doc","result","dynamicProperties","extractDynamicProperties","formatTime","value","Number","isNaN","Date","getFormattedTimeFromNow","log","document_id","placeResultImageRight","finalComponents","placeAdAtStart","push","adInterval","forEach","component","placeAdAtEnd","_g","_f","_e","SearchcraftCheckIcon","width","height","viewBox","fill","d","stroke","SearchcraftClearIconSet","xmlns","id","searchcraftClearInputButtonModuleCss","SearchcraftClearInputButtonStyle0","SearchcraftClearInputButton","handleClearClick","theme","classNames","SearchcraftDashIcon","x1","y1","x2","y2","searchcraftErrorMessageModuleCss","SearchcraftErrorMessageStyle0","SearchcraftErrorMessage","errorMessageStyle","searchcraftFiltersListModuleCss","SearchcraftFiltersListStyle0","SearchcraftFiltersList","autoSearchFormElement","handleSearchRequest","selectedFilters","emitFiltersUpdate","connectedCallback","facets","populateFiltersFromFacets","resultsCount","querySelector","addEventListener","removeEventListener","flattened","flattenFacets","section","dynamicFilters","filter","count","children","handleCheckboxChange","isChecked","isParent","parentFilter","find","childValues","child","includes","filtersUpdated","formatLabel","replace","char","toUpperCase","isChildSelected","some","checked","onChange","marginLeft","display","split","pop","searchcraftInputModuleCss","SearchcraftInputStyle0","SearchcraftInput","input","searchInputChange","inputKeyUp","containerClassName","inputClassName","validatedCustomStyles","placeholderStyle","fontSize","placeholderFontSize","formClassName","autoComplete","bind","onKeyUp","placeholder","inputCaptionClassName","searchcraftInputCaptionModuleCss","SearchcraftInputCaptionStyle0","SearchcraftInputCaption","searchcraftInputIconModuleCss","SearchcraftInputIconStyle0","SearchcraftInputIcon","searchcraftInputLabelModuleCss","SearchcraftInputLabelStyle0","SearchcraftInputLabel","labelStyle","inputLabelClassName","htmlFor","searchcraftResultsInfoModuleCss","SearchcraftResultsInfoStyle0","SearchcraftResultsInfo","responseTime","time_taken","toFixed","SearchcraftSearchIconSet","searchcraftSliderModuleCss","SearchcraftSliderStyle0","SearchcraftSlider","updateYears","setYearsRange","startYear","endYear","handleStartYearChange","parseInt","Math","min","handleEndYearChange","max","getFullYear","maxYear","minYear","rangeMin","rangeMax","startPercent","endPercent","left","onInput","step","searchcraftSpinnerDarkModuleCss","SearchcraftSpinnerDarkStyle0","SearchcraftSpinnerDark","searchcraftSpinnerLightModuleCss","SearchcraftSpinnerLightStyle0","SearchcraftSpinnerLight","searchcraftToggleButtonModuleCss","SearchcraftToggleButtonStyle0","SearchcraftToggleButton","handleToggle","isActive","mode","setSearchParams","sort"],"sources":["src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.scss?tag=searchcraft-auto-search-form&encapsulation=shadow","src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.tsx","src/components/searchcraft-base-search-result/searchcraft-base-search-result.module.scss?tag=searchcraft-base-search-result&encapsulation=shadow","src/components/searchcraft-base-search-result/searchcraft-base-search-result.tsx","src/components/searchcraft-base-search-results/searchcraft-base-search-results.module.scss?tag=searchcraft-base-search-results&encapsulation=shadow","src/components/searchcraft-base-search-results/searchcraft-base-search-results.tsx","src/assets/searchcraft-check-icon.tsx","src/assets/searchcraft-clear-icon-set.tsx","src/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.scss?tag=searchcraft-clear-input-button&encapsulation=shadow","src/components/searchcraft-clear-input-button/searchcraft-clear-input-button.tsx","src/assets/searchcraft-dash-icon.tsx","src/components/searchcraft-error-message/searchcraft-error-message.module.scss?tag=searchcraft-error-message&encapsulation=shadow","src/components/searchcraft-error-message/searchcraft-error-message.tsx","src/components/searchcraft-filters-list/searchcraft-filters-list.module.scss?tag=searchcraft-filters-list&encapsulation=shadow","src/components/searchcraft-filters-list/searchcraft-filters-list.tsx","src/components/searchcraft-input/searchcraft-input.module.scss?tag=searchcraft-input&encapsulation=shadow","src/components/searchcraft-input/searchcraft-input.tsx","src/components/searchcraft-input-caption/searchcraft-input-caption.module.scss?tag=searchcraft-input-caption&encapsulation=shadow","src/components/searchcraft-input-caption/searchcraft-input-caption.tsx","src/components/searchcraft-input-icon/searchcraft-input-icon.module.scss?tag=searchcraft-input-icon&encapsulation=shadow","src/components/searchcraft-input-icon/searchcraft-input-icon.tsx","src/components/searchcraft-input-label/searchcraft-input-label.module.scss?tag=searchcraft-input-label&encapsulation=shadow","src/components/searchcraft-input-label/searchcraft-input-label.tsx","src/components/searchcraft-results-info/searchcraft-results-info.module.scss?tag=searchcraft-results-info&encapsulation=shadow","src/components/searchcraft-results-info/searchcraft-results-info.tsx","src/assets/searchcraft-search-icon-set.tsx","src/components/searchcraft-slider/searchcraft-slider.module.scss?tag=searchcraft-slider&encapsulation=shadow","src/components/searchcraft-slider/searchcraft-slider.tsx","src/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.scss?tag=searchcraft-spinner-dark&encapsulation=shadow","src/components/searchcraft-spinner-dark/searchcraft-spinner-dark.tsx","src/components/searchcraft-spinner-light/searchcraft-spinner-light.module.scss?tag=searchcraft-spinner-light&encapsulation=shadow","src/components/searchcraft-spinner-light/searchcraft-spinner-light.tsx","src/components/searchcraft-toggle-button/searchcraft-toggle-button.module.scss?tag=searchcraft-toggle-button&encapsulation=shadow","src/components/searchcraft-toggle-button/searchcraft-toggle-button.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.formLTR {\n font-family: var(--font-stack);\n text-align: left;\n width: 100%;\n}\n\n.formRTL {\n font-family: var(--font-stack);\n text-align: right;\n width: 100%;\n}","import {\n Component,\n Prop,\n State,\n Event,\n type EventEmitter,\n h,\n} from '@stencil/core';\n\nimport {\n type CoreConfigSDK,\n CoreSDK as SearchcraftCore,\n type SearchcraftResponse,\n} from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\n\nimport { parseCustomStyles } from '@utils/utils';\n\nimport type { ScInputCustomEvent } from '@components/searchcraft-input/searchcraft-input';\n\n@Component({\n tag: 'searchcraft-auto-search-form',\n styleUrl: 'searchcraft-auto-search-form.module.scss',\n shadow: true,\n})\nexport class SearchcraftAutoSearchForm {\n @Prop() autoSearchFormClass = '';\n @Prop() clearInput: () => void = () => {};\n @Prop() config: CoreConfigSDK = {\n apiKey: '',\n endpointURL: '',\n index: [],\n };\n @Prop() customStylesForInput: string | Record<string, string> = {};\n @Prop() inputCaptionValue = '';\n @Prop() inputIconHeight = 20;\n @Prop() inputIconWidth = 20;\n @Prop() labelForInput = '';\n @Prop() placeholderValue = 'Search here';\n @Prop() rightToLeftOrientation = false;\n @Prop() searchContainerClass = '';\n\n @Event() inputClearedOrNoResults: EventEmitter<void>;\n @Event() querySubmit: EventEmitter<string>;\n\n @State() error = false;\n @State() isRequesting = false;\n @State() query = '';\n @State() searchResults: SearchcraftResponse | null = null;\n\n private debounceTimeout: ReturnType<typeof setTimeout> | null = null;\n private debounceDelay = 0;\n private searchStore = useSearchcraftStore.getState();\n unsubscribe: () => void;\n\n componentDidLoad() {\n const searchcraft = new SearchcraftCore(this.config);\n this.searchStore.initialize(searchcraft, true);\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.isRequesting = state.isRequesting;\n this.searchResults = { ...state.searchResults };\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n handleInputChange = (event: ScInputCustomEvent<string>) => {\n this.query = event.detail;\n this.searchStore.setQuery(this.query);\n\n if (this.query.trim() === '') {\n this.searchResults = null;\n this.searchStore.setSearchResults(null);\n } else {\n this.querySubmit.emit(this.query);\n }\n };\n\n handleInputKeyUp = (event: ScInputCustomEvent<string>) => {\n const target = event.detail;\n if (target === this.query) {\n return;\n }\n this.query = target;\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n this.debounceTimeout = setTimeout(() => {\n if (this.query.trim() === '') {\n this.searchResults = null;\n this.searchStore.setSearchResults(null);\n } else {\n this.searchStore.setQuery(this.query);\n this.querySubmit.emit(this.query);\n this.runSearch();\n }\n }, this.debounceDelay);\n };\n\n handleClearInput = () => {\n this.query = '';\n this.searchResults = null;\n this.searchStore.setQuery('');\n this.searchStore.setSearchResults(null);\n\n if (typeof this.clearInput === 'function') {\n this.clearInput();\n }\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n this.error = false;\n this.inputClearedOrNoResults.emit();\n };\n\n private runSearch = async () => {\n if (this.query.trim() === '') {\n this.error = true;\n this.inputClearedOrNoResults.emit();\n } else {\n this.error = false;\n this.searchStore.setQuery(this.query);\n this.searchStore.setSelectedFilters([]);\n\n try {\n await this.searchStore.search();\n } catch (error) {\n this.error = true;\n this.inputClearedOrNoResults.emit();\n }\n }\n };\n\n handleFormSubmit = async (event: Event) => {\n event.preventDefault();\n await this.runSearch();\n };\n\n render() {\n const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';\n const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);\n\n return (\n <form class={`${formClass}`} onSubmit={this.handleFormSubmit}>\n <searchcraft-input-label label={this.labelForInput} />\n <searchcraft-input\n customStyles={parsedCustomStyles}\n input-caption-value={this.inputCaptionValue}\n input-icon-height={this.inputIconHeight}\n input-icon-width={this.inputIconWidth}\n is-requesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n onInputKeyUp={this.handleInputKeyUp}\n onSearchInputChange={this.handleInputChange}\n placeholder-value={this.placeholderValue}\n query={this.query}\n right-to-left-orientation={this.rightToLeftOrientation}\n />\n {this.error && (\n <searchcraft-error-message errorMessage='Please enter a search query.' />\n )}\n </form>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin interactive-result-container-base {\n align-items: flex-start;\n border-radius: 16px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 8px;\n position: relative;\n\n @media (min-width: 600px) {\n flex-direction: row;\n }\n}\n\n.interactiveResultContainerLight {\n @include interactive-result-container-base;\n background-color: $light-search-result-container-background;\n}\n\n.interactiveResultContainerDark {\n @include interactive-result-container-base;\n background-color: $dark-search-result-container-background;\n}\n\n.resultContainer {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n }\n}\n\n.interactiveIconLarge {\n display: inline-block;\n position: absolute;\n right: 5px;\n top: 8px;\n\n\n @media (max-width: 600px) {\n display: none;\n }\n}\n\n.interactiveIconSmall {\n display: inline-block;\n position: absolute;\n right: 5px;\n top: -2px;\n\n\n @media (min-width: 600px) {\n display: none;\n }\n}\n\n.imageContainer {\n max-width: 100%;\n}\n\n.contentContainer {\n max-height: 100%;\n max-width: 100%;\n\n @media (min-width: 600px) {\n max-width: 50%;\n }\n}\n\n.secondaryContentContainer {\n display: flex;\n\n}\n\n@mixin image-base {\n border-radius: 8px;\n max-height: 100%;\n max-width: 100%;\n}\n\n.imageLight {\n @include image-base;\n border: 1px solid $light-search-result-image-border;\n}\n\n.imageDark {\n @include image-base;\n border: 1px solid $dark-search-result-image-border;\n}\n\n@mixin heading-base {\n font-family: var(--font-stack);\n font-size: 16px;\n font-weight: 700;\n line-height: 20px;\n margin-bottom: 4px;\n margin-top: 0;\n position: relative;\n -webkit-font-smoothing: antialiased;\n}\n\n.headingLight {\n @include heading-base;\n color: $light-search-result-heading-color;\n}\n\n.headingDark {\n @include heading-base;\n color: $dark-search-result-heading-color;\n}\n\n@mixin subheading-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-bottom: 4px;\n margin-top: 0px;\n -webkit-font-smoothing: antialiased;\n}\n\n.subheadingLight {\n @include subheading-base;\n color: $light-search-result-subheading-color;\n}\n\n.subheadingDark {\n @include subheading-base;\n color: $dark-search-result-subheading-color\n}\n\n@mixin body-content-base {\n font-family: var(--font-stack);\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 4px;\n margin-top: 0px;\n -webkit-font-smoothing: antialiased;\n}\n\n.primaryContentLight {\n @include body-content-base;\n color: $light-search-result-body-content-color;\n}\n\n.primaryContentDark {\n @include body-content-base;\n color: $dark-search-result-body-content-color;\n}\n\n.secondaryContentLight {\n @include body-content-base;\n color: $light-search-result-body-content-color;\n}\n\n.secondaryContentLight::after {\n content: \"•\";\n color: $light-search-result-body-content-color;\n font-size: 1em;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.secondaryContentDark {\n @include body-content-base;\n color: $dark-search-result-body-content-color;\n}\n\n.tertiaryContentLight {\n @include body-content-base;\n color: $light-search-result-body-content-color;\n}\n\n.tertiaryContentDark {\n @include body-content-base;\n color: $dark-search-result-body-content-color;\n}","import { Component, Event, Fragment, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-base-search-result',\n styleUrl: 'searchcraft-base-search-result.module.scss',\n shadow: true,\n})\nexport class SearchcraftBaseSearchResult {\n @Prop() buttonText = ''; // Label for the button\n @Prop() customStyles = '{}'; // New string prop for serialized styles.\n @Prop() headingText = ''; // Text for the heading\n @Prop() imageDescription = ''; // Alternative text for the image\n @Prop() imageSource = ''; // Source URL for the image\n @Prop() isInteractive = false; // Determines if the result is interactive\n @Prop() primaryContent = ''; // Primary body content\n @Prop() secondaryContent = ''; // Secondary body content\n @Prop() subheadingText = ''; // Text for the subheading\n @Prop() tertiaryContent = ''; // Tertiary body content\n @Prop() themeMode: 'light' | 'dark' = 'light'; // Light or dark theme context\n @Prop() placeImageRight = false; // Determines the placement of the image container\n\n @Event() buttonCallback: () => void = () => {}; // Callback for button click\n @Event() keyDownCallback: () => void = () => {}; // Callback for key down event\n @Event() resultCallback: () => void = () => {}; // Callback for result container click\n\n private handleButtonClick = () => {\n this.buttonCallback();\n };\n\n private handleContainerClick = () => {\n if (this.isInteractive) {\n this.resultCallback();\n }\n };\n\n private parseStyles(): Record<string, { [key: string]: string }> {\n try {\n return JSON.parse(this.customStyles);\n } catch (error) {\n console.error('Error parsing custom styles:', error);\n return {};\n }\n }\n\n render() {\n const isLightTheme = this.themeMode === 'light';\n const styles = this.parseStyles();\n\n const imageContainer = this.imageSource && (\n <div class='imageContainer'>\n <img\n alt={this.imageDescription}\n class={isLightTheme ? 'imageLight' : 'imageDark'}\n src={this.imageSource}\n style={styles.image || {}}\n />\n </div>\n );\n\n const contentContainer = (\n <div class='contentContainer'>\n <h2\n class={isLightTheme ? 'headingLight' : 'headingDark'}\n style={styles.heading || {}}\n >\n {this.headingText}\n </h2>\n <h3\n class={isLightTheme ? 'subheadingLight' : 'subheadingDark'}\n style={styles.subheading || {}}\n >\n {this.subheadingText}\n </h3>\n <p\n class={isLightTheme ? 'primaryContentLight' : 'primaryContentDark'}\n style={styles.primaryContent || {}}\n >\n {this.primaryContent}\n </p>\n <div class='secondaryContentContainer'>\n <p\n class={\n isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark'\n }\n style={styles.secondaryContent || {}}\n >\n {this.secondaryContent}\n </p>\n <p\n class={\n isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark'\n }\n style={styles.tertiaryContent || {}}\n >\n {this.tertiaryContent}\n </p>\n </div>\n {this.buttonText && (\n <button\n onClick={this.handleButtonClick}\n style={styles.button || {}}\n type='button'\n >\n {this.buttonText}\n </button>\n )}\n </div>\n );\n\n return (\n <div\n class={\n this.isInteractive\n ? isLightTheme\n ? 'interactiveResultContainerLight'\n : 'interactiveResultContainerDark'\n : 'resultContainer'\n }\n onKeyDown={this.keyDownCallback}\n onClick={this.handleContainerClick}\n style={styles.container || {}}\n tabindex='0'\n >\n {this.placeImageRight ? (\n <Fragment>\n {contentContainer}\n {imageContainer}\n </Fragment>\n ) : (\n <Fragment>\n {imageContainer}\n {contentContainer}\n </Fragment>\n )}\n </div>\n );\n }\n}\n",":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.resultsContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 16px 0;\n\n & > p {\n align-self: center;\n }\n\n & > div {\n margin-bottom: 20px;\n img {\n height: 300px;\n width: 200px;\n }\n }\n}\n\n.adSection {\n align-items: center;\n background-color: #F1F1F1;\n border: 1px solid #DCDDDE;\n border-radius: 16px;\n display: flex;\n flex-direction: column;\n font-size: 16px;\n justify-content: center;\n margin: auto;\n min-height: 150px;\n text-align: center;\n width: 100%;\n\n p {\n margin-top: 5px;\n }\n}\n\n.emptyState {\n text-align: center;\n width: 100%;\n}\n\n.errorMessageContainer {\n text-align: center;\n}\n","import { Component, h, Prop, State } from '@stencil/core';\n\nimport type { SearchcraftResponse } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\n\nimport {\n extractDynamicProperties,\n getFormattedTimeFromNow,\n parseSearchKeys,\n serializeStyles,\n} from '@utils/utils';\n\n@Component({\n tag: 'searchcraft-base-search-results',\n styleUrl: 'searchcraft-base-search-results.module.scss',\n shadow: true,\n})\nexport class SearchcraftBaseSearchResults {\n @Prop() adInterval = 4;\n @Prop() customStylesForResults:\n | string\n | Record<string, Record<string, string>> = {};\n @Prop() documentAttributesForDisplay = '';\n @Prop() fallbackElement: HTMLElement | null = null;\n @Prop() formatTime = true;\n @Prop() placeAdAtEnd = false;\n @Prop() placeAdAtStart = true;\n @Prop() placeResultImageRight = false;\n\n @State() hasSearched = false;\n @State() query = '';\n @State() searchResults: SearchcraftResponse | null = null;\n\n private unsubscribe: () => void;\n\n componentDidLoad() {\n if (\n !this.documentAttributesForDisplay ||\n this.documentAttributesForDisplay.length === 0\n ) {\n console.warn('No document attributes provided; using empty keys array.');\n this.documentAttributesForDisplay = '';\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n if (state.query.length > 0) {\n this.hasSearched = true;\n } else {\n this.hasSearched = false;\n }\n this.searchResults = { ...state.searchResults };\n this.query = state.query;\n });\n\n const { searchResults, query } = useSearchcraftStore.getState();\n this.searchResults = searchResults;\n this.query = query;\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.hasSearched) {\n return (\n <div class='emptyState'>\n <slot name='empty-search' />\n </div>\n );\n }\n\n if (!this.searchResults?.data) {\n return;\n }\n\n const parsedSearchKeys = parseSearchKeys(this.documentAttributesForDisplay);\n const serializedStyles =\n typeof this.customStylesForResults === 'string'\n ? this.customStylesForResults\n : serializeStyles(this.customStylesForResults);\n\n const resultsComponents = this.searchResults?.data?.hits?.map(\n (document, index) => {\n const { doc: result } = document;\n const dynamicProperties = extractDynamicProperties(\n result,\n parsedSearchKeys,\n );\n\n if (this.formatTime) {\n for (const key of parsedSearchKeys) {\n if (dynamicProperties[key]) {\n const value = dynamicProperties[key];\n if (\n typeof value === 'string' &&\n !Number.isNaN(Date.parse(value))\n ) {\n dynamicProperties[key] = getFormattedTimeFromNow(value);\n }\n }\n }\n }\n\n return (\n <searchcraft-base-search-result\n button-callback={() => console.log('button callback')}\n custom-styles={serializedStyles}\n image-source={\n dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]]\n }\n is-interactive={true}\n key={`${document.document_id}-${index}`}\n keydown-callback={() => console.log('keydown')}\n heading-text={dynamicProperties[parsedSearchKeys[0]]}\n place-image-right={this.placeResultImageRight}\n primary-content={dynamicProperties[parsedSearchKeys[2]]}\n result-callback={() => console.log('interactive element')}\n secondary-content={dynamicProperties[parsedSearchKeys[3]]}\n subheading-text={dynamicProperties[parsedSearchKeys[1]]}\n tertiary-content={dynamicProperties[parsedSearchKeys[4]]}\n />\n );\n },\n );\n\n const finalComponents: JSX.Element[] = [];\n\n if (this.placeAdAtStart) {\n finalComponents.push(\n <div key='ad-section-start' class='adSection'>\n <span>##</span>\n <p> Ad Impressions</p>\n </div>,\n );\n }\n\n if (this.adInterval > 0) {\n resultsComponents.forEach((component, index) => {\n finalComponents.push(component);\n if ((index + 1) % this.adInterval === 0) {\n finalComponents.push(\n <div key={`ad-section-${index + 1}`} class='adSection'>\n <span>##</span>\n <p> Ad Impressions</p>\n </div>,\n );\n }\n });\n } else {\n finalComponents.push(...resultsComponents);\n }\n\n if (this.placeAdAtEnd) {\n finalComponents.push(\n <div key='ad-section-end' class='adSection'>\n <span>##</span>\n <p> Ad Impressions</p>\n </div>,\n );\n }\n\n return (\n <div class='resultsContainer'>\n {finalComponents}\n {this.query.length > 0 &&\n this.searchResults?.data?.hits?.length === 0 && (\n <div class='errorMessageContainer'>\n <searchcraft-error-message\n error-message={`No search results found for \"${this.query}\" query`}\n />\n </div>\n )}\n </div>\n );\n }\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-check-icon',\n shadow: true,\n})\nexport class SearchcraftCheckIcon {\n render() {\n return (\n <svg width='16' height='16' viewBox='0 0 16 16' fill='none'>\n <title>Checkbox Check</title>\n <path\n d='M13.9999 2L5.74988 10L1.99988 6.36364'\n stroke='white'\n stroke-width='3'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-clear-icon-set',\n shadow: true,\n})\nexport class SearchcraftClearIconSet {\n /**\n * Type of the icon to display.\n * Options: 'clear-light', 'clear-dark', 'arrow-light', 'arrow-dark'\n */\n @Prop() type: 'clear-light' | 'clear-dark' | 'arrow-light' | 'arrow-dark' =\n 'clear-light';\n\n render() {\n switch (this.type) {\n case 'clear-light':\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Clear Input Icon Light</title>\n <path\n d='M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z'\n stroke='black'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'clear-dark':\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Clear Input Icon Dark</title>\n <path\n d='M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z'\n stroke='white'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'arrow-light':\n return (\n <svg\n width='20'\n height='21'\n viewBox='0 0 20 21'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Arrow Right Icon Light</title>\n <path\n d='M7.5 15.0444L12.5 10.0444L7.5 5.04443'\n stroke='#737373'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'arrow-dark':\n return (\n <svg\n width='8'\n height='12'\n viewBox='0 0 8 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Arrow Right Icon Dark</title>\n <path\n d='M1.5 11L6.5 6L1.5 1'\n stroke='#BFBFBF'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n\n default:\n return null;\n }\n }\n}\n",":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.inputClearButtonLTR {\n align-items: center;\n background: none;\n border: none;\n display: flex;\n height: 20px;\n justify-content: center;\n padding: 0;\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 20px;\n}\n\n.inputClearButtonRTL {\n align-items: center;\n background: none;\n border: none;\n display: flex;\n height: 20px;\n justify-content: center;\n left: 0px;\n padding: 0;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 20px;\n}","import {\n Component,\n Event,\n type EventEmitter,\n Prop,\n h,\n State,\n} from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-clear-input-button',\n styleUrl: 'searchcraft-clear-input-button.module.scss',\n shadow: true,\n})\nexport class SearchcraftClearInputButton {\n @Prop() isRequesting? = false;\n @Prop() rightToLeftOrientation = false;\n\n @Event() clearInput: EventEmitter<void>;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n private handleClearClick = (event: MouseEvent) => {\n event.preventDefault();\n this.clearInput.emit();\n };\n\n render() {\n return this.rightToLeftOrientation ? (\n <button\n class={classNames('inputClearButtonRTL', '.sc-clear-input-button-rtl')}\n onClick={this.handleClearClick}\n type='button'\n >\n {this.isRequesting ? (\n this.isLightTheme ? (\n <searchcraft-spinner-light />\n ) : (\n <searchcraft-spinner-dark />\n )\n ) : this.isLightTheme ? (\n <searchcraft-clear-icon-set type='clear-light' />\n ) : (\n <searchcraft-clear-icon-set type='clear-dark' />\n )}\n </button>\n ) : (\n <button\n class={classNames('inputClearButtonLTR', '.sc-clear-input-button-ltr')}\n onClick={this.handleClearClick}\n type='button'\n >\n {this.isRequesting ? (\n this.isLightTheme ? (\n <searchcraft-spinner-light />\n ) : (\n <searchcraft-spinner-dark />\n )\n ) : this.isLightTheme ? (\n <searchcraft-clear-icon-set type='clear-light' />\n ) : (\n <searchcraft-clear-icon-set type='clear-dark' />\n )}\n </button>\n );\n }\n}\n","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-dash-icon',\n shadow: true,\n})\nexport class SearchcraftDashIcon {\n render() {\n return (\n <svg width='14' height='3' viewBox='0 0 14 3' fill='none'>\n <title>Checkbox Dash</title>\n <line\n x1='1.5'\n y1='1.5'\n x2='12.5'\n y2='1.5'\n stroke='white'\n stroke-width='3'\n stroke-linecap='round'\n />\n </svg>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin error-message-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n.errorMessageLight {\n @include error-message-base;\n color: $light-input-caption-color-error;\n}\n\n.errorMessageDark {\n @include error-message-base;\n color: $dark-input-caption-color-error;\n}","import { Component, Prop, h } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-error-message',\n styleUrl: 'searchcraft-error-message.module.scss',\n shadow: true,\n})\nexport class SearchcraftErrorMessage {\n /**\n * The error message to display. Defaults to a standard message if not provided.\n */\n @Prop() errorMessage?: string;\n\n /**\n * The theme, which determines the style (light or dark).\n */\n @Prop() theme: 'light' | 'dark' = 'light';\n\n render() {\n const errorMessageStyle =\n this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';\n\n return (\n <p class={classNames(errorMessageStyle)}>\n {this.errorMessage || 'Search term is required.'}\n </p>\n );\n }\n}\n",".filtersList {\n width: 100%;\n}\n\n.checkboxLabel {\n align-items: center;\n color: #292929;\n display: flex;\n font-family: 'Source Sans Pro';\n font-size: 14px;\n font-weight: 600;\n gap: 14px;\n position: relative;\n -webkit-font-smoothing: antialiased;\n}\n\n.checkboxLabel input[type=\"checkbox\"] {\n align-items: center;\n appearance: none;\n background-color: #EDEDED;\n border: 1px solid #D9D9D9;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n width: 24px;\n}\n\n.checkboxLabel input[type=\"checkbox\"]:checked {\n background-color: #000;\n position: relative;\n}\n\n.checkboxLabel input[type=\"checkbox\"]:checked + .checkContainer {\n display: block;\n}\n\n.checkboxLabel input[type=\"checkbox\"]:checked + .dashContainer {\n display: block;\n}\n\n.remainingFilterListCheckbox {\n margin-left: 16px;\n}\n\n.childCheckboxLabel {\n align-items: center;\n color: #292929;\n display: flex;\n font-family: 'Source Sans Pro';\n font-size: 14px;\n font-weight: 600;\n gap: 12px;\n position: relative;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"] {\n align-items: center;\n appearance: none;\n background-color: #EDEDED;\n border: 1px solid #D9D9D9;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n position: relative;\n width: 24px;\n -webkit-font-smoothing: antialiased;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"]:checked {\n background-color: #000;\n position: relative;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"]:checked + .checkContainer {\n display: block;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"]:checked + .dashContainer {\n display: block;\n}\n\n.checkContainer {\n display: none;\n height: 16px;\n width: 16px;\n position: absolute;\n top: 10px;\n left: 7px;\n}\n\n.dashContainer {\n display: none;\n height: 3px;\n width: 14px;\n position: absolute;\n top: 5px;\n left: 9px;\n}\n\n.loading {\n align-items: center;\n display: flex;\n justify-content: center;\n margin: 100px;\n}","import {\n Component,\n h,\n State,\n Prop,\n Event,\n type EventEmitter,\n} from '@stencil/core';\n\nimport type { Facets } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\n\nimport { flattenFacets } from '@utils/utils';\n\n@Component({\n tag: 'searchcraft-filters-list',\n styleUrl: 'searchcraft-filters-list.module.scss',\n shadow: true,\n})\nexport class SearchcraftFiltersList {\n @Prop() filters: Array<{ label: string; value: string }> = [];\n\n @Event() filtersUpdated: EventEmitter<string[]>;\n\n @State() dynamicFilters: Array<{\n label: string;\n value: string;\n count: number;\n children?: Array<{\n label: string;\n value: string;\n count: number;\n }>;\n }> = [];\n @State() selectedFilters: string[] = [];\n @State() query = '';\n @State() isRequesting = false;\n @State() resultsCount = 0;\n\n private searchStore = useSearchcraftStore.getState();\n private autoSearchFormElement: HTMLElement | null = null;\n unsubscribe: () => void;\n\n connectedCallback() {\n const state = this.searchStore;\n const facets = state.searchResults?.data.facets;\n\n if (facets) {\n this.populateFiltersFromFacets(facets);\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n const query = state.query?.trim();\n const facets = state.searchResults?.data.facets;\n this.query = query || '';\n this.isRequesting = state.isRequesting;\n this.resultsCount = state.searchResults?.data?.hits?.length || 0;\n\n if (facets && this.selectedFilters.length === 0) {\n this.populateFiltersFromFacets(facets);\n }\n });\n\n this.autoSearchFormElement = document.querySelector(\n 'searchcraft-auto-search-form',\n );\n if (this.autoSearchFormElement) {\n this.autoSearchFormElement.addEventListener(\n 'querySubmit',\n this.handleSearchRequest,\n );\n }\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n\n if (this.autoSearchFormElement) {\n this.autoSearchFormElement.removeEventListener(\n 'querySubmit',\n this.handleSearchRequest,\n );\n }\n }\n\n handleSearchRequest = () => {\n this.selectedFilters = [];\n this.searchStore.setSelectedFilters([]);\n this.emitFiltersUpdate();\n };\n\n populateFiltersFromFacets(facets: Facets) {\n const flattened = flattenFacets(facets[0]?.section || []);\n this.dynamicFilters = flattened.map((filter) => ({\n label: filter.label,\n value: filter.value,\n count: filter.count,\n children: filter.children || [],\n }));\n }\n\n handleCheckboxChange(value: string, isChecked: boolean, isParent = false) {\n if (isParent) {\n const parentFilter = this.dynamicFilters.find(\n (filter) => filter.value === value,\n );\n const childValues =\n parentFilter?.children?.map((child) => child.value) || [];\n\n if (!isChecked) {\n // Remove children from selectedFilters when parent is unchecked\n this.selectedFilters = this.selectedFilters.filter(\n (filter) => filter !== value && !childValues.includes(filter),\n );\n } else {\n // Add parent filter to selectedFilters\n this.selectedFilters = [...this.selectedFilters, value];\n }\n } else {\n // Update selectedFilters for child filters\n this.selectedFilters = isChecked\n ? [...this.selectedFilters, value]\n : this.selectedFilters.filter((filter) => filter !== value);\n }\n this.emitFiltersUpdate();\n }\n\n emitFiltersUpdate() {\n this.filtersUpdated.emit(this.selectedFilters);\n this.searchStore.setSelectedFilters(this.selectedFilters);\n this.searchStore.search();\n }\n\n formatLabel(label: string, count: number): string {\n return `${label.replace(/-/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase())} (${count})`;\n }\n\n render() {\n if (!this.query || this.resultsCount === 0) {\n return null;\n }\n return (\n <div class='filtersList'>\n {this.dynamicFilters.map((filter) => {\n const isChildSelected = filter.children\n ? filter.children.some((child) =>\n this.selectedFilters.includes(child.value),\n )\n : false;\n\n return (\n <div key={filter.value} class='filterItem'>\n <label class='checkboxLabel'>\n <input\n type='checkbox'\n checked={this.selectedFilters.includes(filter.value)}\n onChange={(event: Event) =>\n this.handleCheckboxChange(\n filter.value,\n (event.target as HTMLInputElement).checked,\n true,\n )\n }\n />\n {isChildSelected ? (\n <div class='dashContainer'>\n <searchcraft-dash-icon />\n </div>\n ) : (\n <div class='checkContainer'>\n <searchcraft-check-icon />\n </div>\n )}\n {this.formatLabel(filter.label, filter.count)}\n </label>\n {filter.children && filter.children.length > 0 && (\n <div class='childrenContainer'>\n {filter.children.map((child) => (\n <label\n key={child.value}\n class='childCheckboxLabel'\n style={{\n marginLeft: '20px',\n display: this.selectedFilters.includes(filter.value)\n ? 'flex'\n : 'none',\n }}\n >\n <input\n type='checkbox'\n checked={this.selectedFilters.includes(child.value)}\n onChange={(event: Event) =>\n this.handleCheckboxChange(\n child.value,\n (event.target as HTMLInputElement).checked,\n )\n }\n />\n <div class='checkContainer'>\n <searchcraft-check-icon />\n </div>\n {this.formatLabel(\n child.label.includes('/')\n ? child.label.split('/').pop() || child.label\n : child.label,\n child.count,\n )}\n </label>\n ))}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-container-base {\n position: relative;\n width: 100%;\n}\n\n@mixin input-base {\n border: none;\n border-radius: 8px;\n font-family: var(--font-stack);\n outline: none;\n padding-bottom: 15px;\n padding-top: 15px;\n width: 100%;\n\n &::placeholder {\n font-family: var(--font-stack);\n font-size: 16px;\n }\n}\n\n@mixin input-base-light {\n @include input-base;\n background-color: $light-input-background-color;\n color: $light-input-label-color;\n\n &::placeholder {\n color: $light-input-placeholder-color;\n }\n\n &:focus {\n outline: 2px solid $light-input-outline-focus;\n }\n}\n\n@mixin input-base-dark {\n @include input-base;\n background-color: $dark-input-background-color;\n color: $dark-input-label-color;\n\n &::placeholder {\n color: $dark-input-placeholder-color;\n }\n\n &:focus {\n outline: 2px solid $dark-input-outline-focus;\n }\n}\n\n@mixin input-error-base-light {\n @include input-base-light;\n outline: 2px solid $light-input-error-outline;\n\n &:focus-visible {\n outline: 2px solid $light-input-error-outline,\n }\n}\n\n@mixin input-error-base-dark {\n @include input-base-dark;\n outline: 2px solid $dark-input-error-outline;\n\n &:focus-visible {\n outline: 2px solid $dark-input-error-outline;\n }\n}\n\n.inputContainerLTR {\n @include input-container-base;\n}\n\n.inputContainerRTL {\n @include input-container-base;\n margin-left: 8px;\n}\n\n@mixin align-LTR {\n margin-right: 8px;\n padding-left: 36px;\n padding-right: 16px;\n}\n\n.inputLightLTR {\n @include input-base-light;\n @include align-LTR;\n}\n\n.inputDarkLTR {\n @include input-base-dark;\n @include align-LTR;\n}\n\n.inputErrorLightLTR {\n @include input-error-base-light;\n @include align-LTR;\n}\n\n.inputErrorDarkLTR {\n @include input-error-base-dark;\n @include align-LTR;\n}\n\n@mixin align-RTL {\n margin-left: 8px;\n padding-left: 16px;\n padding-right: 36px;\n text-align: right;\n}\n\n.inputLightRTL {\n @include input-base-light;\n @include align-RTL;\n}\n\n.inputDarkRTL {\n @include input-base-dark;\n @include align-RTL;\n}\n\n.inputErrorLightRTL {\n @include input-error-base-light;\n @include align-RTL;\n}\n\n.inputErrorDarkRTL {\n @include input-error-base-dark;\n @include align-RTL;\n}\n\n.inputWrapper {\n align-items: center;\n display: flex;\n position: relative;\n width: 100%;\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Event,\n Fragment,\n type EventEmitter,\n} from '@stencil/core';\nimport classNames from 'classnames';\n\nimport { parseCustomStyles } from '@utils/utils';\n\nexport interface ScInputCustomEvent<T> extends CustomEvent<T> {\n detail: T;\n target: HTMLSearchcraftInputElement;\n}\n\n@Component({\n tag: 'searchcraft-input',\n styleUrl: 'searchcraft-input.module.scss',\n shadow: true,\n})\nexport class SearchcraftInput {\n @Prop() customStyles: string | Record<string, string> = {};\n @Prop() error = false;\n @Prop() formClassName = '';\n @Prop() inputCaptionClassName = '';\n @Prop() inputCaptionValue = '';\n @Prop() inputClassName = '';\n @Prop() inputIconHeight = 20;\n @Prop() inputIconWidth = 20;\n @Prop() isRequesting = false;\n @Prop() placeholderValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\n @Prop() query = '';\n\n @Event() clearInput: EventEmitter<void>;\n @Event() searchInputChange: EventEmitter<string>;\n @Event() inputKeyUp: EventEmitter<string>;\n\n @State() theme = 'light';\n\n private get isLightTheme() {\n return this.theme === 'light';\n }\n\n handleInputChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.searchInputChange.emit(input.value);\n }\n\n handleInputKeyUp(event: KeyboardEvent) {\n const input = event.target as HTMLInputElement;\n this.inputKeyUp.emit(input.value);\n }\n\n handleClearInput() {\n if (this.clearInput) {\n this.clearInput.emit();\n }\n }\n\n render() {\n const containerClassName = this.rightToLeftOrientation\n ? 'inputContainerRTL'\n : 'inputContainerLTR';\n\n const inputClassName = classNames(\n this.error\n ? this.isLightTheme\n ? 'inputErrorLightRTL'\n : 'inputErrorDarkRTL'\n : this.isLightTheme\n ? 'inputLightLTR'\n : 'inputDarkLTR',\n 'searchcraft-input',\n );\n\n const validatedCustomStyles = parseCustomStyles(this.customStyles);\n\n const placeholderStyle = {\n fontSize: validatedCustomStyles.placeholderFontSize || '16px',\n };\n return (\n <div\n class={classNames(\n containerClassName,\n this.formClassName,\n 'searchcraft-input-form',\n )}\n >\n {this.rightToLeftOrientation ? (\n <Fragment>\n <input\n autoComplete='off'\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.bind(this)}\n onKeyUp={this.handleInputKeyUp.bind(this)}\n placeholder={this.placeholderValue}\n type='text'\n value={this.query}\n style={validatedCustomStyles}\n />\n <style>\n {`\n #searchcraft-input-id::placeholder {\n font-size: ${placeholderStyle.fontSize};\n }\n `}\n </style>\n {this.inputCaptionValue && (\n <searchcraft-input-caption\n inputCaptionClassName={this.inputCaptionClassName}\n inputCaptionValue={this.inputCaptionValue}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n {this.query.length > 0 && (\n <searchcraft-clear-input-button\n isRequesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n </Fragment>\n ) : (\n <Fragment>\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n <input\n autoComplete='off'\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.bind(this)}\n onKeyUp={this.handleInputKeyUp.bind(this)}\n placeholder={this.placeholderValue}\n type='text'\n value={this.query}\n style={validatedCustomStyles}\n />\n <style>\n {`\n #searchcraft-input-id::placeholder {\n font-size: ${placeholderStyle.fontSize};\n }\n `}\n </style>\n {this.inputCaptionValue && (\n <searchcraft-input-caption\n inputCaptionClassName={this.inputCaptionClassName}\n inputCaptionValue={this.inputCaptionValue}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n {this.query.length > 0 && (\n <searchcraft-clear-input-button\n isRequesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n </Fragment>\n )}\n </div>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-caption-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n@mixin input-caption-base-light {\n @include input-caption-base;\n color: $light-input-caption-color;\n}\n\n@mixin input-caption-base-dark {\n @include input-caption-base;\n color: $dark-input-caption-color;\n}\n\n.inputCaptionLightLTR {\n @include input-caption-base-light;\n}\n\n.inputCaptionDarkLTR {\n @include input-caption-base-dark;\n}\n\n.inputCaptionErrorLightLTR {\n @include input-caption-base;\n color: $light-input-caption-color-error;\n}\n\n.inputCaptionErrorDarkLTR {\n @include input-caption-base;\n color: $dark-input-caption-color-error;\n}\n\n.inputCaptionLightRTL {\n @include input-caption-base-light;\n text-align: right;\n}\n\n.inputCaptionDarkRTL {\n @include input-caption-base-dark;\n text-align: right;\n}\n\n.inputCaptionErrorLightRTL {\n @include input-caption-base;\n color: $light-input-caption-color-error;\n text-align: right;\n}\n\n.inputCaptionErrorDarkRTL {\n @include input-caption-base;\n color: $dark-input-caption-color-error;\n text-align: right;\n}","import { Component, Prop, h, State } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-input-caption',\n styleUrl: 'searchcraft-input-caption.module.scss',\n shadow: true,\n})\nexport class SearchcraftInputCaption {\n @Prop() error?: boolean;\n @Prop() inputCaptionClassName? = '';\n @Prop() inputCaptionValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n return this.rightToLeftOrientation ? (\n <p\n class={classNames(\n this.error\n ? this.isLightTheme\n ? 'inputCaptionErrorLightRTL'\n : 'inputCaptionErrorDarkRTL'\n : this.isLightTheme\n ? 'inputCaptionLightRTL'\n : 'inputCaptionDarkRTL',\n this.inputCaptionClassName,\n '.searchcraft-input-caption',\n )}\n >\n {this.inputCaptionValue}\n </p>\n ) : (\n <p\n class={classNames(\n this.error\n ? this.isLightTheme\n ? 'inputCaptionErrorLightLTR'\n : 'inputCaptionErrorDarkLTR'\n : this.isLightTheme\n ? 'inputCaptionLightLTR'\n : 'inputCaptionDarkLTR',\n this.inputCaptionClassName,\n '.searchcraft-input-caption',\n )}\n >\n {this.inputCaptionValue}\n </p>\n );\n }\n}\n",":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.inputIconLTR {\n left: 15px;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.inputIconRTL {\n position: absolute;\n right: 15px;\n top: 50%;\n transform: translateY(-50%);\n}","import { Component, Prop, h, State } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-input-icon',\n styleUrl: 'searchcraft-input-icon.module.scss',\n shadow: true,\n})\nexport class SearchcraftInputIcon {\n @Prop() error?: boolean;\n @Prop() height = 20;\n @Prop() rightToLeftOrientation = false;\n @Prop() width = 20;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n return this.error ? (\n <div\n class={this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR'}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-dark'\n width={this.width}\n />\n )}\n </div>\n ) : (\n <div\n class={this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR'}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-dark'\n width={this.width}\n />\n )}\n </div>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-label-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n.labelLight {\n @include input-label-base;\n color: $light-input-label-color;\n}\n\n.labelDark {\n @include input-label-base;\n color: $dark-input-label-color;\n}","import { Component, Prop, h, State } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-input-label',\n styleUrl: 'searchcraft-input-label.module.scss',\n shadow: true,\n})\nexport class SearchcraftInputLabel {\n @Prop() inputLabelClassName? = '';\n @Prop() label?: string;\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n if (!this.label) {\n return null;\n }\n const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';\n return (\n <label\n class={classNames(labelStyle, this.inputLabelClassName)}\n htmlFor='searchcraft-input-id'\n >\n {this.label}\n </label>\n );\n }\n}\n",".container {\n border-bottom: 1px solid #D9D9D9;\n display: flex;\n justify-content: flex-start;\n width: 100%;\n}\n\n.resultsInfo {\n color: #292929;\n font-size: 18px;\n font-weight: 600;\n line-height: 20px;\n margin: 0;\n margin-bottom: 8px;\n}","import { Component, h, State } from '@stencil/core';\nimport { useSearchcraftStore } from '@provider/store';\n\n@Component({\n tag: 'searchcraft-results-info',\n styleUrl: 'searchcraft-results-info.module.scss',\n shadow: true,\n})\nexport class SearchcraftResultsInfo {\n @State() isRequesting = false;\n @State() resultsCount = 0;\n @State() responseTime = '';\n @State() query = ''; // Track the query\n\n unsubscribe: () => void;\n\n connectedCallback() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.isRequesting = state.isRequesting;\n this.resultsCount = state.searchResults?.data?.count || 0;\n this.responseTime = (\n (state.searchResults?.data?.time_taken || 0) * 1000\n ).toFixed(2);\n this.query = state.query || ''; // Update query from store\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.query || this.resultsCount === 0) {\n return null;\n }\n\n return (\n <div class='container'>\n <p class='resultsInfo'>\n {this.resultsCount} results found in {this.responseTime}ms\n </p>\n </div>\n );\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-search-icon-set',\n shadow: true,\n})\nexport class SearchcraftSearchIconSet {\n /**\n * Type of the icon to display.\n * Options: 'search-light', 'search-dark', 'error-light', 'error-dark'\n */\n @Prop() type: 'search-light' | 'search-dark' | 'error-light' | 'error-dark' =\n 'search-dark';\n @Prop() width = 20;\n @Prop() height = 20;\n\n render() {\n const { width, height } = this;\n switch (this.type) {\n case 'search-light':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 20 20'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>Searchcraft Search Icon Light</title>\n <path\n d='M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z'\n stroke='#404040'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'search-dark':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 18 18'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>Searchcraft Search Icon Dark</title>\n <path\n d='M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z'\n stroke='#E6E6E6'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'error-light':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 20 20'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>\n Searchcraft Error Search Icon Light\n </title>\n <path\n d='M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z'\n stroke='#737373'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'error-dark':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 18 18'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>\n Searchcraft Error Search Icon Dark\n </title>\n <path\n d='M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z'\n stroke='#BFBFBF'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n default:\n return null;\n }\n }\n}\n",".sliderContainer {\n display: flex;\n flex-direction: column;\n gap: 10px;\n font-family: Arial, sans-serif;\n align-items: center;\n width: 100%;\n}\n\n.rangeContainer {\n display: flex;\n position: relative;\n width: 100%;\n align-items: center;\n\n .activeRange {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n height: 4px;\n background: #007DB3;\n z-index: 0;\n border-radius: 2px;\n }\n\n .rangeSlider {\n width: 100%;\n height: 4px;\n background: transparent;\n border-radius: 2px;\n outline: none;\n -webkit-appearance: none;\n appearance: none;\n position: absolute;\n margin: 0;\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 20px;\n height: 20px;\n background-color: #FFF;\n border-radius: 50%;\n border: 2px solid #e6e6e6;\n cursor: pointer;\n }\n\n &::-moz-range-thumb {\n width: 20px;\n height: 20px;\n background-color: #FFF;\n border-radius: 50%;\n border: 2px solid #e6e6e6;\n cursor: pointer;\n }\n }\n}\n\n.yearLabels {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 10px;\n font-size: 15px;\n font-weight: 600;\n font-family: 'Source Sans Pro', sans-serif;\n color: #666;\n}\n\n.yearLabel {\n min-width: 30px;\n text-align: center;\n}","import { Component, h, State, Prop } from '@stencil/core';\nimport { useSearchcraftStore } from '@provider/store';\n\n@Component({\n tag: 'searchcraft-slider',\n styleUrl: 'searchcraft-slider.module.scss',\n shadow: true,\n})\nexport class SearchcraftSlider {\n @Prop() maxYear = new Date().getFullYear();\n @Prop() minYear = 2014;\n\n @State() endYear = this.maxYear;\n @State() hasSearched = false;\n @State() query = '';\n @State() resultsCount = 0;\n @State() startYear = this.minYear;\n\n private searchStore = useSearchcraftStore.getState();\n\n unsubscribe: () => void;\n\n componentDidLoad() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n if (state.query.length > 0) {\n this.hasSearched = true;\n this.resultsCount = state.searchResults?.data?.hits?.length || 0;\n }\n this.query = state.query;\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n private updateYears = async () => {\n this.searchStore.setYearsRange([this.startYear, this.endYear]);\n\n try {\n if (typeof this.query === 'string' && this.query.trim() !== '') {\n await this.searchStore.search();\n } else {\n console.warn('Query is missing or empty, skipping search request.');\n }\n } catch (error) {\n console.error('Search failed:', error);\n }\n };\n\n private handleStartYearChange = (event: InputEvent) => {\n const value = Number.parseInt((event.target as HTMLInputElement).value, 10);\n this.startYear = Math.min(value, this.endYear);\n this.updateYears();\n };\n\n private handleEndYearChange = (event: InputEvent) => {\n const value = Number.parseInt((event.target as HTMLInputElement).value, 10);\n this.endYear = Math.max(value, this.startYear);\n this.updateYears();\n };\n\n render() {\n if (!this.query || this.resultsCount === 0) {\n return null;\n }\n\n const rangeMin = this.minYear;\n const rangeMax = this.maxYear;\n const startPercent =\n ((this.startYear - rangeMin) / (rangeMax - rangeMin)) * 100;\n const endPercent =\n ((this.endYear - rangeMin) / (rangeMax - rangeMin)) * 100;\n\n return (\n <div class='sliderContainer'>\n <div class='rangeContainer'>\n <div\n class='activeRange'\n style={{\n left: `${startPercent}%`,\n width: `${endPercent - startPercent}%`,\n }}\n />\n <input\n class='rangeSlider'\n max={this.maxYear}\n min={this.minYear}\n onInput={this.handleStartYearChange}\n step='1'\n type='range'\n value={this.startYear}\n />\n <input\n class='rangeSlider'\n max={this.maxYear}\n min={this.minYear}\n onInput={this.handleEndYearChange}\n step='1'\n type='range'\n value={this.endYear}\n />\n </div>\n <div class='yearLabels'>\n <span class='yearLabel'>{this.startYear}</span>\n <span class='yearLabel'>{this.endYear}</span>\n </div>\n </div>\n );\n }\n}\n","$spinner-size: 20px;\n\n.spinnerContainer {\n background-color: transparent;\n height: $spinner-size;\n width: $spinner-size;\n}\n\n.spinnerDark {\n animation: spinning 1s linear infinite;\n background: conic-gradient(#000 50%, #FFFFFF);\n clip-path: circle(50%);\n height: 100%;\n mask-image: radial-gradient(circle at center, rgba(0,0,0,0) calc($spinner-size/3), rgba(0,0,0,1) calc($spinner-size/3));\n width: 100%;\n}\n\n.spinnerLight {\n animation: spinning 1s linear infinite;\n background: conic-gradient(#737373 50%, #FFFFFF);\n clip-path: circle(50%);\n height: 100%;\n mask-image: radial-gradient(circle at center, rgba(0,0,0,0) calc($spinner-size/3), rgba(0,0,0,1) calc($spinner-size/3));\n width: 100%;\n}\n\n@keyframes spinning {\n 0% { transform: rotate(0deg); }\n 50% {transform: rotate(180deg);}\n 100% { transform: rotate(360deg); }\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-spinner-dark',\n styleUrl: 'searchcraft-spinner-dark.module.scss',\n shadow: true,\n})\nexport class SearchcraftSpinnerDark {\n render() {\n return (\n <div class='spinnerContainer'>\n <div class='spinnerDark' />\n </div>\n );\n }\n}\n","$spinner-size: 20px;\n\n.spinnerContainer {\n background-color: transparent;\n height: $spinner-size;\n width: $spinner-size;\n}\n\n.spinnerLight {\n animation: spinning 1s linear infinite;\n background: conic-gradient(#737373 50%, #FFFFFF);\n clip-path: circle(50%);\n height: 100%;\n mask-image: radial-gradient(circle at center, rgba(0,0,0,0) calc($spinner-size/3), rgba(0,0,0,1) calc($spinner-size/3));\n width: 100%;\n}\n\n@keyframes spinning {\n 0% { transform: rotate(0deg); }\n 50% {transform: rotate(180deg);}\n 100% { transform: rotate(360deg); }\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-spinner-light',\n styleUrl: 'searchcraft-spinner-light.module.scss',\n shadow: true,\n})\nexport class SearchcraftSpinnerLight {\n render() {\n return (\n <div class='spinnerContainer'>\n <div class='spinnerLight' />\n </div>\n );\n }\n}\n",".toggle-wrapper {\n background: #ddd;\n border: none;\n border-radius: 16px;\n box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05);\n cursor: pointer;\n height: 26px;\n margin-left: 10px;\n position: relative;\n width: 44px;\n}\n\n.toggle-wrapper.active {\n background: #007DB3;\n box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05);\n}\n\n.toggle-wrapper .toggle-switch {\n background: #fff;\n border-radius: 50%;\n height: 18px;\n left: 4px;\n position: absolute;\n top: calc(50% - 18px/2);\n transition: transform 0.3s ease;\n width: 18px;\n}\n\n.toggle-wrapper .toggle-switch.active {\n transform: translateX(16px);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport { useSearchcraftStore } from '@provider/store';\n\n@Component({\n tag: 'searchcraft-toggle-button',\n styleUrl: 'searchcraft-toggle-button.module.scss',\n shadow: true,\n})\nexport class SearchcraftToggleButton {\n /**\n * Type of the toggle - determines what it controls\n * 'mode': toggles between 'fuzzy' and 'normal'\n * 'sort': toggles between 'asc' and 'desc'\n */\n @Prop() type: 'mode' | 'sort' = 'mode';\n\n @State() isActive = false;\n @State() query = ''; // Track the query\n @State() resultsCount = 0; // Track the count of search results\n\n private unsubscribe: () => void;\n private searchStore = useSearchcraftStore.getState();\n\n componentDidLoad() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.query = state.query || '';\n this.resultsCount = state.searchResults?.data?.hits?.length || 0;\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n private handleToggle = async () => {\n this.isActive = !this.isActive;\n\n if (this.type === 'mode') {\n const mode = this.isActive ? 'normal' : 'fuzzy';\n this.searchStore.setSearchParams({\n mode,\n });\n } else if (this.type === 'sort') {\n const sort = this.isActive ? 'desc' : 'asc';\n this.searchStore.setSearchParams({\n sort,\n });\n }\n\n try {\n await this.searchStore.search();\n } catch (error) {\n console.error('Search failed:', error);\n }\n };\n\n render() {\n if (!this.query || this.resultsCount === 0) {\n return null;\n }\n\n return (\n <button\n class={`toggle-wrapper ${this.isActive ? 'active' : ''}`}\n onClick={this.handleToggle}\n type='button'\n >\n <div class={`toggle-switch ${this.isActive ? 'active' : ''}`} />\n </button>\n );\n }\n}\n"],"mappings":"kLAAA,MAAMA,EAAqC,wLAC3C,MAAAC,EAAeD,E,MCyBFE,EAAyB,M,mIAyB5BC,KAAAC,gBAAwD,KACxDD,KAAAE,cAAgB,EAChBF,KAAAG,YAAcC,EAAoBC,WAmB1CL,KAAAM,kBAAqBC,IACnBP,KAAKQ,MAAQD,EAAME,OACnBT,KAAKG,YAAYO,SAASV,KAAKQ,OAE/B,GAAIR,KAAKQ,MAAMG,SAAW,GAAI,CAC5BX,KAAKY,cAAgB,KACrBZ,KAAKG,YAAYU,iBAAiB,K,KAC7B,CACLb,KAAKc,YAAYC,KAAKf,KAAKQ,M,GAI/BR,KAAAgB,iBAAoBT,IAClB,MAAMU,EAASV,EAAME,OACrB,GAAIQ,IAAWjB,KAAKQ,MAAO,CACzB,M,CAEFR,KAAKQ,MAAQS,EAEb,GAAIjB,KAAKC,gBAAiB,CACxBiB,aAAalB,KAAKC,gB,CAGpBD,KAAKC,gBAAkBkB,YAAW,KAChC,GAAInB,KAAKQ,MAAMG,SAAW,GAAI,CAC5BX,KAAKY,cAAgB,KACrBZ,KAAKG,YAAYU,iBAAiB,K,KAC7B,CACLb,KAAKG,YAAYO,SAASV,KAAKQ,OAC/BR,KAAKc,YAAYC,KAAKf,KAAKQ,OAC3BR,KAAKoB,W,IAENpB,KAAKE,cAAc,EAGxBF,KAAAqB,iBAAmB,KACjBrB,KAAKQ,MAAQ,GACbR,KAAKY,cAAgB,KACrBZ,KAAKG,YAAYO,SAAS,IAC1BV,KAAKG,YAAYU,iBAAiB,MAElC,UAAWb,KAAKsB,aAAe,WAAY,CACzCtB,KAAKsB,Y,CAGP,GAAItB,KAAKC,gBAAiB,CACxBiB,aAAalB,KAAKC,gB,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W,SAAW,O","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,b as t}from"./p-0880cfbb.js";export{s as setNonce}from"./p-0880cfbb.js";import{g as a}from"./p-e1255160.js";var r=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};r().then((async e=>{await a();return t([["p-67cc5ccb",[[1,"searchcraft-auto-search-form",{autoSearchFormClass:[1,"auto-search-form-class"],clearInput:[16],config:[16],customStylesForInput:[1,"custom-styles-for-input"],inputCaptionValue:[1,"input-caption-value"],inputIconHeight:[2,"input-icon-height"],inputIconWidth:[2,"input-icon-width"],labelForInput:[1,"label-for-input"],placeholderValue:[1,"placeholder-value"],rightToLeftOrientation:[4,"right-to-left-orientation"],searchContainerClass:[1,"search-container-class"],error:[32],isRequesting:[32],query:[32],searchResults:[32]}],[1,"searchcraft-base-search-results",{adInterval:[2,"ad-interval"],customStylesForResults:[1,"custom-styles-for-results"],documentAttributesForDisplay:[1,"document-attributes-for-display"],fallbackElement:[16],formatTime:[4,"format-time"],placeAdAtEnd:[4,"place-ad-at-end"],placeAdAtStart:[4,"place-ad-at-start"],placeResultImageRight:[4,"place-result-image-right"],hasSearched:[32],query:[32],searchResults:[32]}],[1,"searchcraft-filters-list",{filters:[16],dynamicFilters:[32],isRequesting:[32],query:[32],resultsCount:[32],selectedFilters:[32]}],[1,"searchcraft-results-info",{isRequesting:[32],resultsCount:[32],responseTime:[32],query:[32]}],[1,"searchcraft-slider",{maxYear:[2,"max-year"],minYear:[2,"min-year"],endYear:[32],hasSearched:[32],query:[32],resultsCount:[32],startYear:[32]}],[1,"searchcraft-toggle-button",{type:[1],isActive:[32],query:[32],resultsCount:[32]}],[1,"searchcraft-base-search-result",{buttonText:[1,"button-text"],customStyles:[1,"custom-styles"],headingText:[1,"heading-text"],imageDescription:[1,"image-description"],imageSource:[1,"image-source"],isInteractive:[4,"is-interactive"],primaryContent:[1,"primary-content"],secondaryContent:[1,"secondary-content"],subheadingText:[1,"subheading-text"],tertiaryContent:[1,"tertiary-content"],themeMode:[1,"theme-mode"],placeImageRight:[4,"place-image-right"]}],[1,"searchcraft-check-icon"],[1,"searchcraft-input",{customStyles:[1,"custom-styles"],error:[4],formClassName:[1,"form-class-name"],inputCaptionClassName:[1,"input-caption-class-name"],inputCaptionValue:[1,"input-caption-value"],inputClassName:[1,"input-class-name"],inputIconHeight:[2,"input-icon-height"],inputIconWidth:[2,"input-icon-width"],isRequesting:[4,"is-requesting"],placeholderValue:[1,"placeholder-value"],rightToLeftOrientation:[4,"right-to-left-orientation"],query:[1],theme:[32]}],[1,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1],theme:[32]}],[1,"searchcraft-clear-input-button",{isRequesting:[4,"is-requesting"],rightToLeftOrientation:[4,"right-to-left-orientation"],theme:[32]}],[1,"searchcraft-input-icon",{error:[4],height:[2],rightToLeftOrientation:[4,"right-to-left-orientation"],width:[2],theme:[32]}],[1,"searchcraft-error-message",{errorMessage:[1,"error-message"],theme:[1]}],[1,"searchcraft-input-caption",{error:[4],inputCaptionClassName:[1,"input-caption-class-name"],inputCaptionValue:[1,"input-caption-value"],rightToLeftOrientation:[4,"right-to-left-orientation"],theme:[32]}],[1,"searchcraft-clear-icon-set",{type:[1]}],[1,"searchcraft-search-icon-set",{type:[1],width:[2],height:[2]}],[1,"searchcraft-spinner-light"],[1,"searchcraft-spinner-dark"]]],["p-d9efd790",[[1,"searchcraft-base-search-form",{config:[16],errorMessage:[1,"error-message"],labelForInput:[1,"label-for-input"],rightToLeftOrientation:[4,"right-to-left-orientation"],error:[32],query:[32],searchResults:[32]}]]],["p-5ec960bd",[[1,"searchcraft-button-icon"]]],["p-66f38e89",[[1,"searchcraft-button",{iconElement:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],isRequesting:[32],theme:[32]}]]]],e)}));
1
+ import{p as e,b as t}from"./p-0880cfbb.js";export{s as setNonce}from"./p-0880cfbb.js";import{g as a}from"./p-e1255160.js";var r=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};r().then((async e=>{await a();return t([["p-6c007e2e",[[1,"searchcraft-auto-search-form",{autoSearchFormClass:[1,"auto-search-form-class"],clearInput:[16],config:[16],customStylesForInput:[1,"custom-styles-for-input"],inputCaptionValue:[1,"input-caption-value"],inputIconHeight:[2,"input-icon-height"],inputIconWidth:[2,"input-icon-width"],labelForInput:[1,"label-for-input"],placeholderValue:[1,"placeholder-value"],rightToLeftOrientation:[4,"right-to-left-orientation"],searchContainerClass:[1,"search-container-class"],error:[32],isRequesting:[32],query:[32],searchResults:[32]}],[1,"searchcraft-base-search-results",{adInterval:[2,"ad-interval"],customStylesForResults:[1,"custom-styles-for-results"],documentAttributesForDisplay:[1,"document-attributes-for-display"],fallbackElement:[16],formatTime:[4,"format-time"],placeAdAtEnd:[4,"place-ad-at-end"],placeAdAtStart:[4,"place-ad-at-start"],placeResultImageRight:[4,"place-result-image-right"],hasSearched:[32],query:[32],searchResults:[32]}],[1,"searchcraft-filters-list",{filters:[16],dynamicFilters:[32],selectedFilters:[32],query:[32],isRequesting:[32],resultsCount:[32]}],[1,"searchcraft-results-info",{isRequesting:[32],resultsCount:[32],responseTime:[32],query:[32]}],[1,"searchcraft-slider",{maxYear:[2,"max-year"],minYear:[2,"min-year"],endYear:[32],hasSearched:[32],query:[32],resultsCount:[32],startYear:[32]}],[1,"searchcraft-toggle-button",{type:[1],isActive:[32],query:[32],resultsCount:[32]}],[1,"searchcraft-base-search-result",{buttonText:[1,"button-text"],customStyles:[1,"custom-styles"],headingText:[1,"heading-text"],imageDescription:[1,"image-description"],imageSource:[1,"image-source"],isInteractive:[4,"is-interactive"],primaryContent:[1,"primary-content"],secondaryContent:[1,"secondary-content"],subheadingText:[1,"subheading-text"],tertiaryContent:[1,"tertiary-content"],themeMode:[1,"theme-mode"],placeImageRight:[4,"place-image-right"]}],[1,"searchcraft-check-icon"],[1,"searchcraft-dash-icon"],[1,"searchcraft-input",{customStyles:[1,"custom-styles"],error:[4],formClassName:[1,"form-class-name"],inputCaptionClassName:[1,"input-caption-class-name"],inputCaptionValue:[1,"input-caption-value"],inputClassName:[1,"input-class-name"],inputIconHeight:[2,"input-icon-height"],inputIconWidth:[2,"input-icon-width"],isRequesting:[4,"is-requesting"],placeholderValue:[1,"placeholder-value"],rightToLeftOrientation:[4,"right-to-left-orientation"],query:[1],theme:[32]}],[1,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1],theme:[32]}],[1,"searchcraft-clear-input-button",{isRequesting:[4,"is-requesting"],rightToLeftOrientation:[4,"right-to-left-orientation"],theme:[32]}],[1,"searchcraft-input-icon",{error:[4],height:[2],rightToLeftOrientation:[4,"right-to-left-orientation"],width:[2],theme:[32]}],[1,"searchcraft-error-message",{errorMessage:[1,"error-message"],theme:[1]}],[1,"searchcraft-input-caption",{error:[4],inputCaptionClassName:[1,"input-caption-class-name"],inputCaptionValue:[1,"input-caption-value"],rightToLeftOrientation:[4,"right-to-left-orientation"],theme:[32]}],[1,"searchcraft-clear-icon-set",{type:[1]}],[1,"searchcraft-search-icon-set",{type:[1],width:[2],height:[2]}],[1,"searchcraft-spinner-light"],[1,"searchcraft-spinner-dark"]]],["p-05416a3e",[[1,"searchcraft-base-search-form",{config:[16],errorMessage:[1,"error-message"],labelForInput:[1,"label-for-input"],rightToLeftOrientation:[4,"right-to-left-orientation"],error:[32],query:[32],searchResults:[32]}]]],["p-5ec960bd",[[1,"searchcraft-button-icon"]]],["p-3cb77ee1",[[1,"searchcraft-button",{iconElement:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],isRequesting:[32],theme:[32]}]]]],e)}));
2
2
  //# sourceMappingURL=searchcraft-javascript-sdk.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","autoSearchFormClass","clearInput","config","customStylesForInput","inputCaptionValue","inputIconHeight","inputIconWidth","labelForInput","placeholderValue","rightToLeftOrientation","searchContainerClass","error","isRequesting","query","searchResults","adInterval","customStylesForResults","documentAttributesForDisplay","fallbackElement","formatTime","placeAdAtEnd","placeAdAtStart","placeResultImageRight","hasSearched","filters","dynamicFilters","resultsCount","selectedFilters","responseTime","maxYear","minYear","endYear","startYear","type","isActive","buttonText","customStyles","headingText","imageDescription","imageSource","isInteractive","primaryContent","secondaryContent","subheadingText","tertiaryContent","themeMode","placeImageRight","formClassName","inputCaptionClassName","inputClassName","theme","inputLabelClassName","label","height","width","errorMessage","iconElement","iconOnly","iconPosition"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,kDAAuC,CAAAC,oBAAA,6BAAAC,WAAA,KAAAC,OAAA,KAAAC,qBAAA,8BAAAC,kBAAA,0BAAAC,gBAAA,wBAAAC,eAAA,uBAAAC,cAAA,sBAAAC,iBAAA,wBAAAC,uBAAA,gCAAAC,qBAAA,6BAAAC,MAAA,KAAAC,aAAA,KAAAC,MAAA,KAAAC,cAAA,6CAAAC,WAAA,kBAAAC,uBAAA,gCAAAC,6BAAA,sCAAAC,gBAAA,KAAAC,WAAA,kBAAAC,aAAA,sBAAAC,eAAA,wBAAAC,sBAAA,+BAAAC,YAAA,KAAAV,MAAA,KAAAC,cAAA,sCAAAU,QAAA,KAAAC,eAAA,KAAAb,aAAA,KAAAC,MAAA,KAAAa,aAAA,KAAAC,gBAAA,sCAAAf,aAAA,KAAAc,aAAA,KAAAE,aAAA,KAAAf,MAAA,gCAAAgB,QAAA,eAAAC,QAAA,eAAAC,QAAA,KAAAR,YAAA,KAAAV,MAAA,KAAAa,aAAA,KAAAM,UAAA,uCAAAC,KAAA,IAAAC,SAAA,KAAArB,MAAA,KAAAa,aAAA,4CAAAS,WAAA,kBAAAC,aAAA,oBAAAC,YAAA,mBAAAC,iBAAA,wBAAAC,YAAA,mBAAAC,cAAA,qBAAAC,eAAA,sBAAAC,iBAAA,wBAAAC,eAAA,sBAAAC,gBAAA,uBAAAC,UAAA,iBAAAC,gBAAA,+EAAAV,aAAA,oBAAAzB,MAAA,IAAAoC,cAAA,sBAAAC,sBAAA,+BAAA5C,kBAAA,0BAAA6C,eAAA,uBAAA5C,gBAAA,wBAAAC,eAAA,uBAAAM,aAAA,oBAAAJ,iBAAA,wBAAAC,uBAAA,gCAAAI,MAAA,IAAAqC,MAAA,qCAAAC,oBAAA,6BAAAC,MAAA,IAAAF,MAAA,4CAAAtC,aAAA,oBAAAH,uBAAA,gCAAAyC,MAAA,oCAAAvC,MAAA,IAAA0C,OAAA,IAAA5C,uBAAA,gCAAA6C,MAAA,IAAAJ,MAAA,uCAAAK,aAAA,oBAAAL,MAAA,sCAAAvC,MAAA,IAAAqC,sBAAA,+BAAA5C,kBAAA,0BAAAK,uBAAA,gCAAAyC,MAAA,wCAAAjB,KAAA,wCAAAA,KAAA,IAAAqB,MAAA,IAAAD,OAAA,yHAAAnD,OAAA,KAAAqD,aAAA,oBAAAhD,cAAA,sBAAAE,uBAAA,gCAAAE,MAAA,KAAAE,MAAA,KAAAC,cAAA,gGAAA0C,YAAA,KAAAC,SAAA,gBAAAC,aAAA,oBAAAN,MAAA,IAAAxC,aAAA,KAAAsC,MAAA,UAAArD,EAAA","ignoreList":[]}
1
+ {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","autoSearchFormClass","clearInput","config","customStylesForInput","inputCaptionValue","inputIconHeight","inputIconWidth","labelForInput","placeholderValue","rightToLeftOrientation","searchContainerClass","error","isRequesting","query","searchResults","adInterval","customStylesForResults","documentAttributesForDisplay","fallbackElement","formatTime","placeAdAtEnd","placeAdAtStart","placeResultImageRight","hasSearched","filters","dynamicFilters","selectedFilters","resultsCount","responseTime","maxYear","minYear","endYear","startYear","type","isActive","buttonText","customStyles","headingText","imageDescription","imageSource","isInteractive","primaryContent","secondaryContent","subheadingText","tertiaryContent","themeMode","placeImageRight","formClassName","inputCaptionClassName","inputClassName","theme","inputLabelClassName","label","height","width","errorMessage","iconElement","iconOnly","iconPosition"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,kDAAuC,CAAAC,oBAAA,6BAAAC,WAAA,KAAAC,OAAA,KAAAC,qBAAA,8BAAAC,kBAAA,0BAAAC,gBAAA,wBAAAC,eAAA,uBAAAC,cAAA,sBAAAC,iBAAA,wBAAAC,uBAAA,gCAAAC,qBAAA,6BAAAC,MAAA,KAAAC,aAAA,KAAAC,MAAA,KAAAC,cAAA,6CAAAC,WAAA,kBAAAC,uBAAA,gCAAAC,6BAAA,sCAAAC,gBAAA,KAAAC,WAAA,kBAAAC,aAAA,sBAAAC,eAAA,wBAAAC,sBAAA,+BAAAC,YAAA,KAAAV,MAAA,KAAAC,cAAA,sCAAAU,QAAA,KAAAC,eAAA,KAAAC,gBAAA,KAAAb,MAAA,KAAAD,aAAA,KAAAe,aAAA,sCAAAf,aAAA,KAAAe,aAAA,KAAAC,aAAA,KAAAf,MAAA,gCAAAgB,QAAA,eAAAC,QAAA,eAAAC,QAAA,KAAAR,YAAA,KAAAV,MAAA,KAAAc,aAAA,KAAAK,UAAA,uCAAAC,KAAA,IAAAC,SAAA,KAAArB,MAAA,KAAAc,aAAA,4CAAAQ,WAAA,kBAAAC,aAAA,oBAAAC,YAAA,mBAAAC,iBAAA,wBAAAC,YAAA,mBAAAC,cAAA,qBAAAC,eAAA,sBAAAC,iBAAA,wBAAAC,eAAA,sBAAAC,gBAAA,uBAAAC,UAAA,iBAAAC,gBAAA,2GAAAV,aAAA,oBAAAzB,MAAA,IAAAoC,cAAA,sBAAAC,sBAAA,+BAAA5C,kBAAA,0BAAA6C,eAAA,uBAAA5C,gBAAA,wBAAAC,eAAA,uBAAAM,aAAA,oBAAAJ,iBAAA,wBAAAC,uBAAA,gCAAAI,MAAA,IAAAqC,MAAA,qCAAAC,oBAAA,6BAAAC,MAAA,IAAAF,MAAA,4CAAAtC,aAAA,oBAAAH,uBAAA,gCAAAyC,MAAA,oCAAAvC,MAAA,IAAA0C,OAAA,IAAA5C,uBAAA,gCAAA6C,MAAA,IAAAJ,MAAA,uCAAAK,aAAA,oBAAAL,MAAA,sCAAAvC,MAAA,IAAAqC,sBAAA,+BAAA5C,kBAAA,0BAAAK,uBAAA,gCAAAyC,MAAA,wCAAAjB,KAAA,wCAAAA,KAAA,IAAAqB,MAAA,IAAAD,OAAA,yHAAAnD,OAAA,KAAAqD,aAAA,oBAAAhD,cAAA,sBAAAE,uBAAA,gCAAAE,MAAA,KAAAE,MAAA,KAAAC,cAAA,gGAAA0C,YAAA,KAAAC,SAAA,gBAAAC,aAAA,oBAAAN,MAAA,IAAAxC,aAAA,KAAAsC,MAAA,UAAArD,EAAA","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export declare class SearchcraftDashIcon {
2
+ render(): any;
3
+ }
@@ -9,18 +9,26 @@ export declare class SearchcraftFiltersList {
9
9
  dynamicFilters: Array<{
10
10
  label: string;
11
11
  value: string;
12
+ count: number;
13
+ children?: Array<{
14
+ label: string;
15
+ value: string;
16
+ count: number;
17
+ }>;
12
18
  }>;
13
- isRequesting: boolean;
19
+ selectedFilters: string[];
14
20
  query: string;
21
+ isRequesting: boolean;
15
22
  resultsCount: number;
16
- selectedFilters: Set<string>;
17
23
  private searchStore;
24
+ private autoSearchFormElement;
18
25
  unsubscribe: () => void;
19
26
  connectedCallback(): void;
20
27
  disconnectedCallback(): void;
28
+ handleSearchRequest: () => void;
21
29
  populateFiltersFromFacets(facets: Facets): void;
22
- handleFilterChange: (value: string, checked: boolean) => void;
23
- deduplicatePaths(filters: string[]): string[];
24
- formatLabel(label: string): string;
30
+ handleCheckboxChange(value: string, isChecked: boolean, isParent?: boolean): void;
31
+ emitFiltersUpdate(): void;
32
+ formatLabel(label: string, count: number): string;
25
33
  render(): any;
26
34
  }
@@ -72,6 +72,8 @@ export namespace Components {
72
72
  "isRequesting"?: boolean;
73
73
  "rightToLeftOrientation": boolean;
74
74
  }
75
+ interface SearchcraftDashIcon {
76
+ }
75
77
  interface SearchcraftErrorMessage {
76
78
  /**
77
79
  * The error message to display. Defaults to a standard message if not provided.
@@ -281,6 +283,12 @@ declare global {
281
283
  prototype: HTMLSearchcraftClearInputButtonElement;
282
284
  new (): HTMLSearchcraftClearInputButtonElement;
283
285
  };
286
+ interface HTMLSearchcraftDashIconElement extends Components.SearchcraftDashIcon, HTMLStencilElement {
287
+ }
288
+ var HTMLSearchcraftDashIconElement: {
289
+ prototype: HTMLSearchcraftDashIconElement;
290
+ new (): HTMLSearchcraftDashIconElement;
291
+ };
284
292
  interface HTMLSearchcraftErrorMessageElement extends Components.SearchcraftErrorMessage, HTMLStencilElement {
285
293
  }
286
294
  var HTMLSearchcraftErrorMessageElement: {
@@ -387,6 +395,7 @@ declare global {
387
395
  "searchcraft-check-icon": HTMLSearchcraftCheckIconElement;
388
396
  "searchcraft-clear-icon-set": HTMLSearchcraftClearIconSetElement;
389
397
  "searchcraft-clear-input-button": HTMLSearchcraftClearInputButtonElement;
398
+ "searchcraft-dash-icon": HTMLSearchcraftDashIconElement;
390
399
  "searchcraft-error-message": HTMLSearchcraftErrorMessageElement;
391
400
  "searchcraft-filters-list": HTMLSearchcraftFiltersListElement;
392
401
  "searchcraft-input": HTMLSearchcraftInputElement;
@@ -474,6 +483,8 @@ declare namespace LocalJSX {
474
483
  "onClearInput"?: (event: SearchcraftClearInputButtonCustomEvent<void>) => void;
475
484
  "rightToLeftOrientation"?: boolean;
476
485
  }
486
+ interface SearchcraftDashIcon {
487
+ }
477
488
  interface SearchcraftErrorMessage {
478
489
  /**
479
490
  * The error message to display. Defaults to a standard message if not provided.
@@ -555,6 +566,7 @@ declare namespace LocalJSX {
555
566
  "searchcraft-check-icon": SearchcraftCheckIcon;
556
567
  "searchcraft-clear-icon-set": SearchcraftClearIconSet;
557
568
  "searchcraft-clear-input-button": SearchcraftClearInputButton;
569
+ "searchcraft-dash-icon": SearchcraftDashIcon;
558
570
  "searchcraft-error-message": SearchcraftErrorMessage;
559
571
  "searchcraft-filters-list": SearchcraftFiltersList;
560
572
  "searchcraft-input": SearchcraftInput;
@@ -582,6 +594,7 @@ declare module "@stencil/core" {
582
594
  "searchcraft-check-icon": LocalJSX.SearchcraftCheckIcon & JSXBase.HTMLAttributes<HTMLSearchcraftCheckIconElement>;
583
595
  "searchcraft-clear-icon-set": LocalJSX.SearchcraftClearIconSet & JSXBase.HTMLAttributes<HTMLSearchcraftClearIconSetElement>;
584
596
  "searchcraft-clear-input-button": LocalJSX.SearchcraftClearInputButton & JSXBase.HTMLAttributes<HTMLSearchcraftClearInputButtonElement>;
597
+ "searchcraft-dash-icon": LocalJSX.SearchcraftDashIcon & JSXBase.HTMLAttributes<HTMLSearchcraftDashIconElement>;
585
598
  "searchcraft-error-message": LocalJSX.SearchcraftErrorMessage & JSXBase.HTMLAttributes<HTMLSearchcraftErrorMessageElement>;
586
599
  "searchcraft-filters-list": LocalJSX.SearchcraftFiltersList & JSXBase.HTMLAttributes<HTMLSearchcraftFiltersListElement>;
587
600
  "searchcraft-input": LocalJSX.SearchcraftInput & JSXBase.HTMLAttributes<HTMLSearchcraftInputElement>;
@@ -9,8 +9,11 @@ type Section = {
9
9
  children: Section[];
10
10
  };
11
11
  type FacetCheckbox = {
12
+ count: number;
13
+ children: any[];
12
14
  label: string;
13
15
  value: string;
14
16
  };
15
17
  export declare function flattenFacets(sections: Section[]): FacetCheckbox[];
18
+ export declare function filterPaths(paths: any): any;
16
19
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@searchcraft/javascript-sdk",
3
3
  "private": false,
4
- "version": "0.2.7",
4
+ "version": "0.2.9",
5
5
  "description": "Searchcraft Javascript SDK",
6
6
  "author": "Searchcraft",
7
7
  "license": "Apache-2.0",