@depict-ai/ui 4.8.4 → 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 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.4";
117
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.5";
118
118
  function $054b1113e4897051$export$54c6d6ff54e72743(whatToWatch) {
119
119
  const [width, setWidth] = $52FdA$solidjs.createSignal(0);
120
120
  const [height, setHeight] = $52FdA$solidjs.createSignal(0);
@@ -3257,10 +3257,10 @@ function $068bde7fa83ac02c$export$92f2da32c6e7e7ee(_ref) {
3257
3257
  i18n_: i18n_
3258
3258
  } = _ref;
3259
3259
  return $52FdA$solidjs.createMemo(() => {
3260
- const n_hits = number_();
3261
- if (isNaN(n_hits)) return "";
3260
+ const numberToFormat = number_();
3261
+ if (isNaN(numberToFormat)) return "";
3262
3262
  const price_formatting = i18n_.price_formatting_();
3263
- return $52FdA$depictaiutilishared.standard_price_format(n_hits, 0,
3263
+ return $52FdA$depictaiutilishared.standard_price_format(numberToFormat, 0,
3264
3264
  // we never want places after comma here it looks weird as hell
3265
3265
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
3266
3266
  });
@@ -5789,9 +5789,10 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
5789
5789
  });
5790
5790
  // total number of results = content results + product results + category suggestions
5791
5791
  const totalNumberResults = $52FdA$solidjs.createMemo(() => {
5792
- var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
5792
+ var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
5793
5793
  const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
5794
- const hits = results === null || results === void 0 ? void 0 : results.n_hits;
5794
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
5795
+ 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;
5795
5796
  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;
5796
5797
  const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
5797
5798
  return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
@@ -12027,7 +12028,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
12027
12028
  query_base_: query_base_,
12028
12029
  depict_api_: depict_api_,
12029
12030
  is_loading_: is_loading_,
12030
- content_blocks_: content_blocks_
12031
+ content_blocks_: content_blocks_,
12032
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
12031
12033
  } = _ref;
12032
12034
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
12033
12035
  const [get_extra_displays, set_extra_displays_] = $52FdA$solidjs.createSignal([], {
@@ -12054,6 +12056,7 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
12054
12056
  is_loading_: is_loading_,
12055
12057
  get_extra_displays: get_extra_displays
12056
12058
  });
12059
+ $52FdA$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
12057
12060
  $19438fea513c9d01$export$5e4aed86c12acdd9({
12058
12061
  percentage_in_view_: percentage_in_view_,
12059
12062
  set_extra_displays_: set_extra_displays_,
@@ -12114,7 +12117,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
12114
12117
  layout_options_: layout_options_,
12115
12118
  id_currently_querying_for_: id_currently_querying_for_,
12116
12119
  content_blocks_by_row_: content_blocks_by_row_,
12117
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
12120
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
12121
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
12118
12122
  } = _ref;
12119
12123
  // 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
12120
12124
  const is_loading_ = $52FdA$solidjs.createMemo(() => plp_results_.loading || query_base_.loading);
@@ -12251,7 +12255,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
12251
12255
  query_base_: query_base_,
12252
12256
  depict_api_: depict_api_,
12253
12257
  is_loading_: is_loading_,
12254
- content_blocks_: content_blocks_
12258
+ content_blocks_: content_blocks_,
12259
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
12255
12260
  });
12256
12261
  $52FdA$solidjs.onCleanup(() => suspense_contents = undefined);
12257
12262
  return suspense_contents;
@@ -14113,6 +14118,17 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
14113
14118
  };
14114
14119
  });
14115
14120
  }
14121
+ function $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
14122
+ let [allProductsLoaded] = _ref;
14123
+ return $52FdA$solidjs.createMemo(() => {
14124
+ var _plp_products_;
14125
+ const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
14126
+ const loadedAll = allProductsLoaded();
14127
+ if (!backendSays || !loadedAll) return backendSays;
14128
+ // 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.
14129
+ return currentlyLoadedDisplays();
14130
+ });
14131
+ }
14116
14132
  var $739c927cbecd26b0$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
14117
14133
  $739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
14118
14134
  function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
@@ -14154,6 +14170,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
14154
14170
  } = _ref;
14155
14171
  const [get_sorting] = current_sorting_;
