@searchcraft/javascript-sdk 0.2.4 → 0.2.6
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.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/searchcraft-auto-search-form_17.cjs.entry.js +63 -43
- package/dist/cjs/searchcraft-auto-search-form_17.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +1 -1
- package/dist/cjs/searchcraft-javascript-sdk.cjs.js +1 -1
- package/dist/cjs/{store-b0a26894.js → store-c44c58ab.js} +8 -7
- package/dist/cjs/{store-b0a26894.js.map → store-c44c58ab.js.map} +1 -1
- package/dist/cjs/{utils-15f85bca.js → utils-2dc6115c.js} +13 -1
- package/dist/cjs/utils-2dc6115c.js.map +1 -0
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +24 -3
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +0 -2
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +20 -1
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +54 -39
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +1 -1
- package/dist/collection/provider/store.js +7 -6
- package/dist/collection/provider/store.js.map +1 -1
- package/dist/collection/utils/utils.js +11 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/{p-8c70054a.js → p-023371c8.js} +10 -6
- package/dist/components/p-023371c8.js.map +1 -0
- package/dist/components/{p-33bb5c45.js → p-157e5b1a.js} +8 -7
- package/dist/components/{p-33bb5c45.js.map → p-157e5b1a.js.map} +1 -1
- package/dist/components/{p-ff6c3650.js → p-2bda632c.js} +13 -2
- package/dist/components/p-2bda632c.js.map +1 -0
- package/dist/components/{p-1204b43a.js → p-b5f97e04.js} +2 -2
- package/dist/components/{p-1204b43a.js.map → p-b5f97e04.js.map} +1 -1
- package/dist/components/searchcraft-auto-search-form.js +3 -3
- package/dist/components/searchcraft-base-search-form.js +2 -2
- package/dist/components/searchcraft-base-search-result.js +1 -1
- package/dist/components/searchcraft-base-search-results.js +6 -4
- package/dist/components/searchcraft-base-search-results.js.map +1 -1
- package/dist/components/searchcraft-filters-list.js +55 -40
- package/dist/components/searchcraft-filters-list.js.map +1 -1
- package/dist/components/searchcraft-input.js +1 -1
- package/dist/components/searchcraft-results-info.js +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/searchcraft-auto-search-form_17.entry.js +63 -43
- package/dist/esm/searchcraft-auto-search-form_17.entry.js.map +1 -1
- package/dist/esm/searchcraft-base-search-form.entry.js +1 -1
- package/dist/esm/searchcraft-javascript-sdk.js +1 -1
- package/dist/esm/{store-97358312.js → store-9e0b0710.js} +8 -7
- package/dist/esm/{store-97358312.js.map → store-9e0b0710.js.map} +1 -1
- package/dist/esm/{utils-dbb6302b.js → utils-a3373179.js} +13 -2
- package/dist/esm/utils-a3373179.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/p-2bda632c.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-2bda632c.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-acca6173.entry.js → p-63b3b565.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/{p-cd489e98.js → p-901fee50.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-901fee50.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-c2c4f6b7.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-c2c4f6b7.entry.js.map +1 -0
- 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-base-search-result/searchcraft-base-search-result.d.ts +1 -0
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +1 -0
- package/dist/types/components/searchcraft-filters-list/searchcraft-filters-list.d.ts +1 -5
- package/dist/types/components.d.ts +4 -0
- package/dist/types/utils/utils.d.ts +11 -0
- package/package.json +1 -1
- package/dist/cjs/utils-15f85bca.js.map +0 -1
- package/dist/components/p-8c70054a.js.map +0 -1
- package/dist/components/p-ff6c3650.js.map +0 -1
- package/dist/esm/utils-dbb6302b.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-1a0e85ee.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-1a0e85ee.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-cd489e98.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-ff6c3650.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-ff6c3650.js.map +0 -1
- /package/dist/searchcraft-javascript-sdk/{p-acca6173.entry.js.map → p-63b3b565.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-0ac5bb53.js';
|
|
2
|
-
import { u as useSearchcraftStore, g } from './store-
|
|
3
|
-
import { p as parseCustomStyles, a as parseSearchKeys, s as serializeStyles, e as extractDynamicProperties, g as getFormattedTimeFromNow } from './utils-
|
|
2
|
+
import { u as useSearchcraftStore, g } from './store-9e0b0710.js';
|
|
3
|
+
import { p as parseCustomStyles, a as parseSearchKeys, s as serializeStyles, e as extractDynamicProperties, g as getFormattedTimeFromNow, f as flattenFacets } from './utils-a3373179.js';
|
|
4
4
|
import { c as classNames } from './index-72ac5051.js';
|
|
5
5
|
|
|
6
6
|
const searchcraftAutoSearchFormModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.formLTR{font-family:var(--font-stack);text-align:left;width:100%}.formRTL{font-family:var(--font-stack);text-align:right;width:100%}";
|
|
@@ -109,7 +109,7 @@ const SearchcraftAutoSearchForm = class {
|
|
|
109
109
|
};
|
|
110
110
|
SearchcraftAutoSearchForm.style = SearchcraftAutoSearchFormStyle0;
|
|
111
111
|
|
|
112
|
-
const searchcraftBaseSearchResultModuleCss = "@charset \"UTF-8\";:root{--font-stack:Helvetica, Arial, sans-serif}.interactiveResultContainerLight{align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;position:relative;background-color:#FAFAFA}@media (min-width: 600px){.interactiveResultContainerLight{flex-direction:row}}.interactiveResultContainerDark{align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;position:relative;background-color:#2E2E2E}@media (min-width: 600px){.interactiveResultContainerDark{flex-direction:row}}.resultContainer{align-items:flex-start;display:flex;flex-direction:column;gap:16px}@media (min-width: 600px){.resultContainer{flex-direction:row}}.interactiveIconLarge{display:inline-block;position:absolute;right:5px;top:8px}@media (max-width: 600px){.interactiveIconLarge{display:none}}.interactiveIconSmall{display:inline-block;position:absolute;right:5px;top:-2px}@media (min-width: 600px){.interactiveIconSmall{display:none}}.imageContainer{max-width:100%}.contentContainer{max-height:100%;max-width:100%}@media (min-width: 600px){.contentContainer{max-width:50%}}.secondaryContentContainer{display:flex}.imageLight{
|
|
112
|
+
const searchcraftBaseSearchResultModuleCss = "@charset \"UTF-8\";:root{--font-stack:Helvetica, Arial, sans-serif}.interactiveResultContainerLight{align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;position:relative;background-color:#FAFAFA}@media (min-width: 600px){.interactiveResultContainerLight{flex-direction:row}}.interactiveResultContainerDark{align-items:flex-start;border-radius:16px;display:flex;flex-direction:column;gap:16px;padding:8px;position:relative;background-color:#2E2E2E}@media (min-width: 600px){.interactiveResultContainerDark{flex-direction:row}}.resultContainer{align-items:flex-start;display:flex;flex-direction:column;gap:16px}@media (min-width: 600px){.resultContainer{flex-direction:row}}.interactiveIconLarge{display:inline-block;position:absolute;right:5px;top:8px}@media (max-width: 600px){.interactiveIconLarge{display:none}}.interactiveIconSmall{display:inline-block;position:absolute;right:5px;top:-2px}@media (min-width: 600px){.interactiveIconSmall{display:none}}.imageContainer{max-width:100%}.contentContainer{max-height:100%;max-width:100%}@media (min-width: 600px){.contentContainer{max-width:50%}}.secondaryContentContainer{display:flex}.imageLight{border-radius:8px;max-height:100%;max-width:100%;border:1px solid #D9D9D9}.imageDark{border-radius:8px;max-height:100%;max-width:100%;border:1px solid #333}.headingLight{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0;position:relative;color:#292929}.headingDark{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0;position:relative;color:#FFF}.subheadingLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;color:#737373}.subheadingDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;color:#BFBFBF}.primaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.primaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}.secondaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.secondaryContentLight::after{content:\"•\";color:#404040;font-size:1em;margin-left:5px;margin-right:5px}.secondaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}.tertiaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.tertiaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}";
|
|
113
113
|
const SearchcraftBaseSearchResultStyle0 = searchcraftBaseSearchResultModuleCss;
|
|
114
114
|
|
|
115
115
|
const SearchcraftBaseSearchResult = class {
|
|
@@ -140,6 +140,7 @@ const SearchcraftBaseSearchResult = class {
|
|
|
140
140
|
this.subheadingText = '';
|
|
141
141
|
this.tertiaryContent = '';
|
|
142
142
|
this.themeMode = 'light';
|
|
143
|
+
this.placeImageRight = false;
|
|
143
144
|
}
|
|
144
145
|
parseStyles() {
|
|
145
146
|
try {
|
|
@@ -153,11 +154,13 @@ const SearchcraftBaseSearchResult = class {
|
|
|
153
154
|
render() {
|
|
154
155
|
const isLightTheme = this.themeMode === 'light';
|
|
155
156
|
const styles = this.parseStyles();
|
|
156
|
-
|
|
157
|
+
const imageContainer = this.imageSource && (h("div", { key: '1dee969549e02c262a9fdf050438630961d1954e', class: 'imageContainer' }, h("img", { key: '2a08fd81d563ad2f18e91d22449afefb772244c8', alt: this.imageDescription, class: isLightTheme ? 'imageLight' : 'imageDark', src: this.imageSource, style: styles.image || {} })));
|
|
158
|
+
const contentContainer = (h("div", { key: '93f350bba36c296377dc09824d86631e4f731e78', class: 'contentContainer' }, h("h2", { key: 'd630e930eba15b86c84f7e62f73d1d3539c3650d', class: isLightTheme ? 'headingLight' : 'headingDark', style: styles.heading || {} }, this.headingText), h("h3", { key: '0f8639094f2f64695d887b2de6fc1d777564cbb2', class: isLightTheme ? 'subheadingLight' : 'subheadingDark', style: styles.subheading || {} }, this.subheadingText), h("p", { key: 'e8562ca0a438f9ff0848920a5bae1e208eb3ae72', class: isLightTheme ? 'primaryContentLight' : 'primaryContentDark', style: styles.primaryContent || {} }, this.primaryContent), h("div", { key: 'dd97fb5946a1a50ccba31ae97c8b5b6e0cac91d9', class: 'secondaryContentContainer' }, h("p", { key: '9c6d705bfbd4eccb24f5afcbaad9ec92ca6fda9f', class: isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark', style: styles.secondaryContent || {} }, this.secondaryContent), h("p", { key: '7147e47a9ed408066439431329cda75495567227', class: isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark', style: styles.tertiaryContent || {} }, this.tertiaryContent)), this.buttonText && (h("button", { key: 'e620382ea1fe2f0e60645330ec087f767ff535a0', onClick: this.handleButtonClick, style: styles.button || {}, type: 'button' }, this.buttonText))));
|
|
159
|
+
return (h("div", { key: 'a104499c8adaa7d57743aaea20ee4af7caf6bdb9', class: this.isInteractive
|
|
157
160
|
? isLightTheme
|
|
158
161
|
? 'interactiveResultContainerLight'
|
|
159
162
|
: 'interactiveResultContainerDark'
|
|
160
|
-
: 'resultContainer', onKeyDown: this.keyDownCallback, onClick: this.handleContainerClick, style: styles.container || {}, tabindex: '0' },
|
|
163
|
+
: 'resultContainer', onKeyDown: this.keyDownCallback, onClick: this.handleContainerClick, style: styles.container || {}, tabindex: '0' }, this.placeImageRight ? (h(Fragment, null, contentContainer, imageContainer)) : (h(Fragment, null, imageContainer, contentContainer))));
|
|
161
164
|
}
|
|
162
165
|
};
|
|
163
166
|
SearchcraftBaseSearchResult.style = SearchcraftBaseSearchResultStyle0;
|
|
@@ -175,6 +178,7 @@ const SearchcraftBaseSearchResults = class {
|
|
|
175
178
|
this.formatTime = true;
|
|
176
179
|
this.placeAdAtEnd = false;
|
|
177
180
|
this.placeAdAtStart = true;
|
|
181
|
+
this.placeResultImageRight = false;
|
|
178
182
|
this.hasSearched = false;
|
|
179
183
|
this.query = '';
|
|
180
184
|
this.searchResults = null;
|
|
@@ -232,7 +236,7 @@ const SearchcraftBaseSearchResults = class {
|
|
|
232
236
|
}
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
|
-
return (h("searchcraft-base-search-result", { "button-callback": () => console.log('button callback'), "custom-styles": serializedStyles, "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], "is-interactive": true, key: `${document.document_id}-${index}`, "keydown-callback": () => console.log('keydown'), "heading-text": dynamicProperties[parsedSearchKeys[0]], "primary-content": dynamicProperties[parsedSearchKeys[2]], "result-callback": () => console.log('interactive element'), "secondary-content": dynamicProperties[parsedSearchKeys[3]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]] }));
|
|
239
|
+
return (h("searchcraft-base-search-result", { "button-callback": () => console.log('button callback'), "custom-styles": serializedStyles, "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], "is-interactive": true, key: `${document.document_id}-${index}`, "keydown-callback": () => console.log('keydown'), "heading-text": dynamicProperties[parsedSearchKeys[0]], "place-image-right": this.placeResultImageRight, "primary-content": dynamicProperties[parsedSearchKeys[2]], "result-callback": () => console.log('interactive element'), "secondary-content": dynamicProperties[parsedSearchKeys[3]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]] }));
|
|
236
240
|
});
|
|
237
241
|
const finalComponents = [];
|
|
238
242
|
if (this.placeAdAtStart) {
|
|
@@ -334,29 +338,42 @@ const SearchcraftFiltersList = class {
|
|
|
334
338
|
else {
|
|
335
339
|
this.selectedFilters.delete(value);
|
|
336
340
|
}
|
|
337
|
-
const
|
|
338
|
-
this.filtersUpdated.emit(
|
|
339
|
-
this.searchStore.setSelectedFilters(
|
|
341
|
+
const deduplicatedFilters = this.deduplicatePaths(Array.from(this.selectedFilters));
|
|
342
|
+
this.filtersUpdated.emit(deduplicatedFilters);
|
|
343
|
+
this.searchStore.setSelectedFilters(deduplicatedFilters);
|
|
340
344
|
this.searchStore.search();
|
|
341
345
|
};
|
|
342
346
|
this.filters = [];
|
|
343
347
|
this.dynamicFilters = [];
|
|
344
|
-
this.initialFilters = [];
|
|
345
348
|
this.isRequesting = false;
|
|
346
|
-
this.originalFilterCounts = {};
|
|
347
349
|
this.query = '';
|
|
348
350
|
this.resultsCount = 0;
|
|
349
351
|
this.selectedFilters = new Set();
|
|
350
352
|
}
|
|
351
353
|
connectedCallback() {
|
|
354
|
+
var _a;
|
|
355
|
+
const state = this.searchStore; // Fetch the initial state
|
|
356
|
+
// Initial population of facets if available
|
|
357
|
+
if ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a.data.facets) {
|
|
358
|
+
this.populateFiltersFromFacets(state.searchResults.data.facets);
|
|
359
|
+
}
|
|
352
360
|
this.unsubscribe = useSearchcraftStore.subscribe((state) => {
|
|
353
361
|
var _a, _b, _c, _d;
|
|
354
|
-
|
|
362
|
+
if (!state.query || state.query.trim().length === 0) {
|
|
363
|
+
if (this.selectedFilters.size > 0) {
|
|
364
|
+
this.selectedFilters.clear();
|
|
365
|
+
this.filtersUpdated.emit([]);
|
|
366
|
+
if (this.searchStore.selectedFilters.length > 0) {
|
|
367
|
+
this.searchStore.setSelectedFilters([]);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
355
371
|
this.query = state.query || '';
|
|
372
|
+
this.isRequesting = state.isRequesting;
|
|
356
373
|
this.resultsCount = ((_c = (_b = (_a = state.searchResults) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.hits) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
357
|
-
|
|
358
|
-
if (facets) {
|
|
359
|
-
this.populateFiltersFromFacets(facets);
|
|
374
|
+
// Populate filters when facets are updated
|
|
375
|
+
if ((_d = state.searchResults) === null || _d === void 0 ? void 0 : _d.data.facets) {
|
|
376
|
+
this.populateFiltersFromFacets(state.searchResults.data.facets);
|
|
360
377
|
}
|
|
361
378
|
});
|
|
362
379
|
}
|
|
@@ -367,24 +384,28 @@ const SearchcraftFiltersList = class {
|
|
|
367
384
|
}
|
|
368
385
|
populateFiltersFromFacets(facets) {
|
|
369
386
|
var _a;
|
|
370
|
-
const newFilters =
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
387
|
+
const newFilters = flattenFacets(((_a = facets[0]) === null || _a === void 0 ? void 0 : _a.section) || []);
|
|
388
|
+
const filtersMap = new Map();
|
|
389
|
+
newFilters.forEach((filter) => {
|
|
390
|
+
const key = filter.value.split('/').pop() || '';
|
|
391
|
+
const existingFilter = filtersMap.get(key);
|
|
392
|
+
if (!existingFilter ||
|
|
393
|
+
filter.value.length < existingFilter.value.length) {
|
|
394
|
+
filtersMap.set(key, filter);
|
|
395
|
+
}
|
|
377
396
|
});
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
397
|
+
this.dynamicFilters = Array.from(filtersMap.values());
|
|
398
|
+
}
|
|
399
|
+
deduplicatePaths(filters) {
|
|
400
|
+
const pathMap = new Map();
|
|
401
|
+
filters.forEach((path) => {
|
|
402
|
+
const key = path.split('/').pop() || '';
|
|
403
|
+
const existingPath = pathMap.get(key);
|
|
404
|
+
if (!existingPath || path.length < existingPath.length) {
|
|
405
|
+
pathMap.set(key, path);
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
return Array.from(pathMap.values());
|
|
388
409
|
}
|
|
389
410
|
formatLabel(label) {
|
|
390
411
|
return label
|
|
@@ -397,17 +418,16 @@ const SearchcraftFiltersList = class {
|
|
|
397
418
|
if (!this.query || this.resultsCount === 0) {
|
|
398
419
|
return null;
|
|
399
420
|
}
|
|
400
|
-
const filtersToRender = this.
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}))))));
|
|
421
|
+
const filtersToRender = this.dynamicFilters.filter((filter) => !filter.value.includes('/', filter.value.indexOf('/') + 1));
|
|
422
|
+
return (h("div", { class: 'filtersList' }, filtersToRender.map((filter) => {
|
|
423
|
+
const isChecked = this.selectedFilters.has(filter.value);
|
|
424
|
+
const children = this.dynamicFilters.filter((child) => child.value.startsWith(`${filter.value}/`) &&
|
|
425
|
+
child.value !== filter.value);
|
|
426
|
+
return (h("div", { key: filter.value }, h("label", { class: 'checkboxLabel' }, h("input", { class: 'filterCheckbox', checked: isChecked, onChange: (event) => this.handleFilterChange(filter.value, event.target.checked), type: 'checkbox' }), this.formatLabel(filter.label)), children.map((child) => {
|
|
427
|
+
const isChildChecked = this.selectedFilters.has(child.value);
|
|
428
|
+
return (h("label", { class: 'childCheckboxLabel', key: child.value, style: { marginLeft: '20px' } }, h("input", { class: 'childFilterCheckbox', checked: isChildChecked, onChange: (event) => this.handleFilterChange(child.value, event.target.checked), type: 'checkbox' }), this.formatLabel(child.label.split('/').pop() || '')));
|
|
429
|
+
})));
|
|
430
|
+
})));
|
|
411
431
|
}
|
|
412
432
|
};
|
|
413
433
|
SearchcraftFiltersList.style = SearchcraftFiltersListStyle0;
|