@depict-ai/ui 4.10.29 → 4.10.31
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 +119 -58
- package/ES10/index.d.ts +6 -1
- package/ES10/index.js +119 -58
- package/latest/index.cjs +114 -58
- package/latest/index.d.ts +6 -1
- package/latest/index.js +114 -58
- package/locales/ES10/index.cjs +27 -13
- package/locales/ES10/index.d.ts +5 -0
- package/locales/ES10/index.js +27 -13
- package/locales/latest/index.cjs +27 -13
- package/locales/latest/index.d.ts +5 -0
- package/locales/latest/index.js +27 -13
- package/package.json +4 -4
- package/server/ES10/index.cjs +56 -7
- package/server/ES10/index.d.ts +6 -1
- package/server/ES10/index.js +56 -7
- package/server/latest/index.cjs +51 -7
- package/server/latest/index.d.ts +6 -1
- package/server/latest/index.js +51 -7
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.31";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $b8hua$createSignal(false);
|
|
16
16
|
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
@@ -8577,6 +8577,31 @@ function $01c33966d9ddb108$export$f50b88e2a00918b5(fn) {
|
|
|
8577
8577
|
}
|
|
8578
8578
|
};
|
|
8579
8579
|
}
|
|
8580
|
+
var $f0f23d1343f3986f$var$_tmpl$ = ["<b", ">", "</b>"],
|
|
8581
|
+
$f0f23d1343f3986f$var$_tmpl$2 = ["<div", ' class="no-exact-matches" role="status">', "</div>"];
|
|
8582
|
+
function $f0f23d1343f3986f$export$cff209a01196ea2a(response) {
|
|
8583
|
+
var _response$displays;
|
|
8584
|
+
return (response === null || response === void 0 ? void 0 : response.is_fallback) === true && !!((_response$displays = response.displays) !== null && _response$displays !== void 0 && _response$displays.length);
|
|
8585
|
+
}
|
|
8586
|
+
function $f0f23d1343f3986f$export$6011f3c8b3c691cd(_ref) {
|
|
8587
|
+
let {
|
|
8588
|
+
get_search_query_: get_search_query_,
|
|
8589
|
+
i18n_: i18n_,
|
|
8590
|
+
is_fallback_: is_fallback_
|
|
8591
|
+
} = _ref;
|
|
8592
|
+
const contents = $b8hua$createMemo($b8hua$catchify1(() => {
|
|
8593
|
+
var _i18n_$get_no_exact_m, _i18n_$get_no_exact_m2;
|
|
8594
|
+
return (_i18n_$get_no_exact_m = i18n_.get_no_exact_matches_) === null || _i18n_$get_no_exact_m === void 0 ? void 0 : (_i18n_$get_no_exact_m2 = _i18n_$get_no_exact_m.call(i18n_)) === null || _i18n_$get_no_exact_m2 === void 0 ? void 0 : _i18n_$get_no_exact_m2($b8hua$ssr($f0f23d1343f3986f$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(get_search_query_())));
|
|
8595
|
+
}));
|
|
8596
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
8597
|
+
get when() {
|
|
8598
|
+
return is_fallback_() && get_search_query_().trim() !== "" && contents();
|
|
8599
|
+
},
|
|
8600
|
+
get children() {
|
|
8601
|
+
return $b8hua$ssr($f0f23d1343f3986f$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape(contents()));
|
|
8602
|
+
}
|
|
8603
|
+
});
|
|
8604
|
+
}
|
|
8580
8605
|
function $d0883254246d3eb6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
|
|
8581
8606
|
const isSelected = $b8hua$createMemo(() => {
|
|
8582
8607
|
const selectedValue = selectedIndex();
|
|
@@ -8716,6 +8741,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
8716
8741
|
i18n_: i18n_,
|
|
8717
8742
|
router_: router_,
|
|
8718
8743
|
set_modal_search_results_: set_modal_search_results_,
|
|
8744
|
+
set_instant_query_: set_instant_query_,
|
|
8719
8745
|
InstantCardImageComponent_: InstantCardImageComponent_,
|
|
8720
8746
|
itemIndex_: itemIndex_,
|
|
8721
8747
|
selected_index_: selected_index_,
|
|
@@ -8754,6 +8780,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
8754
8780
|
// Maybe we should move this createResource out of this component, on the other hand it bloats the parent component and if it fails it takes more than needed with it, so I think writing the content results from here is better
|
|
8755
8781
|
// This is for the press-enter-to-instant-content-result feature which gets called from Autocomplete.tsx/TextSuggestions.tsx
|
|
8756
8782
|
set_modal_search_results_(() => search_results);
|
|
8783
|
+
if (set_instant_query_) $b8hua$createComputed(() => set_instant_query_(read_current_instant_query()));
|
|
8757
8784
|
$b8hua$onCleanup(() => set_modal_search_results_(undefined)); // for consistency, in case this component crashes
|
|
8758
8785
|
if (itemIndex_) {
|
|
8759
8786
|
const [, set_currently_showing_suggestions] = currently_showing_suggestions_;
|
|
@@ -9737,6 +9764,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
9737
9764
|
body_: bodyAlignmentSignal = $b8hua$createSignal({})
|
|
9738
9765
|
} = alignmentSignals_ || {};
|
|
9739
9766
|
const [bodyAlignmentStyle] = bodyAlignmentSignal;
|
|
9767
|
+
const [get_instant_query_, set_instant_query_] = $b8hua$createSignal("");
|
|
9740
9768
|
const [get_modal_search_results, set_modal_search_results_] = $b8hua$createSignal();
|
|
9741
9769
|
const close_on_escape_handler = $b8hua$catchify1(_ref2 => {
|
|
9742
9770
|
let {
|
|
@@ -9861,7 +9889,14 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
9861
9889
|
get children() {
|
|
9862
9890
|
return $b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
9863
9891
|
get children() {
|
|
9864
|
-
return $
|
|
9892
|
+
return [$b8hua$createComponent((0, $f0f23d1343f3986f$export$6011f3c8b3c691cd), {
|
|
9893
|
+
get_search_query_: get_instant_query_,
|
|
9894
|
+
i18n_: i18n_,
|
|
9895
|
+
is_fallback_: () => {
|
|
9896
|
+
const results = get_modal_search_results();
|
|
9897
|
+
return !!results && !results.loading && $f0f23d1343f3986f$export$cff209a01196ea2a(results());
|
|
9898
|
+
}
|
|
9899
|
+
}), $f7414b949aeabc90$export$62f101a8aa597bf8({
|
|
9865
9900
|
search_field_value_: search_field_value_,
|
|
9866
9901
|
depict_api_: depict_api_,
|
|
9867
9902
|
merchant_: merchant_,
|
|
@@ -9869,6 +9904,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
9869
9904
|
market_: market_,
|
|
9870
9905
|
router_: router_,
|
|
9871
9906
|
set_modal_search_results_: set_modal_search_results_,
|
|
9907
|
+
set_instant_query_: set_instant_query_,
|
|
9872
9908
|
InstantCardImageComponent_: props => $b8hua$createMemo(() => {
|
|
9873
9909
|
var _props$alt_;
|
|
9874
9910
|
return $b8hua$ContainedImage({
|
|
@@ -9884,7 +9920,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
9884
9920
|
});
|
|
9885
9921
|
}),
|
|
9886
9922
|
...instant_results_options_
|
|
9887
|
-
});
|
|
9923
|
+
})];
|
|
9888
9924
|
}
|
|
9889
9925
|
});
|
|
9890
9926
|
}
|
|
@@ -10347,7 +10383,7 @@ function $1abb91ab5abc8994$export$66d1697a0f27069c(modalLayoutStacked) {
|
|
|
10347
10383
|
instantResultsIndex_: instantResultsIndex_
|
|
10348
10384
|
};
|
|
10349
10385
|
}
|
|
10350
|
-
var $06fcd2a345efd24d$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
|
|
10386
|
+
var $06fcd2a345efd24d$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"],
|
|
10351
10387
|
$06fcd2a345efd24d$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
|
|
10352
10388
|
$06fcd2a345efd24d$var$_tmpl$3 = ["<b", ">", "</b>"],
|
|
10353
10389
|
$06fcd2a345efd24d$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
|
|
@@ -10418,6 +10454,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
10418
10454
|
const [unfiltered_previous_searches] = previous_searches_;
|
|
10419
10455
|
const random_classname_body = $b8hua$make_random_classname();
|
|
10420
10456
|
const backdropRandomClassname = $b8hua$make_random_classname();
|
|
10457
|
+
const [get_instant_query_, set_instant_query_] = $b8hua$createSignal("");
|
|
10421
10458
|
const [get_modal_search_results_, set_modal_search_results_] = $b8hua$createSignal();
|
|
10422
10459
|
const close_on_escape_handler = $b8hua$catchify1(evt => {
|
|
10423
10460
|
if (evt.key === "Escape") {
|
|
@@ -10579,7 +10616,14 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
10579
10616
|
get children() {
|
|
10580
10617
|
return $b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
10581
10618
|
get children() {
|
|
10582
|
-
return $b8hua$ssr($06fcd2a345efd24d$var$_tmpl$, $b8hua$ssrHydrationKey(), "order:" + $b8hua$escape(itemIndexes.instantResultsIndex_(), true), $b8hua$escape(i18n_.products_()), $b8hua$escape($
|
|
10619
|
+
return $b8hua$ssr($06fcd2a345efd24d$var$_tmpl$, $b8hua$ssrHydrationKey(), "order:" + $b8hua$escape(itemIndexes.instantResultsIndex_(), true), $b8hua$escape(i18n_.products_()), $b8hua$escape($b8hua$createComponent((0, $f0f23d1343f3986f$export$6011f3c8b3c691cd), {
|
|
10620
|
+
get_search_query_: get_instant_query_,
|
|
10621
|
+
i18n_: i18n_,
|
|
10622
|
+
is_fallback_: () => {
|
|
10623
|
+
const results = get_modal_search_results_();
|
|
10624
|
+
return !!results && !results.loading && $f0f23d1343f3986f$export$cff209a01196ea2a(results());
|
|
10625
|
+
}
|
|
10626
|
+
})), $b8hua$escape($f7414b949aeabc90$export$62f101a8aa597bf8({
|
|
10583
10627
|
search_field_value_: search_field_value_,
|
|
10584
10628
|
depict_api_: depict_api_,
|
|
10585
10629
|
merchant_: merchant_,
|
|
@@ -10587,6 +10631,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
10587
10631
|
market_: market_,
|
|
10588
10632
|
router_: router_,
|
|
10589
10633
|
set_modal_search_results_: set_modal_search_results_,
|
|
10634
|
+
set_instant_query_: set_instant_query_,
|
|
10590
10635
|
itemIndex_: itemIndexes.instantResultsIndex_,
|
|
10591
10636
|
selected_index_: selected_index_,
|
|
10592
10637
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -13156,7 +13201,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13156
13201
|
});
|
|
13157
13202
|
}
|
|
13158
13203
|
var $da279c5a540c6846$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
13159
|
-
$da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
13204
|
+
$da279c5a540c6846$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
13160
13205
|
function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
13161
13206
|
let {
|
|
13162
13207
|
depict_api_: depict_api_,
|
|
@@ -13479,7 +13524,11 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13479
13524
|
}
|
|
13480
13525
|
});
|
|
13481
13526
|
}
|
|
13482
|
-
})), $b8hua$escape(results_filters[0]()), $b8hua$escape($b8hua$createComponent((0, $
|
|
13527
|
+
})), $b8hua$escape(results_filters[0]()), $b8hua$escape($b8hua$createComponent((0, $f0f23d1343f3986f$export$6011f3c8b3c691cd), {
|
|
13528
|
+
get_search_query_: get_search_query_,
|
|
13529
|
+
i18n_: i18n_,
|
|
13530
|
+
is_fallback_: () => !search_results_.loading && $f0f23d1343f3986f$export$cff209a01196ea2a(search_results_())
|
|
13531
|
+
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
13483
13532
|
get when() {
|
|
13484
13533
|
var _selected_filters_$;
|
|
13485
13534
|
return (_selected_filters_$ = selected_filters_[0]()) === null || _selected_filters_$ === void 0 ? void 0 : _selected_filters_$.length;
|
package/server/latest/index.cjs
CHANGED
|
@@ -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.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.31";
|
|
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, ({
|
|
@@ -8188,6 +8188,26 @@ function $deaaf04362a1bc71$export$f50b88e2a00918b5(fn) {
|
|
|
8188
8188
|
}
|
|
8189
8189
|
};
|
|
8190
8190
|
}
|
|
8191
|
+
var $b84056ffaebb3f3f$var$_tmpl$ = ["<b", ">", "</b>"],
|
|
8192
|
+
$b84056ffaebb3f3f$var$_tmpl$2 = ["<div", ' class="no-exact-matches" role="status">', "</div>"];
|
|
8193
|
+
function $b84056ffaebb3f3f$export$cff209a01196ea2a(response) {
|
|
8194
|
+
return response?.is_fallback === true && !!response.displays?.length;
|
|
8195
|
+
}
|
|
8196
|
+
function $b84056ffaebb3f3f$export$6011f3c8b3c691cd({
|
|
8197
|
+
get_search_query_: get_search_query_,
|
|
8198
|
+
i18n_: i18n_,
|
|
8199
|
+
is_fallback_: is_fallback_
|
|
8200
|
+
}) {
|
|
8201
|
+
const contents = $5vyXB$solidjs.createMemo($5vyXB$depictaiutilishared.catchify(() => i18n_.get_no_exact_matches_?.()?.($5vyXB$solidjsweb.ssr($b84056ffaebb3f3f$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(get_search_query_())))));
|
|
8202
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
8203
|
+
get when() {
|
|
8204
|
+
return is_fallback_() && get_search_query_().trim() !== "" && contents();
|
|
8205
|
+
},
|
|
8206
|
+
get children() {
|
|
8207
|
+
return $5vyXB$solidjsweb.ssr($b84056ffaebb3f3f$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(contents()));
|
|
8208
|
+
}
|
|
8209
|
+
});
|
|
8210
|
+
}
|
|
8191
8211
|
function $f144ea315d9e4caa$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
|
|
8192
8212
|
const isSelected = $5vyXB$solidjs.createMemo(() => {
|
|
8193
8213
|
const selectedValue = selectedIndex();
|
|
@@ -8317,6 +8337,7 @@ function $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
|
8317
8337
|
i18n_: i18n_,
|
|
8318
8338
|
router_: router_,
|
|
8319
8339
|
set_modal_search_results_: set_modal_search_results_,
|
|
8340
|
+
set_instant_query_: set_instant_query_,
|
|
8320
8341
|
InstantCardImageComponent_: InstantCardImageComponent_,
|
|
8321
8342
|
itemIndex_: itemIndex_,
|
|
8322
8343
|
selected_index_: selected_index_,
|
|
@@ -8352,6 +8373,7 @@ function $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
|
8352
8373
|
// Maybe we should move this createResource out of this component, on the other hand it bloats the parent component and if it fails it takes more than needed with it, so I think writing the content results from here is better
|
|
8353
8374
|
// This is for the press-enter-to-instant-content-result feature which gets called from Autocomplete.tsx/TextSuggestions.tsx
|
|
8354
8375
|
set_modal_search_results_(() => search_results);
|
|
8376
|
+
if (set_instant_query_) $5vyXB$solidjs.createComputed(() => set_instant_query_(read_current_instant_query()));
|
|
8355
8377
|
$5vyXB$solidjs.onCleanup(() => set_modal_search_results_(undefined)); // for consistency, in case this component crashes
|
|
8356
8378
|
if (itemIndex_) {
|
|
8357
8379
|
const [, set_currently_showing_suggestions] = currently_showing_suggestions_;
|
|
@@ -9282,6 +9304,7 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
9282
9304
|
body_: bodyAlignmentSignal = $5vyXB$solidjs.createSignal({})
|
|
9283
9305
|
} = alignmentSignals_ || {};
|
|
9284
9306
|
const [bodyAlignmentStyle] = bodyAlignmentSignal;
|
|
9307
|
+
const [get_instant_query_, set_instant_query_] = $5vyXB$solidjs.createSignal("");
|
|
9285
9308
|
const [get_modal_search_results, set_modal_search_results_] = $5vyXB$solidjs.createSignal();
|
|
9286
9309
|
const close_on_escape_handler = $5vyXB$depictaiutilishared.catchify(({
|
|
9287
9310
|
key: key
|
|
@@ -9401,7 +9424,14 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
9401
9424
|
get children() {
|
|
9402
9425
|
return $5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
9403
9426
|
get children() {
|
|
9404
|
-
return $
|
|
9427
|
+
return [$5vyXB$solidjsweb.createComponent((0, $b84056ffaebb3f3f$export$6011f3c8b3c691cd), {
|
|
9428
|
+
get_search_query_: get_instant_query_,
|
|
9429
|
+
i18n_: i18n_,
|
|
9430
|
+
is_fallback_: () => {
|
|
9431
|
+
const results = get_modal_search_results();
|
|
9432
|
+
return !!results && !results.loading && $b84056ffaebb3f3f$export$cff209a01196ea2a(results());
|
|
9433
|
+
}
|
|
9434
|
+
}), $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
9405
9435
|
search_field_value_: search_field_value_,
|
|
9406
9436
|
depict_api_: depict_api_,
|
|
9407
9437
|
merchant_: merchant_,
|
|
@@ -9409,6 +9439,7 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
9409
9439
|
market_: market_,
|
|
9410
9440
|
router_: router_,
|
|
9411
9441
|
set_modal_search_results_: set_modal_search_results_,
|
|
9442
|
+
set_instant_query_: set_instant_query_,
|
|
9412
9443
|
InstantCardImageComponent_: props => $5vyXB$solidjs.createMemo(() => $5vyXB$depictaiutilishared.ContainedImage({
|
|
9413
9444
|
loading: "lazy",
|
|
9414
9445
|
aspect_ratio: 1,
|
|
@@ -9421,7 +9452,7 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
9421
9452
|
sizes: "0px"
|
|
9422
9453
|
})),
|
|
9423
9454
|
...instant_results_options_
|
|
9424
|
-
});
|
|
9455
|
+
})];
|
|
9425
9456
|
}
|
|
9426
9457
|
});
|
|
9427
9458
|
}
|
|
@@ -9858,7 +9889,7 @@ function $3b9f2020814c7876$export$66d1697a0f27069c(modalLayoutStacked) {
|
|
|
9858
9889
|
instantResultsIndex_: instantResultsIndex_
|
|
9859
9890
|
};
|
|
9860
9891
|
}
|
|
9861
|
-
var $11597ae03e703a47$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
|
|
9892
|
+
var $11597ae03e703a47$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"],
|
|
9862
9893
|
$11597ae03e703a47$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
|
|
9863
9894
|
$11597ae03e703a47$var$_tmpl$3 = ["<b", ">", "</b>"],
|
|
9864
9895
|
$11597ae03e703a47$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
|
|
@@ -9928,6 +9959,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
9928
9959
|
const [unfiltered_previous_searches] = previous_searches_;
|
|
9929
9960
|
const random_classname_body = $5vyXB$depictaiutilishared.make_random_classname();
|
|
9930
9961
|
const backdropRandomClassname = $5vyXB$depictaiutilishared.make_random_classname();
|
|
9962
|
+
const [get_instant_query_, set_instant_query_] = $5vyXB$solidjs.createSignal("");
|
|
9931
9963
|
const [get_modal_search_results_, set_modal_search_results_] = $5vyXB$solidjs.createSignal();
|
|
9932
9964
|
const close_on_escape_handler = $5vyXB$depictaiutilishared.catchify(evt => {
|
|
9933
9965
|
if (evt.key === "Escape") {
|
|
@@ -10082,7 +10114,14 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
10082
10114
|
get children() {
|
|
10083
10115
|
return $5vyXB$solidjsweb.createComponent((0, $84798aaa863a4909$export$e68cff63f76bd15b), {
|
|
10084
10116
|
get children() {
|
|
10085
|
-
return $5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "order:" + $5vyXB$solidjsweb.escape(itemIndexes.instantResultsIndex_(), true), $5vyXB$solidjsweb.escape(i18n_.products_()), $5vyXB$solidjsweb.escape($
|
|
10117
|
+
return $5vyXB$solidjsweb.ssr($11597ae03e703a47$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "order:" + $5vyXB$solidjsweb.escape(itemIndexes.instantResultsIndex_(), true), $5vyXB$solidjsweb.escape(i18n_.products_()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $b84056ffaebb3f3f$export$6011f3c8b3c691cd), {
|
|
10118
|
+
get_search_query_: get_instant_query_,
|
|
10119
|
+
i18n_: i18n_,
|
|
10120
|
+
is_fallback_: () => {
|
|
10121
|
+
const results = get_modal_search_results_();
|
|
10122
|
+
return !!results && !results.loading && $b84056ffaebb3f3f$export$cff209a01196ea2a(results());
|
|
10123
|
+
}
|
|
10124
|
+
})), $5vyXB$solidjsweb.escape($6ae556e536054e87$export$62f101a8aa597bf8({
|
|
10086
10125
|
search_field_value_: search_field_value_,
|
|
10087
10126
|
depict_api_: depict_api_,
|
|
10088
10127
|
merchant_: merchant_,
|
|
@@ -10090,6 +10129,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
10090
10129
|
market_: market_,
|
|
10091
10130
|
router_: router_,
|
|
10092
10131
|
set_modal_search_results_: set_modal_search_results_,
|
|
10132
|
+
set_instant_query_: set_instant_query_,
|
|
10093
10133
|
itemIndex_: itemIndexes.instantResultsIndex_,
|
|
10094
10134
|
selected_index_: selected_index_,
|
|
10095
10135
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -12445,7 +12485,7 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
12445
12485
|
});
|
|
12446
12486
|
}
|
|
12447
12487
|
var $f1d7cb69f839a526$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
12448
|
-
$f1d7cb69f839a526$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
12488
|
+
$f1d7cb69f839a526$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
12449
12489
|
function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
12450
12490
|
depict_api_: depict_api_,
|
|
12451
12491
|
search_field_value_: search_field_value_,
|
|
@@ -12749,7 +12789,11 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
12749
12789
|
}
|
|
12750
12790
|
});
|
|
12751
12791
|
}
|
|
12752
|
-
})), $5vyXB$solidjsweb.escape(results_filters[0]()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $
|
|
12792
|
+
})), $5vyXB$solidjsweb.escape(results_filters[0]()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $b84056ffaebb3f3f$export$6011f3c8b3c691cd), {
|
|
12793
|
+
get_search_query_: get_search_query_,
|
|
12794
|
+
i18n_: i18n_,
|
|
12795
|
+
is_fallback_: () => !search_results_.loading && $b84056ffaebb3f3f$export$cff209a01196ea2a(search_results_())
|
|
12796
|
+
})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
12753
12797
|
get when() {
|
|
12754
12798
|
return selected_filters_[0]()?.length;
|
|
12755
12799
|
},
|
package/server/latest/index.d.ts
CHANGED
|
@@ -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.
|
|
14
|
+
export const version = "4.10.31";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -111,6 +111,11 @@ interface search_i18n extends plp_shared_i18n {
|
|
|
111
111
|
popular_: string;
|
|
112
112
|
products_: string;
|
|
113
113
|
modal_view_all_no_results_: string;
|
|
114
|
+
/**
|
|
115
|
+
* Shown above the results when no product matched the query and search shows similar products.
|
|
116
|
+
* Optional: a custom locale without it shows no notice.
|
|
117
|
+
*/
|
|
118
|
+
get_no_exact_matches_?: (query: HTMLElement) => Elem[];
|
|
114
119
|
}
|
|
115
120
|
/**
|
|
116
121
|
* Category internationalisation
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.31";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $i7OB2$createSignal(false);
|
|
13
13
|
$i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
|
|
@@ -8086,6 +8086,26 @@ function $d8dbf52fea1773e2$export$f50b88e2a00918b5(fn) {
|
|
|
8086
8086
|
}
|
|
8087
8087
|
};
|
|
8088
8088
|
}
|
|
8089
|
+
var $0ea3251b35307dc0$var$_tmpl$ = ["<b", ">", "</b>"],
|
|
8090
|
+
$0ea3251b35307dc0$var$_tmpl$2 = ["<div", ' class="no-exact-matches" role="status">', "</div>"];
|
|
8091
|
+
function $0ea3251b35307dc0$export$cff209a01196ea2a(response) {
|
|
8092
|
+
return response?.is_fallback === true && !!response.displays?.length;
|
|
8093
|
+
}
|
|
8094
|
+
function $0ea3251b35307dc0$export$6011f3c8b3c691cd({
|
|
8095
|
+
get_search_query_: get_search_query_,
|
|
8096
|
+
i18n_: i18n_,
|
|
8097
|
+
is_fallback_: is_fallback_
|
|
8098
|
+
}) {
|
|
8099
|
+
const contents = $i7OB2$createMemo($i7OB2$catchify1(() => i18n_.get_no_exact_matches_?.()?.($i7OB2$ssr($0ea3251b35307dc0$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(get_search_query_())))));
|
|
8100
|
+
return $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
8101
|
+
get when() {
|
|
8102
|
+
return is_fallback_() && get_search_query_().trim() !== "" && contents();
|
|
8103
|
+
},
|
|
8104
|
+
get children() {
|
|
8105
|
+
return $i7OB2$ssr($0ea3251b35307dc0$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape(contents()));
|
|
8106
|
+
}
|
|
8107
|
+
});
|
|
8108
|
+
}
|
|
8089
8109
|
function $f4125ce4984deee6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
|
|
8090
8110
|
const isSelected = $i7OB2$createMemo(() => {
|
|
8091
8111
|
const selectedValue = selectedIndex();
|
|
@@ -8215,6 +8235,7 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
8215
8235
|
i18n_: i18n_,
|
|
8216
8236
|
router_: router_,
|
|
8217
8237
|
set_modal_search_results_: set_modal_search_results_,
|
|
8238
|
+
set_instant_query_: set_instant_query_,
|
|
8218
8239
|
InstantCardImageComponent_: InstantCardImageComponent_,
|
|
8219
8240
|
itemIndex_: itemIndex_,
|
|
8220
8241
|
selected_index_: selected_index_,
|
|
@@ -8250,6 +8271,7 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
8250
8271
|
// Maybe we should move this createResource out of this component, on the other hand it bloats the parent component and if it fails it takes more than needed with it, so I think writing the content results from here is better
|
|
8251
8272
|
// This is for the press-enter-to-instant-content-result feature which gets called from Autocomplete.tsx/TextSuggestions.tsx
|
|
8252
8273
|
set_modal_search_results_(() => search_results);
|
|
8274
|
+
if (set_instant_query_) $i7OB2$createComputed(() => set_instant_query_(read_current_instant_query()));
|
|
8253
8275
|
$i7OB2$onCleanup(() => set_modal_search_results_(undefined)); // for consistency, in case this component crashes
|
|
8254
8276
|
if (itemIndex_) {
|
|
8255
8277
|
const [, set_currently_showing_suggestions] = currently_showing_suggestions_;
|
|
@@ -9180,6 +9202,7 @@ function $42912431795f188e$var$RawClassicSearchModal({
|
|
|
9180
9202
|
body_: bodyAlignmentSignal = $i7OB2$createSignal({})
|
|
9181
9203
|
} = alignmentSignals_ || {};
|
|
9182
9204
|
const [bodyAlignmentStyle] = bodyAlignmentSignal;
|
|
9205
|
+
const [get_instant_query_, set_instant_query_] = $i7OB2$createSignal("");
|
|
9183
9206
|
const [get_modal_search_results, set_modal_search_results_] = $i7OB2$createSignal();
|
|
9184
9207
|
const close_on_escape_handler = $i7OB2$catchify1(({
|
|
9185
9208
|
key: key
|
|
@@ -9299,7 +9322,14 @@ function $42912431795f188e$var$RawClassicSearchModal({
|
|
|
9299
9322
|
get children() {
|
|
9300
9323
|
return $i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
9301
9324
|
get children() {
|
|
9302
|
-
return $
|
|
9325
|
+
return [$i7OB2$createComponent((0, $0ea3251b35307dc0$export$6011f3c8b3c691cd), {
|
|
9326
|
+
get_search_query_: get_instant_query_,
|
|
9327
|
+
i18n_: i18n_,
|
|
9328
|
+
is_fallback_: () => {
|
|
9329
|
+
const results = get_modal_search_results();
|
|
9330
|
+
return !!results && !results.loading && $0ea3251b35307dc0$export$cff209a01196ea2a(results());
|
|
9331
|
+
}
|
|
9332
|
+
}), $eea41f703612261b$export$62f101a8aa597bf8({
|
|
9303
9333
|
search_field_value_: search_field_value_,
|
|
9304
9334
|
depict_api_: depict_api_,
|
|
9305
9335
|
merchant_: merchant_,
|
|
@@ -9307,6 +9337,7 @@ function $42912431795f188e$var$RawClassicSearchModal({
|
|
|
9307
9337
|
market_: market_,
|
|
9308
9338
|
router_: router_,
|
|
9309
9339
|
set_modal_search_results_: set_modal_search_results_,
|
|
9340
|
+
set_instant_query_: set_instant_query_,
|
|
9310
9341
|
InstantCardImageComponent_: props => $i7OB2$createMemo(() => $i7OB2$ContainedImage({
|
|
9311
9342
|
loading: "lazy",
|
|
9312
9343
|
aspect_ratio: 1,
|
|
@@ -9319,7 +9350,7 @@ function $42912431795f188e$var$RawClassicSearchModal({
|
|
|
9319
9350
|
sizes: "0px"
|
|
9320
9351
|
})),
|
|
9321
9352
|
...instant_results_options_
|
|
9322
|
-
});
|
|
9353
|
+
})];
|
|
9323
9354
|
}
|
|
9324
9355
|
});
|
|
9325
9356
|
}
|
|
@@ -9756,7 +9787,7 @@ function $140dbdee2e0b252f$export$66d1697a0f27069c(modalLayoutStacked) {
|
|
|
9756
9787
|
instantResultsIndex_: instantResultsIndex_
|
|
9757
9788
|
};
|
|
9758
9789
|
}
|
|
9759
|
-
var $500a16dd18ee5a71$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--></div>"],
|
|
9790
|
+
var $500a16dd18ee5a71$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" style="', '"><h2>', "</h2><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"],
|
|
9760
9791
|
$500a16dd18ee5a71$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
|
|
9761
9792
|
$500a16dd18ee5a71$var$_tmpl$3 = ["<b", ">", "</b>"],
|
|
9762
9793
|
$500a16dd18ee5a71$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
|
|
@@ -9826,6 +9857,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
9826
9857
|
const [unfiltered_previous_searches] = previous_searches_;
|
|
9827
9858
|
const random_classname_body = $i7OB2$make_random_classname();
|
|
9828
9859
|
const backdropRandomClassname = $i7OB2$make_random_classname();
|
|
9860
|
+
const [get_instant_query_, set_instant_query_] = $i7OB2$createSignal("");
|
|
9829
9861
|
const [get_modal_search_results_, set_modal_search_results_] = $i7OB2$createSignal();
|
|
9830
9862
|
const close_on_escape_handler = $i7OB2$catchify1(evt => {
|
|
9831
9863
|
if (evt.key === "Escape") {
|
|
@@ -9980,7 +10012,14 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
9980
10012
|
get children() {
|
|
9981
10013
|
return $i7OB2$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
9982
10014
|
get children() {
|
|
9983
|
-
return $i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$, $i7OB2$ssrHydrationKey(), "order:" + $i7OB2$escape(itemIndexes.instantResultsIndex_(), true), $i7OB2$escape(i18n_.products_()), $i7OB2$escape($
|
|
10015
|
+
return $i7OB2$ssr($500a16dd18ee5a71$var$_tmpl$, $i7OB2$ssrHydrationKey(), "order:" + $i7OB2$escape(itemIndexes.instantResultsIndex_(), true), $i7OB2$escape(i18n_.products_()), $i7OB2$escape($i7OB2$createComponent((0, $0ea3251b35307dc0$export$6011f3c8b3c691cd), {
|
|
10016
|
+
get_search_query_: get_instant_query_,
|
|
10017
|
+
i18n_: i18n_,
|
|
10018
|
+
is_fallback_: () => {
|
|
10019
|
+
const results = get_modal_search_results_();
|
|
10020
|
+
return !!results && !results.loading && $0ea3251b35307dc0$export$cff209a01196ea2a(results());
|
|
10021
|
+
}
|
|
10022
|
+
})), $i7OB2$escape($eea41f703612261b$export$62f101a8aa597bf8({
|
|
9984
10023
|
search_field_value_: search_field_value_,
|
|
9985
10024
|
depict_api_: depict_api_,
|
|
9986
10025
|
merchant_: merchant_,
|
|
@@ -9988,6 +10027,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
9988
10027
|
market_: market_,
|
|
9989
10028
|
router_: router_,
|
|
9990
10029
|
set_modal_search_results_: set_modal_search_results_,
|
|
10030
|
+
set_instant_query_: set_instant_query_,
|
|
9991
10031
|
itemIndex_: itemIndexes.instantResultsIndex_,
|
|
9992
10032
|
selected_index_: selected_index_,
|
|
9993
10033
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
@@ -12343,7 +12383,7 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
12343
12383
|
});
|
|
12344
12384
|
}
|
|
12345
12385
|
var $7097477c78a89208$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
12346
|
-
$7097477c78a89208$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
12386
|
+
$7097477c78a89208$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
|
|
12347
12387
|
function $7097477c78a89208$export$a54ec244c8863715({
|
|
12348
12388
|
depict_api_: depict_api_,
|
|
12349
12389
|
search_field_value_: search_field_value_,
|
|
@@ -12647,7 +12687,11 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
12647
12687
|
}
|
|
12648
12688
|
});
|
|
12649
12689
|
}
|
|
12650
|
-
})), $i7OB2$escape(results_filters[0]()), $i7OB2$escape($i7OB2$createComponent((0, $
|
|
12690
|
+
})), $i7OB2$escape(results_filters[0]()), $i7OB2$escape($i7OB2$createComponent((0, $0ea3251b35307dc0$export$6011f3c8b3c691cd), {
|
|
12691
|
+
get_search_query_: get_search_query_,
|
|
12692
|
+
i18n_: i18n_,
|
|
12693
|
+
is_fallback_: () => !search_results_.loading && $0ea3251b35307dc0$export$cff209a01196ea2a(search_results_())
|
|
12694
|
+
})), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
12651
12695
|
get when() {
|
|
12652
12696
|
return selected_filters_[0]()?.length;
|
|
12653
12697
|
},
|