@depict-ai/ui 2.0.24 → 2.0.26
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 +113 -83
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +113 -83
- package/latest/index.cjs +110 -81
- package/latest/index.d.ts +1 -1
- package/latest/index.js +110 -81
- package/package.json +1 -1
- package/server/ES10/index.cjs +73 -44
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +73 -44
- package/server/latest/index.cjs +70 -42
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +70 -42
package/ES10/index.cjs
CHANGED
|
@@ -75,7 +75,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
75
75
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
76
76
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
77
77
|
/*! Depict.ai search and product listing SDK */
|
|
78
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
78
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.26";
|
|
79
79
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
80
80
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
81
81
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -3630,8 +3630,7 @@ function $164d474fea221d77$export$3f1a388cc0d8fed7(props) {
|
|
|
3630
3630
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
3631
3631
|
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3632
3632
|
get when() {
|
|
3633
|
-
|
|
3634
|
-
return (_props$available_filt = props.available_filters_()) === null || _props$available_filt === void 0 ? void 0 : _props$available_filt.length;
|
|
3633
|
+
return props.available_filters_();
|
|
3635
3634
|
},
|
|
3636
3635
|
get fallback() {
|
|
3637
3636
|
return Array.from({
|
|
@@ -4158,11 +4157,14 @@ function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
|
4158
4157
|
thing[function_name] = new Proxy(thing[function_name], {
|
|
4159
4158
|
apply(target, this_arg, arg_list) {
|
|
4160
4159
|
try {
|
|
4161
|
-
|
|
4160
|
+
const old_state = history.state;
|
|
4161
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
4162
|
+
var _arg_list$;
|
|
4163
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
4164
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
4162
4165
|
const cloned_object = {
|
|
4163
|
-
...
|
|
4166
|
+
...intended_new_value_as_obj
|
|
4164
4167
|
};
|
|
4165
|
-
const old_state = history.state;
|
|
4166
4168
|
for (const key in old_state) {
|
|
4167
4169
|
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
4168
4170
|
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
@@ -5411,6 +5413,15 @@ const $9bde34303b3e9ace$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<s
|
|
|
5411
5413
|
function $9bde34303b3e9ace$export$28f6150e232898de() {
|
|
5412
5414
|
return $52FdA$solidjsweb.getNextElement($9bde34303b3e9ace$var$_tmpl$);
|
|
5413
5415
|
}
|
|
5416
|
+
|
|
5417
|
+
/**
|
|
5418
|
+
* Returns true when we have an array of filters that's an array but empty and no selected filters.
|
|
5419
|
+
* Used for hiding the filter button, filter section is from sort/filter modal and desktop filters
|
|
5420
|
+
*/
|
|
5421
|
+
function $8b9c2fa4593b29df$export$50f68cc9882e36a4(args_for_filtering) {
|
|
5422
|
+
var _args_for_filtering$a, _args_for_filtering$s;
|
|
5423
|
+
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);
|
|
5424
|
+
}
|
|
5414
5425
|
const $685149df41127abd$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="clear minor"></button>`, 2),
|
|
5415
5426
|
$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),
|
|
5416
5427
|
$685149df41127abd$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<details class="sorting"></details>`, 2),
|
|
@@ -5652,38 +5663,45 @@ function $685149df41127abd$export$9bf11afa910f536e(_ref) {
|
|
|
5652
5663
|
})();
|
|
5653
5664
|
}
|
|
5654
5665
|
}), _el$7, _co$);
|
|
5655
|
-
$52FdA$solidjsweb.insert(_el$5, $52FdA$solidjsweb.createComponent((0, $
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
return $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$6);
|
|
5659
|
-
},
|
|
5660
|
-
get summary_() {
|
|
5661
|
-
return (() => {
|
|
5662
|
-
const _el$26 = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$4),
|
|
5663
|
-
_el$27 = _el$26.firstChild,
|
|
5664
|
-
_el$28 = _el$27.firstChild,
|
|
5665
|
-
_el$30 = _el$28.firstChild,
|
|
5666
|
-
[_el$31, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$30.nextSibling),
|
|
5667
|
-
_el$29 = _el$31.nextSibling,
|
|
5668
|
-
_el$32 = _el$28.nextSibling,
|
|
5669
|
-
[_el$33, _co$7] = $52FdA$solidjsweb.getNextMarker(_el$32.nextSibling);
|
|
5670
|
-
$52FdA$solidjsweb.insert(_el$28, $52FdA$solidjsweb.createComponent((0, $9bde34303b3e9ace$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5671
|
-
$52FdA$solidjsweb.insert(_el$29, () => i18n_.filters_());
|
|
5672
|
-
$52FdA$solidjsweb.insert(_el$27, $52FdA$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
5673
|
-
expanded_: filters_expanded,
|
|
5674
|
-
i18n_: i18n_
|
|
5675
|
-
}), _el$33, _co$7);
|
|
5676
|
-
return _el$26;
|
|
5677
|
-
})();
|
|
5666
|
+
$52FdA$solidjsweb.insert(_el$5, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
5667
|
+
get when() {
|
|
5668
|
+
return !$8b9c2fa4593b29df$export$50f68cc9882e36a4(args_for_filtering_);
|
|
5678
5669
|
},
|
|
5679
5670
|
get children() {
|
|
5680
|
-
return (()
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
}
|
|
5685
|
-
|
|
5686
|
-
|
|
5671
|
+
return $52FdA$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
|
|
5672
|
+
is_open_: [filters_expanded, set_filters_expanded],
|
|
5673
|
+
get details_() {
|
|
5674
|
+
return $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$6);
|
|
5675
|
+
},
|
|
5676
|
+
get summary_() {
|
|
5677
|
+
return (() => {
|
|
5678
|
+
const _el$26 = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$4),
|
|
5679
|
+
_el$27 = _el$26.firstChild,
|
|
5680
|
+
_el$28 = _el$27.firstChild,
|
|
5681
|
+
_el$30 = _el$28.firstChild,
|
|
5682
|
+
[_el$31, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$30.nextSibling),
|
|
5683
|
+
_el$29 = _el$31.nextSibling,
|
|
5684
|
+
_el$32 = _el$28.nextSibling,
|
|
5685
|
+
[_el$33, _co$7] = $52FdA$solidjsweb.getNextMarker(_el$32.nextSibling);
|
|
5686
|
+
$52FdA$solidjsweb.insert(_el$28, $52FdA$solidjsweb.createComponent((0, $9bde34303b3e9ace$export$28f6150e232898de), {}), _el$31, _co$6);
|
|
5687
|
+
$52FdA$solidjsweb.insert(_el$29, () => i18n_.filters_());
|
|
5688
|
+
$52FdA$solidjsweb.insert(_el$27, $52FdA$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
5689
|
+
expanded_: filters_expanded,
|
|
5690
|
+
i18n_: i18n_
|
|
5691
|
+
}), _el$33, _co$7);
|
|
5692
|
+
return _el$26;
|
|
5693
|
+
})();
|
|
5694
|
+
},
|
|
5695
|
+
get children() {
|
|
5696
|
+
return (() => {
|
|
5697
|
+
const _el$34 = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$5);
|
|
5698
|
+
$52FdA$solidjsweb.insert(_el$34, $52FdA$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), $52FdA$solidjsweb.mergeProps(args_for_filtering_, {
|
|
5699
|
+
are_in_modal_: true
|
|
5700
|
+
})));
|
|
5701
|
+
return _el$34;
|
|
5702
|
+
})();
|
|
5703
|
+
}
|
|
5704
|
+
});
|
|
5687
5705
|
}
|
|
5688
5706
|
}), _el$9, _co$2);
|
|
5689
5707
|
$52FdA$solidjsweb.insert(_el$10, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
@@ -5796,6 +5814,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5796
5814
|
selected_filters_: selected_filters_,
|
|
5797
5815
|
i18n_: i18n_
|
|
5798
5816
|
};
|
|
5817
|
+
const hide_filters = $52FdA$solidjs.createMemo(() => $8b9c2fa4593b29df$export$50f68cc9882e36a4(filter_options));
|
|
5799
5818
|
const sorting_options = {
|
|
5800
5819
|
current_sorting_: current_sorting_,
|
|
5801
5820
|
available_sortings_: available_sortings_,
|
|
@@ -5810,7 +5829,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5810
5829
|
search_filters_open_: search_filters_open_,
|
|
5811
5830
|
search_sorting_open_: search_sorting_open_,
|
|
5812
5831
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5813
|
-
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined
|
|
5832
|
+
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
5833
|
+
hide_button_: hide_filters
|
|
5814
5834
|
});
|
|
5815
5835
|
};
|
|
5816
5836
|
const make_open_sorting_button = function () {
|
|
@@ -5862,12 +5882,17 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5862
5882
|
} else {
|
|
5863
5883
|
var _close_modal_2;
|
|
5864
5884
|
(_close_modal_2 = close_modal_) === null || _close_modal_2 === void 0 || _close_modal_2();
|
|
5865
|
-
if (filters_open()) set_extra_els_in_results_container_((
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5885
|
+
if (filters_open()) set_extra_els_in_results_container_(() => $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
5886
|
+
get when() {
|
|
5887
|
+
return !hide_filters();
|
|
5888
|
+
},
|
|
5889
|
+
get children() {
|
|
5890
|
+
const _el$ = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$),
|
|
5891
|
+
_el$2 = _el$.firstChild;
|
|
5892
|
+
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), filter_options));
|
|
5893
|
+
return _el$;
|
|
5894
|
+
}
|
|
5895
|
+
}));else set_extra_els_in_results_container_((() => {
|
|
5871
5896
|
const _el$3 = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$2),
|
|
5872
5897
|
_el$4 = _el$3.firstChild;
|
|
5873
5898
|
$52FdA$solidjsweb.insert(_el$4, $52FdA$solidjsweb.createComponent((0, $3bd211c857f81dfd$export$1f1775a58da589b5), sorting_options));
|
|
@@ -5933,7 +5958,8 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
5933
5958
|
search_sorting_open_: search_sorting_open_,
|
|
5934
5959
|
filter_button_width_: filter_button_width_,
|
|
5935
5960
|
tabindex_: tabindex_,
|
|
5936
|
-
number_of_rendered_selected_filters_items_: [num_selected_filters]
|
|
5961
|
+
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
5962
|
+
hide_button_: hide_button_
|
|
5937
5963
|
} = _ref3;
|
|
5938
5964
|
const filters_closed = $52FdA$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
5939
5965
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -5979,22 +6005,27 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
5979
6005
|
}), _el$19, _co$4);
|
|
5980
6006
|
$52FdA$solidjsweb.insert(_el$17, () => i18n_.filter_text_());
|
|
5981
6007
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
5982
|
-
const _v$ =
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
_v$
|
|
6008
|
+
const _v$ = hide_button_() ? {
|
|
6009
|
+
display: "none"
|
|
6010
|
+
} : {},
|
|
6011
|
+
_v$2 = !filters_closed(),
|
|
6012
|
+
_v$3 = !!filters_closed(),
|
|
6013
|
+
_v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
|
|
6014
|
+
_v$5 = filter_button_width_ !== null && filter_button_width_ !== void 0 && filter_button_width_() ? {
|
|
5986
6015
|
width: filter_button_width_() + "px"
|
|
5987
6016
|
} : {};
|
|
5988
|
-
|
|
5989
|
-
_v$2 !== _p$._v$2 && _el$16.classList.toggle("
|
|
5990
|
-
_v$3 !== _p$._v$3 && $
|
|
5991
|
-
_p$._v$4
|
|
6017
|
+
_p$._v$ = $52FdA$solidjsweb.style(_el$14, _v$, _p$._v$);
|
|
6018
|
+
_v$2 !== _p$._v$2 && _el$16.classList.toggle("major", _p$._v$2 = _v$2);
|
|
6019
|
+
_v$3 !== _p$._v$3 && _el$16.classList.toggle("minor", _p$._v$3 = _v$3);
|
|
6020
|
+
_v$4 !== _p$._v$4 && $52FdA$solidjsweb.setAttribute(_el$16, "aria-label", _p$._v$4 = _v$4);
|
|
6021
|
+
_p$._v$5 = $52FdA$solidjsweb.style(_el$16, _v$5, _p$._v$5);
|
|
5992
6022
|
return _p$;
|
|
5993
6023
|
}, {
|
|
5994
6024
|
_v$: undefined,
|
|
5995
6025
|
_v$2: undefined,
|
|
5996
6026
|
_v$3: undefined,
|
|
5997
|
-
_v$4: undefined
|
|
6027
|
+
_v$4: undefined,
|
|
6028
|
+
_v$5: undefined
|
|
5998
6029
|
});
|
|
5999
6030
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
6000
6031
|
return _el$14;
|
|
@@ -6054,22 +6085,22 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
6054
6085
|
}
|
|
6055
6086
|
}), _el$25, _co$6);
|
|
6056
6087
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
6057
|
-
const _v$
|
|
6058
|
-
_v$
|
|
6059
|
-
_v$
|
|
6060
|
-
_v$
|
|
6088
|
+
const _v$6 = !sorting_closed(),
|
|
6089
|
+
_v$7 = !!sorting_closed(),
|
|
6090
|
+
_v$8 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
|
|
6091
|
+
_v$9 = sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
6061
6092
|
width: sort_button_width_() + "px"
|
|
6062
6093
|
} : {};
|
|
6063
|
-
_v$
|
|
6064
|
-
_v$
|
|
6065
|
-
_v$
|
|
6066
|
-
_p$._v$
|
|
6094
|
+
_v$6 !== _p$._v$6 && _el$22.classList.toggle("major", _p$._v$6 = _v$6);
|
|
6095
|
+
_v$7 !== _p$._v$7 && _el$22.classList.toggle("minor", _p$._v$7 = _v$7);
|
|
6096
|
+
_v$8 !== _p$._v$8 && $52FdA$solidjsweb.setAttribute(_el$22, "aria-label", _p$._v$8 = _v$8);
|
|
6097
|
+
_p$._v$9 = $52FdA$solidjsweb.style(_el$22, _v$9, _p$._v$9);
|
|
6067
6098
|
return _p$;
|
|
6068
6099
|
}, {
|
|
6069
|
-
_v$5: undefined,
|
|
6070
6100
|
_v$6: undefined,
|
|
6071
6101
|
_v$7: undefined,
|
|
6072
|
-
_v$8: undefined
|
|
6102
|
+
_v$8: undefined,
|
|
6103
|
+
_v$9: undefined
|
|
6073
6104
|
});
|
|
6074
6105
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
6075
6106
|
return _el$22;
|
|
@@ -9456,7 +9487,8 @@ function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
|
9456
9487
|
get_modal_search_results_: get_modal_search_results_,
|
|
9457
9488
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
9458
9489
|
router_: router_,
|
|
9459
|
-
content_results_: content_results_
|
|
9490
|
+
content_results_: content_results_,
|
|
9491
|
+
has_previous_searches_matching_query_: has_previous_searches_matching_query_
|
|
9460
9492
|
} = _ref;
|
|
9461
9493
|
const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = $52FdA$solidjs.createSignal(() => false);
|
|
9462
9494
|
$52FdA$solidjs.createComputed(() => {
|
|
@@ -9465,7 +9497,7 @@ function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
|
9465
9497
|
const search_results = (_get_modal_search_res = get_modal_search_results_()) === null || _get_modal_search_res === void 0 ? void 0 : _get_modal_search_res();
|
|
9466
9498
|
const content_results = content_results_();
|
|
9467
9499
|
// If we only have one content result and nothing else, go there when pressing enter
|
|
9468
|
-
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) {
|
|
9500
|
+
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_()) {
|
|
9469
9501
|
const [{
|
|
9470
9502
|
page_url: page_url
|
|
9471
9503
|
}] = content_results;
|
|
@@ -9490,7 +9522,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9490
9522
|
search_field_value_: search_field_value_,
|
|
9491
9523
|
get_search_query_: get_search_query_,
|
|
9492
9524
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
9493
|
-
previous_searches_: unfiltered_previous_searches,
|
|
9525
|
+
previous_searches_: [unfiltered_previous_searches, set_unfiltered_previous_searches_],
|
|
9494
9526
|
previous_searches_text_: previous_searches_text_,
|
|
9495
9527
|
depict_api_: depict_api_,
|
|
9496
9528
|
tenant_: tenant_,
|
|
@@ -9512,7 +9544,16 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9512
9544
|
const [read_search_field_value] = search_field_value_;
|
|
9513
9545
|
const updating_blocked = $52FdA$solidjs.createSignal(false);
|
|
9514
9546
|
const [read_suggestion_signal_, write_suggestion_signal] = $52FdA$solidjs.createSignal([]);
|
|
9515
|
-
const
|
|
9547
|
+
const previous_searches_without_current_query = $52FdA$solidjs.createMemo(() => [...unfiltered_previous_searches()].reverse().filter(q => q !== get_search_query_()));
|
|
9548
|
+
const previous_searches_matching_query = $52FdA$solidjs.createMemo(() => {
|
|
9549
|
+
return previous_searches_without_current_query().filter(cs_search => {
|
|
9550
|
+
var _searching_for_value;
|
|
9551
|
+
const search = cs_search.toLowerCase();
|
|
9552
|
+
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
9553
|
+
if (!value) return false;
|
|
9554
|
+
return search.includes(value) || value.includes(search);
|
|
9555
|
+
}).slice(0, 2);
|
|
9556
|
+
});
|
|
9516
9557
|
const deparallelized_fn = $52FdA$depictaiutilishared.deparallelize_no_drop(async request_obj => {
|
|
9517
9558
|
var _api_response$suggest;
|
|
9518
9559
|
const api_response = await depict_api_.suggest(request_obj);
|
|
@@ -9554,7 +9595,8 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9554
9595
|
get_modal_search_results_: get_modal_search_results_,
|
|
9555
9596
|
read_suggestion_signal_: read_suggestion_signal_,
|
|
9556
9597
|
router_: router_,
|
|
9557
|
-
content_results_: get_content_results_
|
|
9598
|
+
content_results_: get_content_results_,
|
|
9599
|
+
has_previous_searches_matching_query_: $52FdA$solidjs.createMemo(() => previous_searches_matching_query().length > 0)
|
|
9558
9600
|
});
|
|
9559
9601
|
$52FdA$solidjs.createComputed(() => {
|
|
9560
9602
|
const field_value = read_search_field_value();
|
|
@@ -9591,13 +9633,11 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9591
9633
|
get children() {
|
|
9592
9634
|
return $52FdA$solidjsweb.createComponent((0, $4edbc04f5c5a1843$export$a146ac6fa8346a25), {
|
|
9593
9635
|
i18n_: i18n_,
|
|
9594
|
-
|
|
9595
|
-
return unfiltered_previous_searches[1];
|
|
9596
|
-
},
|
|
9636
|
+
set_unfiltered_previous_searches_: set_unfiltered_previous_searches_,
|
|
9597
9637
|
search_query_param_name_: search_query_url_param_name_,
|
|
9598
9638
|
text_: previous_searches_text_,
|
|
9599
9639
|
get previous_searches_() {
|
|
9600
|
-
return $52FdA$solidjs.createMemo(() =>
|
|
9640
|
+
return $52FdA$solidjs.createMemo(() => previous_searches_without_current_query().slice(0, 3));
|
|
9601
9641
|
},
|
|
9602
9642
|
selected_index_: selected_index_,
|
|
9603
9643
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -9606,17 +9646,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
9606
9646
|
});
|
|
9607
9647
|
}
|
|
9608
9648
|
}), $52FdA$solidjsweb.createComponent((0, $0677d509ad208e22$export$e872e2339fb04a7f), {
|
|
9609
|
-
|
|
9610
|
-
return $52FdA$solidjs.createMemo(() => {
|
|
9611
|
-
return filtered_previous_searches().filter(cs_search => {
|
|
9612
|
-
var _searching_for_value;
|
|
9613
|
-
const search = cs_search.toLowerCase();
|
|
9614
|
-
const value = (_searching_for_value = searching_for_value()) === null || _searching_for_value === void 0 ? void 0 : _searching_for_value.toLowerCase();
|
|
9615
|
-
if (!value) return false;
|
|
9616
|
-
return search.includes(value) || value.includes(search);
|
|
9617
|
-
}).slice(0, 2);
|
|
9618
|
-
});
|
|
9619
|
-
},
|
|
9649
|
+
filtered_previous_searches_: previous_searches_matching_query,
|
|
9620
9650
|
on_previous_searches_page_: show_previous_searches_component,
|
|
9621
9651
|
i18n_: i18n_,
|
|
9622
9652
|
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.26";
|
|
11
11
|
export type SDKGridSpacing = string | {
|
|
12
12
|
horizontal: string;
|
|
13
13
|
vertical: string;
|