@depict-ai/ui 2.0.23 → 2.0.25

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.cjs CHANGED
@@ -10,6 +10,7 @@ function $parcel$export(e, n, v, s) {
10
10
  configurable: true
11
11
  });
12
12
  }
13
+ $parcel$export(module.exports, "strip_encoded_filter_and_sort", () => $1ab22f2cd39b3061$export$916e6850778505f6);
13
14
  $parcel$export(module.exports, "encode_filters", () => $1ab22f2cd39b3061$export$58aa3f171519b6d7);
14
15
  $parcel$export(module.exports, "decode_filters", () => $1ab22f2cd39b3061$export$f934fa24c3a86811);
15
16
  $parcel$export(module.exports, "shopifyContainedImageContextSymbol", () => $a33065cfed827fc0$export$d7b7ab832c20e2f4);
@@ -68,7 +69,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
68
69
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
69
70
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
70
71
  /*! Depict.ai search and product listing SDK */
71
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.23";
72
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.25";
72
73
  const $1ab22f2cd39b3061$var$fallback_operator = "in";
73
74
  const $1ab22f2cd39b3061$var$fallback_token = "";
74
75
  const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
@@ -3424,7 +3425,7 @@ function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
3424
3425
  // Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
3425
3426
  return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
3426
3427
  get when() {
3427
- return props.available_filters_()?.length;
3428
+ return props.available_filters_();
3428
3429
  },
