@depict-ai/ui 2.0.24 → 2.0.26
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/ES10/index.cjs +113 -83
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +113 -83
- package/latest/index.cjs +110 -81
- package/latest/index.d.ts +1 -1
- package/latest/index.js +110 -81
- package/package.json +1 -1
- package/server/ES10/index.cjs +73 -44
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +73 -44
- package/server/latest/index.cjs +70 -42
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +70 -42
package/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createSignal as $9HbP8$createSignal, getOwner as $9HbP8$getOwner, creat
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.26";
|
|
9
9
|
const $4147651646da990a$var$fallback_operator = "in";
|
|
10
10
|
const $4147651646da990a$var$fallback_token = "";
|
|
11
11
|
const $4147651646da990a$var$legacy_filter_prefix = "filter_";
|
|
@@ -3361,7 +3361,7 @@ function $fab07f52c9861732$export$3f1a388cc0d8fed7(props) {
|
|
|
3361
3361
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
3362
3362
|
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
3363
3363
|
get when() {
|
|
3364
|
-
return props.available_filters_()
|
|
3364
|
+
return props.available_filters_();
|
|
3365
3365
|
},
|
|
3366
3366
|
get fallback() {
|
|
3367
3367
|
return Array.from({
|
|
@@ -3844,11 +3844,13 @@ function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
|
3844
3844
|
thing[function_name] = new Proxy(thing[function_name], {
|
|
3845
3845
|
apply(target, this_arg, arg_list) {
|
|
3846
3846
|
try {
|
|
3847
|
-
|
|
3847
|
+
const old_state = history.state;
|
|
3848
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
3849
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3850
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
3848
3851
|
const cloned_object = {
|
|
3849
|
-
...
|
|
3852
|
+
...intended_new_value_as_obj
|
|
3850
3853
|
};
|
|
3851
|
-
const old_state = history.state;
|
|
3852
3854
|
for (const key in old_state) {
|
|
3853
3855
|
if (!$90980bd87c9960f9$var$starts_with_any_prefix(key)) continue;
|
|
3854
3856
|
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
@@ -4984,6 +4986,14 @@ const $b9bf7fce0ae60241$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg xmlns="h
|
|
|
4984
4986
|
function $b9bf7fce0ae60241$export$28f6150e232898de() {
|
|
4985
4987
|
return $9HbP8$getNextElement($b9bf7fce0ae60241$var$_tmpl$);
|
|
4986
4988
|
}
|
|
4989
|
+
|
|
4990
|
+
/**
|
|
4991
|
+
* Returns true when we have an array of filters that's an array but empty and no selected filters.
|
|
4992
|
+
* Used for hiding the filter button, filter section is from sort/filter modal and desktop filters
|
|
4993
|
+
*/
|
|
4994
|
+
function $4cc1c021eee2a432$export$50f68cc9882e36a4(args_for_filtering) {
|
|
4995
|
+
return args_for_filtering.available_filters_()?.length === 0 && !args_for_filtering.selected_filters_[0]()?.length;
|
|
4996
|
+
}
|
|
4987
4997
|
const $757dac7f7c6c5241$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<button class="clear minor"></button>`, 2),
|
|
4988
4998
|
$757dac7f7c6c5241$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div class="depict plp" id="depict-filter-sort-mobile-modal-container"><div class="depict-filter-sort-modal-backdrop"></div><button class="dismiss-modal"></button><div class="filter-sort-modal"><div class="body"><!#><!/><!#><!/></div><div class="bottom-row"><!#><!/><button class="show-results major"></button></div></div></div>`, 20),
|
|
4989
4999
|
$757dac7f7c6c5241$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<details class="sorting"></details>`, 2),
|
|
@@ -5220,38 +5230,45 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
5220
5230
|
})();
|
|
5221
5231
|
}
|
|
5222
5232
|
}), _el$7, _co$);
|
|
5223
|
-
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
return $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$6);
|
|
5227
|
-
},
|
|
5228
|
-
get summary_() {
|
|
5229
|
-
return (() => {
|
|
5230
|
-
const _el$26 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$4),
|
|
5231
|
-
_el$27 = _el$26.firstChild,
|
|
5232
|
-
_el$28 = _el$27.firstChild,
|
|
5233
|
-
_el$30 = _el$28.firstChild,
|
|
5234
|
-
[_el$31, _co$6] = $9HbP8$getNextMarker(_el$30.nextSibling),
|
|
5235
|
-
_el$29 = _el$31.nextSibling,
|
|
5236
|
-
_el$32 = _el$28.nextSibling,
|
|
5237
|
-
[_el$33, _co$7] = $9HbP8$getNextMarker(_el$32.nextSibling);
|
|
5238
|
-
$9HbP8$insert(_el$28, $9HbP8$createComponent((0, $b9bf7fce0ae60241$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5239
|
-
$9HbP8$insert(_el$29, () => i18n_.filters_());
|
|
5240
|
-
$9HbP8$insert(_el$27, $9HbP8$createComponent((0, $0b6bc2f8309efa8a$export$e5c2828934226505), {
|
|
5241
|
-
expanded_: filters_expanded,
|
|
5242
|
-
i18n_: i18n_
|
|
5243
|
-
}), _el$33, _co$7);
|
|
5244
|
-
return _el$26;
|
|
5245
|
-
})();
|
|
5233
|
+
$9HbP8$insert(_el$5, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
5234
|
+
get when() {
|
|
5235
|
+
return !$4cc1c021eee2a432$export$50f68cc9882e36a4(args_for_filtering_);
|
|
5246
5236
|
},
|
|
5247
5237
|
get children() {
|
|
5248
|
-
return (()
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
}
|
|
5253
|
-
|
|
5254
|
-
|
|
5238
|
+
return $9HbP8$createComponent((0, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d), {
|
|
5239
|
+
is_open_: [filters_expanded, set_filters_expanded],
|
|
5240
|
+
get details_() {
|
|
5241
|
+
return $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$6);
|
|
5242
|
+
},
|
|
5243
|
+
get summary_() {
|
|
5244
|
+
return (() => {
|
|
5245
|
+
const _el$26 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$4),
|
|
5246
|
+
_el$27 = _el$26.firstChild,
|
|
5247
|
+
_el$28 = _el$27.firstChild,
|
|
5248
|
+
_el$30 = _el$28.firstChild,
|
|
5249
|
+
[_el$31, _co$6] = $9HbP8$getNextMarker(_el$30.nextSibling),
|
|
5250
|
+
_el$29 = _el$31.nextSibling,
|
|
5251
|
+
_el$32 = _el$28.nextSibling,
|
|
5252
|
+
[_el$33, _co$7] = $9HbP8$getNextMarker(_el$32.nextSibling);
|
|
5253
|
+
$9HbP8$insert(_el$28, $9HbP8$createComponent((0, $b9bf7fce0ae60241$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5254
|
+
$9HbP8$insert(_el$29, () => i18n_.filters_());
|
|
5255
|
+
$9HbP8$insert(_el$27, $9HbP8$createComponent((0, $0b6bc2f8309efa8a$export$e5c2828934226505), {
|
|
5256
|
+
expanded_: filters_expanded,
|
|
5257
|
+
i18n_: i18n_
|
|
5258
|
+
}), _el$33, _co$7);
|
|
5259
|
+
return _el$26;
|
|
5260
|
+
})();
|
|
5261
|
+
},
|
|
5262
|
+
get children() {
|
|
5263
|
+
return (() => {
|
|
5264
|
+
const _el$34 = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$5);
|
|
5265
|
+
$9HbP8$insert(_el$34, $9HbP8$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $9HbP8$mergeProps(args_for_filtering_, {
|
|
5266
|
+
are_in_modal_: true
|
|
5267
|
+
})));
|
|
5268
|
+
return _el$34;
|
|
5269
|
+
})();
|
|
5270
|
+
}
|
|
5271
|
+
});
|
|
5255
5272
|
}
|
|
5256
5273
|
}), _el$9, _co$2);
|
|
5257
5274
|
$9HbP8$insert(_el$10, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
@@ -5356,6 +5373,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5356
5373
|
selected_filters_: selected_filters_,
|
|
5357
5374
|
i18n_: i18n_
|
|
5358
5375
|
};
|
|
5376
|
+
const hide_filters = $9HbP8$createMemo(() => $4cc1c021eee2a432$export$50f68cc9882e36a4(filter_options));
|
|
5359
5377
|
const sorting_options = {
|
|
5360
5378
|
current_sorting_: current_sorting_,
|
|
5361
5379
|
available_sortings_: available_sortings_,
|
|
@@ -5367,7 +5385,8 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5367
5385
|
search_filters_open_: search_filters_open_,
|
|
5368
5386
|
search_sorting_open_: search_sorting_open_,
|
|
5369
5387
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5370
|
-
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
5388
|
+
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
5389
|
+
hide_button_: hide_filters
|
|
5371
5390
|
});
|
|
5372
5391
|
const make_open_sorting_button = (adhere_to_width = false, is_tabbable = false) => $9HbP8$createComponent($cdea4cf8c5c071ef$var$OpenSortingButton, {
|
|
5373
5392
|
tabindex_: is_tabbable ? 0 : -1,
|
|
@@ -5411,12 +5430,17 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5411
5430
|
set_extra_els_in_results_container_("");
|
|
5412
5431
|
} else {
|
|
5413
5432
|
close_modal_?.();
|
|
5414
|
-
if (filters_open()) set_extra_els_in_results_container_((
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5433
|
+
if (filters_open()) set_extra_els_in_results_container_(() => $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
5434
|
+
get when() {
|
|
5435
|
+
return !hide_filters();
|
|
5436
|
+
},
|
|
5437
|
+
get children() {
|
|
5438
|
+
const _el$ = $9HbP8$getNextElement($cdea4cf8c5c071ef$var$_tmpl$),
|
|
5439
|
+
_el$2 = _el$.firstChild;
|
|
5440
|
+
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), filter_options));
|
|
5441
|
+
return _el$;
|
|
5442
|
+
}
|
|
5443
|
+
}));else set_extra_els_in_results_container_((() => {
|
|
5420
5444
|
const _el$3 = $9HbP8$getNextElement($cdea4cf8c5c071ef$var$_tmpl$2),
|
|
5421
5445
|
_el$4 = _el$3.firstChild;
|
|
5422
5446
|
$9HbP8$insert(_el$4, $9HbP8$createComponent((0, $68a258a92b88f02f$export$1f1775a58da589b5), sorting_options));
|
|
@@ -5478,7 +5502,8 @@ function $cdea4cf8c5c071ef$var$OpenFiltersButton({
|
|
|
5478
5502
|
search_sorting_open_: search_sorting_open_,
|
|
5479
5503
|
filter_button_width_: filter_button_width_,
|
|
5480
5504
|
tabindex_: tabindex_,
|
|
5481
|
-
number_of_rendered_selected_filters_items_: [num_selected_filters]
|
|
5505
|
+
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
5506
|
+
hide_button_: hide_button_
|
|
5482
5507
|
}) {
|
|
5483
5508
|
const filters_closed = $9HbP8$createMemo(() => !search_filters_open_[0]());
|
|
5484
5509
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -5524,22 +5549,27 @@ function $cdea4cf8c5c071ef$var$OpenFiltersButton({
|
|
|
5524
5549
|
}), _el$19, _co$4);
|
|
5525
5550
|
$9HbP8$insert(_el$17, () => i18n_.filter_text_());
|
|
5526
5551
|
$9HbP8$effect(_p$ => {
|
|
5527
|
-
const _v$ =
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
_v$
|
|
5552
|
+
const _v$ = hide_button_() ? {
|
|
5553
|
+
display: "none"
|
|
5554
|
+
} : {},
|
|
5555
|
+
_v$2 = !filters_closed(),
|
|
5556
|
+
_v$3 = !!filters_closed(),
|
|
5557
|
+
_v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
|
|
5558
|
+
_v$5 = filter_button_width_?.() ? {
|
|
5531
5559
|
width: filter_button_width_() + "px"
|
|
5532
5560
|
} : {};
|
|
5533
|
-
|
|
5534
|
-
_v$2 !== _p$._v$2 && _el$16.classList.toggle("
|
|
5535
|
-
_v$3 !== _p$._v$3 &&
|
|
5536
|
-
_p$._v$4
|
|
5561
|
+
_p$._v$ = $9HbP8$style(_el$14, _v$, _p$._v$);
|
|
5562
|
+
_v$2 !== _p$._v$2 && _el$16.classList.toggle("major", _p$._v$2 = _v$2);
|
|
5563
|
+
_v$3 !== _p$._v$3 && _el$16.classList.toggle("minor", _p$._v$3 = _v$3);
|
|
5564
|
+
_v$4 !== _p$._v$4 && $9HbP8$setAttribute(_el$16, "aria-label", _p$._v$4 = _v$4);
|
|
5565
|
+
_p$._v$5 = $9HbP8$style(_el$16, _v$5, _p$._v$5);
|
|
5537
5566
|
return _p$;
|
|
5538
5567
|
}, {
|
|
5539
5568
|
_v$: undefined,
|
|
5540
5569
|
_v$2: undefined,
|
|
5541
5570
|
_v$3: undefined,
|
|
5542
|
-
_v$4: undefined
|
|
5571
|
+
_v$4: undefined,
|
|
5572
|
+
_v$5: undefined
|
|
5543
5573
|
});
|
|
5544
5574
|
$9HbP8$runHydrationEvents();
|
|
5545
5575
|
return _el$14;
|
|
@@ -5591,22 +5621,22 @@ function $cdea4cf8c5c071ef$var$OpenSortingButton({
|
|
|
5591
5621
|
}
|
|
5592
5622
|
}), _el$25, _co$6);
|
|
5593
5623
|
$9HbP8$effect(_p$ => {
|
|
5594
|
-
const _v$
|
|
5595
|
-
_v$
|
|
5596
|
-
_v$
|
|
5597
|
-
_v$
|
|
5624
|
+
const _v$6 = !sorting_closed(),
|
|
5625
|
+
_v$7 = !!sorting_closed(),
|
|
5626
|
+
_v$8 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
|
|
5627
|
+
_v$9 = sort_button_width_?.() ? {
|
|
5598
5628
|
width: sort_button_width_() + "px"
|
|
5599
5629
|
} : {};
|
|
5600
|
-
_v$
|
|
5601
|
-
_v$
|
|
5602
|
-
_v$
|
|
5603
|
-
_p$._v$
|
|
5630
|
+
_v$6 !== _p$._v$6 && _el$22.classList.toggle("major", _p$._v$6 = _v$6);
|
|
5631
|
+
_v$7 !== _p$._v$7 && _el$22.classList.toggle("minor", _p$._v$7 = _v$7);
|
|
5632
|
+
_v$8 !== _p$._v$8 && $9HbP8$setAttribute(_el$22, "aria-label", _p$._v$8 = _v$8);
|
|
5633
|
+
_p$._v$9 = $9HbP8$style(_el$22, _v$9, _p$._v$9);
|
|
5604
5634
|
return _p$;
|
|
5605
5635
|
}, {
|
|
5606
|
-
_v$5: undefined,
|
|
5607
5636
|
_v$6: undefined,
|
|
5608
5637
|
_v$7: undefined,
|
|
5609
|
-
_v$8: undefined
|
|
5638
|
+
_v$8: undefined,
|
|
5639
|
+
_v$9: undefined
|
|
5610
5640
|
});
|
|
5611
5641
|
$9HbP8$runHydrationEvents();
|
|
5612
5642
|
return _el$22;
|
|
@@ -8734,7 +8764,8 @@ function $1ae0eaca6ada9753$export$af0124069c150252({
|
|
|
8734
8764
|
get_modal_search_results_: get_modal_search_results_,
|
|
8735
8765
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
8736
8766
|
router_: router_,
|
|
8737
|
-
content_results_: content_results_
|
|
8767
|
+
content_results_: content_results_,
|
|
8768
|
+
has_previous_searches_matching_query_: has_previous_searches_matching_query_
|
|
8738
8769
|
}) {
|
|
8739
8770
|
const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = $9HbP8$createSignal(() => false);
|
|
8740
8771
|
$9HbP8$createComputed(() => {
|
|
@@ -8742,7 +8773,7 @@ function $1ae0eaca6ada9753$export$af0124069c150252({
|
|
|
8742
8773
|
const search_results = get_modal_search_results_()?.();
|
|
8743
8774
|
const content_results = content_results_();
|
|
8744
8775
|
// If we only have one content result and nothing else, go there when pressing enter
|
|
8745
|
-
if (!suggestions.length && !search_results?.displays?.length && content_results?.length === 1) {
|
|
8776
|
+
if (!suggestions.length && !search_results?.displays?.length && content_results?.length === 1 && !has_previous_searches_matching_query_()) {
|
|
8746
8777
|
const [{
|
|
8747
8778
|
page_url: page_url
|
|
8748
8779
|
}] = content_results;
|
|
@@ -8766,7 +8797,7 @@ function $a0eb8b431ec1f87b$export$2f2b9559550c7bbc({
|
|
|
8766
8797
|
search_field_value_: search_field_value_,
|
|
8767
8798
|
get_search_query_: get_search_query_,
|
|
8768
8799
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
8769
|
-
previous_searches_: unfiltered_previous_searches,
|
|
8800
|
+
previous_searches_: [unfiltered_previous_searches, set_unfiltered_previous_searches_],
|
|
8770
8801
|
previous_searches_text_: previous_searches_text_,
|
|
8771
8802
|
depict_api_: depict_api_,
|
|
8772
8803
|
tenant_: tenant_,
|
|
@@ -8788,7 +8819,15 @@ function $a0eb8b431ec1f87b$export$2f2b9559550c7bbc({
|
|
|
8788
8819
|
const [read_search_field_value] = search_field_value_;
|
|
8789
8820
|
const updating_blocked = $9HbP8$createSignal(false);
|
|
8790
8821
|
const [read_suggestion_signal_, write_suggestion_signal] = $9HbP8$createSignal([]);
|
|
8791
|
-
const
|
|
8822
|
+
const previous_searches_without_current_query = $9HbP8$createMemo(() => [...unfiltered_previous_searches()].reverse().filter(q => q !== get_search_query_()));
|
|
8823
|
+
const previous_searches_matching_query = $9HbP8$createMemo(() => {
|
|
8824
|
+
return previous_searches_without_current_query().filter(cs_search => {
|
|
8825
|
+
const search = cs_search.toLowerCase();
|
|
8826
|
+
const value = searching_for_value()?.toLowerCase();
|
|
8827
|
+
if (!value) return false;
|
|
8828
|
+
return search.includes(value) || value.includes(search);
|
|
8829
|
+
}).slice(0, 2);
|
|
8830
|
+
});
|
|
8792
8831
|
const deparallelized_fn = $9HbP8$deparallelize_no_drop(async request_obj => {
|
|
8793
8832
|
const api_response = await depict_api_.suggest(request_obj);
|
|
8794
8833
|
if (!api_response?.suggestions?.length) {
|
|
@@ -8824,7 +8863,8 @@ function $a0eb8b431ec1f87b$export$2f2b9559550c7bbc({
|
|
|
8824
8863
|
get_modal_search_results_: get_modal_search_results_,
|
|
8825
8864
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
8826
8865
|
router_: router_,
|
|
8827
|
-
content_results_: get_content_results_
|
|
8866
|
+
content_results_: get_content_results_,
|
|
8867
|
+
has_previous_searches_matching_query_: $9HbP8$createMemo(() => previous_searches_matching_query().length > 0)
|
|
8828
8868
|
});
|
|
8829
8869
|
$9HbP8$createComputed(() => {
|
|
8830
8870
|
const field_value = read_search_field_value();
|
|
@@ -8861,13 +8901,11 @@ function $a0eb8b431ec1f87b$export$2f2b9559550c7bbc({
|
|
|
8861
8901
|
get children() {
|
|
8862
8902
|
return $9HbP8$createComponent((0, $7ad3a93cbe6fa208$export$a146ac6fa8346a25), {
|
|
8863
8903
|
i18n_: i18n_,
|
|
8864
|
-
|
|
8865
|
-
return unfiltered_previous_searches[1];
|
|
8866
|
-
},
|
|
8904
|
+
set_unfiltered_previous_searches_: set_unfiltered_previous_searches_,
|
|
8867
8905
|
search_query_param_name_: search_query_url_param_name_,
|
|
8868
8906
|
text_: previous_searches_text_,
|
|
8869
8907
|
get previous_searches_() {
|
|
8870
|
-
return $9HbP8$createMemo(() =>
|
|
8908
|
+
return $9HbP8$createMemo(() => previous_searches_without_current_query().slice(0, 3));
|
|
8871
8909
|
},
|
|
8872
8910
|
selected_index_: selected_index_,
|
|
8873
8911
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -8876,16 +8914,7 @@ function $a0eb8b431ec1f87b$export$2f2b9559550c7bbc({
|
|
|
8876
8914
|
});
|
|
8877
8915
|
}
|
|
8878
8916
|
}), $9HbP8$createComponent((0, $cea52f6b24092f05$export$e872e2339fb04a7f), {
|
|
8879
|
-
|
|
8880
|
-
return $9HbP8$createMemo(() => {
|
|
8881
|
-
return filtered_previous_searches().filter(cs_search => {
|
|
8882
|
-
const search = cs_search.toLowerCase();
|
|
8883
|
-
const value = searching_for_value()?.toLowerCase();
|
|
8884
|
-
if (!value) return false;
|
|
8885
|
-
return search.includes(value) || value.includes(search);
|
|
8886
|
-
}).slice(0, 2);
|
|
8887
|
-
});
|
|
8888
|
-
},
|
|
8917
|
+
filtered_previous_searches_: previous_searches_matching_query,
|
|
8889
8918
|
on_previous_searches_page_: show_previous_searches_component,
|
|
8890
8919
|
i18n_: i18n_,
|
|
8891
8920
|
get_content_results_: get_content_results_,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -75,7 +75,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
75
75
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
76
76
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
77
77
|
/*! Depict.ai search and product listing SDK */
|
|
78
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
78
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.26";
|
|
79
79
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
80
80
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
81
81
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -2824,8 +2824,7 @@ function $164d474fea221d77$export$3f1a388cc0d8fed7(props) {
|
|
|
2824
2824
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
2825
2825
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
2826
2826
|
get when() {
|
|
2827
|
-
|
|
2828
|
-
return (_props$available_filt = props.available_filters_()) === null || _props$available_filt === void 0 ? void 0 : _props$available_filt.length;
|
|
2827
|
+
return props.available_filters_();
|
|
2829
2828
|
},
|
|
2830
2829
|
get fallback() {
|
|
2831
2830
|
return Array.from({
|
|
@@ -3283,11 +3282,14 @@ function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
|
3283
3282
|
thing[function_name] = new Proxy(thing[function_name], {
|
|
3284
3283
|
apply(target, this_arg, arg_list) {
|
|
3285
3284
|
try {
|
|
3286
|
-
|
|
3285
|
+
const old_state = history.state;
|
|
3286
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
3287
|
+
var _arg_list$;
|
|
3288
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3289
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
3287
3290
|
const cloned_object = {
|
|
3288
|
-
...
|
|
3291
|
+
...intended_new_value_as_obj
|
|
3289
3292
|
};
|
|
3290
|
-
const old_state = history.state;
|
|
3291
3293
|
for (const key in old_state) {
|
|
3292
3294
|
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
3293
3295
|
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
@@ -4442,6 +4444,15 @@ const $9bde34303b3e9ace$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/sv
|
|
|
4442
4444
|
function $9bde34303b3e9ace$export$28f6150e232898de() {
|
|
4443
4445
|
return $3hooq$solidjsweb.ssr($9bde34303b3e9ace$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey());
|
|
4444
4446
|
}
|
|
4447
|
+
|
|
4448
|
+
/**
|
|
4449
|
+
* Returns true when we have an array of filters that's an array but empty and no selected filters.
|
|
4450
|
+
* Used for hiding the filter button, filter section is from sort/filter modal and desktop filters
|
|
4451
|
+
*/
|
|
4452
|
+
function $8b9c2fa4593b29df$export$50f68cc9882e36a4(args_for_filtering) {
|
|
4453
|
+
var _args_for_filtering$a, _args_for_filtering$s;
|
|
4454
|
+
return ((_args_for_filtering$a = args_for_filtering.available_filters_()) === null || _args_for_filtering$a === void 0 ? void 0 : _args_for_filtering$a.length) === 0 && !((_args_for_filtering$s = args_for_filtering.selected_filters_[0]()) !== null && _args_for_filtering$s !== void 0 && _args_for_filtering$s.length);
|
|
4455
|
+
}
|
|
4445
4456
|
const $685149df41127abd$var$_tmpl$ = ["<button", ' class="clear minor">', "</button>"],
|
|
4446
4457
|
$685149df41127abd$var$_tmpl$2 = ["<div", ' class="depict plp" id="depict-filter-sort-mobile-modal-container"><div class="depict-filter-sort-modal-backdrop"></div><button class="dismiss-modal"', ">", '</button><div class="filter-sort-modal"><div class="body" style="', '"><!--#-->', "<!--/--><!--#-->", '<!--/--></div><div class="bottom-row"><!--#-->', '<!--/--><button class="show-results major">', "</button></div></div></div>"],
|
|
4447
4458
|
$685149df41127abd$var$_tmpl$3 = ["<details", ' class="sorting"></details>'],
|
|
@@ -4521,21 +4532,28 @@ function $685149df41127abd$export$9bf11afa910f536e(_ref) {
|
|
|
4521
4532
|
get children() {
|
|
4522
4533
|
return $3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3bd211c857f81dfd$export$1f1775a58da589b5), args_for_sorting_)));
|
|
4523
4534
|
}
|
|
4524
|
-
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
return $3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey());
|
|
4528
|
-
},
|
|
4529
|
-
get summary_() {
|
|
4530
|
-
return $3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9bde34303b3e9ace$export$28f6150e232898de), {})), $3hooq$solidjsweb.escape(i18n_.filters_()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
4531
|
-
expanded_: filters_expanded,
|
|
4532
|
-
i18n_: i18n_
|
|
4533
|
-
})));
|
|
4535
|
+
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
4536
|
+
get when() {
|
|
4537
|
+
return !$8b9c2fa4593b29df$export$50f68cc9882e36a4(args_for_filtering_);
|
|
4534
4538
|
},
|
|
4535
4539
|
get children() {
|
|
4536
|
-
return $3hooq$solidjsweb.
|
|
4537
|
-
|
|
4538
|
-
|
|
4540
|
+
return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
|
|
4541
|
+
is_open_: [filters_expanded, set_filters_expanded],
|
|
4542
|
+
get details_() {
|
|
4543
|
+
return $3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey());
|
|
4544
|
+
},
|
|
4545
|
+
get summary_() {
|
|
4546
|
+
return $3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9bde34303b3e9ace$export$28f6150e232898de), {})), $3hooq$solidjsweb.escape(i18n_.filters_()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
4547
|
+
expanded_: filters_expanded,
|
|
4548
|
+
i18n_: i18n_
|
|
4549
|
+
})));
|
|
4550
|
+
},
|
|
4551
|
+
get children() {
|
|
4552
|
+
return $3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), $3hooq$solidjsweb.mergeProps(args_for_filtering_, {
|
|
4553
|
+
are_in_modal_: true
|
|
4554
|
+
}))));
|
|
4555
|
+
}
|
|
4556
|
+
});
|
|
4539
4557
|
}
|
|
4540
4558
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
4541
4559
|
get when() {
|
|
@@ -4555,7 +4573,7 @@ const $f70cc6dfcadf0fd5$var$_tmpl$ = ["<div", ' class="filters"><div class="body
|
|
|
4555
4573
|
$f70cc6dfcadf0fd5$var$_tmpl$2 = ["<div", ' class="sorting"><div class="body">', "</div></div>"],
|
|
4556
4574
|
$f70cc6dfcadf0fd5$var$_tmpl$3 = ["<div", ' class="sort-and-filter-buttons"><div class="outer"><div class="inner"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></div></div></div>"],
|
|
4557
4575
|
$f70cc6dfcadf0fd5$var$_tmpl$4 = ["<span", ' class="num-filters" style="', '">', "</span>"],
|
|
4558
|
-
$f70cc6dfcadf0fd5$var$_tmpl$5 = ["<div", ' class="open-filters-button-container"><!--#-->', "<!--/--><button", ' class="', '" type="button"', ' style="', '"><!--#-->', "<!--/--><span>", "</span></button></div>"],
|
|
4576
|
+
$f70cc6dfcadf0fd5$var$_tmpl$5 = ["<div", ' class="open-filters-button-container" style="', '"><!--#-->', "<!--/--><button", ' class="', '" type="button"', ' style="', '"><!--#-->', "<!--/--><span>", "</span></button></div>"],
|
|
4559
4577
|
$f70cc6dfcadf0fd5$var$_tmpl$6 = ["<button", ' class="', '"', ' style="', '"><span>', "</span><!--#-->", "<!--/--></button>"];
|
|
4560
4578
|
function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
4561
4579
|
let {
|
|
@@ -4612,6 +4630,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
4612
4630
|
selected_filters_: selected_filters_,
|
|
4613
4631
|
i18n_: i18n_
|
|
4614
4632
|
};
|
|
4633
|
+
const hide_filters = $3hooq$solidjs.createMemo(() => $8b9c2fa4593b29df$export$50f68cc9882e36a4(filter_options));
|
|
4615
4634
|
const sorting_options = {
|
|
4616
4635
|
current_sorting_: current_sorting_,
|
|
4617
4636
|
available_sortings_: available_sortings_,
|
|
@@ -4626,7 +4645,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
4626
4645
|
search_filters_open_: search_filters_open_,
|
|
4627
4646
|
search_sorting_open_: search_sorting_open_,
|
|
4628
4647
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
4629
|
-
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
4648
|
+
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
4649
|
+
hide_button_: hide_filters
|
|
4630
4650
|
});
|
|
4631
4651
|
};
|
|
4632
4652
|
const make_open_sorting_button = function () {
|
|
@@ -4678,7 +4698,14 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
4678
4698
|
} else {
|
|
4679
4699
|
var _close_modal_2;
|
|
4680
4700
|
(_close_modal_2 = close_modal_) === null || _close_modal_2 === void 0 || _close_modal_2();
|
|
4681
|
-
if (filters_open()) set_extra_els_in_results_container_(
|
|
4701
|
+
if (filters_open()) set_extra_els_in_results_container_(() => $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
4702
|
+
get when() {
|
|
4703
|
+
return !hide_filters();
|
|
4704
|
+
},
|
|
4705
|
+
get children() {
|
|
4706
|
+
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), filter_options)));
|
|
4707
|
+
}
|
|
4708
|
+
}));else set_extra_els_in_results_container_($3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3bd211c857f81dfd$export$1f1775a58da589b5), sorting_options))));
|
|
4682
4709
|
}
|
|
4683
4710
|
});
|
|
4684
4711
|
$3hooq$depictaiutilishared.catchify(async () => {
|
|
@@ -4723,11 +4750,14 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
4723
4750
|
search_sorting_open_: search_sorting_open_,
|
|
4724
4751
|
filter_button_width_: filter_button_width_,
|
|
4725
4752
|
tabindex_: tabindex_,
|
|
4726
|
-
number_of_rendered_selected_filters_items_: [num_selected_filters]
|
|
4753
|
+
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
4754
|
+
hide_button_: hide_button_
|
|
4727
4755
|
} = _ref3;
|
|
4728
4756
|
const filters_closed = $3hooq$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
4729
4757
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
4730
|
-
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.
|
|
4758
|
+
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(hide_button_() ? {
|
|
4759
|
+
display: "none"
|
|
4760
|
+
} : {}), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
4731
4761
|
get when() {
|
|
4732
4762
|
return num_selected_filters();
|
|
4733
4763
|
},
|
|
@@ -7666,7 +7696,8 @@ function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
|
7666
7696
|
get_modal_search_results_: get_modal_search_results_,
|
|
7667
7697
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
7668
7698
|
router_: router_,
|
|
7669
|
-
content_results_: content_results_
|
|
7699
|
+
content_results_: content_results_,
|
|
7700
|
+
has_previous_searches_matching_query_: has_previous_searches_matching_query_
|
|
7670
7701
|
} = _ref;
|
|
7671
7702
|
const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = $3hooq$solidjs.createSignal(() => false);
|
|
7672
7703
|
$3hooq$solidjs.createComputed(() => {
|
|
@@ -7675,7 +7706,7 @@ function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
|
7675
7706
|
const search_results = (_get_modal_search_res = get_modal_search_results_()) === null || _get_modal_search_res === void 0 ? void 0 : _get_modal_search_res();
|
|
7676
7707
|
const content_results = content_results_();
|
|
7677
7708
|
// If we only have one content result and nothing else, go there when pressing enter
|
|
7678
|
-
if (!suggestions.length && !(search_results !== null && search_results !== void 0 && (_search_results$displ = search_results.displays) !== null && _search_results$displ !== void 0 && _search_results$displ.length) && (content_results === null || content_results === void 0 ? void 0 : content_results.length) === 1) {
|
|
7709
|
+
if (!suggestions.length && !(search_results !== null && search_results !== void 0 && (_search_results$displ = search_results.displays) !== null && _search_results$displ !== void 0 && _search_results$displ.length) && (content_results === null || content_results === void 0 ? void 0 : content_results.length) === 1 && !has_previous_searches_matching_query_()) {
|
|
7679
7710
|
const [{
|
|
7680
7711
|
page_url: page_url
|
|
7681
7712
|
}] = content_results;
|
|
@@ -7700,7 +7731,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
7700
7731
|
search_field_value_: search_field_value_,
|
|
7701
7732
|
get_search_query_: get_search_query_,
|
|
7702
7733
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
7703
|
-
previous_searches_: unfiltered_previous_searches,
|
|
7734
|
+
previous_searches_: [unfiltered_previous_searches, set_unfiltered_previous_searches_],
|
|
7704
7735
|
previous_searches_text_: previous_searches_text_,
|
|
7705
7736
|
depict_api_: depict_api_,
|
|
7706
7737
|
tenant_: tenant_,
|
|
@@ -7722,7 +7753,16 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
7722
7753
|
const [read_search_field_value] = search_field_value_;
|
|
7723
7754
|
const updating_blocked = $3hooq$solidjs.createSignal(false);
|
|
7724
7755
|
const [read_suggestion_signal_, write_suggestion_signal] = $3hooq$solidjs.createSignal([]);
|
|
7725
|
-
const
|
|
7756
|
+
const previous_searches_without_current_query = $3hooq$solidjs.createMemo(() => [...unfiltered_previous_searches()].reverse().filter(q => q !== get_search_query_()));
|
|
7757
|
+
const previous_searches_matching_query = $3hooq$solidjs.createMemo(() => {
|
|
7758
|
+
return previous_searches_without_current_query().filter(cs_search => {
|
|
7759
|
+
var _searching_for_value;
|
|
7760
|
+
const search = cs_search.toLowerCase();
|
|
7761
|
+
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
7762
|
+
if (!value) return false;
|
|
7763
|
+
return search.includes(value) || value.includes(search);
|
|
7764
|
+
}).slice(0, 2);
|
|
7765
|
+
});
|
|
7726
7766
|
const deparallelized_fn = $3hooq$depictaiutilishared.deparallelize_no_drop(async request_obj => {
|
|
7727
7767
|
var _api_response$suggest;
|
|
7728
7768
|
const api_response = await depict_api_.suggest(request_obj);
|
|
@@ -7764,7 +7804,8 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
7764
7804
|
get_modal_search_results_: get_modal_search_results_,
|
|
7765
7805
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
7766
7806
|
router_: router_,
|
|
7767
|
-
content_results_: get_content_results_
|
|
7807
|
+
content_results_: get_content_results_,
|
|
7808
|
+
has_previous_searches_matching_query_: $3hooq$solidjs.createMemo(() => previous_searches_matching_query().length > 0)
|
|
7768
7809
|
});
|
|
7769
7810
|
$3hooq$solidjs.createComputed(() => {
|
|
7770
7811
|
const field_value = read_search_field_value();
|
|
@@ -7801,13 +7842,11 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
7801
7842
|
get children() {
|
|
7802
7843
|
return $3hooq$solidjsweb.createComponent((0, $4edbc04f5c5a1843$export$a146ac6fa8346a25), {
|
|
7803
7844
|
i18n_: i18n_,
|
|
7804
|
-
|
|
7805
|
-
return unfiltered_previous_searches[1];
|
|
7806
|
-
},
|
|
7845
|
+
set_unfiltered_previous_searches_: set_unfiltered_previous_searches_,
|
|
7807
7846
|
search_query_param_name_: search_query_url_param_name_,
|
|
7808
7847
|
text_: previous_searches_text_,
|
|
7809
7848
|
get previous_searches_() {
|
|
7810
|
-
return $3hooq$solidjs.createMemo(() =>
|
|
7849
|
+
return $3hooq$solidjs.createMemo(() => previous_searches_without_current_query().slice(0, 3));
|
|
7811
7850
|
},
|
|
7812
7851
|
selected_index_: selected_index_,
|
|
7813
7852
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -7816,17 +7855,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
7816
7855
|
});
|
|
7817
7856
|
}
|
|
7818
7857
|
}), $3hooq$solidjsweb.createComponent((0, $0677d509ad208e22$export$e872e2339fb04a7f), {
|
|
7819
|
-
|
|
7820
|
-
return $3hooq$solidjs.createMemo(() => {
|
|
7821
|
-
return filtered_previous_searches().filter(cs_search => {
|
|
7822
|
-
var _searching_for_value;
|
|
7823
|
-
const search = cs_search.toLowerCase();
|
|
7824
|
-
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
7825
|
-
if (!value) return false;
|
|
7826
|
-
return search.includes(value) || value.includes(search);
|
|
7827
|
-
}).slice(0, 2);
|
|
7828
|
-
});
|
|
7829
|
-
},
|
|
7858
|
+
filtered_previous_searches_: previous_searches_matching_query,
|
|
7830
7859
|
on_previous_searches_page_: show_previous_searches_component,
|
|
7831
7860
|
i18n_: i18n_,
|
|
7832
7861
|
get_content_results_: get_content_results_,
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "2.0.
|
|
10
|
+
export const version = "2.0.26";
|
|
11
11
|
export type SDKGridSpacing = string | {
|
|
12
12
|
horizontal: string;
|
|
13
13
|
vertical: string;
|