@searchcraft/javascript-sdk 0.2.9 → 0.3.0
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.
- package/dist/cjs/searchcraft-auto-search-form_19.cjs.entry.js +28 -11
- package/dist/cjs/searchcraft-auto-search-form_19.cjs.entry.js.map +1 -1
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +4 -4
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -1
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +1 -3
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +1 -1
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.module.css +15 -12
- package/dist/collection/components/searchcraft-input/searchcraft-input.js +5 -1
- package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -1
- package/dist/collection/components/searchcraft-input/searchcraft-input.module.css +24 -16
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.module.css +3 -3
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +15 -0
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -1
- package/dist/components/{p-dd2a4022.js → p-27a6ca57.js} +7 -3
- package/dist/components/p-27a6ca57.js.map +1 -0
- package/dist/components/searchcraft-auto-search-form.js +5 -5
- package/dist/components/searchcraft-auto-search-form.js.map +1 -1
- package/dist/components/searchcraft-base-search-form.js +1 -1
- package/dist/components/searchcraft-filters-list.js +2 -4
- package/dist/components/searchcraft-filters-list.js.map +1 -1
- package/dist/components/searchcraft-input.js +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-slider.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +15 -0
- package/dist/components/searchcraft-toggle-button.js.map +1 -1
- package/dist/esm/searchcraft-auto-search-form_19.entry.js +28 -11
- package/dist/esm/searchcraft-auto-search-form_19.entry.js.map +1 -1
- package/dist/searchcraft-javascript-sdk/p-72382d90.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-72382d90.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +3 -1
- package/package.json +1 -1
- package/dist/components/p-dd2a4022.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-6c007e2e.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-6c007e2e.entry.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
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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