@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/ES10/index.cjs +108 -80
- package/ES10/index.d.ts +9 -1
- package/ES10/index.js +108 -81
- package/latest/index.cjs +106 -78
- package/latest/index.d.ts +9 -1
- package/latest/index.js +106 -79
- package/package.json +1 -1
- package/server/ES10/index.cjs +68 -41
- package/server/ES10/index.d.ts +9 -1
- package/server/ES10/index.js +68 -42
- package/server/latest/index.cjs +66 -39
- package/server/latest/index.d.ts +9 -1
- package/server/latest/index.js +66 -40
package/ES10/index.cjs
CHANGED
|
@@ -16,6 +16,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
16
16
|
function $parcel$interopDefault(a) {
|
|
17
17
|
return a && a.__esModule ? a.default : a;
|
|
18
18
|
}
|
|
19
|
+
$parcel$export(module.exports, "strip_encoded_filter_and_sort", () => $a68b73fd7ba0853f$export$916e6850778505f6);
|
|
19
20
|
$parcel$export(module.exports, "encode_filters", () => $a68b73fd7ba0853f$export$58aa3f171519b6d7);
|
|
20
21
|
$parcel$export(module.exports, "decode_filters", () => $a68b73fd7ba0853f$export$f934fa24c3a86811);
|
|
21
22
|
$parcel$export(module.exports, "shopifyContainedImageContextSymbol", () => $28535bb7671c63d1$export$d7b7ab832c20e2f4);
|
|
@@ -74,7 +75,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
74
75
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
75
76
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
76
77
|
/*! Depict.ai search and product listing SDK */
|
|
77
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
78
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.25";
|
|
78
79
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
79
80
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
80
81
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -3629,8 +3630,7 @@ function $164d474fea221d77$export$3f1a388cc0d8fed7(props) {
|
|
|
3629
3630
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
3630
3631
|
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3631
3632
|
get when() {
|
|
3632
|
-
|
|
3633
|
-
return (_props$available_filt = props.available_filters_()) === null || _props$available_filt === void 0 ? void 0 : _props$available_filt.length;
|
|
3633
|
+
return props.available_filters_();
|
|
3634
3634
|
},
|
|
3635
3635
|
get fallback() {
|
|
3636
3636
|
return Array.from({
|
|
@@ -5410,6 +5410,15 @@ const $9bde34303b3e9ace$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<s
|
|
|
5410
5410
|
function $9bde34303b3e9ace$export$28f6150e232898de() {
|
|
5411
5411
|
return $52FdA$solidjsweb.getNextElement($9bde34303b3e9ace$var$_tmpl$);
|
|
5412
5412
|
}
|
|
5413
|
+
|
|
5414
|
+
/**
|
|
5415
|
+
* Returns true when we have an array of filters that's an array but empty and no selected filters.
|
|
5416
|
+
* Used for hiding the filter button, filter section is from sort/filter modal and desktop filters
|
|
5417
|
+
*/
|
|
5418
|
+
function $8b9c2fa4593b29df$export$50f68cc9882e36a4(args_for_filtering) {
|
|
5419
|
+
var _args_for_filtering$a, _args_for_filtering$s;
|
|
5420
|
+
return ((_args_for_filtering$a = args_for_filtering.available_filters_()) === null || _args_for_filtering$a === void 0 ? void 0 : _args_for_filtering$a.length) === 0 && !((_args_for_filtering$s = args_for_filtering.selected_filters_[0]()) !== null && _args_for_filtering$s !== void 0 && _args_for_filtering$s.length);
|
|
5421
|
+
}
|
|
5413
5422
|
const $685149df41127abd$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="clear minor"></button>`, 2),
|
|
5414
5423
|
$685149df41127abd$var$_tmpl$2 = /*#__PURE__*/$52FdA$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),
|
|
5415
5424
|
$685149df41127abd$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<details class="sorting"></details>`, 2),
|
|
@@ -5651,38 +5660,45 @@ function $685149df41127abd$export$9bf11afa910f536e(_ref) {
|
|
|
5651
5660
|
})();
|
|
5652
5661
|
}
|
|
5653
5662
|
}), _el$7, _co$);
|
|
5654
|
-
$52FdA$solidjsweb.insert(_el$5, $52FdA$solidjsweb.createComponent((0, $
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
return $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$6);
|
|
5658
|
-
},
|
|
5659
|
-
get summary_() {
|
|
5660
|
-
return (() => {
|
|
5661
|
-
const _el$26 = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$4),
|
|
5662
|
-
_el$27 = _el$26.firstChild,
|
|
5663
|
-
_el$28 = _el$27.firstChild,
|
|
5664
|
-
_el$30 = _el$28.firstChild,
|
|
5665
|
-
[_el$31, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$30.nextSibling),
|
|
5666
|
-
_el$29 = _el$31.nextSibling,
|
|
5667
|
-
_el$32 = _el$28.nextSibling,
|
|
5668
|
-
[_el$33, _co$7] = $52FdA$solidjsweb.getNextMarker(_el$32.nextSibling);
|
|
5669
|
-
$52FdA$solidjsweb.insert(_el$28, $52FdA$solidjsweb.createComponent((0, $9bde34303b3e9ace$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5670
|
-
$52FdA$solidjsweb.insert(_el$29, () => i18n_.filters_());
|
|
5671
|
-
$52FdA$solidjsweb.insert(_el$27, $52FdA$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
5672
|
-
expanded_: filters_expanded,
|
|
5673
|
-
i18n_: i18n_
|
|
5674
|
-
}), _el$33, _co$7);
|
|
5675
|
-
return _el$26;
|
|
5676
|
-
})();
|
|
5663
|
+
$52FdA$solidjsweb.insert(_el$5, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
5664
|
+
get when() {
|
|
5665
|
+
return !$8b9c2fa4593b29df$export$50f68cc9882e36a4(args_for_filtering_);
|
|
5677
5666
|
},
|
|
5678
5667
|
get children() {
|
|
5679
|
-
return (()
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
}
|
|
5684
|
-
|
|
5685
|
-
|
|
5668
|
+
return $52FdA$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
|
|
5669
|
+
is_open_: [filters_expanded, set_filters_expanded],
|
|
5670
|
+
get details_() {
|
|
5671
|
+
return $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$6);
|
|
5672
|
+
},
|
|
5673
|
+
get summary_() {
|
|
5674
|
+
return (() => {
|
|
5675
|
+
const _el$26 = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$4),
|
|
5676
|
+
_el$27 = _el$26.firstChild,
|
|
5677
|
+
_el$28 = _el$27.firstChild,
|
|
5678
|
+
_el$30 = _el$28.firstChild,
|
|
5679
|
+
[_el$31, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$30.nextSibling),
|
|
5680
|
+
_el$29 = _el$31.nextSibling,
|
|
5681
|
+
_el$32 = _el$28.nextSibling,
|
|
5682
|
+
[_el$33, _co$7] = $52FdA$solidjsweb.getNextMarker(_el$32.nextSibling);
|
|
5683
|
+
$52FdA$solidjsweb.insert(_el$28, $52FdA$solidjsweb.createComponent((0, $9bde34303b3e9ace$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5684
|
+
$52FdA$solidjsweb.insert(_el$29, () => i18n_.filters_());
|
|
5685
|
+
$52FdA$solidjsweb.insert(_el$27, $52FdA$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
5686
|
+
expanded_: filters_expanded,
|
|
5687
|
+
i18n_: i18n_
|
|
5688
|
+
}), _el$33, _co$7);
|
|
5689
|
+
return _el$26;
|
|
5690
|
+
})();
|
|
5691
|
+
},
|
|
5692
|
+
get children() {
|
|
5693
|
+
return (() => {
|
|
5694
|
+
const _el$34 = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$5);
|
|
5695
|
+
$52FdA$solidjsweb.insert(_el$34, $52FdA$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), $52FdA$solidjsweb.mergeProps(args_for_filtering_, {
|
|
5696
|
+
are_in_modal_: true
|
|
5697
|
+
})));
|
|
5698
|
+
return _el$34;
|
|
5699
|
+
})();
|
|
5700
|
+
}
|
|
5701
|
+
});
|
|
5686
5702
|
}
|
|
5687
5703
|
}), _el$9, _co$2);
|
|
5688
5704
|
$52FdA$solidjsweb.insert(_el$10, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
@@ -5795,6 +5811,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5795
5811
|
selected_filters_: selected_filters_,
|
|
5796
5812
|
i18n_: i18n_
|
|
5797
5813
|
};
|
|
5814
|
+
const hide_filters = $52FdA$solidjs.createMemo(() => $8b9c2fa4593b29df$export$50f68cc9882e36a4(filter_options));
|
|
5798
5815
|
const sorting_options = {
|
|
5799
5816
|
current_sorting_: current_sorting_,
|
|
5800
5817
|
available_sortings_: available_sortings_,
|
|
@@ -5809,7 +5826,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5809
5826
|
search_filters_open_: search_filters_open_,
|
|
5810
5827
|
search_sorting_open_: search_sorting_open_,
|
|
5811
5828
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5812
|
-
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
5829
|
+
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
5830
|
+
hide_button_: hide_filters
|
|
5813
5831
|
});
|
|
5814
5832
|
};
|
|
5815
5833
|
const make_open_sorting_button = function () {
|
|
@@ -5861,12 +5879,17 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5861
5879
|
} else {
|
|
5862
5880
|
var _close_modal_2;
|
|
5863
5881
|
(_close_modal_2 = close_modal_) === null || _close_modal_2 === void 0 || _close_modal_2();
|
|
5864
|
-
if (filters_open()) set_extra_els_in_results_container_((
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5882
|
+
if (filters_open()) set_extra_els_in_results_container_(() => $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
5883
|
+
get when() {
|
|
5884
|
+
return !hide_filters();
|
|
5885
|
+
},
|
|
5886
|
+
get children() {
|
|
5887
|
+
const _el$ = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$),
|
|
5888
|
+
_el$2 = _el$.firstChild;
|
|
5889
|
+
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), filter_options));
|
|
5890
|
+
return _el$;
|
|
5891
|
+
}
|
|
5892
|
+
}));else set_extra_els_in_results_container_((() => {
|
|
5870
5893
|
const _el$3 = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$2),
|
|
5871
5894
|
_el$4 = _el$3.firstChild;
|
|
5872
5895
|
$52FdA$solidjsweb.insert(_el$4, $52FdA$solidjsweb.createComponent((0, $3bd211c857f81dfd$export$1f1775a58da589b5), sorting_options));
|
|
@@ -5932,7 +5955,8 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
5932
5955
|
search_sorting_open_: search_sorting_open_,
|
|
5933
5956
|
filter_button_width_: filter_button_width_,
|
|
5934
5957
|
tabindex_: tabindex_,
|
|
5935
|
-
number_of_rendered_selected_filters_items_: [num_selected_filters]
|
|
5958
|
+
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
5959
|
+
hide_button_: hide_button_
|
|
5936
5960
|
} = _ref3;
|
|
5937
5961
|
const filters_closed = $52FdA$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
5938
5962
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -5978,22 +6002,27 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
5978
6002
|
}), _el$19, _co$4);
|
|
5979
6003
|
$52FdA$solidjsweb.insert(_el$17, () => i18n_.filter_text_());
|
|
5980
6004
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
5981
|
-
const _v$ =
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
_v$
|
|
6005
|
+
const _v$ = hide_button_() ? {
|
|
6006
|
+
display: "none"
|
|
6007
|
+
} : {},
|
|
6008
|
+
_v$2 = !filters_closed(),
|
|
6009
|
+
_v$3 = !!filters_closed(),
|
|
6010
|
+
_v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
|
|
6011
|
+
_v$5 = filter_button_width_ !== null && filter_button_width_ !== void 0 && filter_button_width_() ? {
|
|
5985
6012
|
width: filter_button_width_() + "px"
|
|
5986
6013
|
} : {};
|
|
5987
|
-
|
|
5988
|
-
_v$2 !== _p$._v$2 && _el$16.classList.toggle("
|
|
5989
|
-
_v$3 !== _p$._v$3 && $
|
|
5990
|
-
_p$._v$4
|
|
6014
|
+
_p$._v$ = $52FdA$solidjsweb.style(_el$14, _v$, _p$._v$);
|
|
6015
|
+
_v$2 !== _p$._v$2 && _el$16.classList.toggle("major", _p$._v$2 = _v$2);
|
|
6016
|
+
_v$3 !== _p$._v$3 && _el$16.classList.toggle("minor", _p$._v$3 = _v$3);
|
|
6017
|
+
_v$4 !== _p$._v$4 && $52FdA$solidjsweb.setAttribute(_el$16, "aria-label", _p$._v$4 = _v$4);
|
|
6018
|
+
_p$._v$5 = $52FdA$solidjsweb.style(_el$16, _v$5, _p$._v$5);
|
|
5991
6019
|
return _p$;
|
|
5992
6020
|
}, {
|
|
5993
6021
|
_v$: undefined,
|
|
5994
6022
|
_v$2: undefined,
|
|
5995
6023
|
_v$3: undefined,
|
|
5996
|
-
_v$4: undefined
|
|
6024
|
+
_v$4: undefined,
|
|
6025
|
+
_v$5: undefined
|
|
5997
6026
|
});
|
|
5998
6027
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
5999
6028
|
return _el$14;
|
|
@@ -6053,22 +6082,22 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
6053
6082
|
}
|
|
6054
6083
|
}), _el$25, _co$6);
|
|
6055
6084
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
6056
|
-
const _v$
|
|
6057
|
-
_v$
|
|
6058
|
-
_v$
|
|
6059
|
-
_v$
|
|
6085
|
+
const _v$6 = !sorting_closed(),
|
|
6086
|
+
_v$7 = !!sorting_closed(),
|
|
6087
|
+
_v$8 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
|
|
6088
|
+
_v$9 = sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
6060
6089
|
width: sort_button_width_() + "px"
|
|
6061
6090
|
} : {};
|
|
6062
|
-
_v$
|
|
6063
|
-
_v$
|
|
6064
|
-
_v$
|
|
6065
|
-
_p$._v$
|
|
6091
|
+
_v$6 !== _p$._v$6 && _el$22.classList.toggle("major", _p$._v$6 = _v$6);
|
|
6092
|
+
_v$7 !== _p$._v$7 && _el$22.classList.toggle("minor", _p$._v$7 = _v$7);
|
|
6093
|
+
_v$8 !== _p$._v$8 && $52FdA$solidjsweb.setAttribute(_el$22, "aria-label", _p$._v$8 = _v$8);
|
|
6094
|
+
_p$._v$9 = $52FdA$solidjsweb.style(_el$22, _v$9, _p$._v$9);
|
|
6066
6095
|
return _p$;
|
|
6067
6096
|
}, {
|
|
6068
|
-
_v$5: undefined,
|
|
6069
6097
|
_v$6: undefined,
|
|
6070
6098
|
_v$7: undefined,
|
|
6071
|
-
_v$8: undefined
|
|
6099
|
+
_v$8: undefined,
|
|
6100
|
+
_v$9: undefined
|
|
6072
6101
|
});
|
|
6073
6102
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
6074
6103
|
return _el$22;
|
|
@@ -9455,7 +9484,8 @@ function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
|
9455
9484
|
get_modal_search_results_: get_modal_search_results_,
|
|
9456
9485
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
9457
9486
|
router_: router_,
|
|
9458
|
-
content_results_: content_results_
|
|
9487
|
+
content_results_: content_results_,
|
|
9488
|
+
has_previous_searches_matching_query_: has_previous_searches_matching_query_
|
|
9459
9489
|
} = _ref;
|
|
9460
9490
|
const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = $52FdA$solidjs.createSignal(() => false);
|
|
9461
9491
|
$52FdA$solidjs.createComputed(() => {
|
|
@@ -9464,7 +9494,7 @@ function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
|
9464
9494
|
const search_results = (_get_modal_search_res = get_modal_search_results_()) === null || _get_modal_search_res === void 0 ? void 0 : _get_modal_search_res();
|
|
9465
9495
|
const content_results = content_results_();
|
|
9466
9496
|
// If we only have one content result and nothing else, go there when pressing enter
|
|
9467
|
-
if (!suggestions.length && !(search_results !== null && search_results !== void 0 && (_search_results$displ = search_results.displays) !== null && _search_results$displ !== void 0 && _search_results$displ.length) && (content_results === null || content_results === void 0 ? void 0 : content_results.length) === 1) {
|
|
9497
|
+
if (!suggestions.length && !(search_results !== null && search_results !== void 0 && (_search_results$displ = search_results.displays) !== null && _search_results$displ !== void 0 && _search_results$displ.length) && (content_results === null || content_results === void 0 ? void 0 : content_results.length) === 1 && !has_previous_searches_matching_query_()) {
|
|
9468
9498
|
const [{
|
|
9469
9499
|
page_url: page_url
|
|
9470
9500
|
}] = content_results;
|
|
@@ -9489,7 +9519,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9489
9519
|
search_field_value_: search_field_value_,
|
|
9490
9520
|
get_search_query_: get_search_query_,
|
|
9491
9521
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
9492
|
-
previous_searches_: unfiltered_previous_searches,
|
|
9522
|
+
previous_searches_: [unfiltered_previous_searches, set_unfiltered_previous_searches_],
|
|
9493
9523
|
previous_searches_text_: previous_searches_text_,
|
|
9494
9524
|
depict_api_: depict_api_,
|
|
9495
9525
|
tenant_: tenant_,
|
|
@@ -9511,7 +9541,16 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9511
9541
|
const [read_search_field_value] = search_field_value_;
|
|
9512
9542
|
const updating_blocked = $52FdA$solidjs.createSignal(false);
|
|
9513
9543
|
const [read_suggestion_signal_, write_suggestion_signal] = $52FdA$solidjs.createSignal([]);
|
|
9514
|
-
const
|
|
9544
|
+
const previous_searches_without_current_query = $52FdA$solidjs.createMemo(() => [...unfiltered_previous_searches()].reverse().filter(q => q !== get_search_query_()));
|
|
9545
|
+
const previous_searches_matching_query = $52FdA$solidjs.createMemo(() => {
|
|
9546
|
+
return previous_searches_without_current_query().filter(cs_search => {
|
|
9547
|
+
var _searching_for_value;
|
|
9548
|
+
const search = cs_search.toLowerCase();
|
|
9549
|
+
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
9550
|
+
if (!value) return false;
|
|
9551
|
+
return search.includes(value) || value.includes(search);
|
|
9552
|
+
}).slice(0, 2);
|
|
9553
|
+
});
|
|
9515
9554
|
const deparallelized_fn = $52FdA$depictaiutilishared.deparallelize_no_drop(async request_obj => {
|
|
9516
9555
|
var _api_response$suggest;
|
|
9517
9556
|
const api_response = await depict_api_.suggest(request_obj);
|
|
@@ -9553,7 +9592,8 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9553
9592
|
get_modal_search_results_: get_modal_search_results_,
|
|
9554
9593
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
9555
9594
|
router_: router_,
|
|
9556
|
-
content_results_: get_content_results_
|
|
9595
|
+
content_results_: get_content_results_,
|
|
9596
|
+
has_previous_searches_matching_query_: $52FdA$solidjs.createMemo(() => previous_searches_matching_query().length > 0)
|
|
9557
9597
|
});
|
|
9558
9598
|
$52FdA$solidjs.createComputed(() => {
|
|
9559
9599
|
const field_value = read_search_field_value();
|
|
@@ -9590,13 +9630,11 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9590
9630
|
get children() {
|
|
9591
9631
|
return $52FdA$solidjsweb.createComponent((0, $4edbc04f5c5a1843$export$a146ac6fa8346a25), {
|
|
9592
9632
|
i18n_: i18n_,
|
|
9593
|
-
|
|
9594
|
-
return unfiltered_previous_searches[1];
|
|
9595
|
-
},
|
|
9633
|
+
set_unfiltered_previous_searches_: set_unfiltered_previous_searches_,
|
|
9596
9634
|
search_query_param_name_: search_query_url_param_name_,
|
|
9597
9635
|
text_: previous_searches_text_,
|
|
9598
9636
|
get previous_searches_() {
|
|
9599
|
-
return $52FdA$solidjs.createMemo(() =>
|
|
9637
|
+
return $52FdA$solidjs.createMemo(() => previous_searches_without_current_query().slice(0, 3));
|
|
9600
9638
|
},
|
|
9601
9639
|
selected_index_: selected_index_,
|
|
9602
9640
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -9605,17 +9643,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9605
9643
|
});
|
|
9606
9644
|
}
|
|
9607
9645
|
}), $52FdA$solidjsweb.createComponent((0, $0677d509ad208e22$export$e872e2339fb04a7f), {
|
|
9608
|
-
|
|
9609
|
-
return $52FdA$solidjs.createMemo(() => {
|
|
9610
|
-
return filtered_previous_searches().filter(cs_search => {
|
|
9611
|
-
var _searching_for_value;
|
|
9612
|
-
const search = cs_search.toLowerCase();
|
|
9613
|
-
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
9614
|
-
if (!value) return false;
|
|
9615
|
-
return search.includes(value) || value.includes(search);
|
|
9616
|
-
}).slice(0, 2);
|
|
9617
|
-
});
|
|
9618
|
-
},
|
|
9646
|
+
filtered_previous_searches_: previous_searches_matching_query,
|
|
9619
9647
|
on_previous_searches_page_: show_previous_searches_component,
|
|
9620
9648
|
i18n_: i18n_,
|
|
9621
9649
|
get_content_results_: get_content_results_,
|
package/ES10/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.
|
|
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
|