@depict-ai/ui 4.10.19 → 4.10.20

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.
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.19";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.20";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $5vyXB$solidjs.createSignal(false);
115
115
  $5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
@@ -2151,6 +2151,7 @@ async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_
2151
2151
  const modal_els = $5vyXB$solidjs.createRoot(dispose => {
2152
2152
  let closing_animation;
2153
2153
  let animation_started;
2154
+ let focus_target_after_close;
2154
2155
  dispose_and_remove = () => {
2155
2156
  const actually_close = () => {
2156
2157
  dispose();
@@ -2169,11 +2170,19 @@ async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_
2169
2170
  activeElement?.blur?.();
2170
2171
  el.remove();
2171
2172
  });
2172
- if (should_restore_focus && element_focused_before_open?.isConnected) {
2173
+ const requested_focus_target = focus_target_after_close?.();
2174
+ if (should_restore_focus && (requested_focus_target?.isConnected || element_focused_before_open?.isConnected)) {
2173
2175
  restoring_focus = true;
2174
2176
  try {
2175
2177
  // preventScroll so this can't re-introduce the safari page-jump the blur() above works around
2176
- element_focused_before_open.focus({
2178
+ let focused = false;
2179
+ if (requested_focus_target?.isConnected) {
2180
+ requested_focus_target.focus({
2181
+ preventScroll: true
2182
+ });
2183
+ focused = requested_focus_target.getRootNode().activeElement === requested_focus_target;
2184
+ }
2185
+ if (!focused && element_focused_before_open?.isConnected) element_focused_before_open.focus({
2177
2186
  preventScroll: true
2178
2187
  });
2179
2188
  } finally {
@@ -2194,7 +2203,8 @@ async function $9abb0a35d4b60ed3$export$79b1565500412d9b(search_modal, modal_fn_
2194
2203
  ...extra_options_for_modal,
2195
2204
  close_modal_: close_modal_,
2196
2205
  open_modal_: open_modal_,
2197
- register_closing_animation_: animation => closing_animation = animation
2206
+ register_closing_animation_: animation => closing_animation = animation,
2207
+ set_focus_target_after_close_: get_target => focus_target_after_close = get_target
2198
2208
  });
2199
2209
  });
2200
2210
  body.append(...modal_els);
@@ -8840,6 +8850,7 @@ function $0175183387c8923a$export$f7658c347b037c3f(props = {}) {
8840
8850
  var $66b8b9a9613c141d$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
8841
8851
  $66b8b9a9613c141d$var$_tmpl$2 = ['<div class="field"><!--$-->', "<!--/-->", "<!--$-->", "<!--/--></div>"],
8842
8852
  $66b8b9a9613c141d$var$_tmpl$3 = ["<button", ' class="submit major" type="button"', ">", "</button>"];
8853
+ const $66b8b9a9613c141d$var$keys_not_opening_modal = new Set(["Tab", "Shift", "Control", "Alt", "AltGraph", "Meta", "CapsLock", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Home", "End", "Insert", "ContextMenu", "NumLock", "ScrollLock", "Pause", "PrintScreen"]);
8843
8854
  function $66b8b9a9613c141d$export$b94867ecbd698f21({
8844
8855
  search_field_value_: [searchFieldValue, setSearchFieldValue],
8845
8856
  input_field_ref_: input_field_ref_,
@@ -8981,6 +8992,31 @@ function $eb3039a27db40508$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
8981
8992
  }
8982
8993
  })();
8983
8994
  }
8995
+ function $5f9dc76a99175920$export$9e9e2ae069cf2fe1({
8996
+ props_search_field_value_: props_search_field_value_,
8997
+ props_submit_query_: props_submit_query_,
8998
+ dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_,
8999
+ set_focus_target_after_close_: set_focus_target_after_close_,
9000
+ get_search_page_input_element_: get_search_page_input_element_
9001
+ }) {
9002
+ const search_field_value_ = dont_sync_search_field_value_except_on_submit_ ? $5vyXB$solidjs.createSignal("") : props_search_field_value_;
9003
+ let submits_in_flight = 0;
9004
+ const submit_query_ = async (new_query = $5vyXB$solidjs.untrack(search_field_value_[0])) => {
9005
+ submits_in_flight++;
9006
+ try {
9007
+ return await props_submit_query_(new_query, () => set_focus_target_after_close_(get_search_page_input_element_));
9008
+ } finally {
9009
+ submits_in_flight--;
9010
+ }
9011
+ };
9012
+ if (dont_sync_search_field_value_except_on_submit_) $5vyXB$solidjs.createEffect($5vyXB$solidjs.on(search_field_value_[0], value => submits_in_flight > 0 && props_search_field_value_[1](value), {
9013
+ defer: true
9014
+ }));
9015
+ return {
9016
+ search_field_value_: search_field_value_,
9017
+ submit_query_: submit_query_
9018
+ };
9019
+ }
8984
9020
  var $44f0b2e312a9b710$var$_tmpl$ = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
8985
9021
  $44f0b2e312a9b710$var$_tmpl$2 = ["<b", ">", "</b>"],
8986
9022
  $44f0b2e312a9b710$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '" role="search" aria-label="Search modal with search field, query suggestions and result preview"><!--$-->', '<!--/--><div id="depict-suggestions-and-result-preview" class="padded"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"],
@@ -8994,6 +9030,8 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
8994
9030
  search_query_url_param_name_: search_query_url_param_name_,
8995
9031
  previous_searches_: previous_searches_,
8996
9032
  close_modal_: close_modal_,
9033
+ set_focus_target_after_close_: set_focus_target_after_close_,
9034
+ get_search_page_input_element_: get_search_page_input_element_,
8997
9035
  depict_api_: depict_api_,
8998
9036
  merchant_: merchant_,
8999
9037
  market_: market_,
@@ -9018,15 +9056,16 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
9018
9056
  // As per feedback from stronger we sometimes want a modal with the search field value disconnected from the one in the rest of the UI, see https://depictaiworkspace.slack.com/archives/C02J16R9XEH/p1679065878487709.
9019
9057
  // This is desired for when the modal is opened from a UI element that visually does not look connected with the search page or current query
9020
9058
  // Basically the UI signals that the button that opens the modal starts a new search.
9021
- const search_field_value_ = dont_sync_search_field_value_except_on_submit_ ? $5vyXB$solidjs.createSignal("") : props_search_field_value;
9022
- const propagate_search_field_value_back = dont_sync_search_field_value_except_on_submit_ ? () => props_search_field_value[1]($5vyXB$solidjs.untrack(search_field_value_[0])) // Set actual search field value to the throwaway internal one before submitting
9023
- : undefined;
9024
- const submit_query_ = (...args) => {
9025
- // submit_query expects to read the current search field value which is why we have to write the current one to the signal before calling it
9026
- // It will write the old one back and then write the new one after submit
9027
- propagate_search_field_value_back?.();
9028
- return props_submit_query(...args);
9029
- };
9059
+ const {
9060
+ search_field_value_: search_field_value_,
9061
+ submit_query_: submit_query_
9062
+ } = $5f9dc76a99175920$export$9e9e2ae069cf2fe1({
9063
+ props_search_field_value_: props_search_field_value,
9064
+ props_submit_query_: props_submit_query,
9065
+ dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_,
9066
+ set_focus_target_after_close_: set_focus_target_after_close_,
9067
+ get_search_page_input_element_: get_search_page_input_element_
9068
+ });
9030
9069
  const [input_field, set_input_field] = $5vyXB$solidjs.createSignal();
9031
9070
  const [get_search_field_value_] = search_field_value_;
9032
9071
  // Search field alignment unused in ClassicSearchModal since the search field spans the whole modal
@@ -9624,6 +9663,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
9624
9663
  search_query_url_param_name_: search_query_url_param_name_,
9625
9664
  previous_searches_: previous_searches_,
9626
9665
  close_modal_: close_modal_,
9666
+ set_focus_target_after_close_: set_focus_target_after_close_,
9667
+ get_search_page_input_element_: get_search_page_input_element_,
9627
9668
  alignmentSignals_: alignmentSignals_,
9628
9669
  depict_api_: depict_api_,
9629
9670
  merchant_: merchant_,
@@ -9654,15 +9695,16 @@ function $11597ae03e703a47$var$RawSearchModalV2({
9654
9695
  // As per feedback from stronger we sometimes want a modal with the search field value disconnected from the one in the rest of the UI, see https://depictaiworkspace.slack.com/archives/C02J16R9XEH/p1679065878487709.
9655
9696
  // This is desired for when the modal is opened from a UI element that visually does not look connected with the search page or current query
9656
9697
  // Basically the UI signals that the button that opens the modal starts a new search.
9657
- const search_field_value_ = dont_sync_search_field_value_except_on_submit_ ? $5vyXB$solidjs.createSignal("") : props_search_field_value;
9658
- const propagate_search_field_value_back = dont_sync_search_field_value_except_on_submit_ ? () => props_search_field_value[1]($5vyXB$solidjs.untrack(search_field_value_[0])) // Set actual search field value to the throwaway internal one before submitting
9659
- : undefined;
9660
- const submit_query_ = (...args) => {
9661
- // submit_query expects to read the current search field value which is why we have to write the current one to the signal before calling it
9662
- // It will write the old one back and then write the new one after submit
9663
- propagate_search_field_value_back?.();
9664
- return props_submit_query(...args);
9665
- };
9698
+ const {
9699
+ search_field_value_: search_field_value_,
9700
+ submit_query_: submit_query_
9701
+ } = $5f9dc76a99175920$export$9e9e2ae069cf2fe1({
9702
+ props_search_field_value_: props_search_field_value,
9703
+ props_submit_query_: props_submit_query,
9704
+ dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_,
9705
+ set_focus_target_after_close_: set_focus_target_after_close_,
9706
+ get_search_page_input_element_: get_search_page_input_element_
9707
+ });
9666
9708
  const [input_field, set_input_field] = $5vyXB$solidjs.createSignal();
9667
9709
  const [searching_for_value_, set_searching_for_value_] = $5vyXB$solidjs.createSignal();
9668
9710
  const [show_stale_content_results_, set_show_stale_content_results_] = $5vyXB$solidjs.createSignal(false);
@@ -11490,11 +11532,12 @@ function $2b7a005a65221045$export$84bba84a7b837187(read_search_query) {
11490
11532
  async function $f328bd45f8ede33c$export$e16630ecb9644a1c({
11491
11533
  on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
11492
11534
  search_param_name_: search_param_name_,
11493
- set_search_field_value_: set_search_field_value_,
11535
+ search_field_value_: search_field_value_,
11494
11536
  get_search_query_: get_search_query_,
11495
11537
  url_transformer_: url_transformer_,
11496
11538
  router_: router_,
11497
11539
  after_submit_: after_submit_,
11540
+ before_navigate_: before_navigate_,
11498
11541
  get_new_query: get_new_query
11499
11542
  }) {
11500
11543
  const new_search_query = get_new_query();
@@ -11502,21 +11545,89 @@ async function $f328bd45f8ede33c$export$e16630ecb9644a1c({
11502
11545
  if (previous_query === new_search_query && new URLSearchParams(location.search).has(search_param_name_)) {
11503
11546
  // don't push a history entry / re-search if someone submits a search again
11504
11547
  // do close the modal though
11548
+ search_field_value_.settle_(new_search_query);
11505
11549
  on_submit_with_unchanged_value_?.();
11506
- return;
11550
+ return false;
11507
11551
  }
11508
- set_search_field_value_(previous_query); // restore the value to the previous query since this one goes to the new history entry
11509
11552
  const target_url = new URL(location.href);
11510
11553
  url_transformer_?.(target_url);
11511
11554
  target_url.searchParams.set(search_param_name_, new_search_query);
11512
- await router_.navigate_.go_to_({
11513
- new_url_: target_url,
11514
- is_replace_: false,
11515
- force_spa_navigation_: true
11516
- });
11517
- set_search_field_value_(new_search_query);
11555
+ const end_submit = search_field_value_.begin_submit_(new_search_query, previous_query);
11556
+ before_navigate_?.();
11557
+ let landed;
11558
+ try {
11559
+ await router_.navigate_.go_to_({
11560
+ new_url_: target_url,
11561
+ is_replace_: false,
11562
+ force_spa_navigation_: true
11563
+ });
11564
+ } finally {
11565
+ landed = end_submit();
11566
+ }
11567
+ if (!landed) return false;
11518
11568
  scrollTo(0, 0);
11519
11569
  after_submit_?.();
11570
+ return true;
11571
+ }
11572
+ function $380b434363eee5f6$export$d13a185c53aa5edf(persisted_, get_search_query_) {
11573
+ const [get_persisted, set_persisted] = persisted_;
11574
+ const [get_submitting, set_submitting] = $5vyXB$solidjs.createSignal();
11575
+ const get_value = $5vyXB$solidjs.createMemo(() => get_submitting() ?? get_persisted());
11576
+ const set_value = value => {
11577
+ const new_value = typeof value === "function" ? value($5vyXB$solidjs.untrack(get_value)) : value;
11578
+ if ($5vyXB$solidjs.untrack(get_submitting) === undefined) set_persisted(new_value);else set_submitting(new_value);
11579
+ return new_value;
11580
+ };
11581
+ let current_submit;
11582
+ const end_submit = landed => {
11583
+ current_submit.landed_ = landed;
11584
+ current_submit = undefined;
11585
+ $5vyXB$solidjs.batch(() => {
11586
+ const submitting = $5vyXB$solidjs.untrack(get_submitting);
11587
+ set_submitting(undefined);
11588
+ if (landed && submitting !== undefined) set_persisted(submitting);
11589
+ });
11590
+ };
11591
+ const abort_on_popstate = what_happened => {
11592
+ if (what_happened === "popstate" && current_submit) end_submit(false);
11593
+ };
11594
+ (0, $5vyXB$depictaiutilishared.instant_exec_on_suspect_history_change).add(abort_on_popstate);
11595
+ $5vyXB$solidjs.onCleanup(() => (0, $5vyXB$depictaiutilishared.instant_exec_on_suspect_history_change).delete(abort_on_popstate));
11596
+ $5vyXB$solidjs.createEffect($5vyXB$solidjs.on(get_search_query_, query => {
11597
+ const token = current_submit;
11598
+ if (!token || query !== token.query_) return;
11599
+ queueMicrotask(() => {
11600
+ if (current_submit === token) end_submit(true);
11601
+ });
11602
+ }, {
11603
+ defer: true
11604
+ }));
11605
+ const begin_submit_ = (submitted_query, query_of_current_history_entry) => {
11606
+ const token = current_submit = {
11607
+ query_: submitted_query,
11608
+ landed_: false
11609
+ };
11610
+ $5vyXB$solidjs.batch(() => {
11611
+ set_submitting(submitted_query);
11612
+ set_persisted(query_of_current_history_entry);
11613
+ });
11614
+ return () => {
11615
+ if (current_submit === token) end_submit(true);
11616
+ return token.landed_;
11617
+ };
11618
+ };
11619
+ const settle_ = query => {
11620
+ if (current_submit) return;
11621
+ $5vyXB$solidjs.batch(() => {
11622
+ set_submitting(undefined);
11623
+ set_persisted(query);
11624
+ });
11625
+ };
11626
+ return {
11627
+ value_: [get_value, set_value],
11628
+ begin_submit_: begin_submit_,
11629
+ settle_: settle_
11630
+ };
11520
11631
  }
11521
11632
  function $331c7a65de274e6c$export$181cceed5c91919e(callback, alsoRaF, passiveListener) {
11522
11633
  let aligned_this_microtask = false;
@@ -12152,6 +12263,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
12152
12263
  scroll_restoration_data_: scroll_restoration_data_,
12153
12264
  product_card_template_: product_card_template_,
12154
12265
  modalAlignmentSignalsRef_: modalAlignmentSignalsRef_,
12266
+ inputFieldRef_: inputFieldRef_,
12155
12267
  router_: router_,
12156
12268
  content_results_rows_: content_results_rows_,
12157
12269
  content_layout_options_: content_layout_options_,
@@ -12331,6 +12443,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
12331
12443
  if (!search_field) break add_input_field;
12332
12444
  setModalBodyStyle({});
12333
12445
  modalAlignmentSignalsRef_?.(alignmentSignals_);
12446
+ inputFieldRef_?.(input_element);
12447
+ $5vyXB$solidjs.onCleanup(() => inputFieldRef_?.(undefined));
12334
12448
  const [pollAlignment, setPollAlignment_] = $5vyXB$solidjs.createSignal(false);
12335
12449
  const align_position = $5vyXB$depictaiutilishared.catchify((0, $fd463ff0edb29915$export$b3ad617e9036868))(alignmentSignals_, search_field, (0, $fd463ff0edb29915$export$3f238c96c45e6cc6) | (0, $fd463ff0edb29915$export$7895aadd1956b1c7) | (modalVersionUsed_ === 1 ? (0, $fd463ff0edb29915$export$902f8b4a7dae5d78) : (0, $fd463ff0edb29915$export$6060bc6bee850eb6) | (0, $fd463ff0edb29915$export$5097308c5200105a)), true, pollAlignment);
12336
12450
  div_with_field_class.addEventListener("click", $5vyXB$depictaiutilishared.catchify(e => {
@@ -12632,14 +12746,16 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
12632
12746
  set_search_content_results_rows((0, $3716b8caf7f959e2$export$70ceae36059a1036));
12633
12747
  }; // do this every time after we have submitted a new query - otherwise there might already be a saved number of rows in the state
12634
12748
  const on_submit_with_unchanged_value_ = () => this.modal_open = false;
12635
- const [get_search_field_value_, set_search_field_value_] = state_.field_value;
12636
- const configured_submit_query_ = new_query => $f328bd45f8ede33c$export$e16630ecb9644a1c({
12749
+ const search_field_value_ = $380b434363eee5f6$export$d13a185c53aa5edf(state_.field_value, get_search_query_);
12750
+ const [get_search_field_value_] = search_field_value_.value_;
12751
+ const configured_submit_query_ = (new_query, before_navigate_) => $f328bd45f8ede33c$export$e16630ecb9644a1c({
12637
12752
  on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
12638
- set_search_field_value_: set_search_field_value_,
12753
+ search_field_value_: search_field_value_,
12639
12754
  get_search_query_: get_search_query_,
12640
12755
  search_param_name_: search_query_url_param_name_,
12641
12756
  after_submit_: after_submit_,
12642
- get_new_query: () => new_query || $5vyXB$solidjs.untrack(get_search_field_value_),
12757
+ before_navigate_: before_navigate_,
12758
+ get_new_query: () => new_query ?? $5vyXB$solidjs.untrack(get_search_field_value_),
12643
12759
  url_transformer_: url_transformer,
12644
12760
  router_: this.#router
12645
12761
  });
@@ -12658,6 +12774,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
12658
12774
  search_query_url_param_name_: search_query_url_param_name_,
12659
12775
  reset_history_state_: reset_history_state_,
12660
12776
  state_: state_,
12777
+ search_field_value_: search_field_value_.value_,
12661
12778
  router_: this.#router,
12662
12779
  url_transformer_: url_transformer,
12663
12780
  depict_api_: depict_api_,
@@ -12681,7 +12798,8 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
12681
12798
  $5vyXB$solidjs.onCleanup(() => this.modal_open = false);
12682
12799
  return searchModalComponent(...args);
12683
12800
  }, {
12684
- search_field_value_: state_.field_value,
12801
+ search_field_value_: search_field_value_.value_,
12802
+ get_search_page_input_element_: () => $2c61e4cd8229c49a$export$dde08b2dca8cc1ce.get(this)?.search_page_input_element_,
12685
12803
  get_search_query_: get_search_query_,
12686
12804
  search_query_url_param_name_: search_query_url_param_name_,
12687
12805
  previous_searches_: previous_searches,
@@ -12829,6 +12947,7 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
12829
12947
  const {
12830
12948
  state_: state_
12831
12949
  } = shared_properties;
12950
+ let registered_input_element;
12832
12951
  const grid_spacing_override = $5vyXB$solidjs.createMemo(() => {
12833
12952
  const {
12834
12953
  grid_spacing: grid_spacing
@@ -12857,7 +12976,7 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
12857
12976
  min_products_to_fetch_: $2c61e4cd8229c49a$var$min_products_to_fetch_,
12858
12977
  local_filter_cache_: state_.local_filter_cache,
12859
12978
  content_search_enabled_: () => depict_search.enable_content_search ?? $2c61e4cd8229c49a$var$content_search_default,
12860
- search_field_value_: state_.field_value,
12979
+ search_field_value_: shared_properties.search_field_value_,
12861
12980
  get_search_query_: shared_properties.get_search_query_,
12862
12981
  clear_filters_on_next_submit_: shared_properties.clear_filters_on_next_submit_,
12863
12982
  open_modal_: (...args) => depict_search.modal_open = args,
@@ -12865,6 +12984,16 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
12865
12984
  modalVersionUsed_: shared_properties.modalVersionUsed_,
12866
12985
  showSliderArrow_: () => props.showSliderArrow_,
12867
12986
  i18n_: shared_properties.i18n_,
12987
+ inputFieldRef_: input_element => {
12988
+ const shared_info_right_now = $2c61e4cd8229c49a$export$dde08b2dca8cc1ce.get(depict_search);
12989
+ if (!shared_info_right_now) return;
12990
+ if (input_element === undefined && shared_info_right_now.search_page_input_element_ !== registered_input_element) return;
12991
+ registered_input_element = input_element;
12992
+ $2c61e4cd8229c49a$export$dde08b2dca8cc1ce.set(depict_search, {
12993
+ ...shared_info_right_now,
12994
+ search_page_input_element_: input_element
12995
+ });
12996
+ },
12868
12997
  modalAlignmentSignalsRef_: style => {
12869
12998
  const shared_info_right_now = $2c61e4cd8229c49a$export$dde08b2dca8cc1ce.get(depict_search);
12870
12999
  if (!shared_info_right_now) return;
@@ -13215,7 +13344,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
13215
13344
  return shared_properties.BackIcon_;
13216
13345
  },
13217
13346
  get search_field_value_() {
13218
- return shared_properties.state_.field_value;
13347
+ return shared_properties.search_field_value_;
13219
13348
  },
13220
13349
  get submit_query_() {
13221
13350
  return shared_properties.configured_submit_query_;
@@ -13258,7 +13387,7 @@ function $c0a0659cf97e8eb2$export$316f6f283ae64765(props) {
13258
13387
  return shared_properties.BackIcon_;
13259
13388
  },
13260
13389
  get search_field_value_() {
13261
- return shared_properties.state_.field_value;
13390
+ return shared_properties.search_field_value_;
13262
13391
  },
13263
13392
  get submit_query_() {
13264
13393
  return shared_properties.configured_submit_query_;
@@ -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.10.19";
14
+ export const version = "4.10.20";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -713,6 +713,8 @@ declare function RawSearchModalV2<InputDisplay extends Display, OutputDisplay ex
713
713
  search_query_url_param_name_,
714
714
  previous_searches_,
715
715
  close_modal_,
716
+ set_focus_target_after_close_,
717
+ get_search_page_input_element_,
716
718
  alignmentSignals_,
717
719
  depict_api_,
718
720
  merchant_,
@@ -743,12 +745,14 @@ declare function RawSearchModalV2<InputDisplay extends Display, OutputDisplay ex
743
745
  search_query_url_param_name_: string;
744
746
  previous_searches_: Signal<string[]>;
745
747
  close_modal_: VoidFunction;
748
+ set_focus_target_after_close_: (get_target: (() => HTMLElement | undefined) | undefined) => void;
749
+ get_search_page_input_element_: () => HTMLInputElement | undefined;
746
750
  alignmentSignals_?: ModalAlignmentSignals;
747
751
  depict_api_: DepictAPI<InputDisplay, OutputDisplay>;
748
752
  clear_filters_: (user_triggered: boolean) => void;
749
753
  merchant_: Accessor<string>;
750
754
  market_: Accessor<string>;
751
- submit_query_: (new_query?: string) => void;
755
+ submit_query_: (new_query?: string, before_navigate_?: VoidFunction) => Promise<boolean>;
752
756
  class_list_?: Accessor<Record<string, boolean>>;
753
757
  url_transformer_?: (url_object: URL) => unknown;
754
758
  disable_scrolling_?: boolean;
@@ -785,6 +789,8 @@ declare function RawClassicSearchModal({
785
789
  search_query_url_param_name_,
786
790
  previous_searches_,
787
791
  close_modal_,
792
+ set_focus_target_after_close_,
793
+ get_search_page_input_element_,
788
794
  depict_api_,
789
795
  merchant_,
790
796
  market_,
@@ -810,11 +816,13 @@ declare function RawClassicSearchModal({
810
816
  search_query_url_param_name_: string;
811
817
  previous_searches_: Signal<string[]>;
812
818
  close_modal_: VoidFunction;
819
+ set_focus_target_after_close_: (get_target: (() => HTMLElement | undefined) | undefined) => void;
820
+ get_search_page_input_element_: () => HTMLInputElement | undefined;
813
821
  depict_api_: DepictAPI<any>;
814
822
  clear_filters_: (user_triggered: boolean) => void;
815
823
  merchant_: Accessor<string>;
816
824
  market_: Accessor<string>;
817
- submit_query_: (new_query?: string) => void;
825
+ submit_query_: (new_query?: string, before_navigate_?: VoidFunction) => Promise<boolean>;
818
826
  class_list_?: Accessor<Record<string, boolean>>;
819
827
  url_transformer_?: (url_object: URL) => unknown;
820
828
  disable_scrolling_?: boolean;
@@ -1038,6 +1046,7 @@ export function general_modal_abstraction<StaticOptions extends {
1038
1046
  close_modal_: VoidFunction;
1039
1047
  open_modal_: (extra_options_for_modal?: ExtraOptionsProvidedOnOpen, on_dispose?: VoidFunction) => void;
1040
1048
  register_closing_animation_: (animation: () => Promise<any>) => void;
1049
+ set_focus_target_after_close_: (get_target: (() => HTMLElement | undefined) | undefined) => void;
1041
1050
  }) => Node_Array, modal_fn_opts: StaticOptions, parent?: HTMLElement | ShadowRoot): Promise<{
1042
1051
  open_modal_: (extra_options_for_modal?: any, on_dispose?: VoidFunction | undefined) => Promise<void | undefined>;
1043
1052
  close_modal_: () => void | undefined;