14156
14172
  const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
14173
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $52FdA$solidjs.createSignal(0);
14157
14174
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
14158
14175
  const number_of_rendered_selected_filters_items_ = $52FdA$solidjs.createSignal(0);
14159
14176
  const first_result_in_viewport_ = $52FdA$solidjs.createSignal();
@@ -14232,24 +14249,21 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
14232
14249
  const SafeSearchField = $52FdA$depictaiutilishared.catchify((0, $29e5dbeb69da7a36$export$b94867ecbd698f21));
14233
14250
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $52FdA$solidjs.createSignal(false);
14234
14251
  const [desktop_filter_elements_, set_desktop_filter_elements] = $52FdA$solidjs.createSignal();
14235
- const n_hits = $52FdA$solidjs.createMemo(() => {
14236
- var _search_results_3;
14237
- return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
14238
- });
14252
+ const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
14239
14253
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
14240
- number_: n_hits,
14254
+ number_: countOfProductsForUI,
14241
14255
  i18n_: i18n_
14242
14256
  });
14243
14257
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $52FdA$solidjs.createSignal();
14244
14258
  const no_results_text_ = $52FdA$solidjs.createMemo(() => {
14245
- var _search_results_4, _search_results_4$con;
14246
- return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
14259
+ var _search_results_3, _search_results_3$con;
14260
+ 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_)();
14247
14261
  });
14248
14262
  const results_for = $52FdA$solidjsweb.createComponent((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), $52FdA$solidjsweb.mergeProps({
14249
14263
  get type() {
14250
14264
  return (0, $9870a8a48ee126af$export$2452208c79fe93ea).products;
14251
14265
  },
14252
- number_of_results_: n_hits
14266
+ number_of_results_: countOfProductsForUI
14253
14267
  }, {
14254
14268
  get_search_query_: get_search_query_,
14255
14269
  i18n_: i18n_,
@@ -14510,6 +14524,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
14510
14524
  sort_or_filter_open_: sort_or_filter_open_,
14511
14525
  id_currently_querying_for_: get_search_query_,
14512
14526
  content_blocks_by_row_: content_blocks_by_row_,
14527
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
14513
14528
  no_results_options_: {
14514
14529
  selected_filters_: selected_filters_,
14515
14530
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -14552,10 +14567,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
14552
14567
  last_result_in_viewport_: last_result_in_viewport_,
14553
14568
  formatted_number_of_results_: formatted_number_of_results_,
14554
14569
  i18n_: i18n_,
14555
- number_of_results_: $52FdA$solidjs.createMemo(() => {
14556
- var _search_results_5;
14557
- return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
14558
- })
14570
+ number_of_results_: countOfProductsForUI
14559
14571
  });
14560
14572
  }
14561
14573
  }), _el$23, _co$10);
@@ -16175,6 +16187,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
16175
16187
  const number_of_rendered_selected_filters_items_ = $52FdA$solidjs.createSignal(0);
16176
16188
  const first_result_in_viewport_ = $52FdA$solidjs.createSignal();
16177
16189
  const last_result_in_viewport_ = $52FdA$solidjs.createSignal();
16190
+ const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
16191
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $52FdA$solidjs.createSignal(0);
16178
16192
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $52FdA$solidjs.createSignal(false);
16179
16193
  const products_query_base_ = $e4bc31358c414b18$export$210f130a61ac1e8d(() => {
16180
16194
  const sort_obj = get_sorting() && {
@@ -16221,6 +16235,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
16221
16235
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
16222
16236
  const [plp_meta] = $52FdA$solidjs.createResource(meta_query_base, $52FdA$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
16223
16237
  const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
16238
+ const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
16224
16239
  const available_sortings_ = $52FdA$solidjs.createMemo(() => {
16225
16240
  var _plp_products_, _plp_products_$sorts;
16226
16241
  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 => {
@@ -16247,10 +16262,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
16247
16262
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $52FdA$solidjs.createSignal(false);
16248
16263
  const [desktop_filter_elements_, set_desktop_filter_elements] = $52FdA$solidjs.createSignal();
16249
16264
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
16250
- number_: $52FdA$solidjs.createMemo(() => {
16251
- var _plp_products_3;
16252
- return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
16253
- }),
16265
+ number_: countOfProductsForUI,
16254
16266
  i18n_: i18n_
16255
16267
  });
16256
16268
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $52FdA$solidjs.createSignal();
@@ -16273,10 +16285,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
16273
16285
  last_result_in_viewport_: last_result_in_viewport_,
16274
16286
  formatted_number_of_results_: formatted_number_of_results_,
16275
16287
  i18n_: i18n_,
16276
- number_of_results_: $52FdA$solidjs.createMemo(() => {
16277
- var _plp_products_4;
16278
- return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
16279
- }),
16288
+ number_of_results_: countOfProductsForUI,
16280
16289
  ...extraProps
16281
16290
  });
16282
16291
  }
@@ -16303,8 +16312,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
16303
16312
  }), _el$4, _co$);
