@depict-ai/ui 1.0.16 → 1.0.18
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 +79 -89
- package/dist/client/module.js +80 -90
- package/dist/index.d.ts +8 -2
- package/dist/main.js +8605 -0
- package/dist/module.js +8571 -0
- package/dist/server/main.js +54 -66
- package/dist/server/module.js +54 -66
- package/package.json +4 -4
package/dist/client/module.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {add_to_version_info as $gco9i$add_to_version_info, fetch_recs as $gco9i$fetch_recs, snakeCasifyObject as $gco9i$snakeCasifyObject, catchify as $gco9i$catchify, instant_exec_on_suspect_history_change as $gco9i$instant_exec_on_suspect_history_change, base_url as $gco9i$base_url, dlog as $gco9i$dlog, get_depict_id as $gco9i$get_depict_id, get_user_id as $gco9i$get_user_id, get_session_id as $gco9i$get_session_id, make_url_with_query_params as $gco9i$make_url_with_query_params, fetch_retry as $gco9i$fetch_retry, add_version_query_params as $gco9i$add_version_query_params, sort_obj as $gco9i$sort_obj, report as $gco9i$report, javascript_media_query as $gco9i$javascript_media_query, standard_price_format as $gco9i$standard_price_format, observer as $gco9i$observer, make_random_classname as $gco9i$make_random_classname, n_col_styling_with_dist as $gco9i$n_col_styling_with_dist, useExpandingContainer as $gco9i$useExpandingContainer, Amazing_Slider as $gco9i$Amazing_Slider, slider_snap_css as $gco9i$slider_snap_css, slider_fading_factory as $gco9i$slider_fading_factory, hsl_to_rgb as $gco9i$hsl_to_rgb, relative_luminance_from_rgb as $gco9i$relative_luminance_from_rgb, base64_encode_unicode as $gco9i$base64_encode_unicode, base64_decode_unicode as $gco9i$base64_decode_unicode, queueMacroTask as $gco9i$queueMacroTask, is_debug as $gco9i$is_debug, dwarn as $gco9i$dwarn, Layout as $gco9i$Layout, async_iterable_ipns as $gco9i$async_iterable_ipns, make_asyncIterable_exiter as $gco9i$make_asyncIterable_exiter, href_change_ipns as $gco9i$href_change_ipns, ContainedImage as $gco9i$ContainedImage, buildThresholdList as $gco9i$buildThresholdList, deparallelize_no_drop as $gco9i$deparallelize_no_drop, insert_surfaces as $gco9i$insert_surfaces} from "@depict-ai/utilishared";
|
|
2
|
-
import {template as $gco9i$template, getNextElement as $gco9i$getNextElement, spread as $gco9i$spread, mergeProps as $gco9i$mergeProps, runHydrationEvents as $gco9i$runHydrationEvents, effect as $gco9i$effect, setAttribute as $gco9i$setAttribute, insert as $gco9i$insert, isServer as $gco9i$isServer, createComponent as $gco9i$createComponent, getNextMarker as $gco9i$getNextMarker, use as $gco9i$use, memo as $gco9i$memo, addEventListener as $gco9i$addEventListener, delegateEvents as $gco9i$delegateEvents, classList as $gco9i$classList, style as $gco9i$style,
|
|
2
|
+
import {template as $gco9i$template, getNextElement as $gco9i$getNextElement, spread as $gco9i$spread, mergeProps as $gco9i$mergeProps, runHydrationEvents as $gco9i$runHydrationEvents, effect as $gco9i$effect, setAttribute as $gco9i$setAttribute, insert as $gco9i$insert, isServer as $gco9i$isServer, createComponent as $gco9i$createComponent, getNextMarker as $gco9i$getNextMarker, use as $gco9i$use, memo as $gco9i$memo, addEventListener as $gco9i$addEventListener, delegateEvents as $gco9i$delegateEvents, classList as $gco9i$classList, style as $gco9i$style, className as $gco9i$className, Dynamic as $gco9i$Dynamic} from "solid-js/web";
|
|
3
3
|
import {createSignal as $gco9i$createSignal, getOwner as $gco9i$getOwner, createRoot as $gco9i$createRoot, runWithOwner as $gco9i$runWithOwner, onCleanup as $gco9i$onCleanup, createComputed as $gco9i$createComputed, createRenderEffect as $gco9i$createRenderEffect, createEffect as $gco9i$createEffect, untrack as $gco9i$untrack, batch as $gco9i$batch, createResource as $gco9i$createResource, createMemo as $gco9i$createMemo, Show as $gco9i$Show, createReaction as $gco9i$createReaction, Suspense as $gco9i$Suspense, on as $gco9i$on, ErrorBoundary as $gco9i$ErrorBoundary, For as $gco9i$For, Index as $gco9i$Index} from "solid-js";
|
|
4
4
|
|
|
5
|
-
/*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.0.
|
|
5
|
+
/*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.0.18";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -723,6 +723,7 @@ function $e9342fb3ac73a54a$export$8895d39404bd2bb1(props) {
|
|
|
723
723
|
|
|
724
724
|
const $598245ecfe38f34b$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<a class="hint" href="javascript:void(0)"></a>`, 2), $598245ecfe38f34b$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="no-results"><div class="text"></div><!#><!/></div>`, 6);
|
|
725
725
|
function $598245ecfe38f34b$export$ef6006467f04ee41({ i18n_: i18n_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ }) {
|
|
726
|
+
const root = (0, $gco9i$getOwner)();
|
|
726
727
|
return [
|
|
727
728
|
(()=>{
|
|
728
729
|
const _el$ = (0, $gco9i$getNextElement)($598245ecfe38f34b$var$_tmpl$2), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, [_el$5, _co$] = (0, $gco9i$getNextMarker)(_el$4.nextSibling);
|
|
@@ -733,14 +734,14 @@ function $598245ecfe38f34b$export$ef6006467f04ee41({ i18n_: i18n_ , expanded_hie
|
|
|
733
734
|
},
|
|
734
735
|
get children () {
|
|
735
736
|
const _el$3 = (0, $gco9i$getNextElement)($598245ecfe38f34b$var$_tmpl$);
|
|
736
|
-
(0, $gco9i$addEventListener)(_el$3, "click", (0, $gco9i$catchify)(()=>(0, $e9342fb3ac73a54a$export$8895d39404bd2bb1)({
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
737
|
+
(0, $gco9i$addEventListener)(_el$3, "click", (0, $gco9i$catchify)(()=>(0, $gco9i$runWithOwner)(root, ()=>(0, $e9342fb3ac73a54a$export$8895d39404bd2bb1)({
|
|
738
|
+
user_triggered_: true,
|
|
739
|
+
selected_filters_: selected_filters_,
|
|
740
|
+
also_clear_sorting_: false,
|
|
741
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
742
|
+
i18n_: i18n_,
|
|
743
|
+
local_filter_cache_: local_filter_cache_
|
|
744
|
+
}))), true);
|
|
744
745
|
(0, $gco9i$insert)(_el$3, ()=>i18n_.try_without_filters_());
|
|
745
746
|
(0, $gco9i$runHydrationEvents)();
|
|
746
747
|
return _el$3;
|
|
@@ -830,11 +831,20 @@ function $a52235d12ccf9c88$var$unwrapping_helper(elements) {
|
|
|
830
831
|
}
|
|
831
832
|
|
|
832
833
|
|
|
834
|
+
|
|
833
835
|
let $6e41f1fde994db72$var$cached_placeholder_element;
|
|
834
836
|
let $6e41f1fde994db72$var$rendering_cached_placeholder_element;
|
|
835
837
|
function $6e41f1fde994db72$export$f33414a4df0afd3f({ product_card_template_: product_card_template_ , num_placeholders_: num_placeholders_ }) {
|
|
836
838
|
const [get_elements, set_elements] = (0, $gco9i$createSignal)([]);
|
|
837
839
|
let existing_num = 0;
|
|
840
|
+
if (0, $gco9i$isServer) // want to render simple placeholders on server, effects don't run there
|
|
841
|
+
return (0, $gco9i$createMemo)(()=>Array.from({
|
|
842
|
+
length: num_placeholders_()
|
|
843
|
+
}).map(()=>{
|
|
844
|
+
const template_result = product_card_template_(null, undefined);
|
|
845
|
+
// @ts-ignore
|
|
846
|
+
if (typeof template_result?.then !== "function") return template_result;
|
|
847
|
+
}));
|
|
838
848
|
(0, $gco9i$createRenderEffect)(()=>{
|
|
839
849
|
const to_add = num_placeholders_() - existing_num;
|
|
840
850
|
if (to_add <= 0) return;
|
|
@@ -1027,22 +1037,17 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({ displays_by_key_: displays_
|
|
|
1027
1037
|
];
|
|
1028
1038
|
},
|
|
1029
1039
|
children: (product_id, index)=>{
|
|
1030
|
-
// We're using `untrack` here since we don't want to react in here to displays_by_key changing
|
|
1031
|
-
// As long as our key stays the same we assume that the display hasn't changed, so we don't want to rerender
|
|
1032
|
-
// If the key gets removed, <For> will remove us
|
|
1033
1040
|
const owner = (0, $gco9i$getOwner)();
|
|
1034
1041
|
const display_accessor = (0, $gco9i$createMemo)(()=>displays_by_key_().get(product_id));
|
|
1035
|
-
const [product_card_resource] = (0, $gco9i$createResource)(
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
]), // re-render when merchant or market changes
|
|
1039
|
-
([merchant, market])=>{
|
|
1042
|
+
const [product_card_resource] = (0, $gco9i$createResource)(display_accessor, // re-render when the reference to the display object changes
|
|
1043
|
+
// this should only be the case when the merchant or market changes and the new request has completed
|
|
1044
|
+
(display)=>{
|
|
1040
1045
|
// get display in the function that re-runs when merchant or market have changed, since the display may have changed but product_id not
|
|
1041
|
-
const display = (0, $gco9i$untrack)(display_accessor);
|
|
1042
1046
|
return product_card_template_(display, {
|
|
1043
1047
|
set_on_index_change: (fn)=>(0, $gco9i$runWithOwner)(owner, ()=>(0, $gco9i$createEffect)(()=>fn(index()))),
|
|
1044
|
-
merchant:
|
|
1045
|
-
market
|
|
1048
|
+
merchant: (0, $gco9i$untrack)(merchant_),
|
|
1049
|
+
// this means that the merchant and market provided to the template is wrong while we do another fetch, but I don't see how anyone would need to know the correct market there
|
|
1050
|
+
market: (0, $gco9i$untrack)(market_)
|
|
1046
1051
|
});
|
|
1047
1052
|
});
|
|
1048
1053
|
const node_accessor = (0, $a52235d12ccf9c88$export$2f0cbfbb4354bb52)(product_card_resource);
|
|
@@ -1185,7 +1190,7 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({ plp_results_: plp_results_
|
|
|
1185
1190
|
const random_id = (0, $gco9i$make_random_classname)();
|
|
1186
1191
|
const selector_beginning_ = `.depict.plp #${random_id}>`;
|
|
1187
1192
|
const [get_styling, set_styling_] = (0, $gco9i$createSignal)("");
|
|
1188
|
-
const [get_should_have_placeholders_rendered, set_should_have_placeholders_rendered] = (0, $gco9i$createSignal)(
|
|
1193
|
+
const [get_should_have_placeholders_rendered, set_should_have_placeholders_rendered] = (0, $gco9i$createSignal)(true);
|
|
1189
1194
|
const rendered_placeholders = (0, $gco9i$createMemo)(()=>get_should_have_placeholders_rendered() ? (0, $6e41f1fde994db72$export$f33414a4df0afd3f)({
|
|
1190
1195
|
product_card_template_: product_card_template_,
|
|
1191
1196
|
num_placeholders_: (0, $gco9i$createMemo)(()=>{
|
|
@@ -1441,28 +1446,24 @@ function $6bb0a0c563dff4bb$export$e13dddbb31c3a42f() {
|
|
|
1441
1446
|
|
|
1442
1447
|
|
|
1443
1448
|
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
const _el$ = (0, $gco9i$getNextElement)($f32e14878e75af51$var$_tmpl$), _el$2 = _el$.firstChild;
|
|
1449
|
-
(0, $gco9i$insert)(_el$2, children);
|
|
1450
|
-
return _el$;
|
|
1451
|
-
})();
|
|
1449
|
+
|
|
1450
|
+
|
|
1451
|
+
const $f32e14878e75af51$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div></div>`, 2);
|
|
1452
|
+
function $f32e14878e75af51$export$6649caad96ef8870({ children: children , slider_ref_: slider_ref_ , faded_opacity_: faded_opacity_ = 0.7 , mutation_plugins_: mutation_plugins_ = [] }) {
|
|
1452
1453
|
const slider = new (0, $gco9i$Amazing_Slider)({
|
|
1453
1454
|
button_contents: {
|
|
1454
1455
|
left: [
|
|
1455
1456
|
(()=>{
|
|
1456
|
-
const _el$
|
|
1457
|
-
(0, $gco9i$insert)(_el
|
|
1458
|
-
return _el
|
|
1457
|
+
const _el$ = (0, $gco9i$getNextElement)($f32e14878e75af51$var$_tmpl$);
|
|
1458
|
+
(0, $gco9i$insert)(_el$, (0, $gco9i$createComponent)((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {}));
|
|
1459
|
+
return _el$;
|
|
1459
1460
|
})()
|
|
1460
1461
|
],
|
|
1461
1462
|
right: [
|
|
1462
1463
|
(()=>{
|
|
1463
|
-
const _el$
|
|
1464
|
-
(0, $gco9i$insert)(_el$
|
|
1465
|
-
return _el$
|
|
1464
|
+
const _el$2 = (0, $gco9i$getNextElement)($f32e14878e75af51$var$_tmpl$);
|
|
1465
|
+
(0, $gco9i$insert)(_el$2, (0, $gco9i$createComponent)((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {}));
|
|
1466
|
+
return _el$2;
|
|
1466
1467
|
})()
|
|
1467
1468
|
]
|
|
1468
1469
|
},
|
|
@@ -1487,7 +1488,7 @@ function $f32e14878e75af51$export$6649caad96ef8870({ children: children , button
|
|
|
1487
1488
|
|
|
1488
1489
|
|
|
1489
1490
|
const $1adfe60f3a14a1d7$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<button class="clear-all-filters minor"></button>`, 2), $1adfe60f3a14a1d7$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="inner"><span class="title"><!#><!/>: </span><!#><!/></div>`, 8), $1adfe60f3a14a1d7$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<button class="clear-filter major"><!#><!/><span><!#><!/><!#><!/><!#><!/> – <!#><!/><!#><!/><!#><!/></span></button>`, 18), $1adfe60f3a14a1d7$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<button class="clear-filter major"><!#><!/><span></span></button>`, 6);
|
|
1490
|
-
function $1adfe60f3a14a1d7$export$fecbb157621501bd({ number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: [read_local_filter_cache] , search_filters_open_: [read_search_filters_open] , search_sorting_open_: [read_search_sorting_open] ,
|
|
1491
|
+
function $1adfe60f3a14a1d7$export$fecbb157621501bd({ number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: [read_local_filter_cache] , search_filters_open_: [read_search_filters_open] , search_sorting_open_: [read_search_sorting_open] , local_filter_cache_: local_filter_cache_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ }) {
|
|
1491
1492
|
const { price_formatting_: price_formatting_ } = i18n_;
|
|
1492
1493
|
const [read_selected_filters, write_selected_filters] = selected_filters_;
|
|
1493
1494
|
const { collapse: collapse , expand: expand , ExpandingContainer: ExpandingContainer } = (0, $24e27fab9c821b86$export$5bad61ecde080b1f)({
|
|
@@ -1504,7 +1505,6 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({ number_of_rendered_selected
|
|
|
1504
1505
|
const _el$ = (0, $gco9i$getNextElement)($1adfe60f3a14a1d7$var$_tmpl$2), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, [_el$5, _co$] = (0, $gco9i$getNextMarker)(_el$4.nextSibling), _el$3 = _el$5.nextSibling, _el$7 = _el$2.nextSibling, [_el$8, _co$2] = (0, $gco9i$getNextMarker)(_el$7.nextSibling);
|
|
1505
1506
|
(0, $gco9i$insert)(_el$2, ()=>i18n_.selected_filters_title_(), _el$5, _co$);
|
|
1506
1507
|
(0, $gco9i$insert)(_el$, (0, $gco9i$createComponent)((0, $f32e14878e75af51$export$6649caad96ef8870), {
|
|
1507
|
-
button_: slider_arrow_button_,
|
|
1508
1508
|
slider_ref_: (slider)=>slider.container.classList.add("filter-crumbs"),
|
|
1509
1509
|
get children () {
|
|
1510
1510
|
return [
|
|
@@ -1771,6 +1771,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({ number_of_rendered_selected
|
|
|
1771
1771
|
|
|
1772
1772
|
|
|
1773
1773
|
|
|
1774
|
+
|
|
1774
1775
|
async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_opts) {
|
|
1775
1776
|
const body = await (0, $gco9i$observer).wait_for_element("body");
|
|
1776
1777
|
let dispose_and_remove;
|
|
@@ -4215,7 +4216,8 @@ function $11d594c749b76228$export$cb808a3c41736d8e() {
|
|
|
4215
4216
|
|
|
4216
4217
|
|
|
4217
4218
|
|
|
4218
|
-
|
|
4219
|
+
|
|
4220
|
+
const $cdea4cf8c5c071ef$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="filters"><div class="body"></div></div>`, 4), $cdea4cf8c5c071ef$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="sorting"><div class="body"></div></div>`, 4), $cdea4cf8c5c071ef$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="sort-and-filter-buttons"><div class="outer"><div class="inner"><!#><!/><!#><!/><!#><!/></div></div></div>`, 12), $cdea4cf8c5c071ef$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<span class="num-filters"></span>`, 2), $cdea4cf8c5c071ef$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="open-filters-button-container"><!#><!/><button type="button"><!#><!/><span></span></button></div>`, 10), $cdea4cf8c5c071ef$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<button class="toggle-button for-sorting major-minor-transition"><span></span><!#><!/></button>`, 6);
|
|
4219
4221
|
function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({ current_sorting_: current_sorting_ , set_extra_els_in_results_container_: set_extra_els_in_results_container_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , set_sort_or_filter_open_: set_sort_or_filter_open_ , i18n_: i18n_ , available_sortings_: available_sortings_ , available_filters_: available_filters_ , expanded_filters_: expanded_filters_ , middle_elements_: middle_elements_ , input_modal_open_: input_modal_open_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , set_sort_and_filter_element_: set_sort_and_filter_element_ , formatted_number_of_results_: formatted_number_of_results_ , filter_button_width_: filter_button_width_ , sort_button_width_: sort_button_width_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ , get_extra_filters_button_: get_extra_filters_button_ , get_extra_sorting_button_: get_extra_sorting_button_ }) {
|
|
4220
4222
|
const Self = ()=>{
|
|
4221
4223
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -4367,6 +4369,7 @@ function $cdea4cf8c5c071ef$var$OpenFiltersButton({ i18n_: i18n_ , search_filters
|
|
|
4367
4369
|
search_sorting_open_[1](false);
|
|
4368
4370
|
})), true);
|
|
4369
4371
|
(0, $gco9i$setAttribute)(_el$16, "tabindex", tabindex_);
|
|
4372
|
+
(0, $gco9i$className)(_el$16, "filter toggle-button major-minor-transition" + ((0, $gco9i$isServer) ? " minor" : ""));
|
|
4370
4373
|
(0, $gco9i$insert)(_el$16, (0, $gco9i$createComponent)((0, $gco9i$Show), {
|
|
4371
4374
|
get when () {
|
|
4372
4375
|
return filters_closed();
|
|
@@ -4852,7 +4855,7 @@ function $dfa5b6f7c5e421df$export$5646050d516e06bc({ crumb_data_: get_api_crumb_
|
|
|
4852
4855
|
|
|
4853
4856
|
|
|
4854
4857
|
const $06edf3aec9073663$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<nav class="quicklinks"></nav>`, 2), $06edf3aec9073663$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div>QuickLinks failed</div>`, 2), $06edf3aec9073663$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<a class="quicklink"></a>`, 2);
|
|
4855
|
-
function $06edf3aec9073663$export$466cdc317043f6cb({ quicklinks_data_: quicklinks_data_ , router_: router_ , current_query_id_: current_query_id_ ,
|
|
4858
|
+
function $06edf3aec9073663$export$466cdc317043f6cb({ quicklinks_data_: quicklinks_data_ , router_: router_ , current_query_id_: current_query_id_ , breadcrumb_data_: breadcrumb_data_ , i18n_: i18n_ }) {
|
|
4856
4859
|
let scrolling_logic_ran_for_query_id = false;
|
|
4857
4860
|
let last_scroll_position;
|
|
4858
4861
|
let scroll_to_element_on_dom_insertion;
|
|
@@ -4909,7 +4912,6 @@ function $06edf3aec9073663$export$466cdc317043f6cb({ quicklinks_data_: quicklink
|
|
|
4909
4912
|
const _el$ = (0, $gco9i$getNextElement)($06edf3aec9073663$var$_tmpl$);
|
|
4910
4913
|
(0, $gco9i$insert)(_el$, (0, $gco9i$createComponent)((0, $f32e14878e75af51$export$6649caad96ef8870), {
|
|
4911
4914
|
faded_opacity_: 0.5,
|
|
4912
|
-
button_: slider_arrow_button_,
|
|
4913
4915
|
mutation_plugins_: mutation_plugins,
|
|
4914
4916
|
slider_ref_: (slider)=>{
|
|
4915
4917
|
const { insert_here: insert_here , intersecting_items_object: intersecting_items_object } = slider;
|
|
@@ -5264,7 +5266,7 @@ function $eb9ba2e49ab3dcc2$export$d4fc5c0e68a52116(el, query_id_, i18n_) {
|
|
|
5264
5266
|
|
|
5265
5267
|
|
|
5266
5268
|
const $df5d81d0fe61ff21$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="product-count"><!#><!/> <!#><!/></div>`, 6), $df5d81d0fe61ff21$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div></div>`, 2), $df5d81d0fe61ff21$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="filter-results-for-one-row"><!#><!/><!#><!/></div>`, 6), $df5d81d0fe61ff21$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="depict plp category"><div class="listing-page"><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/></div><!#><!/><!#><!/></div>`, 20);
|
|
5267
|
-
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_ ,
|
|
5269
|
+
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_ , 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_ }) {
|
|
5268
5270
|
let results_for;
|
|
5269
5271
|
let only_show_filters_opener_;
|
|
5270
5272
|
let middle_elements_;
|
|
@@ -5416,17 +5418,18 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5416
5418
|
(0, $gco9i$createRenderEffect)((0, $gco9i$catchify)(async ()=>{
|
|
5417
5419
|
const slim = is_slim_();
|
|
5418
5420
|
const only_show_filters_opener = only_show_filters_opener_?.();
|
|
5421
|
+
const owner = (0, $gco9i$getOwner)();
|
|
5419
5422
|
await set_results_filters(); // remove elements, wait one microtask for updates to have been committed to the DOM, otherwise we'd try to do illegal DOM operations
|
|
5420
5423
|
// signals can't be read reactively anymore after the await FYI
|
|
5421
|
-
set_results_filters(slim ? only_show_filters_opener ? filters_opener : [
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5424
|
+
(0, $gco9i$runWithOwner)(owner, ()=>set_results_filters(slim ? only_show_filters_opener ? filters_opener : [
|
|
5425
|
+
results_for,
|
|
5426
|
+
filters_opener
|
|
5427
|
+
] : (()=>{
|
|
5428
|
+
const _el$8 = (0, $gco9i$getNextElement)($df5d81d0fe61ff21$var$_tmpl$3), _el$9 = _el$8.firstChild, [_el$10, _co$3] = (0, $gco9i$getNextMarker)(_el$9.nextSibling), _el$11 = _el$10.nextSibling, [_el$12, _co$4] = (0, $gco9i$getNextMarker)(_el$11.nextSibling);
|
|
5429
|
+
(0, $gco9i$insert)(_el$8, results_for, _el$10, _co$3);
|
|
5430
|
+
(0, $gco9i$insert)(_el$8, filters_opener, _el$12, _co$4);
|
|
5431
|
+
return _el$8;
|
|
5432
|
+
})()));
|
|
5430
5433
|
}));
|
|
5431
5434
|
(0, $fc5a12f3a857ca30$export$e702733a056c40d6)({
|
|
5432
5435
|
selected_filters_: selected_filters_,
|
|
@@ -5466,7 +5469,6 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5466
5469
|
quicklinks_data_: quicklinks_data_,
|
|
5467
5470
|
current_query_id_: query_id_,
|
|
5468
5471
|
router_: router_,
|
|
5469
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
5470
5472
|
breadcrumb_data_: crumb_data_,
|
|
5471
5473
|
i18n_: i18n_
|
|
5472
5474
|
});
|
|
@@ -5487,7 +5489,6 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5487
5489
|
i18n_: i18n_,
|
|
5488
5490
|
selected_filters_: selected_filters_,
|
|
5489
5491
|
local_filter_cache_: local_filter_cache_,
|
|
5490
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
5491
5492
|
search_filters_open_: category_filters_open_,
|
|
5492
5493
|
search_sorting_open_: category_sorting_open_,
|
|
5493
5494
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
@@ -5888,7 +5889,6 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
5888
5889
|
|
|
5889
5890
|
|
|
5890
5891
|
|
|
5891
|
-
|
|
5892
5892
|
const $961b5c64bef4662f$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="depict plp category"></div>`, 2);
|
|
5893
5893
|
const $961b5c64bef4662f$var$min_products_to_fetch_ = 20;
|
|
5894
5894
|
const $961b5c64bef4662f$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
@@ -5969,11 +5969,7 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
5969
5969
|
router_: this.#router,
|
|
5970
5970
|
selected_filters_: selected_filters_,
|
|
5971
5971
|
current_sorting_: current_sorting_,
|
|
5972
|
-
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
5973
|
-
slider_arrow_button_: (0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee)({
|
|
5974
|
-
height_: 12,
|
|
5975
|
-
width_: 6.46
|
|
5976
|
-
})
|
|
5972
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
5977
5973
|
});
|
|
5978
5974
|
});
|
|
5979
5975
|
}
|
|
@@ -5987,7 +5983,7 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5987
5983
|
grid_spacing: grid_spacing.horizontal
|
|
5988
5984
|
};
|
|
5989
5985
|
return (0, $16b52438165aafe2$export$23fca46f3143581f)(()=>{
|
|
5990
|
-
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ ,
|
|
5986
|
+
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ } = shared_properties;
|
|
5991
5987
|
(0, $gco9i$onCleanup)(reset_history_state_);
|
|
5992
5988
|
return (0, $df5d81d0fe61ff21$export$f7d2f673fc2f091d)({
|
|
5993
5989
|
tenant_: ()=>depict_category.merchant,
|
|
@@ -6006,7 +6002,6 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
6006
6002
|
get_quicklinks_accessor_: (accessor)=>(0, $gco9i$createComputed)(()=>quicklinks_signal_[1](accessor())),
|
|
6007
6003
|
category_filters_open_: category_filters_open_,
|
|
6008
6004
|
category_sorting_open_: category_sorting_open_,
|
|
6009
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
6010
6005
|
expanded_filters_: expanded_filters_,
|
|
6011
6006
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
6012
6007
|
selected_filters_: selected_filters_,
|
|
@@ -6033,7 +6028,7 @@ function $961b5c64bef4662f$export$5b7c3ce0ebe51f86({ depict_category: depict_cat
|
|
|
6033
6028
|
});
|
|
6034
6029
|
}
|
|
6035
6030
|
function $961b5c64bef4662f$export$de035477d6fef996({ depict_category: depict_category }) {
|
|
6036
|
-
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , router_: router_
|
|
6031
|
+
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , router_: router_ } = $961b5c64bef4662f$var$get_shared_properties(depict_category);
|
|
6037
6032
|
return (0, $gco9i$createComponent)($961b5c64bef4662f$var$InExternalAreaDiv, {
|
|
6038
6033
|
get children () {
|
|
6039
6034
|
return (0, $06edf3aec9073663$export$466cdc317043f6cb)({
|
|
@@ -6041,7 +6036,6 @@ function $961b5c64bef4662f$export$de035477d6fef996({ depict_category: depict_cat
|
|
|
6041
6036
|
quicklinks_data_: quicklinks_data_,
|
|
6042
6037
|
router_: router_,
|
|
6043
6038
|
current_query_id_: ()=>depict_category.category_id,
|
|
6044
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
6045
6039
|
breadcrumb_data_: breadcrumb_data_
|
|
6046
6040
|
});
|
|
6047
6041
|
}
|
|
@@ -6175,9 +6169,9 @@ const $a79d86d64fb64e8e$export$824dde41348efed1 = /*@__PURE__*/ (()=>{
|
|
|
6175
6169
|
|
|
6176
6170
|
const $5c5f95951393e5d1$var$TEN_MINUTES = 600000;
|
|
6177
6171
|
const $5c5f95951393e5d1$var$TWENTY_FOUR_HOURS = 86400000;
|
|
6178
|
-
async function $5c5f95951393e5d1$export$643598a327b5833e(tenant, market) {
|
|
6172
|
+
async function $5c5f95951393e5d1$export$643598a327b5833e(tenant, market, type) {
|
|
6179
6173
|
let localstorage_value;
|
|
6180
|
-
const localstorage_key = `
|
|
6174
|
+
const localstorage_key = `depict_${tenant}_${type ?? "categories"}_` + market;
|
|
6181
6175
|
try {
|
|
6182
6176
|
const in_ls = localStorage[localstorage_key];
|
|
6183
6177
|
if (in_ls) localstorage_value = JSON.parse(in_ls);
|
|
@@ -6193,7 +6187,7 @@ async function $5c5f95951393e5d1$export$643598a327b5833e(tenant, market) {
|
|
|
6193
6187
|
return stored_queries;
|
|
6194
6188
|
else if (age < $5c5f95951393e5d1$var$TWENTY_FOUR_HOURS) {
|
|
6195
6189
|
// if younger than a day, return stored value but still trigger re-fetch, so we have fresh data next page load (stale data this one but never a delay)
|
|
6196
|
-
$5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market, localstorage_key).catch((e)=>(0, $gco9i$report)([
|
|
6190
|
+
$5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market, localstorage_key, type).catch((e)=>(0, $gco9i$report)([
|
|
6197
6191
|
e,
|
|
6198
6192
|
"couldn't fetch categories"
|
|
6199
6193
|
], "warning"));
|
|
@@ -6201,10 +6195,10 @@ async function $5c5f95951393e5d1$export$643598a327b5833e(tenant, market) {
|
|
|
6201
6195
|
}
|
|
6202
6196
|
// else: we are older and just fetch, store and return new queries
|
|
6203
6197
|
}
|
|
6204
|
-
return await $5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market, localstorage_key);
|
|
6198
|
+
return await $5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market, localstorage_key, type);
|
|
6205
6199
|
}
|
|
6206
|
-
async function $5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market, localstorage_key) {
|
|
6207
|
-
const new_categories = await $5c5f95951393e5d1$var$download_categories(tenant, market);
|
|
6200
|
+
async function $5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market, localstorage_key, type) {
|
|
6201
|
+
const new_categories = await $5c5f95951393e5d1$var$download_categories(tenant, market, type);
|
|
6208
6202
|
try {
|
|
6209
6203
|
localStorage[localstorage_key] = JSON.stringify({
|
|
6210
6204
|
updated: +new Date(),
|
|
@@ -6218,12 +6212,15 @@ async function $5c5f95951393e5d1$var$fetch_and_store_categories(tenant, market,
|
|
|
6218
6212
|
}
|
|
6219
6213
|
return new_categories;
|
|
6220
6214
|
}
|
|
6221
|
-
async function $5c5f95951393e5d1$var$download_categories(tenant, market) {
|
|
6215
|
+
async function $5c5f95951393e5d1$var$download_categories(tenant, market, type) {
|
|
6222
6216
|
const fetched = await (0, $gco9i$fetch_retry)((0, $gco9i$base_url) + "/v2/product-listing/queries", {
|
|
6223
6217
|
method: "POST",
|
|
6224
6218
|
body: JSON.stringify({
|
|
6225
6219
|
tenant: tenant,
|
|
6226
|
-
market: market
|
|
6220
|
+
market: market,
|
|
6221
|
+
...type ? {
|
|
6222
|
+
type: type
|
|
6223
|
+
} : {}
|
|
6227
6224
|
})
|
|
6228
6225
|
});
|
|
6229
6226
|
if (!fetched) return [];
|
|
@@ -7924,7 +7921,7 @@ function $fabfda1230351b1a$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
7924
7921
|
|
|
7925
7922
|
|
|
7926
7923
|
const $793905995512612d$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="category-suggestions"></div>`, 2), $793905995512612d$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="category-suggestion"></div>`, 2);
|
|
7927
|
-
function $793905995512612d$export$c05a196222ba1302({ suggestions_: suggestions_ , children: children
|
|
7924
|
+
function $793905995512612d$export$c05a196222ba1302({ suggestions_: suggestions_ , children: children }) {
|
|
7928
7925
|
const category_suggestions_ = (0, $gco9i$createMemo)(()=>suggestions_()?.suggestions.filter((s)=>s.type === "category"));
|
|
7929
7926
|
return (0, $gco9i$createComponent)((0, $gco9i$Show), {
|
|
7930
7927
|
get when () {
|
|
@@ -7933,7 +7930,6 @@ function $793905995512612d$export$c05a196222ba1302({ suggestions_: suggestions_
|
|
|
7933
7930
|
get children () {
|
|
7934
7931
|
const _el$ = (0, $gco9i$getNextElement)($793905995512612d$var$_tmpl$);
|
|
7935
7932
|
(0, $gco9i$insert)(_el$, (0, $gco9i$createComponent)((0, $f32e14878e75af51$export$6649caad96ef8870), {
|
|
7936
|
-
button_: slider_arrow_button_,
|
|
7937
7933
|
faded_opacity_: 0.7,
|
|
7938
7934
|
get children () {
|
|
7939
7935
|
return (0, $gco9i$createComponent)((0, $gco9i$Show), {
|
|
@@ -8009,7 +8005,7 @@ function $f8c929beb82c512b$export$9dd50d35b9d94fdf({ get_search_query_: get_sear
|
|
|
8009
8005
|
|
|
8010
8006
|
const $7097477c78a89208$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="filter-results-for-one-row"><!#><!/><!#><!/></div>`, 6), $7097477c78a89208$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="depict plp search"><div class="listing-page"><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/></div><!#><!/><!#><!/></div>`, 20);
|
|
8011
8007
|
function $7097477c78a89208$export$a54ec244c8863715(opts) {
|
|
8012
|
-
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_ ,
|
|
8008
|
+
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_ , 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;
|
|
8013
8009
|
const [get_sorting] = current_sorting_;
|
|
8014
8010
|
const all_products_loaded_ = (0, $gco9i$createSignal)(false);
|
|
8015
8011
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
@@ -8129,18 +8125,19 @@ function $7097477c78a89208$export$a54ec244c8863715(opts) {
|
|
|
8129
8125
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_
|
|
8130
8126
|
});
|
|
8131
8127
|
const results_filters = (0, $gco9i$createSignal)();
|
|
8128
|
+
const owner = (0, $gco9i$getOwner)();
|
|
8132
8129
|
(0, $gco9i$onCleanup)((0, $gco9i$javascript_media_query)("(max-width:600px)", async ({ matches: matches })=>{
|
|
8133
8130
|
results_filters[1]();
|
|
8134
8131
|
await new Promise((r)=>queueMicrotask(r));
|
|
8135
|
-
results_filters[1](matches ? [
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8132
|
+
(0, $gco9i$runWithOwner)(owner, ()=>results_filters[1](matches ? [
|
|
8133
|
+
results_for,
|
|
8134
|
+
filters_opener
|
|
8135
|
+
] : (()=>{
|
|
8136
|
+
const _el$ = (0, $gco9i$getNextElement)($7097477c78a89208$var$_tmpl$), _el$2 = _el$.firstChild, [_el$3, _co$] = (0, $gco9i$getNextMarker)(_el$2.nextSibling), _el$4 = _el$3.nextSibling, [_el$5, _co$2] = (0, $gco9i$getNextMarker)(_el$4.nextSibling);
|
|
8137
|
+
(0, $gco9i$insert)(_el$, results_for, _el$3, _co$);
|
|
8138
|
+
(0, $gco9i$insert)(_el$, filters_opener, _el$5, _co$2);
|
|
8139
|
+
return _el$;
|
|
8140
|
+
})()));
|
|
8144
8141
|
}).remove);
|
|
8145
8142
|
(0, $gco9i$catchify)((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
8146
8143
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
@@ -8172,7 +8169,6 @@ function $7097477c78a89208$export$a54ec244c8863715(opts) {
|
|
|
8172
8169
|
get children () {
|
|
8173
8170
|
return (0, $gco9i$createComponent)((0, $793905995512612d$export$c05a196222ba1302), {
|
|
8174
8171
|
suggestions_: suggestions,
|
|
8175
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
8176
8172
|
children: make_category_suggestion_card_
|
|
8177
8173
|
});
|
|
8178
8174
|
}
|
|
@@ -8192,7 +8188,6 @@ function $7097477c78a89208$export$a54ec244c8863715(opts) {
|
|
|
8192
8188
|
i18n_: i18n_,
|
|
8193
8189
|
selected_filters_: selected_filters_,
|
|
8194
8190
|
local_filter_cache_: local_filter_cache_,
|
|
8195
|
-
slider_arrow_button_: slider_arrow_button_,
|
|
8196
8191
|
search_filters_open_: search_filters_open_,
|
|
8197
8192
|
search_sorting_open_: search_sorting_open_,
|
|
8198
8193
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
@@ -8319,7 +8314,6 @@ function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
|
8319
8314
|
|
|
8320
8315
|
|
|
8321
8316
|
|
|
8322
|
-
|
|
8323
8317
|
const $806c97b931758897$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$gco9i$template)(`<div class="depict plp search"></div>`, 2);
|
|
8324
8318
|
/**
|
|
8325
8319
|
* 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.
|
|
@@ -8605,10 +8599,6 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
8605
8599
|
cols_at_size: (0, $b5cccc8ee7d24677$export$6daf8749b65a1b77)(extra_depict_options.recommendations_cols_at_size),
|
|
8606
8600
|
...grid_spacing_override
|
|
8607
8601
|
} : undefined,
|
|
8608
|
-
slider_arrow_button_: (0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee)({
|
|
8609
|
-
height_: 12,
|
|
8610
|
-
width_: 6.46
|
|
8611
|
-
}),
|
|
8612
8602
|
product_card_template_: product_card_template
|
|
8613
8603
|
});
|
|
8614
8604
|
}, "Entire SearchPage failed");
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { SearchSuggestionsResponse, CategorySuggestion } from "@depict-ai/types/
|
|
|
7
7
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
8
8
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
9
9
|
import { ProductListingResponse } from "@depict-ai/types/api/ProductListingResponse";
|
|
10
|
-
export const version = "1.0.
|
|
10
|
+
export const version = "1.0.18";
|
|
11
11
|
export function CrossIcon(props?: JSX.SvgSVGAttributes<SVGSVGElement>): SVGElement;
|
|
12
12
|
/** @jsxImportSource solid-js */
|
|
13
13
|
export function GenericSliderArrowButton(props?: {
|
|
@@ -314,7 +314,13 @@ export function BreadCrumbs({ depict_category }: {
|
|
|
314
314
|
export function QuickLinks({ depict_category }: {
|
|
315
315
|
depict_category: DepictCategory;
|
|
316
316
|
}): HTMLElement;
|
|
317
|
-
|
|
317
|
+
/**
|
|
318
|
+
* Gets available categories/collections (query_ids for the product-listing endpoint) for a merchant
|
|
319
|
+
* @param tenant
|
|
320
|
+
* @param market
|
|
321
|
+
* @param type - optional, currently only setting this to "collection" will return collections instead of categories
|
|
322
|
+
*/
|
|
323
|
+
export function get_categories(tenant: string, market: string, type?: string): Promise<string[]>;
|
|
318
324
|
type ImagePlaceholderBaseOptions = {
|
|
319
325
|
style?: JSX.CSSProperties;
|
|
320
326
|
class?: string;
|