@depict-ai/ui 1.1.0 → 1.1.2
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/dist/client/main.js +136 -109
- package/dist/client/module.js +137 -111
- package/dist/index.d.ts +78 -27
- package/dist/main.js +169 -126
- package/dist/module.js +259 -131
- package/dist/server/main.js +136 -109
- package/dist/server/module.js +137 -111
- package/package.json +50 -27
package/dist/module.js
CHANGED
|
@@ -1,8 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {
|
|
2
|
+
add_to_version_info as $kyEB6$add_to_version_info,
|
|
3
|
+
add_version_query_params as $kyEB6$add_version_query_params,
|
|
4
|
+
Amazing_Slider as $kyEB6$Amazing_Slider,
|
|
5
|
+
ArrowUp as $kyEB6$ArrowUp,
|
|
6
|
+
async_iterable_ipns as $kyEB6$async_iterable_ipns,
|
|
7
|
+
BackIcon as $kyEB6$BackIcon,
|
|
8
|
+
base64_decode_unicode as $kyEB6$base64_decode_unicode,
|
|
9
|
+
base64_encode_unicode as $kyEB6$base64_encode_unicode,
|
|
10
|
+
base_url as $kyEB6$base_url,
|
|
11
|
+
buildThresholdList as $kyEB6$buildThresholdList,
|
|
12
|
+
catchify as $kyEB6$catchify,
|
|
13
|
+
ContainedImage as $kyEB6$ContainedImage,
|
|
14
|
+
CrossIcon as $kyEB6$CrossIcon,
|
|
15
|
+
deparallelize_no_drop as $kyEB6$deparallelize_no_drop,
|
|
16
|
+
dlog as $kyEB6$dlog,
|
|
17
|
+
dwarn as $kyEB6$dwarn,
|
|
18
|
+
fetch_recs as $kyEB6$fetch_recs,
|
|
19
|
+
fetch_retry as $kyEB6$fetch_retry,
|
|
20
|
+
FilterIcon as $kyEB6$FilterIcon,
|
|
21
|
+
GenericSliderArrowButton as $kyEB6$GenericSliderArrowButton,
|
|
22
|
+
get_depict_id as $kyEB6$get_depict_id,
|
|
23
|
+
get_session_id as $kyEB6$get_session_id,
|
|
24
|
+
get_user_id as $kyEB6$get_user_id,
|
|
25
|
+
href_change_ipns as $kyEB6$href_change_ipns,
|
|
26
|
+
hsl_to_rgb as $kyEB6$hsl_to_rgb,
|
|
27
|
+
insert_surfaces as $kyEB6$insert_surfaces,
|
|
28
|
+
instant_exec_on_suspect_history_change as $kyEB6$instant_exec_on_suspect_history_change,
|
|
29
|
+
is_debug as $kyEB6$is_debug,
|
|
30
|
+
javascript_media_query as $kyEB6$javascript_media_query,
|
|
31
|
+
Layout as $kyEB6$Layout,
|
|
32
|
+
make_asyncIterable_exiter as $kyEB6$make_asyncIterable_exiter,
|
|
33
|
+
make_random_classname as $kyEB6$make_random_classname,
|
|
34
|
+
make_url_with_query_params as $kyEB6$make_url_with_query_params,
|
|
35
|
+
MinusIcon as $kyEB6$MinusIcon,
|
|
36
|
+
n_col_styling_with_dist as $kyEB6$n_col_styling_with_dist,
|
|
37
|
+
observer as $kyEB6$observer,
|
|
38
|
+
PlusIcon as $kyEB6$PlusIcon,
|
|
39
|
+
PreviousSearchIcon as $kyEB6$PreviousSearchIcon,
|
|
40
|
+
queueMacroTask as $kyEB6$queueMacroTask,
|
|
41
|
+
relative_luminance_from_rgb as $kyEB6$relative_luminance_from_rgb,
|
|
42
|
+
report as $kyEB6$report,
|
|
43
|
+
SearchIcon as $kyEB6$SearchIcon,
|
|
44
|
+
slider_fading_factory as $kyEB6$slider_fading_factory,
|
|
45
|
+
slider_snap_css as $kyEB6$slider_snap_css,
|
|
46
|
+
snakeCasifyObject as $kyEB6$snakeCasifyObject,
|
|
47
|
+
sort_obj as $kyEB6$sort_obj,
|
|
48
|
+
SortIconAsc as $kyEB6$SortIconAsc,
|
|
49
|
+
SortIconDesc as $kyEB6$SortIconDesc,
|
|
50
|
+
standard_price_format as $kyEB6$standard_price_format,
|
|
51
|
+
TickIcon as $kyEB6$TickIcon,
|
|
52
|
+
useExpandingContainer as $kyEB6$useExpandingContainer
|
|
53
|
+
} from "@depict-ai/utilishared";
|
|
54
|
+
import {
|
|
55
|
+
addEventListener as $kyEB6$addEventListener,
|
|
56
|
+
classList as $kyEB6$classList,
|
|
57
|
+
className as $kyEB6$className,
|
|
58
|
+
createComponent as $kyEB6$createComponent,
|
|
59
|
+
delegateEvents as $kyEB6$delegateEvents,
|
|
60
|
+
Dynamic as $kyEB6$Dynamic,
|
|
61
|
+
effect as $kyEB6$effect,
|
|
62
|
+
insert as $kyEB6$insert,
|
|
63
|
+
memo as $kyEB6$memo,
|
|
64
|
+
mergeProps as $kyEB6$mergeProps,
|
|
65
|
+
setAttribute as $kyEB6$setAttribute,
|
|
66
|
+
spread as $kyEB6$spread,
|
|
67
|
+
style as $kyEB6$style,
|
|
68
|
+
template as $kyEB6$template,
|
|
69
|
+
use as $kyEB6$use
|
|
70
|
+
} from "solid-js/web";
|
|
71
|
+
import {
|
|
72
|
+
batch as $kyEB6$batch,
|
|
73
|
+
createComputed as $kyEB6$createComputed,
|
|
74
|
+
createEffect as $kyEB6$createEffect,
|
|
75
|
+
createMemo as $kyEB6$createMemo,
|
|
76
|
+
createReaction as $kyEB6$createReaction,
|
|
77
|
+
createRenderEffect as $kyEB6$createRenderEffect,
|
|
78
|
+
createResource as $kyEB6$createResource,
|
|
79
|
+
createRoot as $kyEB6$createRoot,
|
|
80
|
+
createSignal as $kyEB6$createSignal,
|
|
81
|
+
ErrorBoundary as $kyEB6$ErrorBoundary,
|
|
82
|
+
For as $kyEB6$For,
|
|
83
|
+
getOwner as $kyEB6$getOwner,
|
|
84
|
+
Index as $kyEB6$Index,
|
|
85
|
+
on as $kyEB6$on,
|
|
86
|
+
onCleanup as $kyEB6$onCleanup,
|
|
87
|
+
runWithOwner as $kyEB6$runWithOwner,
|
|
88
|
+
Show as $kyEB6$Show,
|
|
89
|
+
Suspense as $kyEB6$Suspense,
|
|
90
|
+
untrack as $kyEB6$untrack
|
|
91
|
+
} from "solid-js";
|
|
92
|
+
|
|
93
|
+
/*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.0.14";
|
|
6
94
|
|
|
7
95
|
|
|
8
96
|
|
|
@@ -144,23 +232,10 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
144
232
|
let resolve_in_progress;
|
|
145
233
|
cache_obj.in_progress_[body] = new Promise((r)=>resolve_in_progress = r);
|
|
146
234
|
try {
|
|
147
|
-
|
|
235
|
+
const search_results = await (0, $kyEB6$fetch_retry)((0, $kyEB6$add_version_query_params)(endpoint1), {
|
|
148
236
|
method: "POST",
|
|
149
237
|
body: body
|
|
150
238
|
});
|
|
151
|
-
if ("query_id" in request && request.type === "collection") // FIXME: Remove. Backwards compatibility layer
|
|
152
|
-
// This will retry the request without the collection type if the first request fails
|
|
153
|
-
{
|
|
154
|
-
if (!search_results || search_results?.status === 404) {
|
|
155
|
-
(0, $kyEB6$dlog)("Fallback request for collections due to failure");
|
|
156
|
-
const fallback_body = JSON.parse(body);
|
|
157
|
-
delete fallback_body.type;
|
|
158
|
-
search_results = await (0, $kyEB6$fetch_retry)((0, $kyEB6$add_version_query_params)(endpoint1), {
|
|
159
|
-
method: "POST",
|
|
160
|
-
body: JSON.stringify(fallback_body)
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
239
|
if (!search_results || search_results.status !== 200) {
|
|
165
240
|
const retval = fallback_response(input_req);
|
|
166
241
|
resolve_in_progress(retval);
|
|
@@ -973,17 +1048,22 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({ displays_by_key_: displays_
|
|
|
973
1048
|
];
|
|
974
1049
|
},
|
|
975
1050
|
children: (product_id, index)=>{
|
|
1051
|
+
// We're using `untrack` here since we don't want to react in here to displays_by_key changing
|
|
1052
|
+
// As long as our key stays the same we assume that the display hasn't changed, so we don't want to rerender
|
|
1053
|
+
// If the key gets removed, <For> will remove us
|
|
976
1054
|
const owner = (0, $kyEB6$getOwner)();
|
|
977
1055
|
const display_accessor = (0, $kyEB6$createMemo)(()=>displays_by_key_().get(product_id));
|
|
978
|
-
const [product_card_resource] = (0, $kyEB6$createResource)(
|
|
979
|
-
|
|
980
|
-
|
|
1056
|
+
const [product_card_resource] = (0, $kyEB6$createResource)((0, $kyEB6$createMemo)(()=>[
|
|
1057
|
+
merchant_(),
|
|
1058
|
+
market_()
|
|
1059
|
+
]), // re-render when merchant or market changes
|
|
1060
|
+
([merchant, market])=>{
|
|
981
1061
|
// get display in the function that re-runs when merchant or market have changed, since the display may have changed but product_id not
|
|
1062
|
+
const display = (0, $kyEB6$untrack)(display_accessor);
|
|
982
1063
|
return product_card_template_(display, {
|
|
983
1064
|
set_on_index_change: (fn)=>(0, $kyEB6$runWithOwner)(owner, ()=>(0, $kyEB6$createEffect)(()=>fn(index()))),
|
|
984
|
-
merchant:
|
|
985
|
-
|
|
986
|
-
market: (0, $kyEB6$untrack)(market_)
|
|
1065
|
+
merchant: merchant,
|
|
1066
|
+
market: market
|
|
987
1067
|
});
|
|
988
1068
|
});
|
|
989
1069
|
const node_accessor = (0, $a52235d12ccf9c88$export$2f0cbfbb4354bb52)(product_card_resource);
|
|
@@ -3160,6 +3240,52 @@ function $84d6cd10bb7b1589$export$ab34afce88557c0e(props) {
|
|
|
3160
3240
|
|
|
3161
3241
|
|
|
3162
3242
|
|
|
3243
|
+
|
|
3244
|
+
|
|
3245
|
+
|
|
3246
|
+
|
|
3247
|
+
|
|
3248
|
+
const $d20eff0aadc28983$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<span></span>`, 2);
|
|
3249
|
+
function $d20eff0aadc28983$export$acb3eaade4b23afd(props) {
|
|
3250
|
+
return (()=>{
|
|
3251
|
+
const _el$ = $d20eff0aadc28983$var$_tmpl$.cloneNode(true);
|
|
3252
|
+
(0, $kyEB6$effect)((_p$)=>{
|
|
3253
|
+
const _v$ = `depict-placeholder ${props.class || ""}`, _v$2 = props.style;
|
|
3254
|
+
_v$ !== _p$._v$ && (0, $kyEB6$className)(_el$, _p$._v$ = _v$);
|
|
3255
|
+
_p$._v$2 = (0, $kyEB6$style)(_el$, _v$2, _p$._v$2);
|
|
3256
|
+
return _p$;
|
|
3257
|
+
}, {
|
|
3258
|
+
_v$: undefined,
|
|
3259
|
+
_v$2: undefined
|
|
3260
|
+
});
|
|
3261
|
+
return _el$;
|
|
3262
|
+
})();
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
|
|
3266
|
+
|
|
3267
|
+
function $d134eae24341b4a1$export$89c6019e4baa40b1(props) {
|
|
3268
|
+
const style = (0, $kyEB6$createMemo)(()=>{
|
|
3269
|
+
const { style: style , height: height , width: width } = props;
|
|
3270
|
+
return {
|
|
3271
|
+
...style || {},
|
|
3272
|
+
height: height ?? "1em",
|
|
3273
|
+
...width && {
|
|
3274
|
+
width: width
|
|
3275
|
+
}
|
|
3276
|
+
};
|
|
3277
|
+
});
|
|
3278
|
+
return (0, $kyEB6$createComponent)((0, $d20eff0aadc28983$export$acb3eaade4b23afd), {
|
|
3279
|
+
get style () {
|
|
3280
|
+
return style();
|
|
3281
|
+
},
|
|
3282
|
+
get ["class"] () {
|
|
3283
|
+
return props.class;
|
|
3284
|
+
}
|
|
3285
|
+
});
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
|
|
3163
3289
|
const $fab07f52c9861732$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="filter-collapsible"></div>`, 2), $fab07f52c9861732$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<button class="clear-group"><span></span></button>`, 4), $fab07f52c9861732$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="view-more-clear"></div>`, 2), $fab07f52c9861732$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="filter-collapsible-body"><div class="filter-part"></div></div>`, 4), $fab07f52c9861732$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<details class="filter-collapsible"></details>`, 2), $fab07f52c9861732$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<summary class="filter-group-summary"><div class="summary"><span></span><div class="selected-w-sign"></div></div></summary>`, 8), $fab07f52c9861732$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="ungrouped"></div>`, 2), $fab07f52c9861732$var$_tmpl$8 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<button class="clear-all-filters major"></button>`, 2);
|
|
3164
3290
|
function $fab07f52c9861732$export$3f1a388cc0d8fed7(props) {
|
|
3165
3291
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
@@ -3172,7 +3298,7 @@ function $fab07f52c9861732$export$3f1a388cc0d8fed7(props) {
|
|
|
3172
3298
|
length: 5
|
|
3173
3299
|
}).map(()=>(()=>{
|
|
3174
3300
|
const _el$ = $fab07f52c9861732$var$_tmpl$.cloneNode(true);
|
|
3175
|
-
(0, $kyEB6$insert)(_el$, (0, $kyEB6$createComponent)((0, $
|
|
3301
|
+
(0, $kyEB6$insert)(_el$, (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
3176
3302
|
width: "100%",
|
|
3177
3303
|
height: "50px"
|
|
3178
3304
|
}));
|
|
@@ -3402,6 +3528,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
3402
3528
|
|
|
3403
3529
|
|
|
3404
3530
|
|
|
3531
|
+
|
|
3405
3532
|
const $68a258a92b88f02f$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="sorting-attributes"></div>`, 2), $68a258a92b88f02f$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="sorting-direction"></div>`, 2), $68a258a92b88f02f$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div><div class="input-row"><input type="radio"><span class="custom-indicator"></span></div></div>`, 7), $68a258a92b88f02f$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div><label class="input-row"><input type="radio"><span class="custom-indicator"></span></label></div>`, 7);
|
|
3406
3533
|
function $68a258a92b88f02f$export$1f1775a58da589b5({ available_sortings_: available_sortings_ , current_sorting_: [get_current_sorting, set_current_sorting] , meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_ }) {
|
|
3407
3534
|
const title_radio_name = (0, $kyEB6$make_random_classname)();
|
|
@@ -3418,7 +3545,7 @@ function $68a258a92b88f02f$export$1f1775a58da589b5({ available_sortings_: availa
|
|
|
3418
3545
|
}).map(()=>(()=>{
|
|
3419
3546
|
const _el$4 = $68a258a92b88f02f$var$_tmpl$3.cloneNode(true), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
3420
3547
|
_el$6.disabled = true;
|
|
3421
|
-
(0, $kyEB6$insert)(_el$5, (0, $kyEB6$createComponent)((0, $
|
|
3548
|
+
(0, $kyEB6$insert)(_el$5, (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
3422
3549
|
height: "1.2em",
|
|
3423
3550
|
width: "100%"
|
|
3424
3551
|
}), null);
|
|
@@ -4499,6 +4626,7 @@ function $4147651646da990a$export$43cd1e747fecd42e(to_url, set_clearing_flag, fr
|
|
|
4499
4626
|
}
|
|
4500
4627
|
|
|
4501
4628
|
|
|
4629
|
+
|
|
4502
4630
|
const $dfa5b6f7c5e421df$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<nav class="crumbs"></nav>`, 2), $dfa5b6f7c5e421df$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<a class="crumb"></a>`, 2), $dfa5b6f7c5e421df$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<span class="separator"></span>`, 2);
|
|
4503
4631
|
function $dfa5b6f7c5e421df$export$5646050d516e06bc({ crumb_data_: get_api_crumb_data , router_: router_ , i18n_: i18n_ }) {
|
|
4504
4632
|
const placeholder_crumb_data = [
|
|
@@ -4524,7 +4652,7 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({ crumb_data_: get_api_crumb_
|
|
|
4524
4652
|
return display_accessor();
|
|
4525
4653
|
},
|
|
4526
4654
|
get fallback () {
|
|
4527
|
-
return (0, $kyEB6$createComponent)((0, $
|
|
4655
|
+
return (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
4528
4656
|
height: "calc(1em + 1px)",
|
|
4529
4657
|
width: "10ch"
|
|
4530
4658
|
});
|
|
@@ -4577,6 +4705,7 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({ crumb_data_: get_api_crumb_
|
|
|
4577
4705
|
|
|
4578
4706
|
|
|
4579
4707
|
|
|
4708
|
+
|
|
4580
4709
|
const $06edf3aec9073663$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<nav class="quicklinks"></nav>`, 2), $06edf3aec9073663$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div>QuickLinks failed</div>`, 2), $06edf3aec9073663$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<a class="quicklink"></a>`, 2);
|
|
4581
4710
|
function $06edf3aec9073663$export$466cdc317043f6cb({ quicklinks_data_: quicklinks_data_ , router_: router_ , current_query_id_: current_query_id_ , slider_arrow_button_: slider_arrow_button_ , breadcrumb_data_: breadcrumb_data_ , i18n_: i18n_ }) {
|
|
4582
4711
|
let scrolling_logic_ran_for_query_id = false;
|
|
@@ -4729,7 +4858,7 @@ function $06edf3aec9073663$export$466cdc317043f6cb({ quicklinks_data_: quicklink
|
|
|
4729
4858
|
category_query_id_: display_accessor()?.query_id
|
|
4730
4859
|
});
|
|
4731
4860
|
}), true);
|
|
4732
|
-
(0, $kyEB6$insert)(_el$3, ()=>display_accessor()?.title || (0, $kyEB6$createComponent)((0, $
|
|
4861
|
+
(0, $kyEB6$insert)(_el$3, ()=>display_accessor()?.title || (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
4733
4862
|
height: "1em",
|
|
4734
4863
|
width: "10ch"
|
|
4735
4864
|
}));
|
|
@@ -4983,8 +5112,9 @@ function $eb9ba2e49ab3dcc2$export$d4fc5c0e68a52116(el, query_id_, i18n_) {
|
|
|
4983
5112
|
]);
|
|
4984
5113
|
|
|
4985
5114
|
|
|
5115
|
+
|
|
4986
5116
|
const $df5d81d0fe61ff21$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="product-count"> </div>`, 2), $df5d81d0fe61ff21$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div></div>`, 2), $df5d81d0fe61ff21$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="filter-results-for-one-row"></div>`, 2), $df5d81d0fe61ff21$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="depict plp category"><div class="listing-page"></div></div>`, 4);
|
|
4987
|
-
function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ ,
|
|
5117
|
+
function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , category_filters_open_: category_filters_open_ , category_sorting_open_: category_sorting_open_ , expanded_filters_: expanded_filters_ , selected_filters_: selected_filters_ , get_quicklinks_accessor_: get_quicklinks_accessor_ , i18n_: incoming_i18n , get_breadcrumb_accessor_: get_breadcrumb_accessor_ , slider_arrow_button_: slider_arrow_button_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , local_filter_cache_: local_filter_cache_ , tenant_: tenant_ , market_: market_ , router_: router_ , show_quicklinks_: show_quicklinks_ , category_title_: category_title_ , show_breadcrumbs_: show_breadcrumbs_ , layout_options_: layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ }) {
|
|
4988
5118
|
let results_for;
|
|
4989
5119
|
let only_show_filters_opener_;
|
|
4990
5120
|
let middle_elements_;
|
|
@@ -5009,7 +5139,6 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5009
5139
|
tenant: tenant_(),
|
|
5010
5140
|
market: market_(),
|
|
5011
5141
|
query_id: query_id_(),
|
|
5012
|
-
type: listing_type_(),
|
|
5013
5142
|
...f.length ? {
|
|
5014
5143
|
filters: f
|
|
5015
5144
|
} : {},
|
|
@@ -5060,7 +5189,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5060
5189
|
get children () {
|
|
5061
5190
|
return [
|
|
5062
5191
|
" ",
|
|
5063
|
-
(0, $kyEB6$createComponent)((0, $
|
|
5192
|
+
(0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
5064
5193
|
height: "1em",
|
|
5065
5194
|
width: "3ch"
|
|
5066
5195
|
})
|
|
@@ -5511,8 +5640,7 @@ function $ccd5db07a3a069c5$export$477caf01aecaeb2a(options) {
|
|
|
5511
5640
|
router_.navigate_.go_to_({
|
|
5512
5641
|
is_replace_: true,
|
|
5513
5642
|
new_url_: url_object.href,
|
|
5514
|
-
force_spa_navigation_: true
|
|
5515
|
-
scroll: false
|
|
5643
|
+
force_spa_navigation_: true
|
|
5516
5644
|
});
|
|
5517
5645
|
}, {
|
|
5518
5646
|
defer: true
|
|
@@ -5572,7 +5700,7 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
5572
5700
|
* @param force_spa_navigation_ if you want to force SPA navigation even if on_navigation_ is set to "hard_navigation". You should only set this to true for inter-SDK-page navigations
|
|
5573
5701
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
5574
5702
|
* @param category_query_id_ If you are navigating to a category and know the query_id of, please provide it. This is for making a better devEx in js-ui
|
|
5575
|
-
*/ go_to_: (0, $kyEB6$catchify)(async ({ new_url_: raw_new_url , event_: event_ , force_spa_navigation_: force_spa_navigation_ , is_replace_: is_replace_ , category_query_id_: category_query_id_
|
|
5703
|
+
*/ go_to_: (0, $kyEB6$catchify)(async ({ new_url_: raw_new_url , event_: event_ , force_spa_navigation_: force_spa_navigation_ , is_replace_: is_replace_ , category_query_id_: category_query_id_ })=>{
|
|
5576
5704
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
5577
5705
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
5578
5706
|
if (this.#dont_attempt_navigation(event_)) return;
|
|
@@ -5594,8 +5722,7 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
5594
5722
|
history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
|
|
5595
5723
|
} else this.#throwing_on_navigation.call(this, {
|
|
5596
5724
|
is_replace: is_replace_,
|
|
5597
|
-
new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin)
|
|
5598
|
-
scroll: scroll
|
|
5725
|
+
new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin)
|
|
5599
5726
|
});
|
|
5600
5727
|
await promise;
|
|
5601
5728
|
})
|
|
@@ -5621,7 +5748,6 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
5621
5748
|
#merchant_signal = (0, $kyEB6$createSignal)();
|
|
5622
5749
|
#market_signal = (0, $kyEB6$createSignal)();
|
|
5623
5750
|
#query_id_signal = (0, $kyEB6$createSignal)("");
|
|
5624
|
-
#listing_type_signal = (0, $kyEB6$createSignal)();
|
|
5625
5751
|
static #has_been_constructed = false;
|
|
5626
5752
|
get localization() {
|
|
5627
5753
|
// allow reactive access
|
|
@@ -5648,12 +5774,6 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
5648
5774
|
set market(market) {
|
|
5649
5775
|
this.#market_signal[1](market);
|
|
5650
5776
|
}
|
|
5651
|
-
get listing_type() {
|
|
5652
|
-
return this.#listing_type_signal[0]();
|
|
5653
|
-
}
|
|
5654
|
-
set listing_type(listing_type) {
|
|
5655
|
-
this.#listing_type_signal[1](listing_type);
|
|
5656
|
-
}
|
|
5657
5777
|
get on_navigation() {
|
|
5658
5778
|
// The only non-reactive public property on the class (I don't see it making sense to have it reactive)
|
|
5659
5779
|
return this.#router.on_navigation_;
|
|
@@ -5719,7 +5839,6 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5719
5839
|
min_products_to_fetch_: $961b5c64bef4662f$var$min_products_to_fetch_,
|
|
5720
5840
|
local_filter_cache_: local_filter_cache_,
|
|
5721
5841
|
query_id_: ()=>depict_category.category_id,
|
|
5722
|
-
listing_type_: ()=>depict_category.listing_type,
|
|
5723
5842
|
i18n_: i18n_,
|
|
5724
5843
|
show_quicklinks_: show_quicklinks,
|
|
5725
5844
|
category_title_: category_title,
|
|
@@ -5788,7 +5907,7 @@ const $e4615ecd1849548f$export$b91cec6bdc6b32a1 = /*@__PURE__*/ (()=>{
|
|
|
5788
5907
|
const actual_function = ({ category_title_: category_title_ , product_count_: product_count_ })=>{
|
|
5789
5908
|
return (()=>{
|
|
5790
5909
|
const _el$ = $e4615ecd1849548f$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
5791
|
-
(0, $kyEB6$insert)(_el$2, ()=>category_title_() || (0, $kyEB6$createComponent)((0, $
|
|
5910
|
+
(0, $kyEB6$insert)(_el$2, ()=>category_title_() || (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
5792
5911
|
height: "1em",
|
|
5793
5912
|
width: "10ch"
|
|
5794
5913
|
}));
|
|
@@ -5966,14 +6085,45 @@ async function $5c5f95951393e5d1$var$download_categories(tenant, market) {
|
|
|
5966
6085
|
|
|
5967
6086
|
|
|
5968
6087
|
|
|
6088
|
+
|
|
6089
|
+
|
|
6090
|
+
function $7f60f09116a3fe61$export$3f37af283f8fb843(props) {
|
|
6091
|
+
const style = (0, $kyEB6$createMemo)(()=>{
|
|
6092
|
+
const { style: style , height: height , width: width , aspectRatio: aspectRatio } = props;
|
|
6093
|
+
const is_image = aspectRatio != undefined;
|
|
6094
|
+
const size_data = is_image ? {
|
|
6095
|
+
width: "100%",
|
|
6096
|
+
"padding-bottom": 1 / aspectRatio * 100 + "%"
|
|
6097
|
+
} : {
|
|
6098
|
+
width: width,
|
|
6099
|
+
height: height
|
|
6100
|
+
};
|
|
6101
|
+
return {
|
|
6102
|
+
display: "block",
|
|
6103
|
+
...style || {},
|
|
6104
|
+
...size_data
|
|
6105
|
+
};
|
|
6106
|
+
});
|
|
6107
|
+
return (0, $kyEB6$createComponent)((0, $d20eff0aadc28983$export$acb3eaade4b23afd), {
|
|
6108
|
+
get style () {
|
|
6109
|
+
return style();
|
|
6110
|
+
},
|
|
6111
|
+
get ["class"] () {
|
|
6112
|
+
return props.class;
|
|
6113
|
+
}
|
|
6114
|
+
});
|
|
6115
|
+
}
|
|
6116
|
+
|
|
6117
|
+
|
|
6118
|
+
|
|
5969
6119
|
const $bb15dfb548a7666e$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="instant-card"><div class="img-part"></div><div class="right-part"><div class="title-brand-tagline"><span class="title"></span></div></div></div>`, 10);
|
|
5970
6120
|
function $bb15dfb548a7666e$export$ee1733d9a8495996() {
|
|
5971
6121
|
return (()=>{
|
|
5972
6122
|
const _el$ = $bb15dfb548a7666e$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
5973
|
-
(0, $kyEB6$insert)(_el$2, (0, $kyEB6$createComponent)((0, $
|
|
5974
|
-
|
|
6123
|
+
(0, $kyEB6$insert)(_el$2, (0, $kyEB6$createComponent)((0, $7f60f09116a3fe61$export$3f37af283f8fb843), {
|
|
6124
|
+
aspectRatio: 1
|
|
5975
6125
|
}));
|
|
5976
|
-
(0, $kyEB6$insert)(_el$5, (0, $kyEB6$createComponent)((0, $
|
|
6126
|
+
(0, $kyEB6$insert)(_el$5, (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
5977
6127
|
width: "20ch",
|
|
5978
6128
|
height: "1em"
|
|
5979
6129
|
}));
|
|
@@ -6441,8 +6591,7 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = (display_or_variant_container,
|
|
|
6441
6591
|
sizes: "0px"
|
|
6442
6592
|
}));
|
|
6443
6593
|
const is_sale = (0, $kyEB6$createMemo)(()=>display().sale_price !== display().original_price);
|
|
6444
|
-
|
|
6445
|
-
const href = (0, $kyEB6$createMemo)(()=>display().localized_page_url || display().page_url);
|
|
6594
|
+
const href = (0, $kyEB6$createMemo)(()=>display().page_url);
|
|
6446
6595
|
return (()=>{
|
|
6447
6596
|
const _el$ = $e003be2a50d9e5bc$var$_tmpl$2.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$9 = _el$7.firstChild;
|
|
6448
6597
|
(0, $kyEB6$addEventListener)(_el$, "click", (0, $kyEB6$catchify)((event_)=>router_.navigate_.go_to_({
|
|
@@ -7557,7 +7706,7 @@ function $793905995512612d$export$c05a196222ba1302({ suggestions_: suggestions_
|
|
|
7557
7706
|
get fallback () {
|
|
7558
7707
|
return (()=>{
|
|
7559
7708
|
const _el$2 = $793905995512612d$var$_tmpl$2.cloneNode(true);
|
|
7560
|
-
(0, $kyEB6$insert)(_el$2, (0, $kyEB6$createComponent)((0, $
|
|
7709
|
+
(0, $kyEB6$insert)(_el$2, (0, $kyEB6$createComponent)((0, $d134eae24341b4a1$export$89c6019e4baa40b1), {
|
|
7561
7710
|
height: "19px",
|
|
7562
7711
|
width: "133px"
|
|
7563
7712
|
}));
|
|
@@ -7619,28 +7768,9 @@ function $f8c929beb82c512b$export$9dd50d35b9d94fdf({ get_search_query_: get_sear
|
|
|
7619
7768
|
|
|
7620
7769
|
|
|
7621
7770
|
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
function $1801dbce7adb3f19$export$41b4894022a3580f({ style_props_: style_props_ = (0, $kyEB6$createSignal)({}) } = {}) {
|
|
7625
|
-
const [, set_style_props] = style_props_;
|
|
7626
|
-
const supports_hover = (0, $dc9262ef6f786812$export$d9f36cf74e24d595)("(hover: hover) and (pointer: fine)");
|
|
7627
|
-
const desktop_short = (0, $dc9262ef6f786812$export$d9f36cf74e24d595)("(max-height: 790px)");
|
|
7628
|
-
const mobile_short = (0, $dc9262ef6f786812$export$d9f36cf74e24d595)("(max-height: 1000px)");
|
|
7629
|
-
const transform_y = (0, $kyEB6$createMemo)(()=>supports_hover() ? !desktop_short() : !mobile_short());
|
|
7630
|
-
set_style_props({
|
|
7631
|
-
position: "fixed",
|
|
7632
|
-
top: "50%"
|
|
7633
|
-
});
|
|
7634
|
-
(0, $kyEB6$createComputed)(()=>set_style_props((old_value)=>({
|
|
7635
|
-
...old_value,
|
|
7636
|
-
transform: transform_y() ? "translateY(-50%)" : "unset"
|
|
7637
|
-
})));
|
|
7638
|
-
return style_props_;
|
|
7639
|
-
}
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
7771
|
const $7097477c78a89208$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="filter-results-for-one-row"></div>`, 2), $7097477c78a89208$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="depict plp search"><div class="listing-page"></div></div>`, 4);
|
|
7643
|
-
function $7097477c78a89208$export$a54ec244c8863715(
|
|
7772
|
+
function $7097477c78a89208$export$a54ec244c8863715(opts) {
|
|
7773
|
+
const { depict_api_: depict_api_ , search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ , slider_arrow_button_: slider_arrow_button_ , make_category_suggestion_card_: make_category_suggestion_card_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , clear_filters_on_next_submit_: clear_filters_on_next_submit_ , local_filter_cache_: local_filter_cache_ , include_input_field_: include_input_field_ , tenant_: tenant_ , market_: market_ , showing_recommendation_rows_: showing_recommendation_rows_ , search_recs_view_more_: search_recs_view_more_ , disable_search_recommendations_: disable_search_recommendations_ , layout_options_: layout_options_ , recommendations_layout_options_: recommendations_layout_options_ = layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ } = opts;
|
|
7644
7774
|
const [get_sorting] = current_sorting_;
|
|
7645
7775
|
const all_products_loaded_ = (0, $kyEB6$createSignal)(false);
|
|
7646
7776
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
@@ -7693,8 +7823,42 @@ function $7097477c78a89208$export$a54ec244c8863715({ depict_api_: depict_api_ ,
|
|
|
7693
7823
|
})));
|
|
7694
7824
|
const available_filters_ = (0, $kyEB6$createMemo)(()=>search_results_()?.filters);
|
|
7695
7825
|
const modal_body_style = (0, $kyEB6$createSignal)({});
|
|
7696
|
-
|
|
7697
|
-
|
|
7826
|
+
let search_field;
|
|
7827
|
+
if (include_input_field_) {
|
|
7828
|
+
const SafeSearchField = (0, $kyEB6$catchify)((0, $5285d2814d0fac0c$export$b94867ecbd698f21));
|
|
7829
|
+
let input_element;
|
|
7830
|
+
let div_with_field_class;
|
|
7831
|
+
search_field = SafeSearchField({
|
|
7832
|
+
i18n_: i18n_,
|
|
7833
|
+
search_field_value_: search_field_value_,
|
|
7834
|
+
submit_query_: submit_query_,
|
|
7835
|
+
clear_filters_: clear_filters_on_next_submit_,
|
|
7836
|
+
input_field_ref_: (el)=>input_element = el,
|
|
7837
|
+
field_element_ref_: (el)=>div_with_field_class = el,
|
|
7838
|
+
disabled_: true
|
|
7839
|
+
});
|
|
7840
|
+
if (search_field) {
|
|
7841
|
+
opts?.modal_body_style_ref_?.(modal_body_style);
|
|
7842
|
+
const align_position = (0, $kyEB6$catchify)((0, $b6d5529b253681aa$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
7843
|
+
div_with_field_class.addEventListener("click", (0, $kyEB6$catchify)((e)=>{
|
|
7844
|
+
const target = e.target;
|
|
7845
|
+
const sel = ".submit";
|
|
7846
|
+
if (target?.matches?.(sel) || target?.closest?.(sel)) // the search button is just decor, don't do anything when clicked
|
|
7847
|
+
return;
|
|
7848
|
+
// When selecting text in the SearchField that's in the page we want the same selection to persist. It doesn't by itself, since the SearchModal has an entirely different SearchField. Therefore, we manually copy the selection over.
|
|
7849
|
+
const selected_text_range_ = [
|
|
7850
|
+
input_element.selectionStart,
|
|
7851
|
+
input_element.selectionEnd
|
|
7852
|
+
];
|
|
7853
|
+
align_position?.();
|
|
7854
|
+
open_modal_({
|
|
7855
|
+
style_props_: modal_body_style,
|
|
7856
|
+
selected_text_range_: selected_text_range_
|
|
7857
|
+
}, ()=>include_input_field_?.on_close_?.());
|
|
7858
|
+
include_input_field_?.on_open_?.();
|
|
7859
|
+
}));
|
|
7860
|
+
}
|
|
7861
|
+
}
|
|
7698
7862
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = (0, $kyEB6$createSignal)(false);
|
|
7699
7863
|
const [desktop_filter_elements_, set_desktop_filter_elements] = (0, $kyEB6$createSignal)();
|
|
7700
7864
|
const formatted_number_of_results_ = (0, $511cc0abd9a64ce8$export$92f2da32c6e7e7ee)({
|
|
@@ -7758,60 +7922,11 @@ function $7097477c78a89208$export$a54ec244c8863715({ depict_api_: depict_api_ ,
|
|
|
7758
7922
|
get_search_query_();
|
|
7759
7923
|
(0, $d78eea1e8707dc2d$export$c7e181728ad525f)(location);
|
|
7760
7924
|
});
|
|
7761
|
-
(0, $kyEB6$createEffect)(()=>{
|
|
7762
|
-
// reactive include_input_field
|
|
7763
|
-
// this uses ~7 variables from outer scope which is why I didn't refactor it into a function
|
|
7764
|
-
add_input_field: {
|
|
7765
|
-
const input_field_accessor_value = include_input_field_?.() ?? true; // default to showing input field
|
|
7766
|
-
if (!input_field_accessor_value) break add_input_field;
|
|
7767
|
-
let input_element;
|
|
7768
|
-
let div_with_field_class;
|
|
7769
|
-
const search_field = SafeSearchField({
|
|
7770
|
-
i18n_: i18n_,
|
|
7771
|
-
search_field_value_: search_field_value_,
|
|
7772
|
-
submit_query_: submit_query_,
|
|
7773
|
-
clear_filters_: clear_filters_on_next_submit_,
|
|
7774
|
-
input_field_ref_: (el)=>input_element = el,
|
|
7775
|
-
field_element_ref_: (el)=>div_with_field_class = el,
|
|
7776
|
-
disabled_: true
|
|
7777
|
-
});
|
|
7778
|
-
if (!search_field) break add_input_field;
|
|
7779
|
-
modal_body_style[1]({});
|
|
7780
|
-
modal_body_style_ref_?.(modal_body_style);
|
|
7781
|
-
const align_position = (0, $kyEB6$catchify)((0, $b6d5529b253681aa$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
7782
|
-
div_with_field_class.addEventListener("click", (0, $kyEB6$catchify)((e)=>{
|
|
7783
|
-
const target = e.target;
|
|
7784
|
-
const sel = ".submit";
|
|
7785
|
-
if (target?.matches?.(sel) || target?.closest?.(sel)) // the search button is just decor, don't do anything when clicked
|
|
7786
|
-
return;
|
|
7787
|
-
// When selecting text in the SearchField that's in the page we want the same selection to persist. It doesn't by itself, since the SearchModal has an entirely different SearchField. Therefore, we manually copy the selection over.
|
|
7788
|
-
const selected_text_range_ = [
|
|
7789
|
-
input_element.selectionStart,
|
|
7790
|
-
input_element.selectionEnd
|
|
7791
|
-
];
|
|
7792
|
-
align_position?.();
|
|
7793
|
-
open_modal_({
|
|
7794
|
-
style_props_: modal_body_style,
|
|
7795
|
-
selected_text_range_: selected_text_range_
|
|
7796
|
-
}, ()=>input_field_accessor_value?.on_close_?.());
|
|
7797
|
-
input_field_accessor_value?.on_open_?.();
|
|
7798
|
-
}));
|
|
7799
|
-
set_search_field_elements(search_field);
|
|
7800
|
-
return;
|
|
7801
|
-
}
|
|
7802
|
-
// We bailed out of adding the input field
|
|
7803
|
-
set_search_field_elements();
|
|
7804
|
-
// There *might* still be a modal open, either from depict_search.modal_open = true or clicking the SearchField which existed here. Said modal now doesn't have anything to align to anymore - it will still try to align to the style_props_ which it got through the modal_body_style_ref_ which are now no longer updated.
|
|
7805
|
-
// In that case, we write what's needed to center the modal to the modal_body_style for the lifetime of this effect function call to make sure the modal is centered and the UI doesn't look "botched".
|
|
7806
|
-
(0, $1801dbce7adb3f19$export$41b4894022a3580f)({
|
|
7807
|
-
style_props_: modal_body_style
|
|
7808
|
-
});
|
|
7809
|
-
});
|
|
7810
7925
|
return [
|
|
7811
7926
|
document.createComment("Search page based on Depict SDK"),
|
|
7812
7927
|
(()=>{
|
|
7813
7928
|
const _el$2 = $7097477c78a89208$var$_tmpl$2.cloneNode(true), _el$3 = _el$2.firstChild;
|
|
7814
|
-
(0, $kyEB6$insert)(_el$3,
|
|
7929
|
+
(0, $kyEB6$insert)(_el$3, search_field, null);
|
|
7815
7930
|
(0, $kyEB6$insert)(_el$3, make_category_suggestion_card_ ? (0, $kyEB6$createComponent)((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
7816
7931
|
severity_: "error",
|
|
7817
7932
|
message_: "Category suggestions failed",
|
|
@@ -7939,6 +8054,7 @@ function $7097477c78a89208$export$a54ec244c8863715({ depict_api_: depict_api_ ,
|
|
|
7939
8054
|
|
|
7940
8055
|
|
|
7941
8056
|
|
|
8057
|
+
|
|
7942
8058
|
function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
7943
8059
|
const style_element = document.createElement("style");
|
|
7944
8060
|
document.head.append(style_element);
|
|
@@ -7963,7 +8079,6 @@ function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
|
7963
8079
|
|
|
7964
8080
|
|
|
7965
8081
|
|
|
7966
|
-
|
|
7967
8082
|
const $806c97b931758897$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$kyEB6$template)(`<div class="depict plp search"></div>`, 2);
|
|
7968
8083
|
/**
|
|
7969
8084
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
@@ -8106,7 +8221,18 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
|
|
|
8106
8221
|
return;
|
|
8107
8222
|
}
|
|
8108
8223
|
// Open centered modal
|
|
8109
|
-
const
|
|
8224
|
+
const supports_hover = (0, $dc9262ef6f786812$export$d9f36cf74e24d595)("(hover: hover) and (pointer: fine)");
|
|
8225
|
+
const desktop_short = (0, $dc9262ef6f786812$export$d9f36cf74e24d595)("(max-height: 790px)");
|
|
8226
|
+
const mobile_short = (0, $dc9262ef6f786812$export$d9f36cf74e24d595)("(max-height: 1000px)");
|
|
8227
|
+
const transform_y = (0, $kyEB6$createMemo)(()=>supports_hover() ? !desktop_short() : !mobile_short());
|
|
8228
|
+
const style_props_ = (0, $kyEB6$createSignal)({
|
|
8229
|
+
position: "fixed",
|
|
8230
|
+
top: "50%"
|
|
8231
|
+
});
|
|
8232
|
+
(0, $kyEB6$createComputed)(()=>style_props_[1]((old_value)=>({
|
|
8233
|
+
...old_value,
|
|
8234
|
+
transform: transform_y() ? "translateY(-50%)" : "unset"
|
|
8235
|
+
})));
|
|
8110
8236
|
if (signal_value_is_options) {
|
|
8111
8237
|
const [options_arg, ...rest] = open_signal_value;
|
|
8112
8238
|
open_modal_({
|
|
@@ -8174,8 +8300,7 @@ function $806c97b931758897$var$get_shared_properties(depict_search) {
|
|
|
8174
8300
|
if (!shared_properties) throw new Error("Can't connect to provided DepictSearch instance");
|
|
8175
8301
|
return shared_properties;
|
|
8176
8302
|
}
|
|
8177
|
-
function $806c97b931758897$export$f2dc7e4e4aa11abb(
|
|
8178
|
-
const { depict_search: depict_search , grid_spacing: grid_spacing , cols_at_size: cols_at_size , product_card_template: product_card_template , extra_depict_options: extra_depict_options } = props;
|
|
8303
|
+
function $806c97b931758897$export$f2dc7e4e4aa11abb({ depict_search: depict_search , include_input_field: include_input_field , grid_spacing: grid_spacing , cols_at_size: cols_at_size , product_card_template: product_card_template , extra_depict_options: extra_depict_options }) {
|
|
8179
8304
|
const shared_properties = $806c97b931758897$var$get_shared_properties(depict_search);
|
|
8180
8305
|
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
8181
8306
|
grid_spacing: grid_spacing
|
|
@@ -8229,7 +8354,7 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
8229
8354
|
selected_filters_: shared_properties.selected_filters_,
|
|
8230
8355
|
showing_recommendation_rows_: state_.search_showing_recommendation_rows,
|
|
8231
8356
|
scroll_restoration_data_: state_.search_scroll_restoration_data,
|
|
8232
|
-
include_input_field_:
|
|
8357
|
+
include_input_field_: include_input_field,
|
|
8233
8358
|
layout_options_: {
|
|
8234
8359
|
cols_at_size: (0, $b5cccc8ee7d24677$export$6daf8749b65a1b77)(cols_at_size),
|
|
8235
8360
|
...grid_spacing_override
|
|
@@ -8434,6 +8559,9 @@ function $6936724b9e0b98d5$export$689e204eadb33baf(pr) {
|
|
|
8434
8559
|
|
|
8435
8560
|
|
|
8436
8561
|
|
|
8562
|
+
|
|
8563
|
+
|
|
8564
|
+
|
|
8437
8565
|
class $753e9b2889a47c89$export$3ccaa27d81dd8556 extends EventTarget {
|
|
8438
8566
|
#stop_listening;
|
|
8439
8567
|
#disconnect_observer;
|
|
@@ -8612,4 +8740,4 @@ const $4690a06c8489dcd0$export$7bf543b9d9be2c22 = (0, $e4615ecd1849548f$export$b
|
|
|
8612
8740
|
(0, $kyEB6$add_to_version_info)("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
8613
8741
|
|
|
8614
8742
|
|
|
8615
|
-
export {$c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a79d86d64fb64e8e$export$824dde41348efed1 as embedded_num_products, $5c5f95951393e5d1$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version};
|
|
8743
|
+
export {$c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a79d86d64fb64e8e$export$824dde41348efed1 as embedded_num_products, $5c5f95951393e5d1$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version};
|