16304
16313
  $52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
16305
16314
  get when() {
16306
- var _plp_products_5;
16307
- return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
16315
+ return countOfProductsForUI() === 1;
16308
16316
  },
16309
16317
  get fallback() {
16310
16318
  return i18n_.products_();
@@ -16512,6 +16520,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
16512
16520
  content_blocks_by_row_: contentBlocksByRow,
16513
16521
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
16514
16522
  id_currently_querying_for_: id_to_query_for_,
16523
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
16524
+ all_products_loaded_: all_products_loaded_,
16515
16525
  no_results_options_: {
16516
16526
  selected_filters_: selected_filters_,
16517
16527
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
package/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.4";
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 unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
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/ES10/index.js CHANGED
@@ -10,7 +10,7 @@ import $8tj43$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.4";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.5";
14
14
  function $4be619ec2cd7bba3$export$54c6d6ff54e72743(whatToWatch) {
15
15
  const [width, setWidth] = $8tj43$createSignal(0);
16
16
  const [height, setHeight] = $8tj43$createSignal(0);
@@ -3153,10 +3153,10 @@ function $43fbdca0f726a34b$export$92f2da32c6e7e7ee(_ref) {
3153
3153
  i18n_: i18n_
3154
3154
  } = _ref;
3155
3155
  return $8tj43$createMemo(() => {
3156
- const n_hits = number_();
3157
- if (isNaN(n_hits)) return "";
3156
+ const numberToFormat = number_();
3157
+ if (isNaN(numberToFormat)) return "";
3158
3158
  const price_formatting = i18n_.price_formatting_();
3159
- return $8tj43$standard_price_format(n_hits, 0,
3159
+ return $8tj43$standard_price_format(numberToFormat, 0,
3160
3160
  // we never want places after comma here it looks weird as hell
3161
3161
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
3162
3162
  });
@@ -5685,9 +5685,10 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
5685
5685
  });
5686
5686
  // total number of results = content results + product results + category suggestions
5687
5687
  const totalNumberResults = $8tj43$createMemo(() => {
5688
- var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
5688
+ var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
5689
5689
  const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
5690
- const hits = results === null || results === void 0 ? void 0 : results.n_hits;
5690
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
5691
+ 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;
5691
5692
  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;
5692
5693
  const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
5693
5694
  return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
@@ -11923,7 +11924,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
11923
11924
  query_base_: query_base_,
11924
11925
  depict_api_: depict_api_,
11925
11926
  is_loading_: is_loading_,
11926
- content_blocks_: content_blocks_
11927
+ content_blocks_: content_blocks_,
11928
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11927
11929
  } = _ref;
11928
11930
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
11929
11931
  const [get_extra_displays, set_extra_displays_] = $8tj43$createSignal([], {
@@ -11950,6 +11952,7 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
11950
11952
  is_loading_: is_loading_,
11951
11953
  get_extra_displays: get_extra_displays
11952
11954
  });
11955
+ $8tj43$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
11953
11956
  $6d2962bc9370f884$export$5e4aed86c12acdd9({
11954
11957
  percentage_in_view_: percentage_in_view_,
11955
11958
  set_extra_displays_: set_extra_displays_,
@@ -12010,7 +12013,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
12010
12013
  layout_options_: layout_options_,
12011
12014
  id_currently_querying_for_: id_currently_querying_for_,
12012
12015
  content_blocks_by_row_: content_blocks_by_row_,
12013
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
12016
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
12017
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
12014
12018
  } = _ref;
12015
12019
  // 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
12016
12020
  const is_loading_ = $8tj43$createMemo(() => plp_results_.loading || query_base_.loading);
@@ -12147,7 +12151,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
12147
12151
  query_base_: query_base_,
12148
12152
  depict_api_: depict_api_,
12149
12153
  is_loading_: is_loading_,
12150
- content_blocks_: content_blocks_
12154
+ content_blocks_: content_blocks_,
12155
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
12151
12156
  });
12152
12157
  $8tj43$onCleanup(() => suspense_contents = undefined);
12153
12158
  return suspense_contents;
@@ -14009,6 +14014,17 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
14009
14014
  };
14010
14015
  });