3429
3430
  get fallback() {
3430
3431
  return Array.from({
@@ -5047,6 +5048,14 @@ const $02215fefc955d01e$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<s
5047
5048
  function $02215fefc955d01e$export$28f6150e232898de() {
5048
5049
  return $gVhhF$solidjsweb.getNextElement($02215fefc955d01e$var$_tmpl$);
5049
5050
  }
5051
+
5052
+ /**
5053
+ * Returns true when we have an array of filters that's an array but empty and no selected filters.
5054
+ * Used for hiding the filter button, filter section is from sort/filter modal and desktop filters
5055
+ */
5056
+ function $7e91f9b0c6d56424$export$50f68cc9882e36a4(args_for_filtering) {
5057
+ return args_for_filtering.available_filters_()?.length === 0 && !args_for_filtering.selected_filters_[0]()?.length;
5058
+ }
5050
5059
  const $1872ceb56ede7a52$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button class="clear minor"></button>`, 2),
5051
5060
  $1872ceb56ede7a52$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class="depict plp" id="depict-filter-sort-mobile-modal-container"><div class="depict-filter-sort-modal-backdrop"></div><button class="dismiss-modal"></button><div class="filter-sort-modal"><div class="body"><!#><!/><!#><!/></div><div class="bottom-row"><!#><!/><button class="show-results major"></button></div></div></div>`, 20),
5052
5061
  $1872ceb56ede7a52$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<details class="sorting"></details>`, 2),
@@ -5283,38 +5292,45 @@ function $1872ceb56ede7a52$export$9bf11afa910f536e({
5283
5292
  })();
5284
5293
  }
5285
5294
  }), _el$7, _co$);
5286
- $gVhhF$solidjsweb.insert(_el$5, $gVhhF$solidjsweb.createComponent((0, $a69e505a12a77874$export$6c6d7a51fa9aa15d), {
5287
- is_open_: [filters_expanded, set_filters_expanded],
5288
- get details_() {
5289
- return $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$6);
5290
- },
5291
- get summary_() {
5292
- return (() => {
5293
- const _el$26 = $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$4),
5294
- _el$27 = _el$26.firstChild,
5295
- _el$28 = _el$27.firstChild,
5296
- _el$30 = _el$28.firstChild,
5297
- [_el$31, _co$6] = $gVhhF$solidjsweb.getNextMarker(_el$30.nextSibling),
5298
- _el$29 = _el$31.nextSibling,
5299
- _el$32 = _el$28.nextSibling,
5300
- [_el$33, _co$7] = $gVhhF$solidjsweb.getNextMarker(_el$32.nextSibling);
5301
- $gVhhF$solidjsweb.insert(_el$28, $gVhhF$solidjsweb.createComponent((0, $02215fefc955d01e$export$28f6150e232898de), {}), _el$31, _co$6);
5302
- $gVhhF$solidjsweb.insert(_el$29, () => i18n_.filters_());
5303
- $gVhhF$solidjsweb.insert(_el$27, $gVhhF$solidjsweb.createComponent((0, $7567511a7c3e4bd7$export$e5c2828934226505), {
5304
- expanded_: filters_expanded,
5305
- i18n_: i18n_
5306
- }), _el$33, _co$7);
5307
- return _el$26;
5308
- })();
5295
+ $gVhhF$solidjsweb.insert(_el$5, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
5296
+ get when() {
5297
+ return !$7e91f9b0c6d56424$export$50f68cc9882e36a4(args_for_filtering_);
5309
5298
  },
5310
5299
  get children() {
5311
- return (() => {
5312
- const _el$34 = $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$5);
5313
- $gVhhF$solidjsweb.insert(_el$34, $gVhhF$solidjsweb.createComponent((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), $gVhhF$solidjsweb.mergeProps(args_for_filtering_, {
5314
- are_in_modal_: true
5315
- })));
5316
- return _el$34;
5317
- })();
5300
+ return $gVhhF$solidjsweb.createComponent((0, $a69e505a12a77874$export$6c6d7a51fa9aa15d), {
5301
+ is_open_: [filters_expanded, set_filters_expanded],
5302
+ get details_() {
5303
+ return $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$6);
5304
+ },
5305
+ get summary_() {
5306
+ return (() => {
5307
+ const _el$26 = $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$4),
5308
+ _el$27 = _el$26.firstChild,
5309
+ _el$28 = _el$27.firstChild,
5310
+ _el$30 = _el$28.firstChild,
5311
+ [_el$31, _co$6] = $gVhhF$solidjsweb.getNextMarker(_el$30.nextSibling),
5312
+ _el$29 = _el$31.nextSibling,
5313
+ _el$32 = _el$28.nextSibling,
5314
+ [_el$33, _co$7] = $gVhhF$solidjsweb.getNextMarker(_el$32.nextSibling);
5315
+ $gVhhF$solidjsweb.insert(_el$28, $gVhhF$solidjsweb.createComponent((0, $02215fefc955d01e$export$28f6150e232898de), {}), _el$31, _co$6);
5316
+ $gVhhF$solidjsweb.insert(_el$29, () => i18n_.filters_());
5317
+ $gVhhF$solidjsweb.insert(_el$27, $gVhhF$solidjsweb.createComponent((0, $7567511a7c3e4bd7$export$e5c2828934226505), {
5318
+ expanded_: filters_expanded,
5319
+ i18n_: i18n_
5320
+ }), _el$33, _co$7);
5321
+ return _el$26;
5322
+ })();
5323
+ },
5324
+ get children() {
5325
+ return (() => {
5326
+ const _el$34 = $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$5);
5327
+ $gVhhF$solidjsweb.insert(_el$34, $gVhhF$solidjsweb.createComponent((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), $gVhhF$solidjsweb.mergeProps(args_for_filtering_, {
5328
+ are_in_modal_: true
5329
+ })));
5330
+ return _el$34;
5331
+ })();
5332
+ }
5333
+ });
5318
5334
  }
5319
5335
  }), _el$9, _co$2);
5320
5336
  $gVhhF$solidjsweb.insert(_el$10, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
@@ -5419,6 +5435,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
5419
5435
  selected_filters_: selected_filters_,
5420
5436
  i18n_: i18n_
5421
5437
  };
5438
+ const hide_filters = $gVhhF$solidjs.createMemo(() => $7e91f9b0c6d56424$export$50f68cc9882e36a4(filter_options));
5422
5439
  const sorting_options = {
5423
5440
  current_sorting_: current_sorting_,
5424
5441
  available_sortings_: available_sortings_,
@@ -5430,7 +5447,8 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
5430
5447
  search_filters_open_: search_filters_open_,
5431
5448
  search_sorting_open_: search_sorting_open_,
5432
5449
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
5433
- filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
5450
+ filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
5451
+ hide_button_: hide_filters
5434
5452
  });
5435
5453
  const make_open_sorting_button = (adhere_to_width = false, is_tabbable = false) => $gVhhF$solidjsweb.createComponent($f8f64d05c525825b$var$OpenSortingButton, {
5436
5454
  tabindex_: is_tabbable ? 0 : -1,
@@ -5474,12 +5492,17 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
5474
5492
  set_extra_els_in_results_container_("");
5475
5493
  } else {
5476
5494
  close_modal_?.();
5477
- if (filters_open()) set_extra_els_in_results_container_((() => {
5478
- const _el$ = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$),
5479
- _el$2 = _el$.firstChild;
5480
- $gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), filter_options));
5481
- return _el$;
5482
- })());else set_extra_els_in_results_container_((() => {
5495
+ if (filters_open()) set_extra_els_in_results_container_(() => $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
5496
+ get when() {
5497
+ return !hide_filters();
5498
+ },
5499
+ get children() {
5500
+ const _el$ = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$),
5501
+ _el$2 = _el$.firstChild;
5502
+ $gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), filter_options));
5503
+ return _el$;
5504
+ }
5505
+ }));else set_extra_els_in_results_container_((() => {
5483
5506
  const _el$3 = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$2),
5484
5507
  _el$4 = _el$3.firstChild;
5485
5508
  $gVhhF$solidjsweb.insert(_el$4, $gVhhF$solidjsweb.createComponent((0, $be89be42ce9ea60f$export$1f1775a58da589b5), sorting_options));
@@ -5541,7 +5564,8 @@ function $f8f64d05c525825b$var$OpenFiltersButton({
5541
5564
  search_sorting_open_: search_sorting_open_,
5542
5565
  filter_button_width_: filter_button_width_,
5543
5566
  tabindex_: tabindex_,
5544
- number_of_rendered_selected_filters_items_: [num_selected_filters]
5567
+ number_of_rendered_selected_filters_items_: [num_selected_filters],
5568
+ hide_button_: hide_button_
5545
5569
  }) {
5546
5570
  const filters_closed = $gVhhF$solidjs.createMemo(() => !search_filters_open_[0]());
5547
5571
  // We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
@@ -5587,22 +5611,27 @@ function $f8f64d05c525825b$var$OpenFiltersButton({
5587
5611
  }), _el$19, _co$4);
5588
5612
  $gVhhF$solidjsweb.insert(_el$17, () => i18n_.filter_text_());
5589
5613
  $gVhhF$solidjsweb.effect(_p$ => {
5590
- const _v$ = !filters_closed(),
5591
- _v$2 = !!filters_closed(),
5592
- _v$3 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
5593
- _v$4 = filter_button_width_?.() ? {
5614
+ const _v$ = hide_button_() ? {
5615
+ display: "none"
5616
+ } : {},
5617
+ _v$2 = !filters_closed(),
5618
+ _v$3 = !!filters_closed(),
5619
+ _v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
5620
+ _v$5 = filter_button_width_?.() ? {
5594
5621
  width: filter_button_width_() + "px"
5595
5622
  } : {};
5596
- _v$ !== _p$._v$ && _el$16.classList.toggle("major", _p$._v$ = _v$);
5597
- _v$2 !== _p$._v$2 && _el$16.classList.toggle("minor", _p$._v$2 = _v$2);
5598
- _v$3 !== _p$._v$3 && $gVhhF$solidjsweb.setAttribute(_el$16, "aria-label", _p$._v$3 = _v$3);
5599
- _p$._v$4 = $gVhhF$solidjsweb.style(_el$16, _v$4, _p$._v$4);
5623
+ _p$._v$ = $gVhhF$solidjsweb.style(_el$14, _v$, _p$._v$);
5624
+ _v$2 !== _p$._v$2 && _el$16.classList.toggle("major", _p$._v$2 = _v$2);
5625
+ _v$3 !== _p$._v$3 && _el$16.classList.toggle("minor", _p$._v$3 = _v$3);
5626
+ _v$4 !== _p$._v$4 && $gVhhF$solidjsweb.setAttribute(_el$16, "aria-label", _p$._v$4 = _v$4);
5627
+ _p$._v$5 = $gVhhF$solidjsweb.style(_el$16, _v$5, _p$._v$5);
5600
5628
  return _p$;
5601
5629
  }, {
5602
5630
  _v$: undefined,
5603
5631
  _v$2: undefined,
5604
5632
  _v$3: undefined,
5605
- _v$4: undefined
5633
+ _v$4: undefined,
5634
+ _v$5: undefined
5606
5635
  });
5607
5636
  $gVhhF$solidjsweb.runHydrationEvents();
5608
5637
  return _el$14;
@@ -5654,22 +5683,22 @@ function $f8f64d05c525825b$var$OpenSortingButton({
5654
5683
  }
5655
5684
  }), _el$25, _co$6);
5656
5685
  $gVhhF$solidjsweb.effect(_p$ => {
5657
- const _v$5 = !sorting_closed(),
5658
- _v$6 = !!sorting_closed(),
5659
- _v$7 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
5660
- _v$8 = sort_button_width_?.() ? {
5686
+ const _v$6 = !sorting_closed(),
5687
+ _v$7 = !!sorting_closed(),
5688
+ _v$8 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
5689
+ _v$9 = sort_button_width_?.() ? {
5661
5690
  width: sort_button_width_() + "px"
5662
5691
  } : {};
5663
- _v$5 !== _p$._v$5 && _el$22.classList.toggle("major", _p$._v$5 = _v$5);
5664
- _v$6 !== _p$._v$6 && _el$22.classList.toggle("minor", _p$._v$6 = _v$6);
5665
- _v$7 !== _p$._v$7 && $gVhhF$solidjsweb.setAttribute(_el$22, "aria-label", _p$._v$7 = _v$7);
5666
- _p$._v$8 = $gVhhF$solidjsweb.style(_el$22, _v$8, _p$._v$8);
5692
+ _v$6 !== _p$._v$6 && _el$22.classList.toggle("major", _p$._v$6 = _v$6);
5693
+ _v$7 !== _p$._v$7 && _el$22.classList.toggle("minor", _p$._v$7 = _v$7);
5694
+ _v$8 !== _p$._v$8 && $gVhhF$solidjsweb.setAttribute(_el$22, "aria-label", _p$._v$8 = _v$8);
5695
+ _p$._v$9 = $gVhhF$solidjsweb.style(_el$22, _v$9, _p$._v$9);
5667
5696
  return _p$;
5668
5697
  }, {
5669
- _v$5: undefined,
5670
5698
  _v$6: undefined,
5671
5699
  _v$7: undefined,
5672
- _v$8: undefined
5700
+ _v$8: undefined,
5701
+ _v$9: undefined
5673
5702
  });
5674
5703
  $gVhhF$solidjsweb.runHydrationEvents();
5675
5704
  return _el$22;
@@ -8797,7 +8826,8 @@ function $4f0ae864ec7c394e$export$af0124069c150252({
8797
8826
  get_modal_search_results_: get_modal_search_results_,
8798
8827
  read_suggestion_signal_: read_suggestion_signal_,
8799
8828
  router_: router_,
8800
- content_results_: content_results_
8829
+ content_results_: content_results_,
8830
+ has_previous_searches_matching_query_: has_previous_searches_matching_query_
8801
8831
  }) {
8802
8832
  const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = $gVhhF$solidjs.createSignal(() => false);
8803
8833
  $gVhhF$solidjs.createComputed(() => {
@@ -8805,7 +8835,7 @@ function $4f0ae864ec7c394e$export$af0124069c150252({
8805
8835
  const search_results = get_modal_search_results_()?.();
8806
8836
  const content_results = content_results_();
8807
8837
  // If we only have one content result and nothing else, go there when pressing enter
8808
- if (!suggestions.length && !search_results?.displays?.length && content_results?.length === 1) {
8838
+ if (!suggestions.length && !search_results?.displays?.length && content_results?.length === 1 && !has_previous_searches_matching_query_()) {
8809
8839
  const [{
8810
8840
  page_url: page_url
8811
8841
  }] = content_results;
@@ -8829,7 +8859,7 @@ function $3ec9e21d6b6debdd$export$2f2b9559550c7bbc({
8829
8859
  search_field_value_: search_field_value_,
8830
8860
  get_search_query_: get_search_query_,
8831
8861
  search_query_url_param_name_: search_query_url_param_name_,
8832
- previous_searches_: unfiltered_previous_searches,
8862
+ previous_searches_: [unfiltered_previous_searches, set_unfiltered_previous_searches_],
8833
8863
  previous_searches_text_: previous_searches_text_,
8834
8864
  depict_api_: depict_api_,
8835
8865
  tenant_: tenant_,
@@ -8851,7 +8881,15 @@ function $3ec9e21d6b6debdd$export$2f2b9559550c7bbc({
8851
8881
  const [read_search_field_value] = search_field_value_;
8852
8882
  const updating_blocked = $gVhhF$solidjs.createSignal(false);
8853
8883
  const [read_suggestion_signal_, write_suggestion_signal] = $gVhhF$solidjs.createSignal([]);
8854
- const filtered_previous_searches = $gVhhF$solidjs.createMemo(() => [...unfiltered_previous_searches[0]()].reverse().filter(q => q !== get_search_query_()));
8884
+ const previous_searches_without_current_query = $gVhhF$solidjs.createMemo(() => [...unfiltered_previous_searches()].reverse().filter(q => q !== get_search_query_()));
8885
+ const previous_searches_matching_query = $gVhhF$solidjs.createMemo(() => {
8886
+ return previous_searches_without_current_query().filter(cs_search => {
8887
+ const search = cs_search.toLowerCase();
8888
+ const value = searching_for_value()?.toLowerCase();
8889
+ if (!value) return false;
8890
+ return search.includes(value) || value.includes(search);
8891
+ }).slice(0, 2);
8892
+ });
8855
8893
  const deparallelized_fn = $gVhhF$depictaiutilishared.deparallelize_no_drop(async request_obj => {
8856
8894
  const api_response = await depict_api_.suggest(request_obj);
8857
8895
  if (!api_response?.suggestions?.length) {
@@ -8887,7 +8925,8 @@ function $3ec9e21d6b6debdd$export$2f2b9559550c7bbc({
8887
8925
  get_modal_search_results_: get_modal_search_results_,
8888
8926
  read_suggestion_signal_: read_suggestion_signal_,
8889
8927
  router_: router_,
8890
- content_results_: get_content_results_
8928
+ content_results_: get_content_results_,
8929
+ has_previous_searches_matching_query_: $gVhhF$solidjs.createMemo(() => previous_searches_matching_query().length > 0)
8891
8930
  });
8892
8931
  $gVhhF$solidjs.createComputed(() => {
8893
8932
  const field_value = read_search_field_value();
@@ -8924,13 +8963,11 @@ function $3ec9e21d6b6debdd$export$2f2b9559550c7bbc({
8924
8963
  get children() {
8925
8964
  return $gVhhF$solidjsweb.createComponent((0, $9a268bf73b31a717$export$a146ac6fa8346a25), {
8926
8965
  i18n_: i18n_,
8927
- get set_unfiltered_previous_searches_() {
8928
- return unfiltered_previous_searches[1];
8929
- },
8966
+ set_unfiltered_previous_searches_: set_unfiltered_previous_searches_,
8930
8967
  search_query_param_name_: search_query_url_param_name_,
8931
8968
  text_: previous_searches_text_,
8932
8969
  get previous_searches_() {
8933
- return $gVhhF$solidjs.createMemo(() => filtered_previous_searches().slice(0, 3));
8970
+ return $gVhhF$solidjs.createMemo(() => previous_searches_without_current_query().slice(0, 3));
8934
8971
  },
8935
8972
  selected_index_: selected_index_,
8936
8973
  currently_showing_suggestions_: currently_showing_suggestions_,
@@ -8939,16 +8976,7 @@ function $3ec9e21d6b6debdd$export$2f2b9559550c7bbc({
8939
8976
  });
8940
8977
  }
8941
8978
  }), $gVhhF$solidjsweb.createComponent((0, $6b65ba8af12c5a26$export$e872e2339fb04a7f), {
8942
- get filtered_previous_searches_() {
8943
- return $gVhhF$solidjs.createMemo(() => {
8944
- return filtered_previous_searches().filter(cs_search => {
8945
- const search = cs_search.toLowerCase();
8946
- const value = searching_for_value()?.toLowerCase();
8947
- if (!value) return false;
8948
- return search.includes(value) || value.includes(search);
8949
- }).slice(0, 2);
8950
- });
8951
- },
8979
+ filtered_previous_searches_: previous_searches_matching_query,
8952
8980
  on_previous_searches_page_: show_previous_searches_component,
8953
8981
  i18n_: i18n_,
8954
8982
  get_content_results_: get_content_results_,
package/latest/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.23";
10
+ export const version = "2.0.25";
11
11
  export type SDKGridSpacing = string | {
12
12
  horizontal: string;
13
13
  vertical: string;
@@ -47,6 +47,14 @@ export function encode_filters(filters: FilterWithData[], search_params: URLSear
47
47
  * Function that decodes the filters from the provided query parameters and returns them as an array of filter objects.
48
48
  */
49
49
  export function decode_filters(search_params: URLSearchParams, filter_query_param_prefix: string): FilterWithData[];
50
+ /**
51
+ * Remove all Depict filter/sorting query parameters from the given URLSearchParams object.
52
+ * Used to reset the URLSearchParams object to a clean state, before adding new filters/sorting.
53
+ * @param search_params
54
+ * @param filter_query_param_prefix Prefix of the filter query parameters
55
+ * @param sorting_query_param
56
+ */
57
+ export function strip_encoded_filter_and_sort(search_params: URLSearchParams, filter_query_param_prefix: string, sorting_query_param: string): void;
50
58
  /**
51
59
  * Provider to wrap every listing (group of products) in
52
60
  * Used for example for deduplicating ResizeObservers for responsive images