@depict-ai/ui 4.8.3 → 4.8.5
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 +49 -31
- package/ES10/index.d.ts +3 -3
- package/ES10/index.js +49 -31
- package/latest/index.cjs +38 -15
- package/latest/index.d.ts +3 -3
- package/latest/index.js +38 -15
- package/package.json +1 -1
- package/server/ES10/index.cjs +46 -35
- package/server/ES10/index.d.ts +3 -3
- package/server/ES10/index.js +46 -35
- package/server/latest/index.cjs +39 -18
- package/server/latest/index.d.ts +3 -3
- package/server/latest/index.js +39 -18
package/server/ES10/index.cjs
CHANGED
|
@@ -114,7 +114,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
114
114
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
115
115
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
116
116
|
/*! Depict.ai search and product listing SDK */
|
|
117
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.
|
|
117
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.5";
|
|
118
118
|
function $054b1113e4897051$export$54c6d6ff54e72743(whatToWatch) {
|
|
119
119
|
const [width, setWidth] = $3hooq$solidjs.createSignal(0);
|
|
120
120
|
const [height, setHeight] = $3hooq$solidjs.createSignal(0);
|
|
@@ -2764,10 +2764,10 @@ function $068bde7fa83ac02c$export$92f2da32c6e7e7ee(_ref) {
|
|
|
2764
2764
|
i18n_: i18n_
|
|
2765
2765
|
} = _ref;
|
|
2766
2766
|
return $3hooq$solidjs.createMemo(() => {
|
|
2767
|
-
const
|
|
2768
|
-
if (isNaN(
|
|
2767
|
+
const numberToFormat = number_();
|
|
2768
|
+
if (isNaN(numberToFormat)) return "";
|
|
2769
2769
|
const price_formatting = i18n_.price_formatting_();
|
|
2770
|
-
return $3hooq$depictaiutilishared.standard_price_format(
|
|
2770
|
+
return $3hooq$depictaiutilishared.standard_price_format(numberToFormat, 0,
|
|
2771
2771
|
// we never want places after comma here it looks weird as hell
|
|
2772
2772
|
price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
2773
2773
|
});
|
|
@@ -4723,9 +4723,10 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
4723
4723
|
});
|
|
4724
4724
|
// total number of results = content results + product results + category suggestions
|
|
4725
4725
|
const totalNumberResults = $3hooq$solidjs.createMemo(() => {
|
|
4726
|
-
var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
|
|
4726
|
+
var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
|
|
4727
4727
|
const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
|
|
4728
|
-
|
|
4728
|
+
// Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
|
|
4729
|
+
const hits = results !== null && results !== void 0 && results.cursor ? results === null || results === void 0 ? void 0 : results.n_hits : results === null || results === void 0 ? void 0 : (_results$displays = results.displays) === null || _results$displays === void 0 ? void 0 : _results$displays.length;
|
|
4729
4730
|
const content_results = content_search_enabled_() && (results === null || results === void 0 ? void 0 : (_results$content_sear = results.content_search_links) === null || _results$content_sear === void 0 ? void 0 : _results$content_sear.length) || 0;
|
|
4730
4731
|
const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
|
|
4731
4732
|
return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
|
|
@@ -5663,7 +5664,7 @@ function $e2d74bb03cc5252e$export$325f75597868c4f0(stuff) {
|
|
|
5663
5664
|
var $c5842bdb10e57229$var$_tmpl$ = ["<button", ' class="clear-all-filters minor">', "</button>"],
|
|
5664
5665
|
$c5842bdb10e57229$var$_tmpl$2 = ["<div", ' class="inner"><span class="title"><!--$-->', "<!--/-->: </span><!--$-->", "<!--/--></div>"],
|
|
5665
5666
|
$c5842bdb10e57229$var$_tmpl$3 = ["<button", ' class="clear-filter major"><!--$-->', "<!--/--><span><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--> \u2013 <!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></button>"],
|
|
5666
|
-
$c5842bdb10e57229$var$_tmpl$4 = ["<button", ' class="clear-filter major"
|
|
5667
|
+
$c5842bdb10e57229$var$_tmpl$4 = ["<button", ' class="clear-filter major"', "><!--$-->", "<!--/--><span>", "</span></button>"];
|
|
5667
5668
|
function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
5668
5669
|
let {
|
|
5669
5670
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
@@ -5771,9 +5772,10 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
5771
5772
|
return ((_matching_filter2 = matching_filter()) === null || _matching_filter2 === void 0 ? void 0 : _matching_filter2.op) !== "inrange";
|
|
5772
5773
|
},
|
|
5773
5774
|
get fallback() {
|
|
5775
|
+
var _matching_filter3, _matching_filter3$met;
|
|
5774
5776
|
number_of_rendered_selected_filters_items_[1](prev => prev + 1);
|
|
5775
5777
|
$3hooq$solidjs.onCleanup(() => number_of_rendered_selected_filters_items_[1](prev => prev - 1));
|
|
5776
|
-
return $3hooq$solidjsweb.ssr($c5842bdb10e57229$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), $3hooq$solidjsweb.escape(price_formatting_().pre_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $f38f2e64ebe2da86$export$a71e92cfbb498adc), {
|
|
5778
|
+
return $3hooq$solidjsweb.ssr($c5842bdb10e57229$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey() + $3hooq$solidjsweb.ssrAttribute("data-group-title", $3hooq$solidjsweb.escape((_matching_filter3 = matching_filter()) === null || _matching_filter3 === void 0 ? void 0 : (_matching_filter3$met = _matching_filter3.meta) === null || _matching_filter3$met === void 0 ? void 0 : _matching_filter3$met.group_title, true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), $3hooq$solidjsweb.escape(price_formatting_().pre_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $f38f2e64ebe2da86$export$a71e92cfbb498adc), {
|
|
5777
5779
|
get price_() {
|
|
5778
5780
|
return filter().data[0];
|
|
5779
5781
|
},
|
|
@@ -5839,10 +5841,10 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
5839
5841
|
return name() && !hide_us();
|
|
5840
5842
|
},
|
|
5841
5843
|
get children() {
|
|
5842
|
-
return (() => {
|
|
5844
|
+
return ((_matching_filter4, _matching_filter4$met) => {
|
|
5843
5845
|
number_of_rendered_selected_filters_items_[1](prev => prev + 1);
|
|
5844
5846
|
$3hooq$solidjs.onCleanup(() => number_of_rendered_selected_filters_items_[1](prev => prev - 1));
|
|
5845
|
-
return $3hooq$solidjsweb.ssr($c5842bdb10e57229$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), $3hooq$solidjsweb.escape(name()));
|
|
5847
|
+
return $3hooq$solidjsweb.ssr($c5842bdb10e57229$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("data-group-title", $3hooq$solidjsweb.escape((_matching_filter4 = matching_filter()) === null || _matching_filter4 === void 0 ? void 0 : (_matching_filter4$met = _matching_filter4.meta) === null || _matching_filter4$met === void 0 ? void 0 : _matching_filter4$met.group_title, true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), $3hooq$solidjsweb.escape(name()));
|
|
5846
5848
|
})();
|
|
5847
5849
|
}
|
|
5848
5850
|
});
|
|
@@ -9929,7 +9931,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
|
|
|
9929
9931
|
query_base_: query_base_,
|
|
9930
9932
|
depict_api_: depict_api_,
|
|
9931
9933
|
is_loading_: is_loading_,
|
|
9932
|
-
content_blocks_: content_blocks_
|
|
9934
|
+
content_blocks_: content_blocks_,
|
|
9935
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
9933
9936
|
} = _ref;
|
|
9934
9937
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
9935
9938
|
const [get_extra_displays, set_extra_displays_] = $3hooq$solidjs.createSignal([], {
|
|
@@ -9956,6 +9959,7 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
|
|
|
9956
9959
|
is_loading_: is_loading_,
|
|
9957
9960
|
get_extra_displays: get_extra_displays
|
|
9958
9961
|
});
|
|
9962
|
+
$3hooq$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
9959
9963
|
$19438fea513c9d01$export$5e4aed86c12acdd9({
|
|
9960
9964
|
percentage_in_view_: percentage_in_view_,
|
|
9961
9965
|
set_extra_displays_: set_extra_displays_,
|
|
@@ -10101,7 +10105,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
10101
10105
|
layout_options_: layout_options_,
|
|
10102
10106
|
id_currently_querying_for_: id_currently_querying_for_,
|
|
10103
10107
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
10104
|
-
ConfiguredScrollStatus_: ConfiguredScrollStatus_
|
|
10108
|
+
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
10109
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
10105
10110
|
} = _ref;
|
|
10106
10111
|
// The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
|
|
10107
10112
|
const is_loading_ = $3hooq$solidjs.createMemo(() => plp_results_.loading || query_base_.loading);
|
|
@@ -10232,7 +10237,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
10232
10237
|
query_base_: query_base_,
|
|
10233
10238
|
depict_api_: depict_api_,
|
|
10234
10239
|
is_loading_: is_loading_,
|
|
10235
|
-
content_blocks_: content_blocks_
|
|
10240
|
+
content_blocks_: content_blocks_,
|
|
10241
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
10236
10242
|
});
|
|
10237
10243
|
$3hooq$solidjs.onCleanup(() => suspense_contents = undefined);
|
|
10238
10244
|
return suspense_contents;
|
|
@@ -11605,6 +11611,17 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
|
|
|
11605
11611
|
};
|
|
11606
11612
|
});
|
|
11607
11613
|
}
|
|
11614
|
+
function $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
|
|
11615
|
+
let [allProductsLoaded] = _ref;
|
|
11616
|
+
return $3hooq$solidjs.createMemo(() => {
|
|
11617
|
+
var _plp_products_;
|
|
11618
|
+
const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
|
|
11619
|
+
const loadedAll = allProductsLoaded();
|
|
11620
|
+
if (!backendSays || !loadedAll) return backendSays;
|
|
11621
|
+
// People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
|
|
11622
|
+
return currentlyLoadedDisplays();
|
|
11623
|
+
});
|
|
11624
|
+
}
|
|
11608
11625
|
var $739c927cbecd26b0$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
11609
11626
|
$739c927cbecd26b0$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
11610
11627
|
function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
@@ -11646,6 +11663,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11646
11663
|
} = _ref;
|
|
11647
11664
|
const [get_sorting] = current_sorting_;
|
|
11648
11665
|
const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
|
|
11666
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
|
|
11649
11667
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
11650
11668
|
const number_of_rendered_selected_filters_items_ = $3hooq$solidjs.createSignal(0);
|
|
11651
11669
|
const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
|
|
@@ -11724,24 +11742,21 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11724
11742
|
const SafeSearchField = $3hooq$depictaiutilishared.catchify((0, $29e5dbeb69da7a36$export$b94867ecbd698f21));
|
|
11725
11743
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
|
|
11726
11744
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
|
|
11727
|
-
const
|
|
11728
|
-
var _search_results_3;
|
|
11729
|
-
return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
|
|
11730
|
-
});
|
|
11745
|
+
const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
|
|
11731
11746
|
const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
|
|
11732
|
-
number_:
|
|
11747
|
+
number_: countOfProductsForUI,
|
|
11733
11748
|
i18n_: i18n_
|
|
11734
11749
|
});
|
|
11735
11750
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
|
|
11736
11751
|
const no_results_text_ = $3hooq$solidjs.createMemo(() => {
|
|
11737
|
-
var
|
|
11738
|
-
return ((
|
|
11752
|
+
var _search_results_3, _search_results_3$con;
|
|
11753
|
+
return ((_search_results_3 = search_results_()) !== null && _search_results_3 !== void 0 && (_search_results_3$con = _search_results_3.content_search_links) !== null && _search_results_3$con !== void 0 && _search_results_3$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
|
|
11739
11754
|
});
|
|
11740
11755
|
const results_for = $3hooq$solidjsweb.createComponent((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), $3hooq$solidjsweb.mergeProps({
|
|
11741
11756
|
get type() {
|
|
11742
11757
|
return (0, $9870a8a48ee126af$export$2452208c79fe93ea).products;
|
|
11743
11758
|
},
|
|
11744
|
-
number_of_results_:
|
|
11759
|
+
number_of_results_: countOfProductsForUI
|
|
11745
11760
|
}, {
|
|
11746
11761
|
get_search_query_: get_search_query_,
|
|
11747
11762
|
i18n_: i18n_,
|
|
@@ -11967,6 +11982,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
11967
11982
|
sort_or_filter_open_: sort_or_filter_open_,
|
|
11968
11983
|
id_currently_querying_for_: get_search_query_,
|
|
11969
11984
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
11985
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
11970
11986
|
no_results_options_: {
|
|
11971
11987
|
selected_filters_: selected_filters_,
|
|
11972
11988
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
@@ -12007,10 +12023,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
12007
12023
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
12008
12024
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
12009
12025
|
i18n_: i18n_,
|
|
12010
|
-
number_of_results_:
|
|
12011
|
-
var _search_results_5;
|
|
12012
|
-
return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
|
|
12013
|
-
})
|
|
12026
|
+
number_of_results_: countOfProductsForUI
|
|
12014
12027
|
});
|
|
12015
12028
|
}
|
|
12016
12029
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
@@ -13520,6 +13533,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
13520
13533
|
const number_of_rendered_selected_filters_items_ = $3hooq$solidjs.createSignal(0);
|
|
13521
13534
|
const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
|
|
13522
13535
|
const last_result_in_viewport_ = $3hooq$solidjs.createSignal();
|
|
13536
|
+
const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
|
|
13537
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
|
|
13523
13538
|
const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $3hooq$solidjs.createSignal(false);
|
|
13524
13539
|
const products_query_base_ = $e4bc31358c414b18$export$210f130a61ac1e8d(() => {
|
|
13525
13540
|
const sort_obj = get_sorting() && {
|
|
@@ -13566,6 +13581,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
13566
13581
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
13567
13582
|
const [plp_meta] = $3hooq$solidjs.createResource(meta_query_base, $3hooq$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
|
|
13568
13583
|
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
13584
|
+
const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
13569
13585
|
const available_sortings_ = $3hooq$solidjs.createMemo(() => {
|
|
13570
13586
|
var _plp_products_, _plp_products_$sorts;
|
|
13571
13587
|
return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
|
|
@@ -13592,10 +13608,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
13592
13608
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
|
|
13593
13609
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
|
|
13594
13610
|
const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
|
|
13595
|
-
number_:
|
|
13596
|
-
var _plp_products_3;
|
|
13597
|
-
return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
|
|
13598
|
-
}),
|
|
13611
|
+
number_: countOfProductsForUI,
|
|
13599
13612
|
i18n_: i18n_
|
|
13600
13613
|
});
|
|
13601
13614
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
|
|
@@ -13618,10 +13631,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
13618
13631
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
13619
13632
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
13620
13633
|
i18n_: i18n_,
|
|
13621
|
-
number_of_results_:
|
|
13622
|
-
var _plp_products_4;
|
|
13623
|
-
return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
|
|
13624
|
-
}),
|
|
13634
|
+
number_of_results_: countOfProductsForUI,
|
|
13625
13635
|
...extraProps
|
|
13626
13636
|
});
|
|
13627
13637
|
}
|
|
@@ -13640,8 +13650,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
13640
13650
|
}
|
|
13641
13651
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
13642
13652
|
get when() {
|
|
13643
|
-
|
|
13644
|
-
return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
|
|
13653
|
+
return countOfProductsForUI() === 1;
|
|
13645
13654
|
},
|
|
13646
13655
|
get fallback() {
|
|
13647
13656
|
return i18n_.products_();
|
|
@@ -13815,6 +13824,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
13815
13824
|
content_blocks_by_row_: contentBlocksByRow,
|
|
13816
13825
|
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
13817
13826
|
id_currently_querying_for_: id_to_query_for_,
|
|
13827
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
13828
|
+
all_products_loaded_: all_products_loaded_,
|
|
13818
13829
|
no_results_options_: {
|
|
13819
13830
|
selected_filters_: selected_filters_,
|
|
13820
13831
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.5";
|
|
15
15
|
/**
|
|
16
16
|
* Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
17
17
|
*/
|
|
@@ -1506,7 +1506,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1506
1506
|
* Open the modal with support for alignment.
|
|
1507
1507
|
* @returns {void}
|
|
1508
1508
|
*/
|
|
1509
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1509
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1510
1510
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1511
1511
|
export interface PageReplacer {
|
|
1512
1512
|
readonly render_: () => Node_Array;
|
|
@@ -1585,5 +1585,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1585
1585
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1586
1586
|
layout?: PossibleLayout;
|
|
1587
1587
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1588
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1588
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1589
1589
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.5";
|
|
14
14
|
function $4be619ec2cd7bba3$export$54c6d6ff54e72743(whatToWatch) {
|
|
15
15
|
const [width, setWidth] = $b8hua$createSignal(0);
|
|
16
16
|
const [height, setHeight] = $b8hua$createSignal(0);
|
|
@@ -2660,10 +2660,10 @@ function $43fbdca0f726a34b$export$92f2da32c6e7e7ee(_ref) {
|
|
|
2660
2660
|
i18n_: i18n_
|
|
2661
2661
|
} = _ref;
|
|
2662
2662
|
return $b8hua$createMemo(() => {
|
|
2663
|
-
const
|
|
2664
|
-
if (isNaN(
|
|
2663
|
+
const numberToFormat = number_();
|
|
2664
|
+
if (isNaN(numberToFormat)) return "";
|
|
2665
2665
|
const price_formatting = i18n_.price_formatting_();
|
|
2666
|
-
return $b8hua$standard_price_format(
|
|
2666
|
+
return $b8hua$standard_price_format(numberToFormat, 0,
|
|
2667
2667
|
// we never want places after comma here it looks weird as hell
|
|
2668
2668
|
price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
2669
2669
|
});
|
|
@@ -4619,9 +4619,10 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
4619
4619
|
});
|
|
4620
4620
|
// total number of results = content results + product results + category suggestions
|
|
4621
4621
|
const totalNumberResults = $b8hua$createMemo(() => {
|
|
4622
|
-
var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
|
|
4622
|
+
var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
|
|
4623
4623
|
const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
|
|
4624
|
-
|
|
4624
|
+
// Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
|
|
4625
|
+
const hits = results !== null && results !== void 0 && results.cursor ? results === null || results === void 0 ? void 0 : results.n_hits : results === null || results === void 0 ? void 0 : (_results$displays = results.displays) === null || _results$displays === void 0 ? void 0 : _results$displays.length;
|
|
4625
4626
|
const content_results = content_search_enabled_() && (results === null || results === void 0 ? void 0 : (_results$content_sear = results.content_search_links) === null || _results$content_sear === void 0 ? void 0 : _results$content_sear.length) || 0;
|
|
4626
4627
|
const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
|
|
4627
4628
|
return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
|
|
@@ -5559,7 +5560,7 @@ function $af5d8e0b7d97a7f6$export$325f75597868c4f0(stuff) {
|
|
|
5559
5560
|
var $4711a82d08d2021b$var$_tmpl$ = ["<button", ' class="clear-all-filters minor">', "</button>"],
|
|
5560
5561
|
$4711a82d08d2021b$var$_tmpl$2 = ["<div", ' class="inner"><span class="title"><!--$-->', "<!--/-->: </span><!--$-->", "<!--/--></div>"],
|
|
5561
5562
|
$4711a82d08d2021b$var$_tmpl$3 = ["<button", ' class="clear-filter major"><!--$-->', "<!--/--><span><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--> \u2013 <!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></button>"],
|
|
5562
|
-
$4711a82d08d2021b$var$_tmpl$4 = ["<button", ' class="clear-filter major"
|
|
5563
|
+
$4711a82d08d2021b$var$_tmpl$4 = ["<button", ' class="clear-filter major"', "><!--$-->", "<!--/--><span>", "</span></button>"];
|
|
5563
5564
|
function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
5564
5565
|
let {
|
|
5565
5566
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
@@ -5667,9 +5668,10 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
5667
5668
|
return ((_matching_filter2 = matching_filter()) === null || _matching_filter2 === void 0 ? void 0 : _matching_filter2.op) !== "inrange";
|
|
5668
5669
|
},
|
|
5669
5670
|
get fallback() {
|
|
5671
|
+
var _matching_filter3, _matching_filter3$met;
|
|
5670
5672
|
number_of_rendered_selected_filters_items_[1](prev => prev + 1);
|
|
5671
5673
|
$b8hua$onCleanup(() => number_of_rendered_selected_filters_items_[1](prev => prev - 1));
|
|
5672
|
-
return $b8hua$ssr($4711a82d08d2021b$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$escape(price_formatting_().pre_), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
|
|
5674
|
+
return $b8hua$ssr($4711a82d08d2021b$var$_tmpl$3, $b8hua$ssrHydrationKey() + $b8hua$ssrAttribute("data-group-title", $b8hua$escape((_matching_filter3 = matching_filter()) === null || _matching_filter3 === void 0 ? void 0 : (_matching_filter3$met = _matching_filter3.meta) === null || _matching_filter3$met === void 0 ? void 0 : _matching_filter3$met.group_title, true), false), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$escape(price_formatting_().pre_), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
|
|
5673
5675
|
get price_() {
|
|
5674
5676
|
return filter().data[0];
|
|
5675
5677
|
},
|
|
@@ -5735,10 +5737,10 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
5735
5737
|
return name() && !hide_us();
|
|
5736
5738
|
},
|
|
5737
5739
|
get children() {
|
|
5738
|
-
return (() => {
|
|
5740
|
+
return ((_matching_filter4, _matching_filter4$met) => {
|
|
5739
5741
|
number_of_rendered_selected_filters_items_[1](prev => prev + 1);
|
|
5740
5742
|
$b8hua$onCleanup(() => number_of_rendered_selected_filters_items_[1](prev => prev - 1));
|
|
5741
|
-
return $b8hua$ssr($4711a82d08d2021b$var$_tmpl$4, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$escape(name()));
|
|
5743
|
+
return $b8hua$ssr($4711a82d08d2021b$var$_tmpl$4, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("data-group-title", $b8hua$escape((_matching_filter4 = matching_filter()) === null || _matching_filter4 === void 0 ? void 0 : (_matching_filter4$met = _matching_filter4.meta) === null || _matching_filter4$met === void 0 ? void 0 : _matching_filter4$met.group_title, true), false), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$escape(name()));
|
|
5742
5744
|
})();
|
|
5743
5745
|
}
|
|
5744
5746
|
});
|
|
@@ -9825,7 +9827,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
9825
9827
|
query_base_: query_base_,
|
|
9826
9828
|
depict_api_: depict_api_,
|
|
9827
9829
|
is_loading_: is_loading_,
|
|
9828
|
-
content_blocks_: content_blocks_
|
|
9830
|
+
content_blocks_: content_blocks_,
|
|
9831
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
9829
9832
|
} = _ref;
|
|
9830
9833
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
9831
9834
|
const [get_extra_displays, set_extra_displays_] = $b8hua$createSignal([], {
|
|
@@ -9852,6 +9855,7 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
9852
9855
|
is_loading_: is_loading_,
|
|
9853
9856
|
get_extra_displays: get_extra_displays
|
|
9854
9857
|
});
|
|
9858
|
+
$b8hua$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
9855
9859
|
$6d2962bc9370f884$export$5e4aed86c12acdd9({
|
|
9856
9860
|
percentage_in_view_: percentage_in_view_,
|
|
9857
9861
|
set_extra_displays_: set_extra_displays_,
|
|
@@ -9997,7 +10001,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
9997
10001
|
layout_options_: layout_options_,
|
|
9998
10002
|
id_currently_querying_for_: id_currently_querying_for_,
|
|
9999
10003
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
10000
|
-
ConfiguredScrollStatus_: ConfiguredScrollStatus_
|
|
10004
|
+
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
10005
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
10001
10006
|
} = _ref;
|
|
10002
10007
|
// The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
|
|
10003
10008
|
const is_loading_ = $b8hua$createMemo(() => plp_results_.loading || query_base_.loading);
|
|
@@ -10128,7 +10133,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
10128
10133
|
query_base_: query_base_,
|
|
10129
10134
|
depict_api_: depict_api_,
|
|
10130
10135
|
is_loading_: is_loading_,
|
|
10131
|
-
content_blocks_: content_blocks_
|
|
10136
|
+
content_blocks_: content_blocks_,
|
|
10137
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
10132
10138
|
});
|
|
10133
10139
|
$b8hua$onCleanup(() => suspense_contents = undefined);
|
|
10134
10140
|
return suspense_contents;
|
|
@@ -11501,6 +11507,17 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
11501
11507
|
};
|
|
11502
11508
|
});
|
|
11503
11509
|
}
|
|
11510
|
+
function $0728458b46ee9d32$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
|
|
11511
|
+
let [allProductsLoaded] = _ref;
|
|
11512
|
+
return $b8hua$createMemo(() => {
|
|
11513
|
+
var _plp_products_;
|
|
11514
|
+
const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
|
|
11515
|
+
const loadedAll = allProductsLoaded();
|
|
11516
|
+
if (!backendSays || !loadedAll) return backendSays;
|
|
11517
|
+
// People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
|
|
11518
|
+
return currentlyLoadedDisplays();
|
|
11519
|
+
});
|
|
11520
|
+
}
|
|
11504
11521
|
var $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
11505
11522
|
$da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
11506
11523
|
function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
@@ -11542,6 +11559,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11542
11559
|
} = _ref;
|
|
11543
11560
|
const [get_sorting] = current_sorting_;
|
|
11544
11561
|
const all_products_loaded_ = $b8hua$createSignal(false);
|
|
11562
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $b8hua$createSignal(0);
|
|
11545
11563
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
11546
11564
|
const number_of_rendered_selected_filters_items_ = $b8hua$createSignal(0);
|
|
11547
11565
|
const first_result_in_viewport_ = $b8hua$createSignal();
|
|
@@ -11620,24 +11638,21 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11620
11638
|
const SafeSearchField = $b8hua$catchify((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
11621
11639
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $b8hua$createSignal(false);
|
|
11622
11640
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $b8hua$createSignal();
|
|
11623
|
-
const
|
|
11624
|
-
var _search_results_3;
|
|
11625
|
-
return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
|
|
11626
|
-
});
|
|
11641
|
+
const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
|
|
11627
11642
|
const formatted_number_of_results_ = $43fbdca0f726a34b$export$92f2da32c6e7e7ee({
|
|
11628
|
-
number_:
|
|
11643
|
+
number_: countOfProductsForUI,
|
|
11629
11644
|
i18n_: i18n_
|
|
11630
11645
|
});
|
|
11631
11646
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $b8hua$createSignal();
|
|
11632
11647
|
const no_results_text_ = $b8hua$createMemo(() => {
|
|
11633
|
-
var
|
|
11634
|
-
return ((
|
|
11648
|
+
var _search_results_3, _search_results_3$con;
|
|
11649
|
+
return ((_search_results_3 = search_results_()) !== null && _search_results_3 !== void 0 && (_search_results_3$con = _search_results_3.content_search_links) !== null && _search_results_3$con !== void 0 && _search_results_3$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
|
|
11635
11650
|
});
|
|
11636
11651
|
const results_for = $b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $b8hua$mergeProps({
|
|
11637
11652
|
get type() {
|
|
11638
11653
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
|
|
11639
11654
|
},
|
|
11640
|
-
number_of_results_:
|
|
11655
|
+
number_of_results_: countOfProductsForUI
|
|
11641
11656
|
}, {
|
|
11642
11657
|
get_search_query_: get_search_query_,
|
|
11643
11658
|
i18n_: i18n_,
|
|
@@ -11863,6 +11878,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11863
11878
|
sort_or_filter_open_: sort_or_filter_open_,
|
|
11864
11879
|
id_currently_querying_for_: get_search_query_,
|
|
11865
11880
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
11881
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
11866
11882
|
no_results_options_: {
|
|
11867
11883
|
selected_filters_: selected_filters_,
|
|
11868
11884
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
@@ -11903,10 +11919,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11903
11919
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
11904
11920
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
11905
11921
|
i18n_: i18n_,
|
|
11906
|
-
number_of_results_:
|
|
11907
|
-
var _search_results_5;
|
|
11908
|
-
return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
|
|
11909
|
-
})
|
|
11922
|
+
number_of_results_: countOfProductsForUI
|
|
11910
11923
|
});
|
|
11911
11924
|
}
|
|
11912
11925
|
})), $b8hua$escape($b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
@@ -13416,6 +13429,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
13416
13429
|
const number_of_rendered_selected_filters_items_ = $b8hua$createSignal(0);
|
|
13417
13430
|
const first_result_in_viewport_ = $b8hua$createSignal();
|
|
13418
13431
|
const last_result_in_viewport_ = $b8hua$createSignal();
|
|
13432
|
+
const all_products_loaded_ = $b8hua$createSignal(false);
|
|
13433
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $b8hua$createSignal(0);
|
|
13419
13434
|
const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $b8hua$createSignal(false);
|
|
13420
13435
|
const products_query_base_ = $ec225bf1f1627ea8$export$210f130a61ac1e8d(() => {
|
|
13421
13436
|
const sort_obj = get_sorting() && {
|
|
@@ -13462,6 +13477,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
13462
13477
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
13463
13478
|
const [plp_meta] = $b8hua$createResource(meta_query_base, $b8hua$catchify1(query => depict_api_.get_listing(query)));
|
|
13464
13479
|
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
13480
|
+
const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
13465
13481
|
const available_sortings_ = $b8hua$createMemo(() => {
|
|
13466
13482
|
var _plp_products_, _plp_products_$sorts;
|
|
13467
13483
|
return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
|
|
@@ -13488,10 +13504,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
13488
13504
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $b8hua$createSignal(false);
|
|
13489
13505
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $b8hua$createSignal();
|
|
13490
13506
|
const formatted_number_of_results_ = $43fbdca0f726a34b$export$92f2da32c6e7e7ee({
|
|
13491
|
-
number_:
|
|
13492
|
-
var _plp_products_3;
|
|
13493
|
-
return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
|
|
13494
|
-
}),
|
|
13507
|
+
number_: countOfProductsForUI,
|
|
13495
13508
|
i18n_: i18n_
|
|
13496
13509
|
});
|
|
13497
13510
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $b8hua$createSignal();
|
|
@@ -13514,10 +13527,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
13514
13527
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
13515
13528
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
13516
13529
|
i18n_: i18n_,
|
|
13517
|
-
number_of_results_:
|
|
13518
|
-
var _plp_products_4;
|
|
13519
|
-
return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
|
|
13520
|
-
}),
|
|
13530
|
+
number_of_results_: countOfProductsForUI,
|
|
13521
13531
|
...extraProps
|
|
13522
13532
|
});
|
|
13523
13533
|
}
|
|
@@ -13536,8 +13546,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
13536
13546
|
}
|
|
13537
13547
|
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
13538
13548
|
get when() {
|
|
13539
|
-
|
|
13540
|
-
return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
|
|
13549
|
+
return countOfProductsForUI() === 1;
|
|
13541
13550
|
},
|
|
13542
13551
|
get fallback() {
|
|
13543
13552
|
return i18n_.products_();
|
|
@@ -13711,6 +13720,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
13711
13720
|
content_blocks_by_row_: contentBlocksByRow,
|
|
13712
13721
|
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
13713
13722
|
id_currently_querying_for_: id_to_query_for_,
|
|
13723
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
13724
|
+
all_products_loaded_: all_products_loaded_,
|
|
13714
13725
|
no_results_options_: {
|
|
13715
13726
|
selected_filters_: selected_filters_,
|
|
13716
13727
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|