14011
14016
  }
14017
+ function $0728458b46ee9d32$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
14018
+ let [allProductsLoaded] = _ref;
14019
+ return $8tj43$createMemo(() => {
14020
+ var _plp_products_;
14021
+ const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
14022
+ const loadedAll = allProductsLoaded();
14023
+ if (!backendSays || !loadedAll) return backendSays;
14024
+ // 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.
14025
+ return currentlyLoadedDisplays();
14026
+ });
14027
+ }
14012
14028
  var $da279c5a540c6846$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
14013
14029
  $da279c5a540c6846$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
14014
14030
  function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
@@ -14050,6 +14066,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
14050
14066
  } = _ref;
14051
14067
  const [get_sorting] = current_sorting_;
14052
14068
  const all_products_loaded_ = $8tj43$createSignal(false);
14069
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $8tj43$createSignal(0);
14053
14070
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
14054
14071
  const number_of_rendered_selected_filters_items_ = $8tj43$createSignal(0);
14055
14072
  const first_result_in_viewport_ = $8tj43$createSignal();
@@ -14128,24 +14145,21 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
14128
14145
  const SafeSearchField = $8tj43$catchify((0, $584c06c09cf4609d$export$b94867ecbd698f21));
14129
14146
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
14130
14147
  const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
14131
- const n_hits = $8tj43$createMemo(() => {
14132
- var _search_results_3;
14133
- return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
14134
- });
14148
+ const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
14135
14149
  const formatted_number_of_results_ = $43fbdca0f726a34b$export$92f2da32c6e7e7ee({
14136
- number_: n_hits,
14150
+ number_: countOfProductsForUI,
14137
14151
  i18n_: i18n_
14138
14152
  });
14139
14153
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $8tj43$createSignal();
14140
14154
  const no_results_text_ = $8tj43$createMemo(() => {
14141
- var _search_results_4, _search_results_4$con;
14142
- return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
14155
+ var _search_results_3, _search_results_3$con;
14156
+ 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_)();
14143
14157
  });
14144
14158
  const results_for = $8tj43$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $8tj43$mergeProps({
14145
14159
  get type() {
14146
14160
  return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
14147
14161
  },
14148
- number_of_results_: n_hits
14162
+ number_of_results_: countOfProductsForUI
14149
14163
  }, {
14150
14164
  get_search_query_: get_search_query_,
14151
14165
  i18n_: i18n_,
@@ -14406,6 +14420,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
14406
14420
  sort_or_filter_open_: sort_or_filter_open_,
14407
14421
  id_currently_querying_for_: get_search_query_,
14408
14422
  content_blocks_by_row_: content_blocks_by_row_,
14423
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
14409
14424
  no_results_options_: {
14410
14425
  selected_filters_: selected_filters_,
14411
14426
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -14448,10 +14463,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
14448
14463
  last_result_in_viewport_: last_result_in_viewport_,
14449
14464
  formatted_number_of_results_: formatted_number_of_results_,
14450
14465
  i18n_: i18n_,
14451
- number_of_results_: $8tj43$createMemo(() => {
14452
- var _search_results_5;
14453
- return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
14454
- })
14466
+ number_of_results_: countOfProductsForUI
14455
14467
  });
14456
14468
  }
14457
14469
  }), _el$23, _co$10);
@@ -16071,6 +16083,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
16071
16083
  const number_of_rendered_selected_filters_items_ = $8tj43$createSignal(0);
16072
16084
  const first_result_in_viewport_ = $8tj43$createSignal();
