@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/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.26";
|
|
12
12
|
const $2855bffe06ef7a03$var$fallback_operator = "in";
|
|
13
13
|
const $2855bffe06ef7a03$var$fallback_token = "";
|
|
14
14
|
const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
|
|
@@ -3563,8 +3563,7 @@ function $f6b0500577e1b210$export$3f1a388cc0d8fed7(props) {
|
|
|
3563
3563
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
3564
3564
|
return $8tj43$createComponent((0, $8tj43$Show), {
|
|
3565
3565
|
get when() {
|
|
3566
|
-
|
|
3567
|
-
return (_props$available_filt = props.available_filters_()) === null || _props$available_filt === void 0 ? void 0 : _props$available_filt.length;
|
|
3566
|
+
return props.available_filters_();
|
|
3568
3567
|
},
|
|
3569
3568
|
get fallback() {
|
|
3570
3569
|
return Array.from({
|
|
@@ -4091,11 +4090,14 @@ function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
|
4091
4090
|
thing[function_name] = new Proxy(thing[function_name], {
|
|
4092
4091
|
apply(target, this_arg, arg_list) {
|
|
4093
4092
|
try {
|
|
4094
|
-
|
|
4093
|
+
const old_state = history.state;
|
|
4094
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
4095
|
+
var _arg_list$;
|
|
4096
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
4097
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
4095
4098
|
const cloned_object = {
|
|
4096
|
-
...
|
|
4099
|
+
...intended_new_value_as_obj
|
|
4097
4100
|
};
|
|
4098
|
-
const old_state = history.state;
|
|
4099
4101
|
for (const key in old_state) {
|
|
4100
4102
|
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
4101
4103
|
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
@@ -5344,6 +5346,15 @@ const $05f67356defcdd65$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg xmlns="h
|
|
|
5344
5346
|
function $05f67356defcdd65$export$28f6150e232898de() {
|
|
5345
5347
|
return $8tj43$getNextElement($05f67356defcdd65$var$_tmpl$);
|
|
5346
5348
|
}
|
|
5349
|
+
|
|
5350
|
+
/**
|
|
5351
|
+
* Returns true when we have an array of filters that's an array but empty and no selected filters.
|
|
5352
|
+
* Used for hiding the filter button, filter section is from sort/filter modal and desktop filters
|
|
5353
|
+
*/
|
|
5354
|
+
function $6fcb97029a69ec44$export$50f68cc9882e36a4(args_for_filtering) {
|
|
5355
|
+
var _args_for_filtering$a, _args_for_filtering$s;
|
|
5356
|
+
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);
|
|
5357
|
+
}
|
|
5347
5358
|
const $082c4ed3e22f8d71$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<button class="clear minor"></button>`, 2),
|
|
5348
5359
|
$082c4ed3e22f8d71$var$_tmpl$2 = /*#__PURE__*/$8tj43$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),
|
|
5349
5360
|
$082c4ed3e22f8d71$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<details class="sorting"></details>`, 2),
|
|
@@ -5585,38 +5596,45 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
5585
5596
|
})();
|
|
5586
5597
|
}
|
|
5587
5598
|
}), _el$7, _co$);
|
|
5588
|
-
$8tj43$insert(_el$5, $8tj43$createComponent((0, $
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
return $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$6);
|
|
5592
|
-
},
|
|
5593
|
-
get summary_() {
|
|
5594
|
-
return (() => {
|
|
5595
|
-
const _el$26 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$4),
|
|
5596
|
-
_el$27 = _el$26.firstChild,
|
|
5597
|
-
_el$28 = _el$27.firstChild,
|
|
5598
|
-
_el$30 = _el$28.firstChild,
|
|
5599
|
-
[_el$31, _co$6] = $8tj43$getNextMarker(_el$30.nextSibling),
|
|
5600
|
-
_el$29 = _el$31.nextSibling,
|
|
5601
|
-
_el$32 = _el$28.nextSibling,
|
|
5602
|
-
[_el$33, _co$7] = $8tj43$getNextMarker(_el$32.nextSibling);
|
|
5603
|
-
$8tj43$insert(_el$28, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5604
|
-
$8tj43$insert(_el$29, () => i18n_.filters_());
|
|
5605
|
-
$8tj43$insert(_el$27, $8tj43$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
|
|
5606
|
-
expanded_: filters_expanded,
|
|
5607
|
-
i18n_: i18n_
|
|
5608
|
-
}), _el$33, _co$7);
|
|
5609
|
-
return _el$26;
|
|
5610
|
-
})();
|
|
5599
|
+
$8tj43$insert(_el$5, $8tj43$createComponent((0, $8tj43$Show), {
|
|
5600
|
+
get when() {
|
|
5601
|
+
return !$6fcb97029a69ec44$export$50f68cc9882e36a4(args_for_filtering_);
|
|
5611
5602
|
},
|
|
5612
5603
|
get children() {
|
|
5613
|
-
return (()
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
}
|
|
5618
|
-
|
|
5619
|
-
|
|
5604
|
+
return $8tj43$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
|
|
5605
|
+
is_open_: [filters_expanded, set_filters_expanded],
|
|
5606
|
+
get details_() {
|
|
5607
|
+
return $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$6);
|
|
5608
|
+
},
|
|
5609
|
+
get summary_() {
|
|
5610
|
+
return (() => {
|
|
5611
|
+
const _el$26 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$4),
|
|
5612
|
+
_el$27 = _el$26.firstChild,
|
|
5613
|
+
_el$28 = _el$27.firstChild,
|
|
5614
|
+
_el$30 = _el$28.firstChild,
|
|
5615
|
+
[_el$31, _co$6] = $8tj43$getNextMarker(_el$30.nextSibling),
|
|
5616
|
+
_el$29 = _el$31.nextSibling,
|
|
5617
|
+
_el$32 = _el$28.nextSibling,
|
|
5618
|
+
[_el$33, _co$7] = $8tj43$getNextMarker(_el$32.nextSibling);
|
|
5619
|
+
$8tj43$insert(_el$28, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5620
|
+
$8tj43$insert(_el$29, () => i18n_.filters_());
|
|
5621
|
+
$8tj43$insert(_el$27, $8tj43$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
|
|
5622
|
+
expanded_: filters_expanded,
|
|
5623
|
+
i18n_: i18n_
|
|
5624
|
+
}), _el$33, _co$7);
|
|
5625
|
+
return _el$26;
|
|
5626
|
+
})();
|
|
5627
|
+
},
|
|
5628
|
+
get children() {
|
|
5629
|
+
return (() => {
|
|
5630
|
+
const _el$34 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$5);
|
|
5631
|
+
$8tj43$insert(_el$34, $8tj43$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $8tj43$mergeProps(args_for_filtering_, {
|
|
5632
|
+
are_in_modal_: true
|
|
5633
|
+
})));
|
|
5634
|
+
return _el$34;
|
|
5635
|
+
})();
|
|
5636
|
+
}
|
|
5637
|
+
});
|
|
5620
5638
|
}
|
|
5621
5639
|
}), _el$9, _co$2);
|
|
5622
5640
|
$8tj43$insert(_el$10, $8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -5729,6 +5747,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
5729
5747
|
selected_filters_: selected_filters_,
|
|
5730
5748
|
i18n_: i18n_
|
|
5731
5749
|
};
|
|
5750
|
+
const hide_filters = $8tj43$createMemo(() => $6fcb97029a69ec44$export$50f68cc9882e36a4(filter_options));
|
|
5732
5751
|
const sorting_options = {
|
|
5733
5752
|
current_sorting_: current_sorting_,
|
|
5734
5753
|
available_sortings_: available_sortings_,
|
|
@@ -5743,7 +5762,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
5743
5762
|
search_filters_open_: search_filters_open_,
|
|
5744
5763
|
search_sorting_open_: search_sorting_open_,
|
|
5745
5764
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5746
|
-
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
5765
|
+
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
5766
|
+
hide_button_: hide_filters
|
|
5747
5767
|
});
|
|
5748
5768
|
};
|
|
5749
5769
|
const make_open_sorting_button = function () {
|
|
@@ -5795,12 +5815,17 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
5795
5815
|
} else {
|
|
5796
5816
|
var _close_modal_2;
|
|
5797
5817
|
(_close_modal_2 = close_modal_) === null || _close_modal_2 === void 0 || _close_modal_2();
|
|
5798
|
-
if (filters_open()) set_extra_els_in_results_container_((
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5818
|
+
if (filters_open()) set_extra_els_in_results_container_(() => $8tj43$createComponent((0, $8tj43$Show), {
|
|
5819
|
+
get when() {
|
|
5820
|
+
return !hide_filters();
|
|
5821
|
+
},
|
|
5822
|
+
get children() {
|
|
5823
|
+
const _el$ = $8tj43$getNextElement($7396052a1484264f$var$_tmpl$),
|
|
5824
|
+
_el$2 = _el$.firstChild;
|
|
5825
|
+
$8tj43$insert(_el$2, $8tj43$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), filter_options));
|
|
5826
|
+
return _el$;
|
|
5827
|
+
}
|
|
5828
|
+
}));else set_extra_els_in_results_container_((() => {
|
|
5804
5829
|
const _el$3 = $8tj43$getNextElement($7396052a1484264f$var$_tmpl$2),
|
|
5805
5830
|
_el$4 = _el$3.firstChild;
|
|
5806
5831
|
$8tj43$insert(_el$4, $8tj43$createComponent((0, $cfdbd124dd09d713$export$1f1775a58da589b5), sorting_options));
|
|
@@ -5866,7 +5891,8 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
5866
5891
|
search_sorting_open_: search_sorting_open_,
|
|
5867
5892
|
filter_button_width_: filter_button_width_,
|
|
5868
5893
|
tabindex_: tabindex_,
|
|
5869
|
-
number_of_rendered_selected_filters_items_: [num_selected_filters]
|
|
5894
|
+
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
5895
|
+
hide_button_: hide_button_
|
|
5870
5896
|
} = _ref3;
|
|
5871
5897
|
const filters_closed = $8tj43$createMemo(() => !search_filters_open_[0]());
|
|
5872
5898
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -5912,22 +5938,27 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
5912
5938
|
}), _el$19, _co$4);
|
|
5913
5939
|
$8tj43$insert(_el$17, () => i18n_.filter_text_());
|
|
5914
5940
|
$8tj43$effect(_p$ => {
|
|
5915
|
-
const _v$ =
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
_v$
|
|
5941
|
+
const _v$ = hide_button_() ? {
|
|
5942
|
+
display: "none"
|
|
5943
|
+
} : {},
|
|
5944
|
+
_v$2 = !filters_closed(),
|
|
5945
|
+
_v$3 = !!filters_closed(),
|
|
5946
|
+
_v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
|
|
5947
|
+
_v$5 = filter_button_width_ !== null && filter_button_width_ !== void 0 && filter_button_width_() ? {
|
|
5919
5948
|
width: filter_button_width_() + "px"
|
|
5920
5949
|
} : {};
|
|
5921
|
-
|
|
5922
|
-
_v$2 !== _p$._v$2 && _el$16.classList.toggle("
|
|
5923
|
-
_v$3 !== _p$._v$3 &&
|
|
5924
|
-
_p$._v$4
|
|
5950
|
+
_p$._v$ = $8tj43$style(_el$14, _v$, _p$._v$);
|
|
5951
|
+
_v$2 !== _p$._v$2 && _el$16.classList.toggle("major", _p$._v$2 = _v$2);
|
|
5952
|
+
_v$3 !== _p$._v$3 && _el$16.classList.toggle("minor", _p$._v$3 = _v$3);
|
|
5953
|
+
_v$4 !== _p$._v$4 && $8tj43$setAttribute(_el$16, "aria-label", _p$._v$4 = _v$4);
|
|
5954
|
+
_p$._v$5 = $8tj43$style(_el$16, _v$5, _p$._v$5);
|
|
5925
5955
|
return _p$;
|
|
5926
5956
|
}, {
|
|
5927
5957
|
_v$: undefined,
|
|
5928
5958
|
_v$2: undefined,
|
|
5929
5959
|
_v$3: undefined,
|
|
5930
|
-
_v$4: undefined
|
|
5960
|
+
_v$4: undefined,
|
|
5961
|
+
_v$5: undefined
|
|
5931
5962
|
});
|
|
5932
5963
|
$8tj43$runHydrationEvents();
|
|
5933
5964
|
return _el$14;
|
|
@@ -5987,22 +6018,22 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
5987
6018
|
}
|
|
5988
6019
|
}), _el$25, _co$6);
|
|
5989
6020
|
$8tj43$effect(_p$ => {
|
|
5990
|
-
const _v$
|
|
5991
|
-
_v$
|
|
5992
|
-
_v$
|
|
5993
|
-
_v$
|
|
6021
|
+
const _v$6 = !sorting_closed(),
|
|
6022
|
+
_v$7 = !!sorting_closed(),
|
|
6023
|
+
_v$8 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
|
|
6024
|
+
_v$9 = sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
5994
6025
|
width: sort_button_width_() + "px"
|
|
5995
6026
|
} : {};
|
|
5996
|
-
_v$
|
|
5997
|
-
_v$
|
|
5998
|
-
_v$
|
|
5999
|
-
_p$._v$
|
|
6027
|
+
_v$6 !== _p$._v$6 && _el$22.classList.toggle("major", _p$._v$6 = _v$6);
|
|
6028
|
+
_v$7 !== _p$._v$7 && _el$22.classList.toggle("minor", _p$._v$7 = _v$7);
|
|
6029
|
+
_v$8 !== _p$._v$8 && $8tj43$setAttribute(_el$22, "aria-label", _p$._v$8 = _v$8);
|
|
6030
|
+
_p$._v$9 = $8tj43$style(_el$22, _v$9, _p$._v$9);
|
|
6000
6031
|
return _p$;
|
|
6001
6032
|
}, {
|
|
6002
|
-
_v$5: undefined,
|
|
6003
6033
|
_v$6: undefined,
|
|
6004
6034
|
_v$7: undefined,
|
|
6005
|
-
_v$8: undefined
|
|
6035
|
+
_v$8: undefined,
|
|
6036
|
+
_v$9: undefined
|
|
6006
6037
|
});
|
|
6007
6038
|
$8tj43$runHydrationEvents();
|
|
6008
6039
|
return _el$22;
|
|
@@ -9389,7 +9420,8 @@ function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
|
9389
9420
|
get_modal_search_results_: get_modal_search_results_,
|
|
9390
9421
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
9391
9422
|
router_: router_,
|
|
9392
|
-
content_results_: content_results_
|
|
9423
|
+
content_results_: content_results_,
|
|
9424
|
+
has_previous_searches_matching_query_: has_previous_searches_matching_query_
|
|
9393
9425
|
} = _ref;
|
|
9394
9426
|
const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = $8tj43$createSignal(() => false);
|
|
9395
9427
|
$8tj43$createComputed(() => {
|
|
@@ -9398,7 +9430,7 @@ function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
|
9398
9430
|
const search_results = (_get_modal_search_res = get_modal_search_results_()) === null || _get_modal_search_res === void 0 ? void 0 : _get_modal_search_res();
|
|
9399
9431
|
const content_results = content_results_();
|
|
9400
9432
|
// If we only have one content result and nothing else, go there when pressing enter
|
|
9401
|
-
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) {
|
|
9433
|
+
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_()) {
|
|
9402
9434
|
const [{
|
|
9403
9435
|
page_url: page_url
|
|
9404
9436
|
}] = content_results;
|
|
@@ -9423,7 +9455,7 @@ function $7cd4d275a9f8d600$export$2f2b9559550c7bbc(_ref) {
|
|
|
9423
9455
|
search_field_value_: search_field_value_,
|
|
9424
9456
|
get_search_query_: get_search_query_,
|
|
9425
9457
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
9426
|
-
previous_searches_: unfiltered_previous_searches,
|
|
9458
|
+
previous_searches_: [unfiltered_previous_searches, set_unfiltered_previous_searches_],
|
|
9427
9459
|
previous_searches_text_: previous_searches_text_,
|
|
9428
9460
|
depict_api_: depict_api_,
|
|
9429
9461
|
tenant_: tenant_,
|
|
@@ -9445,7 +9477,16 @@ function $7cd4d275a9f8d600$export$2f2b9559550c7bbc(_ref) {
|
|
|
9445
9477
|
const [read_search_field_value] = search_field_value_;
|
|
9446
9478
|
const updating_blocked = $8tj43$createSignal(false);
|
|
9447
9479
|
const [read_suggestion_signal_, write_suggestion_signal] = $8tj43$createSignal([]);
|
|
9448
|
-
const
|
|
9480
|
+
const previous_searches_without_current_query = $8tj43$createMemo(() => [...unfiltered_previous_searches()].reverse().filter(q => q !== get_search_query_()));
|
|
9481
|
+
const previous_searches_matching_query = $8tj43$createMemo(() => {
|
|
9482
|
+
return previous_searches_without_current_query().filter(cs_search => {
|
|
9483
|
+
var _searching_for_value;
|
|
9484
|
+
const search = cs_search.toLowerCase();
|
|
9485
|
+
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
9486
|
+
if (!value) return false;
|
|
9487
|
+
return search.includes(value) || value.includes(search);
|
|
9488
|
+
}).slice(0, 2);
|
|
9489
|
+
});
|
|
9449
9490
|
const deparallelized_fn = $8tj43$deparallelize_no_drop(async request_obj => {
|
|
9450
9491
|
var _api_response$suggest;
|
|
9451
9492
|
const api_response = await depict_api_.suggest(request_obj);
|
|
@@ -9487,7 +9528,8 @@ function $7cd4d275a9f8d600$export$2f2b9559550c7bbc(_ref) {
|
|
|
9487
9528
|
get_modal_search_results_: get_modal_search_results_,
|
|
9488
9529
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
9489
9530
|
router_: router_,
|
|
9490
|
-
content_results_: get_content_results_
|
|
9531
|
+
content_results_: get_content_results_,
|
|
9532
|
+
has_previous_searches_matching_query_: $8tj43$createMemo(() => previous_searches_matching_query().length > 0)
|
|
9491
9533
|
});
|
|
9492
9534
|
$8tj43$createComputed(() => {
|
|
9493
9535
|
const field_value = read_search_field_value();
|
|
@@ -9524,13 +9566,11 @@ function $7cd4d275a9f8d600$export$2f2b9559550c7bbc(_ref) {
|
|
|
9524
9566
|
get children() {
|
|
9525
9567
|
return $8tj43$createComponent((0, $494c9ad553139dbc$export$a146ac6fa8346a25), {
|
|
9526
9568
|
i18n_: i18n_,
|
|
9527
|
-
|
|
9528
|
-
return unfiltered_previous_searches[1];
|
|
9529
|
-
},
|
|
9569
|
+
set_unfiltered_previous_searches_: set_unfiltered_previous_searches_,
|
|
9530
9570
|
search_query_param_name_: search_query_url_param_name_,
|
|
9531
9571
|
text_: previous_searches_text_,
|
|
9532
9572
|
get previous_searches_() {
|
|
9533
|
-
return $8tj43$createMemo(() =>
|
|
9573
|
+
return $8tj43$createMemo(() => previous_searches_without_current_query().slice(0, 3));
|
|
9534
9574
|
},
|
|
9535
9575
|
selected_index_: selected_index_,
|
|
9536
9576
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -9539,17 +9579,7 @@ function $7cd4d275a9f8d600$export$2f2b9559550c7bbc(_ref) {
|
|
|
9539
9579
|
});
|
|
9540
9580
|
}
|
|
9541
9581
|
}), $8tj43$createComponent((0, $40dd3f46f55d62ba$export$e872e2339fb04a7f), {
|
|
9542
|
-
|
|
9543
|
-
return $8tj43$createMemo(() => {
|
|
9544
|
-
return filtered_previous_searches().filter(cs_search => {
|
|
9545
|
-
var _searching_for_value;
|
|
9546
|
-
const search = cs_search.toLowerCase();
|
|
9547
|
-
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
9548
|
-
if (!value) return false;
|
|
9549
|
-
return search.includes(value) || value.includes(search);
|
|
9550
|
-
}).slice(0, 2);
|
|
9551
|
-
});
|
|
9552
|
-
},
|
|
9582
|
+
filtered_previous_searches_: previous_searches_matching_query,
|
|
9553
9583
|
on_previous_searches_page_: show_previous_searches_component,
|
|
9554
9584
|
i18n_: i18n_,
|
|
9555
9585
|
get_content_results_: get_content_results_,
|