@searchcraft/javascript-sdk 0.1.7 → 0.1.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.
- package/dist/cjs/{index-7b49313c.js → index-d0e71432.js} +10 -4
- package/dist/cjs/index-d0e71432.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{searchcraft-auto-search-form_13.cjs.entry.js → searchcraft-auto-search-form_16.cjs.entry.js} +219 -16
- package/dist/cjs/searchcraft-auto-search-form_16.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +3 -3
- package/dist/cjs/searchcraft-button-icon.cjs.entry.js +1 -1
- package/dist/cjs/searchcraft-button.cjs.entry.js +1 -1
- package/dist/cjs/searchcraft-javascript-sdk.cjs.js +2 -2
- package/dist/cjs/{store-3d577aac.js → store-3f6eab7d.js} +110 -42
- package/dist/cjs/store-3f6eab7d.js.map +1 -0
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +7 -4
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +78 -7
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +4 -0
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +131 -0
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +1 -0
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.module.css +35 -0
- package/dist/collection/components/searchcraft-input/searchcraft-input.js +21 -2
- package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -1
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +97 -0
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js.map +1 -0
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.module.css +75 -0
- package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +1 -1
- package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +1 -1
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +79 -0
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -0
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.module.css +38 -0
- package/dist/collection/provider/store.js +35 -2
- package/dist/collection/provider/store.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/{p-a3ea7edc.js → p-05cd002d.js} +2 -2
- package/dist/components/{p-a3ea7edc.js.map → p-05cd002d.js.map} +1 -1
- package/dist/components/{p-85d96d9b.js → p-25bd714c.js} +2 -2
- package/dist/components/{p-85d96d9b.js.map → p-25bd714c.js.map} +1 -1
- package/dist/components/{p-62f37242.js → p-37df2122.js} +16 -11
- package/dist/components/p-37df2122.js.map +1 -0
- package/dist/components/{p-f3af2b04.js → p-3cbac2bb.js} +2 -2
- package/dist/components/{p-f3af2b04.js.map → p-3cbac2bb.js.map} +1 -1
- package/dist/components/{p-07fba086.js → p-403f6115.js} +5 -5
- package/dist/components/{p-07fba086.js.map → p-403f6115.js.map} +1 -1
- package/dist/components/{p-04bad430.js → p-50ca3fe4.js} +3 -3
- package/dist/components/{p-04bad430.js.map → p-50ca3fe4.js.map} +1 -1
- package/dist/components/{p-3ea9ba3a.js → p-574e8e3c.js} +3 -3
- package/dist/components/{p-3ea9ba3a.js.map → p-574e8e3c.js.map} +1 -1
- package/dist/components/{p-9c617862.js → p-5aa6335f.js} +110 -42
- package/dist/components/p-5aa6335f.js.map +1 -0
- package/dist/components/{p-d33fdd81.js → p-71dff048.js} +2 -2
- package/dist/components/{p-d33fdd81.js.map → p-71dff048.js.map} +1 -1
- package/dist/components/{p-d73bc01d.js → p-9bb9d6f0.js} +2 -2
- package/dist/components/{p-d73bc01d.js.map → p-9bb9d6f0.js.map} +1 -1
- package/dist/components/{p-c14731ca.js → p-c9629cc3.js} +2 -2
- package/dist/components/{p-c14731ca.js.map → p-c9629cc3.js.map} +1 -1
- package/dist/components/{p-af65953e.js → p-c9cd5533.js} +6 -2
- package/dist/components/p-c9cd5533.js.map +1 -0
- package/dist/components/{p-781a9a8c.js → p-e0e0fc94.js} +3 -3
- package/dist/components/{p-781a9a8c.js.map → p-e0e0fc94.js.map} +1 -1
- package/dist/components/{p-6b1d0cba.js → p-f2e41d24.js} +3 -3
- package/dist/components/{p-6b1d0cba.js.map → p-f2e41d24.js.map} +1 -1
- package/dist/components/searchcraft-auto-search-form.js +20 -17
- package/dist/components/searchcraft-auto-search-form.js.map +1 -1
- package/dist/components/searchcraft-base-search-form.js +14 -14
- package/dist/components/searchcraft-base-search-result.js +1 -1
- package/dist/components/searchcraft-base-search-results.js +45 -8
- package/dist/components/searchcraft-base-search-results.js.map +1 -1
- package/dist/components/searchcraft-button-icon.js +1 -1
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/searchcraft-clear-icon-set.js +1 -1
- package/dist/components/searchcraft-clear-input-button.js +1 -1
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/searchcraft-filters-list.d.ts +11 -0
- package/dist/components/searchcraft-filters-list.js +103 -0
- package/dist/components/searchcraft-filters-list.js.map +1 -0
- package/dist/components/searchcraft-input-caption.js +1 -1
- package/dist/components/searchcraft-input-icon.js +1 -1
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-input.js +1 -1
- package/dist/components/searchcraft-search-icon-set.js +1 -1
- package/dist/components/searchcraft-slider.d.ts +11 -0
- package/dist/components/searchcraft-slider.js +72 -0
- package/dist/components/searchcraft-slider.js.map +1 -0
- package/dist/components/searchcraft-spinner-dark.js +1 -1
- package/dist/components/searchcraft-spinner-light.js +1 -1
- package/dist/components/searchcraft-toggle-button.d.ts +11 -0
- package/dist/components/searchcraft-toggle-button.js +71 -0
- package/dist/components/searchcraft-toggle-button.js.map +1 -0
- package/dist/esm/{index-e4a4f86d.js → index-92040c37.js} +10 -4
- package/dist/esm/index-92040c37.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{searchcraft-auto-search-form_13.entry.js → searchcraft-auto-search-form_16.entry.js} +217 -17
- package/dist/esm/searchcraft-auto-search-form_16.entry.js.map +1 -0
- package/dist/esm/searchcraft-base-search-form.entry.js +3 -3
- package/dist/esm/searchcraft-button-icon.entry.js +1 -1
- package/dist/esm/searchcraft-button.entry.js +1 -1
- package/dist/esm/searchcraft-javascript-sdk.js +3 -3
- package/dist/esm/{store-03dc618f.js → store-5f6f8445.js} +110 -42
- package/dist/esm/store-5f6f8445.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/{p-6a17384e.entry.js → p-02f632b6.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/{p-e6f6972c.js → p-05369654.js} +3 -3
- package/dist/searchcraft-javascript-sdk/p-05369654.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-5aa6335f.js +11 -0
- package/dist/searchcraft-javascript-sdk/p-5aa6335f.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-639d019b.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/{p-6c825f8c.entry.js.map → p-639d019b.entry.js.map} +1 -1
- package/dist/searchcraft-javascript-sdk/p-73265750.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-73265750.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-98eab6f9.entry.js → p-81eaebdc.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
- package/dist/types/components/searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts +1 -0
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +3 -15
- package/dist/types/components/searchcraft-filters-list/searchcraft-filters-list.d.ts +23 -0
- package/dist/types/components/searchcraft-input/searchcraft-input.d.ts +2 -0
- package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +11 -0
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +12 -0
- package/dist/types/components.d.ts +75 -24
- package/dist/types/provider/store.d.ts +17 -5
- package/package.json +1 -1
- package/dist/cjs/index-7b49313c.js.map +0 -1
- package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js.map +0 -1
- package/dist/cjs/store-3d577aac.js.map +0 -1
- package/dist/components/p-62f37242.js.map +0 -1
- package/dist/components/p-9c617862.js.map +0 -1
- package/dist/components/p-af65953e.js.map +0 -1
- package/dist/esm/index-e4a4f86d.js.map +0 -1
- package/dist/esm/searchcraft-auto-search-form_13.entry.js.map +0 -1
- package/dist/esm/store-03dc618f.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-6c825f8c.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-9c617862.js +0 -11
- package/dist/searchcraft-javascript-sdk/p-9c617862.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-e6f6972c.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-f77e9c21.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-f77e9c21.entry.js.map +0 -1
- /package/dist/searchcraft-javascript-sdk/{p-6a17384e.entry.js.map → p-02f632b6.entry.js.map} +0 -0
- /package/dist/searchcraft-javascript-sdk/{p-98eab6f9.entry.js.map → p-81eaebdc.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-
|
|
2
|
-
import { u as useSearchcraftStore,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-92040c37.js';
|
|
2
|
+
import { u as useSearchcraftStore, p } from './store-5f6f8445.js';
|
|
3
3
|
import { p as parseCustomStyles, a as parseSearchKeys, s as serializeStyles, e as extractDynamicProperties } from './utils-7bff0c78.js';
|
|
4
4
|
import { c as classNames } from './index-72ac5051.js';
|
|
5
5
|
|
|
@@ -16,13 +16,16 @@ const SearchcraftAutoSearchForm = class {
|
|
|
16
16
|
this.handleInputChange = (event) => {
|
|
17
17
|
this.query = event.detail;
|
|
18
18
|
this.querySubmit.emit(this.query);
|
|
19
|
-
|
|
19
|
+
};
|
|
20
|
+
this.handleInputKeyUp = (event) => {
|
|
21
|
+
const target = event.detail;
|
|
22
|
+
this.query = target;
|
|
23
|
+
this.querySubmit.emit(this.query);
|
|
20
24
|
if (this.debounceTimeout) {
|
|
21
25
|
clearTimeout(this.debounceTimeout);
|
|
22
26
|
}
|
|
23
|
-
// Set a new debounce timeout
|
|
24
27
|
this.debounceTimeout = setTimeout(() => {
|
|
25
|
-
this.runSearch();
|
|
28
|
+
this.query.trim() !== '' && this.runSearch();
|
|
26
29
|
}, this.debounceDelay);
|
|
27
30
|
};
|
|
28
31
|
this.handleClearInput = () => {
|
|
@@ -78,7 +81,7 @@ const SearchcraftAutoSearchForm = class {
|
|
|
78
81
|
this.searchResults = '';
|
|
79
82
|
}
|
|
80
83
|
componentDidLoad() {
|
|
81
|
-
const searchcraft = new
|
|
84
|
+
const searchcraft = new p(this.config);
|
|
82
85
|
this.searchStore.initialize(searchcraft, true);
|
|
83
86
|
this.unsubscribe = useSearchcraftStore.subscribe((state) => {
|
|
84
87
|
this.isRequesting = state.isRequesting;
|
|
@@ -92,7 +95,7 @@ const SearchcraftAutoSearchForm = class {
|
|
|
92
95
|
render() {
|
|
93
96
|
const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';
|
|
94
97
|
const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);
|
|
95
|
-
return (h("form", { key: '
|
|
98
|
+
return (h("form", { key: '8a3cf6e3cc1d8cc3f2fcff7ff3b8e90d2e76f400', class: `${formClass}`, onSubmit: this.handleFormSubmit }, h("searchcraft-input-label", { key: 'ab055252710a95574811c9bf82ed2c01fef355d2', label: this.labelForInput }), h("div", { key: '9c397f34ebfe25994de60b7d135cc3167e787499', class: 'searchContainer' }, h("searchcraft-input", { key: '4f3614615c3880fb305e39d511f3ae40e71eed32', customStyles: parsedCustomStyles, "input-caption-value": this.inputCaptionValue, "is-requesting": this.isRequesting, "input-icon-height": this.inputIconHeight, "input-icon-width": this.inputIconWidth, onClearInput: this.handleClearInput, onInputKeyUp: this.handleInputKeyUp, onSearchInputChange: this.handleInputChange, "placeholder-value": this.placeholderValue, query: this.query, "right-to-left-orientation": this.rightToLeftOrientation })), this.error && (h("searchcraft-error-message", { key: '1a297169ed2b12870169e8c533a7112aaa991b93', errorMessage: 'Please enter a search query.' }))));
|
|
96
99
|
}
|
|
97
100
|
};
|
|
98
101
|
SearchcraftAutoSearchForm.style = SearchcraftAutoSearchFormStyle0;
|
|
@@ -150,7 +153,7 @@ const SearchcraftBaseSearchResult = class {
|
|
|
150
153
|
};
|
|
151
154
|
SearchcraftBaseSearchResult.style = SearchcraftBaseSearchResultStyle0;
|
|
152
155
|
|
|
153
|
-
const searchcraftBaseSearchResultsModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.resultsContainer{display:flex;flex-direction:column;justify-content:center;margin:100px 20px}.resultsContainer>p{align-self:center}.resultsContainer>div{margin-bottom:20px}.resultsContainer>div img{height:300px;width:200px}.adSection{align-items:center;border:1px solid #DCDDDE;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}";
|
|
156
|
+
const searchcraftBaseSearchResultsModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.resultsContainer{display:flex;flex-direction:column;justify-content:center;margin:100px 20px}.resultsContainer>p{align-self:center}.resultsContainer>div{margin-bottom:20px}.resultsContainer>div img{height:300px;width:200px}.adSection{align-items:center;border:1px solid #DCDDDE;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}";
|
|
154
157
|
const SearchcraftBaseSearchResultsStyle0 = searchcraftBaseSearchResultsModuleCss;
|
|
155
158
|
|
|
156
159
|
const SearchcraftBaseSearchResults = class {
|
|
@@ -160,8 +163,10 @@ const SearchcraftBaseSearchResults = class {
|
|
|
160
163
|
this.searchResults = null;
|
|
161
164
|
this.searchKeys = '';
|
|
162
165
|
this.customStylesForResults = {};
|
|
166
|
+
this.placeAdAtStart = true;
|
|
163
167
|
this.placeAdAtEnd = false;
|
|
164
168
|
this.adInterval = 4;
|
|
169
|
+
this.formatTime = true;
|
|
165
170
|
}
|
|
166
171
|
componentDidLoad() {
|
|
167
172
|
if (!this.searchKeys || this.searchKeys.length === 0) {
|
|
@@ -181,11 +186,30 @@ const SearchcraftBaseSearchResults = class {
|
|
|
181
186
|
this.unsubscribe();
|
|
182
187
|
}
|
|
183
188
|
}
|
|
189
|
+
timeAgo(timestamp) {
|
|
190
|
+
const now = new Date();
|
|
191
|
+
const inputTime = new Date(timestamp);
|
|
192
|
+
const diffInSeconds = Math.floor((now.getTime() - inputTime.getTime()) / 1000);
|
|
193
|
+
const minutes = Math.floor(diffInSeconds / 60);
|
|
194
|
+
const hours = Math.floor(minutes / 60);
|
|
195
|
+
const days = Math.floor(hours / 24);
|
|
196
|
+
const years = Math.floor(days / 365);
|
|
197
|
+
if (minutes < 60) {
|
|
198
|
+
return `${minutes}m ago`;
|
|
199
|
+
}
|
|
200
|
+
if (hours < 24) {
|
|
201
|
+
return `${hours}h ago`;
|
|
202
|
+
}
|
|
203
|
+
if (days < 365) {
|
|
204
|
+
return `${days}d ago`;
|
|
205
|
+
}
|
|
206
|
+
return `${years}y ago`;
|
|
207
|
+
}
|
|
184
208
|
render() {
|
|
185
209
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
186
210
|
if (!((_a = this.searchResults) === null || _a === void 0 ? void 0 : _a.data)) {
|
|
187
211
|
console.warn('No search results data available');
|
|
188
|
-
return h("div",
|
|
212
|
+
return h("div", { class: 'emptyState' }, "No results to display.");
|
|
189
213
|
}
|
|
190
214
|
const parsedSearchKeys = parseSearchKeys(this.searchKeys);
|
|
191
215
|
const serializedStyles = typeof this.customStylesForResults === 'string'
|
|
@@ -194,10 +218,25 @@ const SearchcraftBaseSearchResults = class {
|
|
|
194
218
|
const resultsComponents = (_d = (_c = (_b = this.searchResults) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.hits) === null || _d === void 0 ? void 0 : _d.map((document, index) => {
|
|
195
219
|
const { doc: result } = document;
|
|
196
220
|
const dynamicProperties = extractDynamicProperties(result, parsedSearchKeys);
|
|
221
|
+
// Apply timeAgo formatting if formatTime is true
|
|
222
|
+
if (this.formatTime) {
|
|
223
|
+
for (const key of parsedSearchKeys) {
|
|
224
|
+
if (dynamicProperties[key]) {
|
|
225
|
+
const value = dynamicProperties[key];
|
|
226
|
+
// Check if the value is a valid ISO timestamp
|
|
227
|
+
if (typeof value === 'string' &&
|
|
228
|
+
!Number.isNaN(Date.parse(value))) {
|
|
229
|
+
dynamicProperties[key] = this.timeAgo(value);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
197
234
|
return (h("searchcraft-base-search-result", { key: `${document.document_id}-${index}`, "button-callback": () => console.log('button callback'), "result-callback": () => console.log('interactive element'), "keydown-callback": () => console.log('keydown'), "is-interactive": true, "heading-text": dynamicProperties[parsedSearchKeys[0]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "primary-content": dynamicProperties[parsedSearchKeys[2]], "secondary-content": dynamicProperties[parsedSearchKeys[3]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]], "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], "custom-styles": serializedStyles }));
|
|
198
235
|
});
|
|
199
236
|
const finalComponents = [];
|
|
200
|
-
|
|
237
|
+
if (this.placeAdAtStart) {
|
|
238
|
+
finalComponents.push(h("div", { key: 'ad-section-start', class: 'adSection' }, h("span", null, "##"), h("p", null, " Ad Impressions")));
|
|
239
|
+
}
|
|
201
240
|
if (this.adInterval > 0) {
|
|
202
241
|
resultsComponents.forEach((component, index) => {
|
|
203
242
|
finalComponents.push(component);
|
|
@@ -209,7 +248,6 @@ const SearchcraftBaseSearchResults = class {
|
|
|
209
248
|
else {
|
|
210
249
|
finalComponents.push(...resultsComponents);
|
|
211
250
|
}
|
|
212
|
-
// Add ad at the end if specified
|
|
213
251
|
if (this.placeAdAtEnd) {
|
|
214
252
|
finalComponents.push(h("div", { key: 'ad-section-end', class: 'adSection' }, h("span", null, "##"), h("p", null, " Ad Impressions")));
|
|
215
253
|
}
|
|
@@ -281,6 +319,78 @@ const SearchcraftErrorMessage = class {
|
|
|
281
319
|
};
|
|
282
320
|
SearchcraftErrorMessage.style = SearchcraftErrorMessageStyle0;
|
|
283
321
|
|
|
322
|
+
const searchcraftFiltersListModuleCss = "@charset \"UTF-8\";.filtersList{padding:16px}.checkboxLabel{align-items:center;color:#292929;display:flex;font-size:14px;font-weight:600;gap:12px}.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}.checkboxLabel input[type=checkbox]:checked::before{color:#fff;content:\"✔\";font-size:14px}";
|
|
323
|
+
const SearchcraftFiltersListStyle0 = searchcraftFiltersListModuleCss;
|
|
324
|
+
|
|
325
|
+
const SearchcraftFiltersList = class {
|
|
326
|
+
constructor(hostRef) {
|
|
327
|
+
registerInstance(this, hostRef);
|
|
328
|
+
this.filtersUpdated = createEvent(this, "filtersUpdated", 7);
|
|
329
|
+
this.searchStore = useSearchcraftStore.getState();
|
|
330
|
+
this.handleFilterChange = (value, checked) => {
|
|
331
|
+
if (checked) {
|
|
332
|
+
this.selectedFilters.add(value);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
this.selectedFilters.delete(value);
|
|
336
|
+
}
|
|
337
|
+
const selectedFiltersArray = Array.from(this.selectedFilters);
|
|
338
|
+
this.filtersUpdated.emit(selectedFiltersArray);
|
|
339
|
+
this.searchStore.setSelectedFilters(selectedFiltersArray);
|
|
340
|
+
this.searchStore.search();
|
|
341
|
+
};
|
|
342
|
+
this.filters = [];
|
|
343
|
+
this.dynamicFilters = [];
|
|
344
|
+
this.isRequesting = false;
|
|
345
|
+
this.selectedFilters = new Set();
|
|
346
|
+
this.originalFilterCounts = {};
|
|
347
|
+
}
|
|
348
|
+
connectedCallback() {
|
|
349
|
+
this.unsubscribe = useSearchcraftStore.subscribe((state) => {
|
|
350
|
+
var _a;
|
|
351
|
+
this.isRequesting = state.isRequesting;
|
|
352
|
+
const facets = (_a = state.searchResults) === null || _a === void 0 ? void 0 : _a.data.facets;
|
|
353
|
+
if (facets) {
|
|
354
|
+
this.populateFiltersFromFacets(facets);
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
disconnectedCallback() {
|
|
359
|
+
if (this.unsubscribe) {
|
|
360
|
+
this.unsubscribe();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
populateFiltersFromFacets(facets) {
|
|
364
|
+
const newFilters = Object.entries(facets).flatMap(([facetKey, facetData]) => Object.entries(facetData.counts).map(([value, count]) => {
|
|
365
|
+
const filterValue = `${facetKey}:${value}`;
|
|
366
|
+
this.originalFilterCounts[filterValue] = `${count}`; // Store the original count
|
|
367
|
+
return {
|
|
368
|
+
label: `${facetKey}: ${value.replace(/^\//, '')} (${count})`,
|
|
369
|
+
value: filterValue,
|
|
370
|
+
};
|
|
371
|
+
}));
|
|
372
|
+
this.dynamicFilters = newFilters;
|
|
373
|
+
}
|
|
374
|
+
render() {
|
|
375
|
+
const checkedFilters = Array.from(this.selectedFilters).map((value) => {
|
|
376
|
+
const count = this.originalFilterCounts[value] || '0';
|
|
377
|
+
return {
|
|
378
|
+
label: `${value.split(':')[1]} (${count})`,
|
|
379
|
+
value,
|
|
380
|
+
};
|
|
381
|
+
});
|
|
382
|
+
const remainingDynamicFilters = this.dynamicFilters.filter((filter) => !this.selectedFilters.has(filter.value));
|
|
383
|
+
if (this.isRequesting) {
|
|
384
|
+
return h("div", null, "Loading facets");
|
|
385
|
+
}
|
|
386
|
+
return (h("div", { class: 'filtersList' }, checkedFilters.map((filter) => (h("label", { class: 'checkboxLabel', key: filter.value }, h("input", { class: 'filterListCheckbox', checked: true, onChange: (event) => this.handleFilterChange(filter.value, event.target.checked), type: 'checkbox', value: filter.value }), filter.label))), remainingDynamicFilters.map((filter) => {
|
|
387
|
+
const filterLabel = filter.label.split(':')[1] || filter.label;
|
|
388
|
+
return (h("label", { class: 'checkboxLabel', key: filter.value }, h("input", { class: 'filterListCheckbox', checked: this.selectedFilters.has(filter.value), onChange: (event) => this.handleFilterChange(filter.value, event.target.checked), type: 'checkbox', value: filter.value }), filterLabel));
|
|
389
|
+
})));
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
SearchcraftFiltersList.style = SearchcraftFiltersListStyle0;
|
|
393
|
+
|
|
284
394
|
const searchcraftInputModuleCss = ":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%}";
|
|
285
395
|
const SearchcraftInputStyle0 = searchcraftInputModuleCss;
|
|
286
396
|
|
|
@@ -289,6 +399,7 @@ const SearchcraftInput = class {
|
|
|
289
399
|
registerInstance(this, hostRef);
|
|
290
400
|
this.clearInput = createEvent(this, "clearInput", 7);
|
|
291
401
|
this.searchInputChange = createEvent(this, "searchInputChange", 7);
|
|
402
|
+
this.inputKeyUp = createEvent(this, "inputKeyUp", 7);
|
|
292
403
|
this.customStyles = {};
|
|
293
404
|
this.error = false;
|
|
294
405
|
this.formClassName = '';
|
|
@@ -310,6 +421,10 @@ const SearchcraftInput = class {
|
|
|
310
421
|
const input = event.target;
|
|
311
422
|
this.searchInputChange.emit(input.value);
|
|
312
423
|
}
|
|
424
|
+
handleInputKeyUp(event) {
|
|
425
|
+
const input = event.target;
|
|
426
|
+
this.inputKeyUp.emit(input.value);
|
|
427
|
+
}
|
|
313
428
|
handleClearInput() {
|
|
314
429
|
if (this.clearInput) {
|
|
315
430
|
this.clearInput.emit();
|
|
@@ -330,11 +445,11 @@ const SearchcraftInput = class {
|
|
|
330
445
|
const placeholderStyle = {
|
|
331
446
|
fontSize: validatedCustomStyles.placeholderFontSize || '16px',
|
|
332
447
|
};
|
|
333
|
-
return (h("div", { key: '
|
|
448
|
+
return (h("div", { key: 'ca2698b808ef606d890817f6b8c133503663570e', class: classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (h(Fragment, null, h("input", { class: classNames(inputClassName, '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: validatedCustomStyles }), h("style", null, `
|
|
334
449
|
#searchcraft-input-id::placeholder {
|
|
335
450
|
font-size: ${placeholderStyle.fontSize};
|
|
336
451
|
}
|
|
337
|
-
`), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { isRequesting: this.isRequesting, onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation })), h("searchcraft-input-icon", { error: this.error, height: this.inputIconHeight, rightToLeftOrientation: this.rightToLeftOrientation, width: this.inputIconWidth }))) : (h("div", { class: 'inputWrapper' }, h("searchcraft-input-icon", { error: this.error, height: this.inputIconHeight, rightToLeftOrientation: this.rightToLeftOrientation, width: this.inputIconWidth }), h("input", { class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), h("style", null, `
|
|
452
|
+
`), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { isRequesting: this.isRequesting, onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation })), h("searchcraft-input-icon", { error: this.error, height: this.inputIconHeight, rightToLeftOrientation: this.rightToLeftOrientation, width: this.inputIconWidth }))) : (h("div", { class: 'inputWrapper' }, h("searchcraft-input-icon", { error: this.error, height: this.inputIconHeight, rightToLeftOrientation: this.rightToLeftOrientation, width: this.inputIconWidth }), h("input", { class: classNames(inputClassName, '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: validatedCustomStyles }), h("style", null, `
|
|
338
453
|
#searchcraft-input-id::placeholder {
|
|
339
454
|
font-size: ${placeholderStyle.fontSize};
|
|
340
455
|
}
|
|
@@ -445,6 +560,48 @@ const SearchcraftSearchIconSet = class {
|
|
|
445
560
|
}
|
|
446
561
|
};
|
|
447
562
|
|
|
563
|
+
const searchcraftSliderModuleCss = ".slider-container{display:flex;flex-direction:column;gap:10px;font-family:Arial, sans-serif;align-items:center}label{font-size:14px;font-weight:bold;margin-bottom:10px}.range-container{display:flex;width:100%;align-items:center}.range-slider{width:100%;height:4px;background:#ddd;border-radius:2px;outline:none;margin:0 -1px;position:relative}.range-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;background:#007bff;border-radius:50%;border:2px solid #fff;cursor:pointer;position:relative}.range-slider::-moz-range-thumb{width:20px;height:20px;background:#007bff;border-radius:50%;border:2px solid #fff;cursor:pointer}.range-slider:before{content:\"\";position:absolute;height:4px;background:#007bff;border-radius:2px;left:0;right:0;z-index:-1}.year-labels{display:flex;justify-content:space-between;width:100%;margin-top:10px;font-size:12px;color:#555}.year-label{min-width:30px;text-align:center}";
|
|
564
|
+
const SearchcraftSliderStyle0 = searchcraftSliderModuleCss;
|
|
565
|
+
|
|
566
|
+
const SearchcraftSlider = class {
|
|
567
|
+
constructor(hostRef) {
|
|
568
|
+
registerInstance(this, hostRef);
|
|
569
|
+
this.searchStore = useSearchcraftStore.getState();
|
|
570
|
+
this.updateYears = async () => {
|
|
571
|
+
const query = this.searchStore.query; // Get the query from the store
|
|
572
|
+
this.searchStore.setYearsRange([this.startYear, this.endYear]);
|
|
573
|
+
try {
|
|
574
|
+
if (!query || query.trim() === '') {
|
|
575
|
+
console.warn('No query value, search request skipped.');
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
await this.searchStore.search();
|
|
579
|
+
}
|
|
580
|
+
catch (error) {
|
|
581
|
+
console.error('Search failed:', error);
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
this.handleStartYearChange = (event) => {
|
|
585
|
+
const value = Number.parseInt(event.target.value, 10);
|
|
586
|
+
this.startYear = Math.min(value, this.endYear);
|
|
587
|
+
this.updateYears();
|
|
588
|
+
};
|
|
589
|
+
this.handleEndYearChange = (event) => {
|
|
590
|
+
const value = Number.parseInt(event.target.value, 10);
|
|
591
|
+
this.endYear = Math.max(value, this.startYear);
|
|
592
|
+
this.updateYears();
|
|
593
|
+
};
|
|
594
|
+
this.minYear = 2000;
|
|
595
|
+
this.maxYear = new Date().getFullYear();
|
|
596
|
+
this.startYear = this.minYear;
|
|
597
|
+
this.endYear = this.maxYear;
|
|
598
|
+
}
|
|
599
|
+
render() {
|
|
600
|
+
return (h("div", { key: 'cc50ae827183ec2cbf1ab16f4a3514fbd581cf01', class: 'slider-container' }, h("label", { key: '96df103d7a04aa5e0364ddf51e13af653984b8a6' }, "Filter by Year"), h("div", { key: 'dc0b68f7cd3b9a3e2fd37b6204e1542ee9fb0478', class: 'range-container' }, h("input", { key: '8ed75b7de77448d8340a76224609345309c20fe4', type: 'range', min: this.minYear, max: this.maxYear, value: this.startYear, step: '1', onInput: this.handleStartYearChange, class: 'range-slider' }), h("input", { key: '12a3612f9245d6ea290007d094668625907c183d', type: 'range', min: this.minYear, max: this.maxYear, value: this.endYear, step: '1', onInput: this.handleEndYearChange, class: 'range-slider' })), h("div", { key: '3bf225797efb2c5e1d97275e2f012faba14d2550', class: 'year-labels' }, h("span", { key: '524c7f49dc52d68059373ecc1e95b425892f0144', class: 'year-label' }, this.startYear), h("span", { key: 'e7464b4154ab8d26a969b338a5a733a206502f29', class: 'year-label' }, this.endYear))));
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
SearchcraftSlider.style = SearchcraftSliderStyle0;
|
|
604
|
+
|
|
448
605
|
const searchcraftSpinnerDarkModuleCss = ".spinnerContainer{background-color:transparent;height:20px;width:20px}.spinnerDark{height:100%;width:100%;background:conic-gradient(#000 50%, #FFFFFF);clip-path:circle(50%);mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);animation:spinning 1s linear infinite}.spinnerLight{height:100%;width:100%;background:conic-gradient(#737373 50%, #FFFFFF);clip-path:circle(50%);mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);animation:spinning 1s linear infinite}@keyframes spinning{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}";
|
|
449
606
|
const SearchcraftSpinnerDarkStyle0 = searchcraftSpinnerDarkModuleCss;
|
|
450
607
|
|
|
@@ -453,7 +610,7 @@ const SearchcraftSpinnerDark = class {
|
|
|
453
610
|
registerInstance(this, hostRef);
|
|
454
611
|
}
|
|
455
612
|
render() {
|
|
456
|
-
return (h("div", { key: '
|
|
613
|
+
return (h("div", { key: 'fa6235c4bf182daac64d41cd04a995aa3476b59a', class: 'spinnerContainer' }, h("div", { key: '68532114a4f25a5d12c8514e5c6d2984a68573af', class: 'spinnerDark' })));
|
|
457
614
|
}
|
|
458
615
|
};
|
|
459
616
|
SearchcraftSpinnerDark.style = SearchcraftSpinnerDarkStyle0;
|
|
@@ -466,11 +623,54 @@ const SearchcraftSpinnerLight = class {
|
|
|
466
623
|
registerInstance(this, hostRef);
|
|
467
624
|
}
|
|
468
625
|
render() {
|
|
469
|
-
return (h("div", { key: '
|
|
626
|
+
return (h("div", { key: 'f1c941149c07dac7ee09eff1ae98dca00dcdf924', class: 'spinnerContainer' }, h("div", { key: '2f93e299ef12f4f382d189ab58c743ee9e981ce2', class: 'spinnerLight' })));
|
|
470
627
|
}
|
|
471
628
|
};
|
|
472
629
|
SearchcraftSpinnerLight.style = SearchcraftSpinnerLightStyle0;
|
|
473
630
|
|
|
474
|
-
|
|
631
|
+
const searchcraftToggleButtonModuleCss = ".toggle-container{display:flex;align-items:center;font-size:14px;color:#333}.toggle-wrapper{box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.05);margin-left:10px;border:none;border-radius:16px;width:44px;height:26px;background:#ddd;position:relative;cursor:pointer}.toggle-wrapper.active{box-shadow:0px 0px 0px 1px rgba(0, 0, 0, 0.05);background:#007DB3}.toggle-wrapper .toggle-switch{width:18px;height:18px;background:#fff;border-radius:50%;position:absolute;top:calc(50% - 9px);left:4px;transition:transform 0.3s ease}.toggle-wrapper .toggle-switch.active{transform:translateX(16px)}";
|
|
632
|
+
const SearchcraftToggleButtonStyle0 = searchcraftToggleButtonModuleCss;
|
|
633
|
+
|
|
634
|
+
const SearchcraftToggleButton = class {
|
|
635
|
+
constructor(hostRef) {
|
|
636
|
+
registerInstance(this, hostRef);
|
|
637
|
+
// Zustand store hook
|
|
638
|
+
this.searchStore = useSearchcraftStore.getState();
|
|
639
|
+
this.handleToggle = async () => {
|
|
640
|
+
this.isActive = !this.isActive;
|
|
641
|
+
if (this.type === 'mode') {
|
|
642
|
+
const mode = this.isActive ? 'normal' : 'fuzzy';
|
|
643
|
+
this.searchStore.setSearchParams({
|
|
644
|
+
mode,
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
else if (this.type === 'sort') {
|
|
648
|
+
const sort = this.isActive ? 'asc' : 'desc';
|
|
649
|
+
this.searchStore.setSearchParams({
|
|
650
|
+
sort,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
try {
|
|
654
|
+
await this.searchStore.search();
|
|
655
|
+
}
|
|
656
|
+
catch (error) {
|
|
657
|
+
console.error('Search failed:', error);
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
this.type = 'mode';
|
|
661
|
+
this.isActive = false;
|
|
662
|
+
}
|
|
663
|
+
render() {
|
|
664
|
+
const label = this.type === 'mode'
|
|
665
|
+
? 'Exact Match'
|
|
666
|
+
: this.type === 'sort'
|
|
667
|
+
? 'Sort Order'
|
|
668
|
+
: '';
|
|
669
|
+
return (h("div", { key: '8bfbd9cf161d3dc285d7309ada79e9fb68624a45', class: 'toggle-container' }, h("span", { key: '99b5f67e53e45ebf97fef2bb2a52e50c804dec4d' }, label), h("button", { key: 'c6444cfcd24ef3558d0d93ebe0d4dcd4ceb8b29e', class: `toggle-wrapper ${this.isActive ? 'active' : ''}`, onClick: this.handleToggle, type: 'button' }, h("div", { key: '801f2e99c695449e161699fc874aa05ee1cf1e07', class: `toggle-switch ${this.isActive ? 'active' : ''}` }))));
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
SearchcraftToggleButton.style = SearchcraftToggleButtonStyle0;
|
|
673
|
+
|
|
674
|
+
export { SearchcraftAutoSearchForm as searchcraft_auto_search_form, SearchcraftBaseSearchResult as searchcraft_base_search_result, SearchcraftBaseSearchResults as searchcraft_base_search_results, SearchcraftClearIconSet as searchcraft_clear_icon_set, SearchcraftClearInputButton as searchcraft_clear_input_button, SearchcraftErrorMessage as searchcraft_error_message, SearchcraftFiltersList as searchcraft_filters_list, SearchcraftInput as searchcraft_input, SearchcraftInputCaption as searchcraft_input_caption, SearchcraftInputIcon as searchcraft_input_icon, SearchcraftInputLabel as searchcraft_input_label, SearchcraftSearchIconSet as searchcraft_search_icon_set, SearchcraftSlider as searchcraft_slider, SearchcraftSpinnerDark as searchcraft_spinner_dark, SearchcraftSpinnerLight as searchcraft_spinner_light, SearchcraftToggleButton as searchcraft_toggle_button };
|
|
475
675
|
|
|
476
|
-
//# sourceMappingURL=searchcraft-auto-search-
|
|
676
|
+
//# sourceMappingURL=searchcraft-auto-search-form_16.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"searchcraft-auto-search-form.searchcraft-base-search-result.searchcraft-base-search-results.searchcraft-clear-icon-set.searchcraft-clear-input-button.searchcraft-error-message.searchcraft-filters-list.searchcraft-input.searchcraft-input-caption.searchcraft-input-icon.searchcraft-input-label.searchcraft-search-icon-set.searchcraft-slider.searchcraft-spinner-dark.searchcraft-spinner-light.searchcraft-toggle-button.entry.js","mappings":";;;;;AAAA,MAAM,kCAAkC,GAAG,uLAAuL,CAAC;AACnO,wCAAe,kCAAkC;;MCqBpC,yBAAyB;;;;QAwB5B,oBAAe,GAAyC,IAAI,CAAC;QAC7D,kBAAa,GAAG,GAAG,CAAC;QACpB,gBAAW,GAAG,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAkBrD,sBAAiB,GAAG,CAAC,KAAiC;YACpD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnC,CAAC;QAEF,qBAAgB,GAAG,CAAC,KAAiC;YACnD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;YACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAElC,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aACpC;YAED,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC;gBAChC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;aAC9C,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACxB,CAAC;QAEF,qBAAgB,GAAG;YACjB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAEhB,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;gBACzC,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;YAED,IAAI,IAAI,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CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAE/B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;gBACxB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;gBAChD,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC;oBAC/B,IAAI;iBACL,CAAC,CAAC;aACJ;iBAAM,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;gBAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;gBAC5C,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC;oBAC/B,IAAI;iBACL,CAAC,CAAC;aACJ;YAED,IAAI;gBACF,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;aACjC;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;aACxC;SACF,CAAC;oBA3B8B,MAAM;wBAElB,KAAK;;IA2BzB,MAAM;QACJ,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,MAAM;cAChB,aAAa;cACb,IAAI,CAAC,IAAI,KAAK,MAAM;kBAClB,YAAY;kBACZ,EAAE,CAAC;QAEX,QACE,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,+DAAO,KAAK,CAAQ,EACpB,+DACE,KAAK,EAAE,kBAAkB,IAAI,CAAC,QAAQ,GAAG,QAAQ,GAAG,EAAE,EAAE,EACxD,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,IAAI,EAAC,QAAQ,IAEb,4DAAK,KAAK,EAAE,iBAAiB,IAAI,CAAC,QAAQ,GAAG,QAAQ,GAAG,EAAE,EAAE,GAAI,CACzD,CACL,EACN;KACH;;;;;;","names":["SearchcraftCore"],"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-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/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/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 text-align: left;\n width: 100%;\n}\n\n.formRTL {\n text-align: right;\n width: 100%;\n}\n\n.searchContainer {\n align-items: center;\n display: flex;\n width: 100%;\n}","import {\n Component,\n Prop,\n State,\n Event,\n type EventEmitter,\n h,\n} from '@stencil/core';\nimport {\n type CoreConfigSDK,\n CoreSDK as SearchcraftCore,\n} from '@searchcraft/core';\n\nimport type { ScInputCustomEvent } from '@components/searchcraft-input/searchcraft-input';\nimport { parseCustomStyles } from '@utils/utils';\nimport { useSearchcraftStore } from '@provider/store';\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() querySubmit: EventEmitter<string>;\n\n @State() error = false;\n @State() isRequesting = false;\n @State() query = '';\n @State() searchResults = '';\n\n private debounceTimeout: ReturnType<typeof setTimeout> | null = null;\n private debounceDelay = 300; // 300ms debounce delay\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 });\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.querySubmit.emit(this.query);\n };\n\n handleInputKeyUp = (event: ScInputCustomEvent<string>) => {\n const target = event.detail;\n this.query = target;\n this.querySubmit.emit(this.query);\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n this.debounceTimeout = setTimeout(() => {\n this.query.trim() !== '' && this.runSearch();\n }, this.debounceDelay);\n };\n\n handleClearInput = () => {\n this.query = '';\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.searchResults = '';\n };\n\n private runSearch = async () => {\n if (this.query.trim() === '') {\n this.error = true;\n this.searchResults = '';\n } else {\n this.error = false;\n this.searchStore.setQuery(this.query);\n\n try {\n await this.searchStore.search();\n this.searchResults = JSON.stringify(this.searchStore.searchResults);\n } catch (error) {\n this.error = true;\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 return (\n <form class={`${formClass}`} onSubmit={this.handleFormSubmit}>\n <searchcraft-input-label label={this.labelForInput} />\n <div class='searchContainer'>\n <searchcraft-input\n customStyles={parsedCustomStyles}\n input-caption-value={this.inputCaptionValue}\n is-requesting={this.isRequesting}\n input-icon-height={this.inputIconHeight}\n input-icon-width={this.inputIconWidth}\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 </div>\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 position: relative;\n flex-direction: column;\n gap: 16px;\n padding: 8px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n }\n}\n\n.interactiveResultContainerLight {\n background-color: $light-search-result-container-background;\n @include interactive-result-container-base;\n}\n\n.interactiveResultContainerDark {\n background-color: $dark-search-result-container-background;\n @include interactive-result-container-base;\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 position: absolute;\n right: 5px;\n top: -2px;\n display: inline-block;\n\n\n @media (min-width: 600px) {\n display: none;\n }\n}\n\n.imageContainer {\n max-height: 540px;\n max-width: 100%;\n\n @media (min-width: 600px) {\n max-height: 175px;\n }\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@mixin image-base {\n aspect-ratio: 2 / 1;\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: 0px;\n position: relative;\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}\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}\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.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, 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() 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() tertiaryContent = ''; // Tertiary body content\n @Prop() headingText = ''; // Text for the heading\n @Prop() subheadingText = ''; // Text for the subheading\n @Prop() themeMode: 'light' | 'dark' = 'light'; // Light or dark theme context\n @Prop() customStyles = '{}'; // New string prop for serialized styles.\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 return (\n <div\n class={\n this.isInteractive\n ? isLightTheme\n ? 'interactiveResultContainerLight'\n : 'interactiveResultContainerDark'\n : 'resultContainer'\n }\n style={styles.container || {}}\n tabindex='0'\n onClick={this.handleContainerClick}\n onKeyDown={this.keyDownCallback}\n >\n <div class='imageContainer'>\n <img\n alt={this.imageDescription}\n src={this.imageSource}\n style={styles.image || {}}\n class={isLightTheme ? 'imageLight' : 'imageDark'}\n />\n </div>\n <div class='contentContainer'>\n <h2\n style={styles.heading || {}}\n class={isLightTheme ? 'headingLight' : 'headingDark'}\n >\n {this.headingText}\n </h2>\n <h3\n style={styles.subheading || {}}\n class={isLightTheme ? 'subheadingLight' : 'subheadingDark'}\n >\n {this.subheadingText}\n </h3>\n <p\n style={styles.primaryContent || {}}\n class={isLightTheme ? 'primaryContentLight' : 'primaryContentDark'}\n >\n {this.primaryContent}\n </p>\n <div>\n <p\n style={styles.secondaryContent || {}}\n class={\n isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark'\n }\n >\n {this.secondaryContent}\n </p>\n <p\n style={styles.tertiaryContent || {}}\n class={\n isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark'\n }\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 </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: 100px 20px;\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 border: 1px solid #DCDDDE;\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}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport type { SearchcraftResponse } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\nimport {\n extractDynamicProperties,\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 @State() query = '';\n @State() searchResults: SearchcraftResponse | null = null;\n\n @Prop() searchKeys = '';\n @Prop() customStylesForResults:\n | string\n | Record<string, Record<string, string>> = {};\n @Prop() placeAdAtStart = true;\n @Prop() placeAdAtEnd = false;\n @Prop() adInterval = 4;\n @Prop() formatTime = true;\n\n private unsubscribe: () => void;\n\n componentDidLoad() {\n if (!this.searchKeys || this.searchKeys.length === 0) {\n console.warn('No searchKeys provided; using empty keys array.');\n this.searchKeys = '';\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\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 timeAgo(timestamp: string): string {\n const now = new Date();\n const inputTime = new Date(timestamp);\n const diffInSeconds = Math.floor(\n (now.getTime() - inputTime.getTime()) / 1000,\n );\n\n const minutes = Math.floor(diffInSeconds / 60);\n const hours = Math.floor(minutes / 60);\n const days = Math.floor(hours / 24);\n const years = Math.floor(days / 365);\n\n if (minutes < 60) {\n return `${minutes}m ago`;\n }\n if (hours < 24) {\n return `${hours}h ago`;\n }\n if (days < 365) {\n return `${days}d ago`;\n }\n return `${years}y ago`;\n }\n\n render() {\n if (!this.searchResults?.data) {\n console.warn('No search results data available');\n return <div class='emptyState'>No results to display.</div>;\n }\n\n const parsedSearchKeys = parseSearchKeys(this.searchKeys);\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 // Apply timeAgo formatting if formatTime is true\n if (this.formatTime) {\n for (const key of parsedSearchKeys) {\n if (dynamicProperties[key]) {\n const value = dynamicProperties[key];\n // Check if the value is a valid ISO timestamp\n if (\n typeof value === 'string' &&\n !Number.isNaN(Date.parse(value))\n ) {\n dynamicProperties[key] = this.timeAgo(value);\n }\n }\n }\n }\n\n return (\n <searchcraft-base-search-result\n key={`${document.document_id}-${index}`}\n button-callback={() => console.log('button callback')}\n result-callback={() => console.log('interactive element')}\n keydown-callback={() => console.log('keydown')}\n is-interactive={true}\n heading-text={dynamicProperties[parsedSearchKeys[0]]}\n subheading-text={dynamicProperties[parsedSearchKeys[1]]}\n primary-content={dynamicProperties[parsedSearchKeys[2]]}\n secondary-content={dynamicProperties[parsedSearchKeys[3]]}\n tertiary-content={dynamicProperties[parsedSearchKeys[4]]}\n image-source={\n dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]]\n }\n custom-styles={serializedStyles}\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 <searchcraft-error-message\n error-message={`No search results found for \"${this.query}\" query`}\n />\n )}\n </div>\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: 25px;\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: 25px;\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 // Updated `clearInput` to an EventEmitter\n @Event() clearInput: EventEmitter<void>;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n // Added a click handler to emit the event\n private handleClearClick = (event: MouseEvent) => {\n event.preventDefault(); // Prevent default if necessary\n this.clearInput.emit(); // Emit the event\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 '../../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 padding: 16px;\n}\n\n.checkboxLabel {\n align-items: center;\n color: #292929;\n display: flex;\n font-size: 14px;\n font-weight: 600;\n gap: 12px;\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}\n\n.checkboxLabel input[type=\"checkbox\"]:checked::before {\n color: #fff;\n content: '✔';\n font-size: 14px;\n}","import {\n Component,\n h,\n State,\n Prop,\n Event,\n type EventEmitter,\n} from '@stencil/core';\nimport { useSearchcraftStore } from '@provider/store';\nimport type { Facets } from '@searchcraft/core';\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 @Event() filtersUpdated: EventEmitter<string[]>;\n\n @State() dynamicFilters: Array<{ label: string; value: string }> = [];\n @State() isRequesting = false;\n @State() selectedFilters: Set<string> = new Set();\n @State() originalFilterCounts: Record<string, string> = {};\n\n private searchStore = useSearchcraftStore.getState();\n unsubscribe: () => void;\n\n connectedCallback() {\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.isRequesting = state.isRequesting;\n const facets = state.searchResults?.data.facets;\n if (facets) {\n this.populateFiltersFromFacets(facets);\n }\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n populateFiltersFromFacets(facets: Facets) {\n const newFilters = Object.entries(facets).flatMap(([facetKey, facetData]) =>\n Object.entries(facetData.counts).map(([value, count]) => {\n const filterValue = `${facetKey}:${value}`;\n this.originalFilterCounts[filterValue] = `${count}`; // Store the original count\n return {\n label: `${facetKey}: ${value.replace(/^\\//, '')} (${count})`,\n value: filterValue,\n };\n }),\n );\n this.dynamicFilters = newFilters;\n }\n\n handleFilterChange = (value: string, checked: boolean) => {\n if (checked) {\n this.selectedFilters.add(value);\n } else {\n this.selectedFilters.delete(value);\n }\n\n const selectedFiltersArray = Array.from(this.selectedFilters);\n this.filtersUpdated.emit(selectedFiltersArray);\n this.searchStore.setSelectedFilters(selectedFiltersArray);\n this.searchStore.search();\n };\n\n render() {\n const checkedFilters = Array.from(this.selectedFilters).map((value) => {\n const count = this.originalFilterCounts[value] || '0';\n return {\n label: `${value.split(':')[1]} (${count})`,\n value,\n };\n });\n\n const remainingDynamicFilters = this.dynamicFilters.filter(\n (filter) => !this.selectedFilters.has(filter.value),\n );\n\n if (this.isRequesting) {\n return <div>Loading facets</div>;\n }\n\n return (\n <div class='filtersList'>\n {checkedFilters.map((filter) => (\n <label class='checkboxLabel' key={filter.value}>\n <input\n class='filterListCheckbox'\n checked\n onChange={(event: Event) =>\n this.handleFilterChange(\n filter.value,\n (event.target as HTMLInputElement).checked,\n )\n }\n type='checkbox'\n value={filter.value}\n />\n {filter.label}\n </label>\n ))}\n {remainingDynamicFilters.map((filter) => {\n const filterLabel = filter.label.split(':')[1] || filter.label;\n return (\n <label class='checkboxLabel' key={filter.value}>\n <input\n class='filterListCheckbox'\n checked={this.selectedFilters.has(filter.value)}\n onChange={(event: Event) =>\n this.handleFilterChange(\n filter.value,\n (event.target as HTMLInputElement).checked,\n )\n }\n type='checkbox'\n value={filter.value}\n />\n {filterLabel}\n </label>\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 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 <div class='inputWrapper'>\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n <input\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 </div>\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 /**\n * Determines if an error icon should be displayed.\n */\n @Prop() error?: boolean;\n\n /**\n * Determines if the layout should be right-to-left.\n */\n @Prop() rightToLeftOrientation = false;\n @Prop() height = 20;\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; // Make label optional\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n // Render nothing if no label prop is provided\n if (!this.label) {\n return null;\n }\n\n const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';\n\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","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",".slider-container {\n display: flex;\n flex-direction: column;\n gap: 10px;\n font-family: Arial, sans-serif;\n align-items: center;\n}\n\nlabel {\n font-size: 14px;\n font-weight: bold;\n margin-bottom: 10px;\n}\n\n.range-container {\n display: flex;\n width: 100%;\n align-items: center;\n}\n\n.range-slider {\n width: 100%;\n height: 4px;\n background: #ddd;\n border-radius: 2px;\n outline: none;\n margin: 0 -1px;\n position: relative;\n}\n\n.range-slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: #007bff;\n border-radius: 50%;\n border: 2px solid #fff;\n cursor: pointer;\n position: relative;\n}\n\n.range-slider::-moz-range-thumb {\n width: 20px;\n height: 20px;\n background: #007bff;\n border-radius: 50%;\n border: 2px solid #fff;\n cursor: pointer;\n}\n\n.range-slider:before {\n content: '';\n position: absolute;\n height: 4px;\n background: #007bff;\n border-radius: 2px;\n left: 0;\n right: 0;\n z-index: -1;\n}\n\n.year-labels {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-top: 10px;\n font-size: 12px;\n color: #555;\n}\n\n.year-label {\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() minYear = 2000;\n @Prop() maxYear = new Date().getFullYear();\n\n @State() startYear = this.minYear;\n @State() endYear = this.maxYear;\n\n private searchStore = useSearchcraftStore.getState();\n\n private updateYears = async () => {\n const query = this.searchStore.query; // Get the query from the store\n this.searchStore.setYearsRange([this.startYear, this.endYear]);\n\n try {\n if (!query || query.trim() === '') {\n console.warn('No query value, search request skipped.');\n return;\n }\n await this.searchStore.search();\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 return (\n <div class='slider-container'>\n <label>Filter by Year</label>\n <div class='range-container'>\n <input\n type='range'\n min={this.minYear}\n max={this.maxYear}\n value={this.startYear}\n step='1'\n onInput={this.handleStartYearChange}\n class='range-slider'\n />\n <input\n type='range'\n min={this.minYear}\n max={this.maxYear}\n value={this.endYear}\n step='1'\n onInput={this.handleEndYearChange}\n class='range-slider'\n />\n </div>\n <div class='year-labels'>\n <span class='year-label'>{this.startYear}</span>\n <span class='year-label'>{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 height: 100%;\n width: 100%;\n background: conic-gradient(#000 50%, #FFFFFF);\n clip-path: circle(50%);\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 animation: spinning 1s linear infinite;\n}\n\n.spinnerLight {\n height: 100%;\n width: 100%;\n background: conic-gradient(#737373 50%, #FFFFFF);\n clip-path: circle(50%);\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 animation: spinning 1s linear infinite;\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 height: 100%;\n width: 100%;\n background: conic-gradient(#737373 50%, #FFFFFF);\n clip-path: circle(50%);\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 animation: spinning 1s linear infinite;\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-container {\n display: flex;\n align-items: center;\n font-size: 14px;\n color: #333;\n}\n\n.toggle-wrapper {\n box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05);\n margin-left: 10px;\n border: none;\n border-radius: 16px;\n width: 44px;\n height: 26px;\n background: #ddd;\n position: relative;\n cursor: pointer;\n}\n\n.toggle-wrapper.active {\n box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05);\n background: #007DB3;\n}\n\n.toggle-wrapper .toggle-switch {\n width: 18px;\n height: 18px;\n background: #fff;\n border-radius: 50%;\n position: absolute;\n top: calc(50% - 18px/2);\n left: 4px;\n transition: transform 0.3s ease;\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\n // Zustand store hook\n private searchStore = useSearchcraftStore.getState();\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 ? 'asc' : 'desc';\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 const label =\n this.type === 'mode'\n ? 'Exact Match'\n : this.type === 'sort'\n ? 'Sort Order'\n : '';\n\n return (\n <div class='toggle-container'>\n <span>{label}</span>\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 </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
2
|
-
import { u as useSearchcraftStore, a as useThemeStore,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-92040c37.js';
|
|
2
|
+
import { u as useSearchcraftStore, a as useThemeStore, p } from './store-5f6f8445.js';
|
|
3
3
|
|
|
4
4
|
const searchcraftBaseSearchFormModuleCss = ".formLTR{font-family:Helvetica, Arial, sans-serif;text-align:left}.formRTL{font-family:Helvetica, Arial, sans-serif;text-align:right}.searchContainer{align-items:center;display:flex}";
|
|
5
5
|
const SearchcraftBaseSearchFormStyle0 = searchcraftBaseSearchFormModuleCss;
|
|
@@ -12,7 +12,7 @@ const SearchcraftBaseSearchForm = class {
|
|
|
12
12
|
this.searchStore = useSearchcraftStore.getState();
|
|
13
13
|
this.themeStore = useThemeStore.getState();
|
|
14
14
|
this.componentDidLoad = () => {
|
|
15
|
-
const searchcraft = new
|
|
15
|
+
const searchcraft = new p(this.config);
|
|
16
16
|
this.searchStore.initialize(searchcraft, true);
|
|
17
17
|
};
|
|
18
18
|
this.handleFormSubmit = async (event) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-92040c37.js';
|
|
2
2
|
import { c as classNames } from './index-72ac5051.js';
|
|
3
3
|
|
|
4
4
|
const searchcraftButtonModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.buttonLight{border-radius:8px;display:flex;font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;padding:11px 20px;position:relative;background-color:#000;border:1px solid #E6E6E6;color:#FFF}.buttonLight:hover{cursor:pointer}.buttonLight:hover{background-color:#2E2E2E}.buttonLight:focus{outline:2px solid #000000}.buttonDark{border-radius:8px;display:flex;font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;padding:11px 20px;position:relative;background-color:#FFF;border:1px solid #404040;color:#292929}.buttonDark:hover{cursor:pointer}.buttonDark:hover{background-color:#FAFAFA}.buttonDark:focus{outline:2px solid #404040}.spinnerMarginRight{left:4px;margin-right:4px;position:absolute}.spinnerMarginLeft{left:4px;margin-left:4px;position:absolute}.buttonLabel{animation:right-and-back 0.2s;margin-left:4px;position:relative}@keyframes right-and-back{0%{right:-6px}50%{right:-12px}75%{right:-6px}100%{right:0px}}";
|