16073
16085
  const last_result_in_viewport_ = $8tj43$createSignal();
16086
+ const all_products_loaded_ = $8tj43$createSignal(false);
16087
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $8tj43$createSignal(0);
16074
16088
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $8tj43$createSignal(false);
16075
16089
  const products_query_base_ = $ec225bf1f1627ea8$export$210f130a61ac1e8d(() => {
16076
16090
  const sort_obj = get_sorting() && {
@@ -16117,6 +16131,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
16117
16131
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
16118
16132
  const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$catchify1(query => depict_api_.get_listing(query)));
16119
16133
  const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
16134
+ const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
16120
16135
  const available_sortings_ = $8tj43$createMemo(() => {
16121
16136
  var _plp_products_, _plp_products_$sorts;
16122
16137
  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 => {
@@ -16143,10 +16158,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
16143
16158
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
16144
16159
  const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
16145
16160
  const formatted_number_of_results_ = $43fbdca0f726a34b$export$92f2da32c6e7e7ee({
16146
- number_: $8tj43$createMemo(() => {
16147
- var _plp_products_3;
16148
- return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
16149
- }),
16161
+ number_: countOfProductsForUI,
16150
16162
  i18n_: i18n_
16151
16163
  });
16152
16164
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $8tj43$createSignal();
@@ -16169,10 +16181,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
16169
16181
  last_result_in_viewport_: last_result_in_viewport_,
16170
16182
  formatted_number_of_results_: formatted_number_of_results_,
16171
16183
  i18n_: i18n_,
16172
- number_of_results_: $8tj43$createMemo(() => {
16173
- var _plp_products_4;
16174
- return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
16175
- }),
16184
+ number_of_results_: countOfProductsForUI,
16176
16185
  ...extraProps
16177
16186
  });
16178
16187
  }
@@ -16199,8 +16208,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
16199
16208
  }), _el$4, _co$);
