@depict-ai/ui 4.10.30 → 4.10.32

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/latest/index.js CHANGED
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.30";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.32";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $9HbP8$createSignal(false);
13
13
  $9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
@@ -8037,6 +8037,14 @@ function $f916989c4b1be9f7$export$780a853d15174484({
8037
8037
  }
8038
8038
  }));
8039
8039
  }
8040
+
8041
+ /** Shopify Lite's storefront (theme-static depict-content-blocks.js) treats screens up to 990px wide as phones. */
8042
+ const $46de6aba0746da31$export$1e15d45642067bf0 = "(max-width: 990px)";
8043
+ function $46de6aba0746da31$export$894065271726d798(visibility, isPhone) {
8044
+ if (visibility === "desktop") return !isPhone;
8045
+ if (visibility === "mobile") return isPhone;
8046
+ return true;
8047
+ }
8040
8048
  const $486360b09f0d5729$export$af2c67164f68e9e9 = (content, aspectRatio) => {
8041
8049
  const {
8042
8050
  link: link,
@@ -8052,6 +8060,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
8052
8060
  let hasSeenContentBlock = false;
8053
8061
  const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
8054
8062
  const contentComponents = new Map();
8063
+ const isPhone = $dc9262ef6f786812$export$d9f36cf74e24d595((0, $46de6aba0746da31$export$1e15d45642067bf0));
8055
8064
  const delayedServerBlocks = $9HbP8$createMemo(prev => {
8056
8065
  // Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
8057
8066
  if (products_request_loading_()) return prev;
@@ -8077,7 +8086,10 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
8077
8086
  if (!blocksFromHistory?.length && !hasSeenContentBlock) return developerProvided;
8078
8087
  const content = [...(developerProvided || [])];
8079
8088
  hasSeenContentBlock = true;
8089
+ const phone = isPhone();
8080
8090
  blocksFromHistory.forEach(row => {
8091
+ // Leave a block hidden on this device out before placement, so products fill its cells instead of a gap.
8092
+ if (!$46de6aba0746da31$export$894065271726d798(row.visibility, phone)) return;
8081
8093
  const {
8082
8094
  content: {
8083
8095
  link: link,
@@ -9785,6 +9797,32 @@ function $d8dbf52fea1773e2$export$f50b88e2a00918b5(fn) {
9785
9797
  }
9786
9798
  };
9787
9799
  }
9800
+ var $0ea3251b35307dc0$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<b>`),
9801
+ $0ea3251b35307dc0$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div class=no-exact-matches role=status>`);
9802
+ function $0ea3251b35307dc0$export$cff209a01196ea2a(response) {
9803
+ return response?.is_fallback === true && !!response.displays?.length;
9804
+ }
9805
+ function $0ea3251b35307dc0$export$6011f3c8b3c691cd({
9806
+ get_search_query_: get_search_query_,
9807
+ i18n_: i18n_,
9808
+ is_fallback_: is_fallback_
9809
+ }) {
9810
+ const contents = $9HbP8$createMemo($9HbP8$catchify1(() => i18n_.get_no_exact_matches_?.()?.((() => {
9811
+ var _el$ = $9HbP8$getNextElement($0ea3251b35307dc0$var$_tmpl$);
9812
+ $9HbP8$insert(_el$, get_search_query_);
9813
+ return _el$;
9814
+ })())));
9815
+ return $9HbP8$createComponent((0, $9HbP8$Show), {
9816
+ get when() {
9817
+ return $9HbP8$memo(() => !!(is_fallback_() && get_search_query_().trim() !== ""))() && contents();
9818
+ },
9819
+ get children() {
9820
+ var _el$2 = $9HbP8$getNextElement($0ea3251b35307dc0$var$_tmpl$2);
9821
+ $9HbP8$insert(_el$2, contents);
9822
+ return _el$2;
9823
+ }
9824
+ });
9825
+ }
9788
9826
  function $f4125ce4984deee6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
9789
9827
  const isSelected = $9HbP8$createMemo(() => {
9790
9828
  const selectedValue = selectedIndex();
@@ -9999,6 +10037,7 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
9999
10037
  i18n_: i18n_,
10000
10038
  router_: router_,
10001
10039
  set_modal_search_results_: set_modal_search_results_,
10040
+ set_instant_query_: set_instant_query_,
10002
10041
  InstantCardImageComponent_: InstantCardImageComponent_,
10003
10042
  itemIndex_: itemIndex_,
10004
10043
  selected_index_: selected_index_,
@@ -10034,6 +10073,7 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
10034
10073
  // Maybe we should move this createResource out of this component, on the other hand it bloats the parent component and if it fails it takes more than needed with it, so I think writing the content results from here is better
10035
10074
  // This is for the press-enter-to-instant-content-result feature which gets called from Autocomplete.tsx/TextSuggestions.tsx
10036
10075
  set_modal_search_results_(() => search_results);
10076
+ if (set_instant_query_) $9HbP8$createComputed(() => set_instant_query_(read_current_instant_query()));
10037
10077
  $9HbP8$onCleanup(() => set_modal_search_results_(undefined)); // for consistency, in case this component crashes
10038
10078
  if (itemIndex_) {
10039
10079
  const [, set_currently_showing_suggestions] = currently_showing_suggestions_;
@@ -11288,6 +11328,7 @@ function $42912431795f188e$var$RawClassicSearchModal({
11288
11328
  body_: bodyAlignmentSignal = $9HbP8$createSignal({})
11289
11329
  } = alignmentSignals_ || {};
11290
11330
  const [bodyAlignmentStyle] = bodyAlignmentSignal;
11331
+ const [get_instant_query_, set_instant_query_] = $9HbP8$createSignal("");
11291
11332
  const [get_modal_search_results, set_modal_search_results_] = $9HbP8$createSignal();
11292
11333
  const close_on_escape_handler = $9HbP8$catchify1(({
11293
11334
  key: key
@@ -11442,7 +11483,14 @@ function $42912431795f188e$var$RawClassicSearchModal({
11442
11483
  get children() {
11443
11484
  return $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
11444
11485
  get children() {
11445
- return $eea41f703612261b$export$62f101a8aa597bf8({
11486
+ return [$9HbP8$createComponent((0, $0ea3251b35307dc0$export$6011f3c8b3c691cd), {
11487
+ get_search_query_: get_instant_query_,
11488
+ i18n_: i18n_,
11489
+ is_fallback_: () => {
11490
+ const results = get_modal_search_results();
11491
+ return !!results && !results.loading && $0ea3251b35307dc0$export$cff209a01196ea2a(results());
11492
+ }
11493
+ }), $9HbP8$memo(() => $eea41f703612261b$export$62f101a8aa597bf8({
11446
11494
  search_field_value_: search_field_value_,
11447
11495
  depict_api_: depict_api_,
11448
11496
  merchant_: merchant_,
@@ -11450,6 +11498,7 @@ function $42912431795f188e$var$RawClassicSearchModal({
11450
11498
  market_: market_,
11451
11499
  router_: router_,
11452
11500
  set_modal_search_results_: set_modal_search_results_,
11501
+ set_instant_query_: set_instant_query_,
11453
11502
  InstantCardImageComponent_: props => $9HbP8$createMemo(() => $9HbP8$ContainedImage({
11454
11503
  loading: "lazy",
11455
11504
  aspect_ratio: 1,
@@ -11462,7 +11511,7 @@ function $42912431795f188e$var$RawClassicSearchModal({
11462
11511
  sizes: "0px"
11463
11512
  })),
11464
11513
  ...instant_results_options_
11465
- });
11514
+ }))];
11466
11515
  }
11467
11516
  });
11468
11517
  }
@@ -12057,7 +12106,7 @@ function $140dbdee2e0b252f$export$66d1697a0f27069c(modalLayoutStacked) {
12057
12106
  instantResultsIndex_: instantResultsIndex_
12058
12107
  };
12059
12108
  }
12060
- var $500a16dd18ee5a71$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=instant-results-wrapper><h2></h2><!$><!/>`),
12109
+ var $500a16dd18ee5a71$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=instant-results-wrapper><h2></h2><!$><!/><!$><!/>`),
12061
12110
  $500a16dd18ee5a71$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div>`),
12062
12111
  $500a16dd18ee5a71$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<dialog>`),
12063
12112
  $500a16dd18ee5a71$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<div class=discover-more><button class=major type=button>`),
@@ -12131,6 +12180,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12131
12180
  const [unfiltered_previous_searches] = previous_searches_;
12132
12181
  const random_classname_body = $9HbP8$make_random_classname();
12133
12182
  const backdropRandomClassname = $9HbP8$make_random_classname();
12183
+ const [get_instant_query_, set_instant_query_] = $9HbP8$createSignal("");
12134
12184
  const [get_modal_search_results_, set_modal_search_results_] = $9HbP8$createSignal();
12135
12185
  const close_on_escape_handler = $9HbP8$catchify1(evt => {
12136
12186
  if (evt.key === "Escape") {
@@ -12288,8 +12338,18 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12288
12338
  var _el$ = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$),
12289
12339
  _el$2 = _el$.firstChild,
12290
12340
  _el$3 = _el$2.nextSibling,
12291
- [_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling);
12341
+ [_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling),
12342
+ _el$5 = _el$4.nextSibling,
12343
+ [_el$6, _co$2] = $9HbP8$getNextMarker(_el$5.nextSibling);
12292
12344
  $9HbP8$insert(_el$2, () => i18n_.products_());
12345
+ $9HbP8$insert(_el$, $9HbP8$createComponent((0, $0ea3251b35307dc0$export$6011f3c8b3c691cd), {
12346
+ get_search_query_: get_instant_query_,
12347
+ i18n_: i18n_,
12348
+ is_fallback_: () => {
12349
+ const results = get_modal_search_results_();
12350
+ return !!results && !results.loading && $0ea3251b35307dc0$export$cff209a01196ea2a(results());
12351
+ }
12352
+ }), _el$4, _co$);
12293
12353
  $9HbP8$insert(_el$, () => $eea41f703612261b$export$62f101a8aa597bf8({
12294
12354
  search_field_value_: search_field_value_,
12295
12355
  depict_api_: depict_api_,
@@ -12298,6 +12358,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12298
12358
  market_: market_,
12299
12359
  router_: router_,
12300
12360
  set_modal_search_results_: set_modal_search_results_,
12361
+ set_instant_query_: set_instant_query_,
12301
12362
  itemIndex_: itemIndexes.instantResultsIndex_,
12302
12363
  selected_index_: selected_index_,
12303
12364
  currently_showing_suggestions_: currently_showing_suggestions_,
@@ -12318,7 +12379,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12318
12379
  imageResizer_: imageResizer_
12319
12380
  }),
12320
12381
  ...instant_results_options_
12321
- }), _el$4, _co$);
12382
+ }), _el$6, _co$2);
12322
12383
  $9HbP8$effect(_$p => (_$p = itemIndexes.instantResultsIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
12323
12384
  return _el$;
12324
12385
  }
@@ -12357,25 +12418,25 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12357
12418
  })]);
12358
12419
  const DialogElement = props => {
12359
12420
  if (forceUseDiv_) return (() => {
12360
- var _el$5 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$2);
12361
- $9HbP8$spread(_el$5, props, false, true);
12362
- $9HbP8$insert(_el$5, () => props.children);
12421
+ var _el$7 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$2);
12422
+ $9HbP8$spread(_el$7, props, false, true);
12423
+ $9HbP8$insert(_el$7, () => props.children);
12363
12424
  $9HbP8$runHydrationEvents();
12364
- return _el$5;
12425
+ return _el$7;
12365
12426
  })();
12366
12427
  return (() => {
12367
- var _el$6 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$3);
12368
- $9HbP8$spread(_el$6, props, false, true);
12369
- $9HbP8$insert(_el$6, () => props.children);
12428
+ var _el$8 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$3);
12429
+ $9HbP8$spread(_el$8, props, false, true);
12430
+ $9HbP8$insert(_el$8, () => props.children);
12370
12431
  $9HbP8$runHydrationEvents();
12371
- return _el$6;
12432
+ return _el$8;
12372
12433
  })();
12373
12434
  };
12374
12435
  const discoverMoreSection = (() => {
12375
- var _el$7 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$4),
12376
- _el$8 = _el$7.firstChild;
12377
- $9HbP8$addEventListener(_el$8, "click", $9HbP8$catchify1(() => submit_query_()), true);
12378
- $9HbP8$insert(_el$8, $9HbP8$createComponent((0, $9HbP8$Show), {
12436
+ var _el$9 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$4),
12437
+ _el$10 = _el$9.firstChild;
12438
+ $9HbP8$addEventListener(_el$10, "click", $9HbP8$catchify1(() => submit_query_()), true);
12439
+ $9HbP8$insert(_el$10, $9HbP8$createComponent((0, $9HbP8$Show), {
12379
12440
  get when() {
12380
12441
  return get_search_field_value_();
12381
12442
  },
@@ -12392,16 +12453,16 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12392
12453
  },
12393
12454
  get children() {
12394
12455
  return i18n_.modal_view_all_results_()((() => {
12395
- var _el$9 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$5);
12396
- $9HbP8$insert(_el$9, formattedTotalNumberResults);
12397
- return _el$9;
12456
+ var _el$11 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$5);
12457
+ $9HbP8$insert(_el$11, formattedTotalNumberResults);
12458
+ return _el$11;
12398
12459
  })());
12399
12460
  }
12400
12461
  });
12401
12462
  }
12402
12463
  }));
12403
12464
  $9HbP8$runHydrationEvents();
12404
- return _el$7;
12465
+ return _el$9;
12405
12466
  })();
12406
12467
  const search_field = $5285d2814d0fac0c$export$b94867ecbd698f21({
12407
12468
  BackIcon_: (0, $5cec65dd06ade2c4$export$11e9f390c90a537f),
@@ -12449,22 +12510,22 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12449
12510
  },
12450
12511
  get children() {
12451
12512
  return [(() => {
12452
- var _el$10 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$6);
12453
- $9HbP8$addEventListener(_el$10, "click", close_modal_, true);
12454
- $9HbP8$effect(_$p => $9HbP8$classList(_el$10, {
12513
+ var _el$12 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$6);
12514
+ $9HbP8$addEventListener(_el$12, "click", close_modal_, true);
12515
+ $9HbP8$effect(_$p => $9HbP8$classList(_el$12, {
12455
12516
  [backdropRandomClassname]: true
12456
12517
  }, _$p));
12457
12518
  $9HbP8$runHydrationEvents();
12458
- return _el$10;
12519
+ return _el$12;
12459
12520
  })(), (() => {
12460
- var _el$11 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$7),
12461
- _el$12 = _el$11.firstChild,
12462
- _el$14 = _el$12.firstChild,
12463
- [_el$15, _co$2] = $9HbP8$getNextMarker(_el$14.nextSibling),
12464
- _el$13 = _el$15.nextSibling,
12465
- _el$16 = _el$12.nextSibling,
12466
- [_el$17, _co$3] = $9HbP8$getNextMarker(_el$16.nextSibling);
12467
- $9HbP8$addEventListener(_el$11, "click", $9HbP8$catchify1(({
12521
+ var _el$13 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$7),
12522
+ _el$14 = _el$13.firstChild,
12523
+ _el$16 = _el$14.firstChild,
12524
+ [_el$17, _co$3] = $9HbP8$getNextMarker(_el$16.nextSibling),
12525
+ _el$15 = _el$17.nextSibling,
12526
+ _el$18 = _el$14.nextSibling,
12527
+ [_el$19, _co$4] = $9HbP8$getNextMarker(_el$18.nextSibling);
12528
+ $9HbP8$addEventListener(_el$13, "click", $9HbP8$catchify1(({
12468
12529
  target: target,
12469
12530
  currentTarget: currentTarget
12470
12531
  }) => {
@@ -12475,8 +12536,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12475
12536
  const resizeObserver = new ResizeObserver($9HbP8$catchify1(records => setModalBodyWidth(records.at(-1).contentRect.width)));
12476
12537
  resizeObserver.observe(element);
12477
12538
  $9HbP8$onCleanup(() => resizeObserver.disconnect());
12478
- }, _el$12);
12479
- $9HbP8$insert(_el$12, search_field, _el$15, _co$2);
12539
+ }, _el$14);
12540
+ $9HbP8$insert(_el$14, search_field, _el$17, _co$3);
12480
12541
  $9HbP8$use(el => {
12481
12542
  $9HbP8$catchify1((0, $4ceabea39c9a56ac$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_ || (() => 0.03 // 3% under SearchModalV2 by default
12482
12543
  ));
@@ -12491,28 +12552,28 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12491
12552
  return;
12492
12553
  }
12493
12554
  el.replaceChildren(...[(() => {
12494
- var _el$18 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$8);
12495
- $9HbP8$insert(_el$18, renderedTextSuggestions);
12496
- return _el$18;
12555
+ var _el$20 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$8);
12556
+ $9HbP8$insert(_el$20, renderedTextSuggestions);
12557
+ return _el$20;
12497
12558
  })(), (() => {
12498
- var _el$19 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$9);
12499
- $9HbP8$insert(_el$19, renderedVisualSuggestions);
12500
- return _el$19;
12559
+ var _el$21 = $9HbP8$getNextElement($500a16dd18ee5a71$var$_tmpl$9);
12560
+ $9HbP8$insert(_el$21, renderedVisualSuggestions);
12561
+ return _el$21;
12501
12562
  })(), discoverMoreSection]);
12502
12563
  });
12503
- }, _el$13);
12504
- $9HbP8$insert(_el$11, $9HbP8$createComponent((0, $19f1f3e588d63502$export$f021bdedd3ec901a), {
12564
+ }, _el$15);
12565
+ $9HbP8$insert(_el$13, $9HbP8$createComponent((0, $19f1f3e588d63502$export$f021bdedd3ec901a), {
12505
12566
  styles: mergedCssObject
12506
- }), _el$17, _co$3);
12567
+ }), _el$19, _co$4);
12507
12568
  $9HbP8$effect(_p$ => {
12508
12569
  var _v$ = !!modalLayoutStacked_(),
12509
12570
  _v$2 = {
12510
12571
  [random_classname_body]: true
12511
12572
  },
12512
12573
  _v$3 = !!noResults();
12513
- _v$ !== _p$.e && _el$11.classList.toggle("stacked", _p$.e = _v$);
12514
- _p$.t = $9HbP8$classList(_el$12, _v$2, _p$.t);
12515
- _v$3 !== _p$.a && _el$13.classList.toggle("no-results", _p$.a = _v$3);
12574
+ _v$ !== _p$.e && _el$13.classList.toggle("stacked", _p$.e = _v$);
12575
+ _p$.t = $9HbP8$classList(_el$14, _v$2, _p$.t);
12576
+ _v$3 !== _p$.a && _el$15.classList.toggle("no-results", _p$.a = _v$3);
12516
12577
  return _p$;
12517
12578
  }, {
12518
12579
  e: undefined,
@@ -12520,7 +12581,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
12520
12581
  a: undefined
12521
12582
  });
12522
12583
  $9HbP8$runHydrationEvents();
12523
- return _el$11;
12584
+ return _el$13;
12524
12585
  })()];
12525
12586
  }
12526
12587
  })];
@@ -15019,7 +15080,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
15019
15080
  });
15020
15081
  }
15021
15082
  var $7097477c78a89208$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
15022
- $7097477c78a89208$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
15083
+ $7097477c78a89208$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
15023
15084
  function $7097477c78a89208$export$a54ec244c8863715({
15024
15085
  depict_api_: depict_api_,
15025
15086
  search_field_value_: search_field_value_,
@@ -15315,10 +15376,12 @@ function $7097477c78a89208$export$a54ec244c8863715({
15315
15376
  [_el$19, _co$8] = $9HbP8$getNextMarker(_el$18.nextSibling),
15316
15377
  _el$20 = _el$19.nextSibling,
15317
15378
  [_el$21, _co$9] = $9HbP8$getNextMarker(_el$20.nextSibling),
15318
- _el$22 = _el$7.nextSibling,
15379
+ _el$22 = _el$21.nextSibling,
15319
15380
  [_el$23, _co$10] = $9HbP8$getNextMarker(_el$22.nextSibling),
15320
- _el$24 = _el$23.nextSibling,
15321
- [_el$25, _co$11] = $9HbP8$getNextMarker(_el$24.nextSibling);
15381
+ _el$24 = _el$7.nextSibling,
15382
+ [_el$25, _co$11] = $9HbP8$getNextMarker(_el$24.nextSibling),
15383
+ _el$26 = _el$25.nextSibling,
15384
+ [_el$27, _co$12] = $9HbP8$getNextMarker(_el$26.nextSibling);
15322
15385
  $9HbP8$insert(_el$7, get_search_field_elements, _el$9, _co$3);
15323
15386
  $9HbP8$insert(_el$7, make_category_suggestion_card_ ? $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
15324
15387
  severity_: "error",
@@ -15357,6 +15420,11 @@ function $7097477c78a89208$export$a54ec244c8863715({
15357
15420
  }
15358
15421
  }), _el$13, _co$5);
15359
15422
  $9HbP8$insert(_el$7, () => results_filters[0](), _el$15, _co$6);
15423
+ $9HbP8$insert(_el$7, $9HbP8$createComponent((0, $0ea3251b35307dc0$export$6011f3c8b3c691cd), {
15424
+ get_search_query_: get_search_query_,
15425
+ i18n_: i18n_,
15426
+ is_fallback_: () => !search_results_.loading && $0ea3251b35307dc0$export$cff209a01196ea2a(search_results_())
15427
+ }), _el$17, _co$7);
15360
15428
  $9HbP8$insert(_el$7, $9HbP8$createComponent((0, $9HbP8$Show), {
15361
15429
  get when() {
15362
15430
  return selected_filters_[0]()?.length;
@@ -15379,7 +15447,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
15379
15447
  }
15380
15448
  });
15381
15449
  }
15382
- }), _el$17, _co$7);
15450
+ }), _el$19, _co$8);
15383
15451
  $9HbP8$insert(_el$7, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
15384
15452
  severity_: "error",
15385
15453
  message_: "Search results failed",
@@ -15416,7 +15484,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
15416
15484
  }
15417
15485
  });
15418
15486
  }
15419
- }), _el$19, _co$8);
15487
+ }), _el$21, _co$9);
15420
15488
  $9HbP8$insert(_el$7, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
15421
15489
  severity_: "error",
15422
15490
  message_: "Search recommendations failed",
@@ -15435,7 +15503,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
15435
15503
  }
15436
15504
  });
15437
15505
  }
15438
- }), _el$21, _co$9);
15506
+ }), _el$23, _co$10);
15439
15507
  $9HbP8$insert(_el$6, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
15440
15508
  message_: "Scroll status failed",
15441
15509
  severity_: "error",
@@ -15448,7 +15516,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
15448
15516
  number_of_results_: countOfProductsForUI
15449
15517
  });
15450
15518
  }
15451
- }), _el$23, _co$10);
15519
+ }), _el$25, _co$11);
15452
15520
  $9HbP8$insert(_el$6, $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
15453
15521
  message_: "Floating buttons failed",
15454
15522
  severity_: "error",
@@ -15461,7 +15529,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
15461
15529
  i18n_: i18n_
15462
15530
  });
15463
15531
  }
15464
- }), _el$25, _co$11);
15532
+ }), _el$27, _co$12);
15465
15533
  $9HbP8$effect(_p$ => {
15466
15534
  var _v$ = (0, $f86ba724282f6690$export$44dad306455dddf).SEARCH_PAGE,
15467
15535
  _v$2 = `depict plp search${class_?.() ? ` ${class_()}` : ""}`;
@@ -127,7 +127,8 @@ const $1b6a9c349ece84af$export$363d705e3ad31495 = {
127
127
  const page_form = number_of_results === 1 ? "\u0635\u0641\u062D\u0629" : "\u0635\u0641\u062D\u0627\u062A";
128
128
  return has_query ? ["\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 ", number_of_results_element, " ".concat(page_form, " \u0644\u0640 "), query] : ["\u062A\u0645 \u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 ", number_of_results_element, " ".concat(page_form)];
129
129
  },
130
- modal_view_all_no_results_: "\u0639\u0631\u0636 \u0627\u0644\u0628\u062F\u0627\u0626\u0644"
130
+ modal_view_all_no_results_: "\u0639\u0631\u0636 \u0627\u0644\u0628\u062F\u0627\u0626\u0644",
131
+ get_no_exact_matches_: query => ["\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0645\u0637\u0627\u0628\u0642\u0629 \u062A\u0645\u0627\u0645\u064B\u0627 \u0644\u0640 ", query, ". \u0646\u0639\u0631\u0636 \u0645\u0646\u062A\u062C\u0627\u062A \u0645\u0634\u0627\u0628\u0647\u0629."]
131
132
  };
132
133
  const $37232ce8fd20bb15$var$english_base_translation = {
133
134
  backend_locale_: "",
@@ -207,7 +208,8 @@ const $37232ce8fd20bb15$export$434b5d2e9cbbcde1 = {
207
208
  const page_form = number_of_results === 1 ? "page" : "pages";
208
209
  return has_query ? ["Found ", number_of_results_element, " ".concat(page_form, " for "), query] : ["Found ", number_of_results_element, " ".concat(page_form)];
209
210
  },
210
- modal_view_all_no_results_: "View alternatives"
211
+ modal_view_all_no_results_: "View alternatives",
212
+ get_no_exact_matches_: query => ["No exact matches for ", query, ". Showing similar products."]
211
213
  };
212
214
  const $c318f9c1803402a6$var$czech_base_translation = {
213
215
  "of_": "z",
@@ -283,7 +285,8 @@ const $c318f9c1803402a6$export$62ef558576ddaf3d = {
283
285
  previous_: "P\u0159edchoz\xed",
284
286
  popular_: "Popul\xe1rn\xed",
285
287
  products_: "Produkty",
286
- modal_view_all_no_results_: "Zobrazit alternativy"
288
+ modal_view_all_no_results_: "Zobrazit alternativy",
289
+ get_no_exact_matches_: query => ["\u017D\xe1dn\xe9 p\u0159esn\xe9 shody pro ", query, ". Zobrazujeme podobn\xe9 produkty."]
287
290
  };
288
291
  const $d2c5f24e02eb2e8a$var$danish_base_translation = {
289
292
  "of_": "af",
@@ -357,7 +360,8 @@ const $d2c5f24e02eb2e8a$export$70578856b2420b5d = {
357
360
  const page_form = number_of_results === 1 ? "side" : "sider";
358
361
  return has_query ? ["Fandt ", number_of_results_element, " ".concat(page_form, " for "), query] : ["Fandt ", number_of_results_element, " ".concat(page_form)];
359
362
  },
360
- modal_view_all_no_results_: "Se alternativer"
363
+ modal_view_all_no_results_: "Se alternativer",
364
+ get_no_exact_matches_: query => ["Ingen pr\xe6cise match for ", query, ". Viser lignende produkter."]
361
365
  };
362
366
  const $4103d7d80b34bfee$var$dutch_base_translation = {
363
367
  "of_": "van",
@@ -431,7 +435,8 @@ const $4103d7d80b34bfee$export$5d14584e27bf4bc5 = {
431
435
  previous_: "Vorige",
432
436
  popular_: "Populair",
433
437
  products_: "Producten",
434
- modal_view_all_no_results_: "Bekijk alternatieven"
438
+ modal_view_all_no_results_: "Bekijk alternatieven",
439
+ get_no_exact_matches_: query => ["Geen exacte resultaten voor ", query, ". Vergelijkbare producten worden getoond."]
435
440
  };
436
441
  const $b31f22b9e38788da$var$finnish_base_translation = {
437
442
  "of_": "/",
@@ -505,7 +510,8 @@ const $b31f22b9e38788da$export$bb9c5e11b9203620 = {
505
510
  previous_: "Edellinen",
506
511
  popular_: "Suosittu",
507
512
  products_: "Tuotteet",
508
- modal_view_all_no_results_: "N\xe4yt\xe4 vaihtoehdot"
513
+ modal_view_all_no_results_: "N\xe4yt\xe4 vaihtoehdot",
514
+ get_no_exact_matches_: query => ["Ei tarkkoja osumia haulle ", query, ". N\xe4ytet\xe4\xe4n samankaltaisia tuotteita."]
509
515
  };
510
516
  const $94cd86d0f0afd844$var$french_base_translation = {
511
517
  "of_": "de",
@@ -579,7 +585,8 @@ const $94cd86d0f0afd844$export$e608b2bb21ba1862 = {
579
585
  previous_: "Pr\xe9c\xe9dent",
580
586
  popular_: "Populaire",
581
587
  products_: "Produits",
582
- modal_view_all_no_results_: "Voir les alternatives"
588
+ modal_view_all_no_results_: "Voir les alternatives",
589
+ get_no_exact_matches_: query => ["Aucun r\xe9sultat exact pour ", query, ". Voici des produits similaires."]
583
590
  };
584
591
  const $7a49ed48f9a44684$var$german_base_translation = {
585
592
  "of_": "von",
@@ -653,7 +660,8 @@ const $7a49ed48f9a44684$export$b43a5e72c07b4d2a = {
653
660
  const page_form = number_of_results === 1 ? "Seite" : "Seiten";
654
661
  return has_query ? [number_of_results_element, " ".concat(page_form, " f\xfcr "), query] : [number_of_results_element, " ".concat(page_form)];
655
662
  },
656
- modal_view_all_no_results_: "Alternativen anzeigen"
663
+ modal_view_all_no_results_: "Alternativen anzeigen",
664
+ get_no_exact_matches_: query => ["Keine genauen Treffer f\xfcr ", query, ". \xc4hnliche Produkte werden angezeigt."]
657
665
  };
658
666
  const $e35c43442881ef9b$var$italian_base_translation = {
659
667
  "of_": "di",
@@ -727,7 +735,8 @@ const $e35c43442881ef9b$export$c05550c0848a3fe4 = {
727
735
  previous_: "Precedente",
728
736
  popular_: "Popolare",
729
737
  products_: "Prodotti",
730
- modal_view_all_no_results_: "Visualizza alternative"
738
+ modal_view_all_no_results_: "Visualizza alternative",
739
+ get_no_exact_matches_: query => ["Nessuna corrispondenza esatta per ", query, ". Ecco alcuni prodotti simili."]
731
740
  };
732
741
  const $198e62eb02da5caf$var$norwegian_base_translation = {
733
742
  "of_": "av",
@@ -801,7 +810,8 @@ const $198e62eb02da5caf$export$dcb702a89633f297 = {
801
810
  const page_form = number_of_results === 1 ? "side" : "sider";
802
811
  return has_query ? ["Fant ", number_of_results_element, " ".concat(page_form, " for "), query] : ["Fant ", number_of_results_element, " ".concat(page_form)];
803
812
  },
804
- modal_view_all_no_results_: "Vis alternativer"
813
+ modal_view_all_no_results_: "Vis alternativer",
814
+ get_no_exact_matches_: query => ["Ingen eksakte treff for ", query, ". Viser lignende produkter."]
805
815
  };
806
816
  const $04b21cf1809eada5$var$polish_base_translation = {
807
817
  "of_": "z",
@@ -884,7 +894,8 @@ const $04b21cf1809eada5$export$b0eb0dd41442f532 = {
884
894
  previous_: "Poprzedni",
885
895
  popular_: "Popularne",
886
896
  products_: "Produkty",
887
- modal_view_all_no_results_: "Zobacz alternatywy"
897
+ modal_view_all_no_results_: "Zobacz alternatywy",
898
+ get_no_exact_matches_: query => ["Brak dok\u0142adnych wynik\xf3w dla ", query, ". Pokazujemy podobne produkty."]
888
899
  };
889
900
  const $c276fe3ab8d132a1$var$portuguese_base_translation = {
890
901
  "of_": "de",
@@ -947,7 +958,8 @@ const $c276fe3ab8d132a1$export$b3b5aa2c4df8976f = {
947
958
  previous_: "Anterior",
948
959
  popular_: "Popular",
949
960
  products_: "Produtos",
950
- modal_view_all_no_results_: "Ver alternativas"
961
+ modal_view_all_no_results_: "Ver alternativas",
962
+ get_no_exact_matches_: query => ["Nenhuma correspond\xeancia exata para ", query, ". A mostrar produtos semelhantes."]
951
963
  };
952
964
  const $91dcb6e4a880879a$var$spanish_base_translation = {
953
965
  "of_": "de",
@@ -1021,7 +1033,8 @@ const $91dcb6e4a880879a$export$49b8f20513f0ff25 = {
1021
1033
  previous_: "Anterior",
1022
1034
  popular_: "Popular",
1023
1035
  products_: "Productos",
1024
- modal_view_all_no_results_: "Ver alternativas"
1036
+ modal_view_all_no_results_: "Ver alternativas",
1037
+ get_no_exact_matches_: query => ["No hay coincidencias exactas para ", query, ". Mostrando productos similares."]
1025
1038
  };
1026
1039
  const $3d7cd7b2646ce6ae$var$swedish_base_translation = {
1027
1040
  "of_": "av",
@@ -1071,6 +1084,7 @@ const $3d7cd7b2646ce6ae$export$596caee559c76764 = {
1071
1084
  "no_results_text_": "Inga resultat",
1072
1085
  modal_view_all_results_: number_of_results => ["Visa alla ", number_of_results, " resultat"],
1073
1086
  modal_view_all_no_results_: "Visa andra alternativ",
1087
+ get_no_exact_matches_: query => ["Inga exakta tr\xe4ffar f\xf6r ", query, ". Visar liknande produkter."],
1074
1088
  "search_recs_title_": "Andra alternativ",
1075
1089
  "clear_filters_query_sorting_after_submit_": "Rensa f\xf6rfr\xe5ga och filter + sorting efter ny f\xf6rfr\xe5ga",
1076
1090
  "previous_searches_text_": "Dina tidigare s\xf6kningar",
@@ -71,6 +71,11 @@ export interface search_i18n extends plp_shared_i18n {
71
71
  popular_: string;
72
72
  products_: string;
73
73
  modal_view_all_no_results_: string;
74
+ /**
75
+ * Shown above the results when no product matched the query and search shows similar products.
76
+ * Optional: a custom locale without it shows no notice.
77
+ */
78
+ get_no_exact_matches_?: (query: HTMLElement) => Elem[];
74
79
  }
75
80
  /**
76
81
  * Category internationalisation