16200
16209
  $8tj43$insert(_el$, $8tj43$createComponent((0, $8tj43$Show), {
16201
16210
  get when() {
16202
- var _plp_products_5;
16203
- return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
16211
+ return countOfProductsForUI() === 1;
16204
16212
  },
16205
16213
  get fallback() {
16206
16214
  return i18n_.products_();
@@ -16408,6 +16416,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
16408
16416
  content_blocks_by_row_: contentBlocksByRow,
16409
16417
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
16410
16418
  id_currently_querying_for_: id_to_query_for_,
16419
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
16420
+ all_products_loaded_: all_products_loaded_,
16411
16421
  no_results_options_: {
16412
16422
  selected_filters_: selected_filters_,
16413
16423
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
package/latest/index.cjs CHANGED
@@ -108,7 +108,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
108
108
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
109
109
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
110
110
  /*! Depict.ai search and product listing SDK */
111
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.4";
111
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.5";
112
112
  function $128302ab61dab8f1$export$54c6d6ff54e72743(whatToWatch) {
113
113
  const [width, setWidth] = $gVhhF$solidjs.createSignal(0);
114
114
  const [height, setHeight] = $gVhhF$solidjs.createSignal(0);
@@ -3088,10 +3088,10 @@ function $0f400c3f7248d5f1$export$92f2da32c6e7e7ee({
3088
3088
  i18n_: i18n_
3089
3089
  }) {
3090
3090
  return $gVhhF$solidjs.createMemo(() => {
3091
- const n_hits = number_();
3092
- if (isNaN(n_hits)) return "";
3091
+ const numberToFormat = number_();
3092
+ if (isNaN(numberToFormat)) return "";
3093
3093
  const price_formatting = i18n_.price_formatting_();
3094
- return $gVhhF$depictaiutilishared.standard_price_format(n_hits, 0,
3094
+ return $gVhhF$depictaiutilishared.standard_price_format(numberToFormat, 0,
3095
3095
  // we never want places after comma here it looks weird as hell
3096
3096
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
3097
3097
  });
@@ -5518,7 +5518,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
5518
5518
  // total number of results = content results + product results + category suggestions
5519
5519
  const totalNumberResults = $gVhhF$solidjs.createMemo(() => {
5520
5520
  const results = get_modal_search_results_()?.();
5521
- const hits = results?.n_hits;
5521
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
5522
+ const hits = results?.cursor ? results?.n_hits : results?.displays?.length;
5522
5523
  const content_results = content_search_enabled_() && results?.content_search_links?.length || 0;
5523
5524
  const category_results = listing_suggestions_()?.length || 0;
5524
5525
  return (hits ?? 0) + content_results + category_results;
@@ -11323,7 +11324,8 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
11323
11324
  query_base_: query_base_,
11324
11325
  depict_api_: depict_api_,
11325
11326
  is_loading_: is_loading_,
11326
- content_blocks_: content_blocks_
11327
+ content_blocks_: content_blocks_,
11328
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11327
11329
  }) {
11328
11330
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
11329
11331
  const [get_extra_displays, set_extra_displays_] = $gVhhF$solidjs.createSignal([], {
@@ -11347,6 +11349,7 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
11347
11349
  is_loading_: is_loading_,
11348
11350
  get_extra_displays: get_extra_displays
11349
11351
  });
11352
+ $gVhhF$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
11350
11353
  $3f08fe2992a2a8ca$export$5e4aed86c12acdd9({
11351
11354
  percentage_in_view_: percentage_in_view_,
11352
11355
  set_extra_displays_: set_extra_displays_,
@@ -11402,7 +11405,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
11402
11405
  layout_options_: layout_options_,
11403
11406
  id_currently_querying_for_: id_currently_querying_for_,
11404
11407
  content_blocks_by_row_: content_blocks_by_row_,
11405
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
11408
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
11409
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11406
11410
  }) {
11407
11411
  // 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
11408
11412
  const is_loading_ = $gVhhF$solidjs.createMemo(() => plp_results_.loading || query_base_.loading);
@@ -11533,7 +11537,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
11533
11537
  query_base_: query_base_,
11534
11538
  depict_api_: depict_api_,
11535
11539
  is_loading_: is_loading_,
11536
- content_blocks_: content_blocks_
11540
+ content_blocks_: content_blocks_,
11541
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11537
11542
  });
11538
11543
  $gVhhF$solidjs.onCleanup(() => suspense_contents = undefined);
11539
11544
  return suspense_contents;
@@ -13300,6 +13305,15 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
13300
13305
  };
13301
13306
  });
13302
13307
  }
13308
+ function $13796d59ea8af231$export$a86bc18439445599(plp_products_, [allProductsLoaded], currentlyLoadedDisplays) {
13309
+ return $gVhhF$solidjs.createMemo(() => {
13310
+ const backendSays = plp_products_()?.n_hits;
13311
+ const loadedAll = allProductsLoaded();
13312
+ if (!backendSays || !loadedAll) return backendSays;
13313
+ // 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.
13314
+ return currentlyLoadedDisplays();
13315
+ });
13316
+ }
13303
13317
  var $f1d7cb69f839a526$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
13304
13318
  $f1d7cb69f839a526$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
13305
13319
  function $f1d7cb69f839a526$export$a54ec244c8863715({
@@ -13340,6 +13354,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
13340
13354
  }) {
13341
13355
  const [get_sorting] = current_sorting_;
13342
13356
  const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
13357
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $gVhhF$solidjs.createSignal(0);
13343
13358
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
13344
13359
  const number_of_rendered_selected_filters_items_ = $gVhhF$solidjs.createSignal(0);
13345
13360
  const first_result_in_viewport_ = $gVhhF$solidjs.createSignal();
@@ -13409,9 +13424,9 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
13409
13424
  const SafeSearchField = $gVhhF$depictaiutilishared.catchify((0, $66b8b9a9613c141d$export$b94867ecbd698f21));
13410
13425
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $gVhhF$solidjs.createSignal(false);
13411
13426
  const [desktop_filter_elements_, set_desktop_filter_elements] = $gVhhF$solidjs.createSignal();
13412
- const n_hits = $gVhhF$solidjs.createMemo(() => search_results_()?.n_hits);
13427
+ const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
13413
13428
  const formatted_number_of_results_ = $0f400c3f7248d5f1$export$92f2da32c6e7e7ee({
13414
- number_: n_hits,
13429
+ number_: countOfProductsForUI,
13415
13430
  i18n_: i18n_
13416
13431
  });
13417
13432
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $gVhhF$solidjs.createSignal();
@@ -13420,7 +13435,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
13420
13435
  get type() {
13421
13436
  return (0, $65a0c4b1c2eb5d0b$export$2452208c79fe93ea).products;
13422
13437
  },
13423
- number_of_results_: n_hits
13438
+ number_of_results_: countOfProductsForUI
13424
13439
  }, {
13425
13440
  get_search_query_: get_search_query_,
13426
13441
  i18n_: i18n_,
@@ -13674,6 +13689,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
13674
13689
  sort_or_filter_open_: sort_or_filter_open_,
13675
13690
  id_currently_querying_for_: get_search_query_,
13676
13691
  content_blocks_by_row_: content_blocks_by_row_,
13692
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
13677
13693
  no_results_options_: {
13678
13694
  selected_filters_: selected_filters_,
13679
13695
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -13716,7 +13732,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
13716
13732
  last_result_in_viewport_: last_result_in_viewport_,
13717
13733
  formatted_number_of_results_: formatted_number_of_results_,
13718
13734
  i18n_: i18n_,
13719
- number_of_results_: $gVhhF$solidjs.createMemo(() => search_results_()?.n_hits)
13735
+ number_of_results_: countOfProductsForUI
13720
13736
  });
13721
13737
  }
13722
13738
  }), _el$23, _co$10);
@@ -15118,6 +15134,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
15118
15134
  const number_of_rendered_selected_filters_items_ = $gVhhF$solidjs.createSignal(0);
15119
15135
  const first_result_in_viewport_ = $gVhhF$solidjs.createSignal();
15120
15136
  const last_result_in_viewport_ = $gVhhF$solidjs.createSignal();
15137
+ const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
15138
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $gVhhF$solidjs.createSignal(0);
15121
15139
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $gVhhF$solidjs.createSignal(false);
15122
15140
  const products_query_base_ = $8cd545330f2674dc$export$210f130a61ac1e8d(() => {
15123
15141
  const sort_obj = get_sorting() && {
@@ -15164,6 +15182,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
15164
15182
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
15165
15183
  const [plp_meta] = $gVhhF$solidjs.createResource(meta_query_base, $gVhhF$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
15166
15184
  const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
15185
+ const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
15167
15186
  const available_sortings_ = $gVhhF$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
15168
15187
  ...sort,
15169
15188
  order: sort.order ?? "desc"
@@ -15175,7 +15194,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
15175
15194
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $gVhhF$solidjs.createSignal(false);
15176
15195
  const [desktop_filter_elements_, set_desktop_filter_elements] = $gVhhF$solidjs.createSignal();
15177
15196
  const formatted_number_of_results_ = $0f400c3f7248d5f1$export$92f2da32c6e7e7ee({
15178
- number_: $gVhhF$solidjs.createMemo(() => plp_products_()?.n_hits),
15197
+ number_: countOfProductsForUI,
15179
15198
  i18n_: i18n_
15180
15199
  });
15181
15200
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $gVhhF$solidjs.createSignal();
@@ -15196,7 +15215,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
15196
15215
  last_result_in_viewport_: last_result_in_viewport_,
15197
15216
  formatted_number_of_results_: formatted_number_of_results_,
15198
15217
  i18n_: i18n_,
15199
- number_of_results_: $gVhhF$solidjs.createMemo(() => plp_products_()?.n_hits),
15218
+ number_of_results_: countOfProductsForUI,
15200
15219
  ...extraProps
15201
15220
  });
15202
15221
  }
@@ -15222,7 +15241,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
15222
15241
  }), _el$4, _co$);
15223
15242
  $gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
15224
15243
  get when() {
15225
- return plp_products_()?.n_hits === 1;
15244
+ return countOfProductsForUI() === 1;
15226
15245
  },
15227
15246
  get fallback() {
15228
15247
  return i18n_.products_();
@@ -15427,6 +15446,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
15427
15446
  content_blocks_by_row_: contentBlocksByRow,
15428
15447
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
15429
15448
  id_currently_querying_for_: id_to_query_for_,
15449
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
15450
+ all_products_loaded_: all_products_loaded_,
15430
15451
  no_results_options_: {
15431
15452
  selected_filters_: selected_filters_,
15432
15453
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,