@depict-ai/ui 4.3.2 → 4.3.4
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 +159 -140
- package/ES10/index.d.ts +12 -1
- package/ES10/index.js +193 -174
- package/latest/index.cjs +153 -134
- package/latest/index.d.ts +12 -1
- package/latest/index.js +187 -168
- package/package.json +2 -2
- package/server/ES10/index.cjs +129 -117
- package/server/ES10/index.d.ts +12 -1
- package/server/ES10/index.js +168 -156
- package/server/latest/index.cjs +123 -111
- package/server/latest/index.d.ts +12 -1
- package/server/latest/index.js +162 -150
package/ES10/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
18
18
|
function $parcel$interopDefault(a) {
|
|
19
19
|
return a && a.__esModule ? a.default : a;
|
|
20
20
|
}
|
|
21
|
-
$parcel$export(module.exports, "LooksSlider", () => $
|
|
21
|
+
$parcel$export(module.exports, "LooksSlider", () => $e57cd46536ad992e$export$2c9f9bf2092486aa);
|
|
22
22
|
$parcel$export(module.exports, "promiseSafeStructuredClone", () => $400d96565bbbfe07$export$83bb9af5671e1dbe);
|
|
23
23
|
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $cfcd56242923775d$export$5162a71f252e6122);
|
|
24
24
|
$parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $cfcd56242923775d$export$3064e1e8c6513da3);
|
|
@@ -100,7 +100,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
100
100
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
101
101
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
102
102
|
/*! Depict.ai search and product listing SDK */
|
|
103
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.3.
|
|
103
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.3.4";
|
|
104
104
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
105
105
|
const cols_at_size = [];
|
|
106
106
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1360,7 +1360,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1360
1360
|
let {
|
|
1361
1361
|
display_: display_,
|
|
1362
1362
|
FavoriteButton_: FavoriteButton_,
|
|
1363
|
-
|
|
1363
|
+
userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
|
|
1364
1364
|
textFadeInAnimationRunning_: textFadeInAnimationRunning_,
|
|
1365
1365
|
outerRef_: outerRef_,
|
|
1366
1366
|
animationDuration_: animationDuration_,
|
|
@@ -1376,7 +1376,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1376
1376
|
return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : (_variantToUse$image_u = _variantToUse.image_urls) === null || _variantToUse$image_u === void 0 ? void 0 : _variantToUse$image_u[0];
|
|
1377
1377
|
});
|
|
1378
1378
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1379
|
-
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $52FdA$solidjs.createSignal($52FdA$solidjs.untrack(
|
|
1379
|
+
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $52FdA$solidjs.createSignal($52FdA$solidjs.untrack(userWantsExpanded));
|
|
1380
1380
|
const [animationEffectExists, setAnimationEffectExists] = $52FdA$solidjs.createSignal(false);
|
|
1381
1381
|
const [salePrice] = $52FdA$solidjs.createResource(() => {
|
|
1382
1382
|
var _variantToUse2;
|
|
@@ -1387,7 +1387,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1387
1387
|
return (_variantToUse3 = variantToUse()) === null || _variantToUse3 === void 0 ? void 0 : _variantToUse3.original_price;
|
|
1388
1388
|
});
|
|
1389
1389
|
const isOnSale = $52FdA$solidjs.createMemo(() => !salePrice.loading && !originalPrice.loading && salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense after the initial load
|
|
1390
|
-
const enableLink = $52FdA$solidjs.createMemo(() =>
|
|
1390
|
+
const enableLink = $52FdA$solidjs.createMemo(() => userWantsExpanded() && !animationIsRunning());
|
|
1391
1391
|
const href = $52FdA$solidjs.createMemo(() => {
|
|
1392
1392
|
var _variantToUse4;
|
|
1393
1393
|
return (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url;
|
|
@@ -1405,11 +1405,18 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1405
1405
|
href: href()
|
|
1406
1406
|
} : {}, {
|
|
1407
1407
|
get onClick() {
|
|
1408
|
-
return $52FdA$depictaiutilishared.catchify(event_ =>
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1408
|
+
return $52FdA$depictaiutilishared.catchify(event_ => {
|
|
1409
|
+
if (enableLink()) {
|
|
1410
|
+
pseudoRouter_.navigate_.go_to_({
|
|
1411
|
+
new_url_: href(),
|
|
1412
|
+
is_replace_: false,
|
|
1413
|
+
event_: event_
|
|
1414
|
+
});
|
|
1415
|
+
if (event_.defaultPrevented)
|
|
1416
|
+
// We single-page-navigated in this tab, close the look
|
|
1417
|
+
setUserWantsExpanded(false);
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1413
1420
|
}
|
|
1414
1421
|
}), false, true);
|
|
1415
1422
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
@@ -1436,10 +1443,10 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1436
1443
|
return imageUrl();
|
|
1437
1444
|
},
|
|
1438
1445
|
get aspectRatio() {
|
|
1439
|
-
return
|
|
1446
|
+
return userWantsExpanded() ? 0.75 : 1;
|
|
1440
1447
|
},
|
|
1441
1448
|
get autoAdjustAspectRatio() {
|
|
1442
|
-
return
|
|
1449
|
+
return userWantsExpanded();
|
|
1443
1450
|
},
|
|
1444
1451
|
imgProps: {
|
|
1445
1452
|
keyRatioUpdating: true
|
|
@@ -1452,7 +1459,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1452
1459
|
}), _el$13, _co$3);
|
|
1453
1460
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1454
1461
|
get when() {
|
|
1455
|
-
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() :
|
|
1462
|
+
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1456
1463
|
},
|
|
1457
1464
|
get children() {
|
|
1458
1465
|
var _el$3 = $52FdA$solidjsweb.getNextElement($d66c35b5a6d6d926$var$_tmpl$3),
|
|
@@ -1480,7 +1487,7 @@ function $d66c35b5a6d6d926$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1480
1487
|
setAnimationIsRunning(true);
|
|
1481
1488
|
$52FdA$solidjs.runWithOwner(owner, () => {
|
|
1482
1489
|
$52FdA$solidjs.createRenderEffect(() => {
|
|
1483
|
-
const expanded =
|
|
1490
|
+
const expanded = userWantsExpanded();
|
|
1484
1491
|
// Still glitches in chrome (probably not fixable) and sometimes the timing is off in Safari but fuck it, I couldn't massage the WAAPI to improve it in any way (without reading computed style) to make the reversing of animations glitch less
|
|
1485
1492
|
textContainerAnimation.pause();
|
|
1486
1493
|
textContainerAnimation.updatePlaybackRate(expanded ? 1 : -1);
|
|
@@ -1639,7 +1646,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1639
1646
|
let {
|
|
1640
1647
|
displays_: displays_,
|
|
1641
1648
|
FavoriteButton_: FavoriteButton_,
|
|
1642
|
-
userWantsExpandedSignal_:
|
|
1649
|
+
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
1643
1650
|
containerWidth_: containerWidth_,
|
|
1644
1651
|
animationDuration_: animationDuration_,
|
|
1645
1652
|
supportsHover_: supportsHover_,
|
|
@@ -1653,6 +1660,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1653
1660
|
// The following three signals just contain the state if the animations are actually running and should only be set by the respective animation code
|
|
1654
1661
|
const textFadeInAnimationRunning = $52FdA$solidjs.createSignal(false);
|
|
1655
1662
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1663
|
+
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1656
1664
|
$dfa95866b27a2a53$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1657
1665
|
return $52FdA$solidjsweb.createComponent((0, $d067f3a30f047b41$export$e68cff63f76bd15b), {
|
|
1658
1666
|
get children() {
|
|
@@ -1702,7 +1710,7 @@ function $e0b3f1f332b6863b$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1702
1710
|
animationDuration_: animationDuration_,
|
|
1703
1711
|
display_: display,
|
|
1704
1712
|
FavoriteButton_: FavoriteButton_,
|
|
1705
|
-
|
|
1713
|
+
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
1706
1714
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1707
1715
|
priceFormatting_: priceFormatting_,
|
|
1708
1716
|
outerRef_: el => $52FdA$solidjs.createEffect(() => {
|
|
@@ -1946,11 +1954,105 @@ function $73014ff36186a4dd$var$_get_navigation_happened_promise2(is_replace) {
|
|
|
1946
1954
|
(0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).add(handler);
|
|
1947
1955
|
});
|
|
1948
1956
|
}
|
|
1949
|
-
var $
|
|
1950
|
-
|
|
1951
|
-
|
|
1957
|
+
var $2c920813c92d6987$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="show-more major"type=button>`),
|
|
1958
|
+
$2c920813c92d6987$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<h2 class=recs-title>`),
|
|
1959
|
+
$2c920813c92d6987$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
|
|
1960
|
+
function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
1961
|
+
let {
|
|
1962
|
+
recommendations_resource_: recommendations_resource_,
|
|
1963
|
+
product_card_template_: product_card_template_,
|
|
1964
|
+
layout_options_: layout_options_,
|
|
1965
|
+
title_: title_,
|
|
1966
|
+
max_rows_: max_rows_,
|
|
1967
|
+
view_more_button_: view_more_button_
|
|
1968
|
+
} = _ref;
|
|
1969
|
+
const rows_object_ = $52FdA$solidjs.createMemo(() => {
|
|
1970
|
+
var _view_more_button$row;
|
|
1971
|
+
const view_more_button = view_more_button_ === null || view_more_button_ === void 0 ? void 0 : view_more_button_();
|
|
1972
|
+
const max_rows = max_rows_ === null || max_rows_ === void 0 ? void 0 : max_rows_();
|
|
1973
|
+
if (!view_more_button) {
|
|
1974
|
+
if (max_rows) return {
|
|
1975
|
+
max_rows: max_rows
|
|
1976
|
+
};
|
|
1977
|
+
return "all";
|
|
1978
|
+
}
|
|
1979
|
+
return {
|
|
1980
|
+
max_rows: max_rows,
|
|
1981
|
+
start_rows: view_more_button.start_rows,
|
|
1982
|
+
rows_per_click: (_view_more_button$row = view_more_button.rows_per_click) !== null && _view_more_button$row !== void 0 ? _view_more_button$row : 2,
|
|
1983
|
+
button: (() => {
|
|
1984
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$);
|
|
1985
|
+
$52FdA$solidjsweb.insert(_el$, () => view_more_button.text);
|
|
1986
|
+
return _el$;
|
|
1987
|
+
})()
|
|
1988
|
+
};
|
|
1989
|
+
});
|
|
1990
|
+
const is_showing_something = $52FdA$solidjs.createMemo(() => {
|
|
1991
|
+
var _recommendations_reso;
|
|
1992
|
+
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
1993
|
+
});
|
|
1994
|
+
const title = $52FdA$solidjs.createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
1995
|
+
const num_placeholders_ = () => 20;
|
|
1996
|
+
const elements = [$52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1997
|
+
get when() {
|
|
1998
|
+
return title();
|
|
1999
|
+
},
|
|
2000
|
+
get children() {
|
|
2001
|
+
var _el$2 = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$2);
|
|
2002
|
+
$52FdA$solidjsweb.insert(_el$2, title);
|
|
2003
|
+
return _el$2;
|
|
2004
|
+
}
|
|
2005
|
+
}), (() => {
|
|
2006
|
+
var _el$3 = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$3),
|
|
2007
|
+
_el$4 = _el$3.firstChild,
|
|
2008
|
+
[_el$5, _co$] = $52FdA$solidjsweb.getNextMarker(_el$4.nextSibling),
|
|
2009
|
+
_el$6 = _el$5.nextSibling,
|
|
2010
|
+
[_el$7, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$6.nextSibling);
|
|
2011
|
+
$52FdA$solidjsweb.insert(_el$3, (0, $8edd3cf30d1fd8b4$export$a2cc176055f8f08), _el$5, _co$);
|
|
2012
|
+
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $6c2c739b113a8ddf$export$d21e32dfedac04be), $52FdA$solidjsweb.mergeProps({
|
|
2013
|
+
get rows() {
|
|
2014
|
+
return rows_object_();
|
|
2015
|
+
},
|
|
2016
|
+
layout: "grid",
|
|
2017
|
+
element_attributes: {
|
|
2018
|
+
class: "cards"
|
|
2019
|
+
}
|
|
2020
|
+
}, layout_options_, {
|
|
2021
|
+
get children() {
|
|
2022
|
+
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Suspense), {
|
|
2023
|
+
get fallback() {
|
|
2024
|
+
return $e3915574cfd3466c$export$f33414a4df0afd3f({
|
|
2025
|
+
num_placeholders_: num_placeholders_,
|
|
2026
|
+
product_card_template_: product_card_template_
|
|
2027
|
+
});
|
|
2028
|
+
},
|
|
2029
|
+
get children() {
|
|
2030
|
+
return (() => {
|
|
2031
|
+
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
2032
|
+
const displays_by_key_ = $76012c4468a53d1f$export$7f8bd308237ab5a5($52FdA$solidjs.createMemo(() => recommendations_resource_() || []));
|
|
2033
|
+
return $76012c4468a53d1f$export$43f0fb951fcb0c54({
|
|
2034
|
+
displays_by_key_: displays_by_key_,
|
|
2035
|
+
product_card_template_: product_card_template_
|
|
2036
|
+
});
|
|
2037
|
+
})();
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
})), _el$7, _co$2);
|
|
2042
|
+
return _el$3;
|
|
2043
|
+
})()];
|
|
2044
|
+
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
2045
|
+
get when() {
|
|
2046
|
+
return is_showing_something();
|
|
2047
|
+
},
|
|
2048
|
+
children: elements
|
|
2049
|
+
});
|
|
2050
|
+
}
|
|
2051
|
+
var $e57cd46536ad992e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict recommendations looks"style=--animation-duration:240ms>`);
|
|
2052
|
+
let $e57cd46536ad992e$var$expandedLooksSignal_;
|
|
2053
|
+
function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
1952
2054
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
1953
|
-
$
|
|
2055
|
+
$e57cd46536ad992e$var$expandedLooksSignal_ || ($e57cd46536ad992e$var$expandedLooksSignal_ = $52FdA$solidjs.createSignal(new Set(), {
|
|
1954
2056
|
equals: false
|
|
1955
2057
|
}));
|
|
1956
2058
|
const expandingAnimationDuration = 240;
|
|
@@ -1992,8 +2094,25 @@ function $8446f782881fa12e$export$1935e6bdfc5ed8ce(props) {
|
|
|
1992
2094
|
market: market,
|
|
1993
2095
|
locale: locale
|
|
1994
2096
|
};
|
|
1995
|
-
return $
|
|
1996
|
-
});
|
|
2097
|
+
return $e57cd46536ad992e$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
2098
|
+
});
|
|
2099
|
+
const sharedOptions = {
|
|
2100
|
+
product_card_template_: display => $47e3c3102c78121b$export$44809a8a3e867e30({
|
|
2101
|
+
display_: display,
|
|
2102
|
+
FavoriteButton_: props.FavoriteButton_,
|
|
2103
|
+
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
2104
|
+
animationDuration_: expandingAnimationDuration,
|
|
2105
|
+
expandedLooksSignal_: $e57cd46536ad992e$var$expandedLooksSignal_,
|
|
2106
|
+
priceFormatting_: () => props.priceFormatting_,
|
|
2107
|
+
pseudoRouter_: pseudoRouter
|
|
2108
|
+
}),
|
|
2109
|
+
recommendations_resource_: looksResource,
|
|
2110
|
+
title_: () => props.title_,
|
|
2111
|
+
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
2112
|
+
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
2113
|
+
...grid_spacing_override()
|
|
2114
|
+
}))
|
|
2115
|
+
};
|
|
1997
2116
|
$52FdA$solidjs.createEffect(() => {
|
|
1998
2117
|
const {
|
|
1999
2118
|
onNavigation_: onNavigation_
|
|
@@ -2001,25 +2120,19 @@ function $8446f782881fa12e$export$1935e6bdfc5ed8ce(props) {
|
|
|
2001
2120
|
if (onNavigation_) pseudoRouter.on_navigation_ = onNavigation_;
|
|
2002
2121
|
});
|
|
2003
2122
|
return (() => {
|
|
2004
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($
|
|
2123
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($e57cd46536ad992e$var$_tmpl$);
|
|
2005
2124
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $d067f3a30f047b41$export$e68cff63f76bd15b), {
|
|
2006
2125
|
get children() {
|
|
2007
|
-
return $
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
}
|
|
2017
|
-
recommendations_resource_: looksResource,
|
|
2018
|
-
title_: () => props.title_,
|
|
2019
|
-
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
2020
|
-
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
2021
|
-
...grid_spacing_override()
|
|
2022
|
-
}))
|
|
2126
|
+
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
2127
|
+
get when() {
|
|
2128
|
+
return props.gridOptions_;
|
|
2129
|
+
},
|
|
2130
|
+
get fallback() {
|
|
2131
|
+
return $52FdA$solidjsweb.createComponent((0, $236a257ee52e5414$export$d41d19e89346fa2), sharedOptions);
|
|
2132
|
+
},
|
|
2133
|
+
get children() {
|
|
2134
|
+
return $52FdA$solidjsweb.createComponent((0, $2c920813c92d6987$export$7da560f849543dff), $52FdA$solidjsweb.mergeProps(sharedOptions, () => props.gridOptions_));
|
|
2135
|
+
}
|
|
2023
2136
|
});
|
|
2024
2137
|
}
|
|
2025
2138
|
}));
|
|
@@ -2027,7 +2140,7 @@ function $8446f782881fa12e$export$1935e6bdfc5ed8ce(props) {
|
|
|
2027
2140
|
})();
|
|
2028
2141
|
}, "LookSlider failed");
|
|
2029
2142
|
}
|
|
2030
|
-
async function $
|
|
2143
|
+
async function $e57cd46536ad992e$var$runDisplayTransformersForLooks(baseData, listings, displayTransformers) {
|
|
2031
2144
|
try {
|
|
2032
2145
|
const {
|
|
2033
2146
|
products: productTransformer,
|
|
@@ -5584,104 +5697,9 @@ const $dc0bcefcc3486ebd$export$b91cec6bdc6b32a1 = /*@__PURE__*/(() => {
|
|
|
5584
5697
|
const $33eed84f447aa0c0$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
5585
5698
|
const $33eed84f447aa0c0$export$864d304a0bc46829 = "2%";
|
|
5586
5699
|
const $33eed84f447aa0c0$export$7bf543b9d9be2c22 = (0, $dc0bcefcc3486ebd$export$b91cec6bdc6b32a1);
|
|
5587
|
-
var $
|
|
5588
|
-
$2c920813c92d6987$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
|
|
5589
|
-
function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
5590
|
-
let {
|
|
5591
|
-
recommendations_resource_: recommendations_resource_,
|
|
5592
|
-
product_card_template_: product_card_template_,
|
|
5593
|
-
layout_options_: layout_options_,
|
|
5594
|
-
rows_object_: rows_object_,
|
|
5595
|
-
title_: title_
|
|
5596
|
-
} = _ref;
|
|
5597
|
-
const is_showing_something = $52FdA$solidjs.createMemo(() => {
|
|
5598
|
-
var _recommendations_reso;
|
|
5599
|
-
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
5600
|
-
});
|
|
5601
|
-
const title = $52FdA$solidjs.createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
5602
|
-
const num_placeholders_ = () => 20;
|
|
5603
|
-
const elements = [$52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
5604
|
-
get when() {
|
|
5605
|
-
return title();
|
|
5606
|
-
},
|
|
5607
|
-
get children() {
|
|
5608
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$);
|
|
5609
|
-
$52FdA$solidjsweb.insert(_el$, title);
|
|
5610
|
-
return _el$;
|
|
5611
|
-
}
|
|
5612
|
-
}), (() => {
|
|
5613
|
-
var _el$2 = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$2),
|
|
5614
|
-
_el$3 = _el$2.firstChild,
|
|
5615
|
-
[_el$4, _co$] = $52FdA$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
5616
|
-
_el$5 = _el$4.nextSibling,
|
|
5617
|
-
[_el$6, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$5.nextSibling);
|
|
5618
|
-
$52FdA$solidjsweb.insert(_el$2, (0, $8edd3cf30d1fd8b4$export$a2cc176055f8f08), _el$4, _co$);
|
|
5619
|
-
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $6c2c739b113a8ddf$export$d21e32dfedac04be), $52FdA$solidjsweb.mergeProps({
|
|
5620
|
-
get rows() {
|
|
5621
|
-
return rows_object_();
|
|
5622
|
-
},
|
|
5623
|
-
layout: "grid",
|
|
5624
|
-
element_attributes: {
|
|
5625
|
-
class: "cards"
|
|
5626
|
-
}
|
|
5627
|
-
}, layout_options_, {
|
|
5628
|
-
get children() {
|
|
5629
|
-
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Suspense), {
|
|
5630
|
-
get fallback() {
|
|
5631
|
-
return $e3915574cfd3466c$export$f33414a4df0afd3f({
|
|
5632
|
-
num_placeholders_: num_placeholders_,
|
|
5633
|
-
product_card_template_: product_card_template_
|
|
5634
|
-
});
|
|
5635
|
-
},
|
|
5636
|
-
get children() {
|
|
5637
|
-
return (() => {
|
|
5638
|
-
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
5639
|
-
const displays_by_key_ = $76012c4468a53d1f$export$7f8bd308237ab5a5($52FdA$solidjs.createMemo(() => recommendations_resource_() || []));
|
|
5640
|
-
return $76012c4468a53d1f$export$43f0fb951fcb0c54({
|
|
5641
|
-
displays_by_key_: displays_by_key_,
|
|
5642
|
-
product_card_template_: product_card_template_
|
|
5643
|
-
});
|
|
5644
|
-
})();
|
|
5645
|
-
}
|
|
5646
|
-
});
|
|
5647
|
-
}
|
|
5648
|
-
})), _el$6, _co$2);
|
|
5649
|
-
return _el$2;
|
|
5650
|
-
})()];
|
|
5651
|
-
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
5652
|
-
get when() {
|
|
5653
|
-
return is_showing_something();
|
|
5654
|
-
},
|
|
5655
|
-
children: elements
|
|
5656
|
-
});
|
|
5657
|
-
}
|
|
5658
|
-
var $41227f10ad680afd$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="show-more major"type=button>`),
|
|
5659
|
-
$41227f10ad680afd$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp recommendations">`);
|
|
5700
|
+
var $41227f10ad680afd$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp recommendations">`);
|
|
5660
5701
|
function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
5661
5702
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
5662
|
-
const rows_object_ = $52FdA$solidjs.createMemo(() => {
|
|
5663
|
-
var _view_more_button$row;
|
|
5664
|
-
const {
|
|
5665
|
-
view_more_button: view_more_button,
|
|
5666
|
-
max_rows: max_rows
|
|
5667
|
-
} = props;
|
|
5668
|
-
if (!view_more_button) {
|
|
5669
|
-
if (max_rows) return {
|
|
5670
|
-
max_rows: max_rows
|
|
5671
|
-
};
|
|
5672
|
-
return "all";
|
|
5673
|
-
}
|
|
5674
|
-
return {
|
|
5675
|
-
max_rows: max_rows,
|
|
5676
|
-
start_rows: view_more_button.start_rows,
|
|
5677
|
-
rows_per_click: (_view_more_button$row = view_more_button.rows_per_click) !== null && _view_more_button$row !== void 0 ? _view_more_button$row : 2,
|
|
5678
|
-
button: (() => {
|
|
5679
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($41227f10ad680afd$var$_tmpl$);
|
|
5680
|
-
$52FdA$solidjsweb.insert(_el$, () => view_more_button.text);
|
|
5681
|
-
return _el$;
|
|
5682
|
-
})()
|
|
5683
|
-
};
|
|
5684
|
-
});
|
|
5685
5703
|
const grid_spacing_override = $52FdA$solidjs.createMemo(() => {
|
|
5686
5704
|
const {
|
|
5687
5705
|
grid_spacing: grid_spacing
|
|
@@ -5695,11 +5713,12 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
5695
5713
|
});
|
|
5696
5714
|
const [recommendations_resource_] = $52FdA$solidjs.createResource(() => props.recommendations, recs => recs);
|
|
5697
5715
|
return (() => {
|
|
5698
|
-
var _el$
|
|
5699
|
-
$52FdA$solidjsweb.insert(_el
|
|
5716
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($41227f10ad680afd$var$_tmpl$);
|
|
5717
|
+
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $d067f3a30f047b41$export$e68cff63f76bd15b), {
|
|
5700
5718
|
get children() {
|
|
5701
5719
|
return $2c920813c92d6987$export$7da560f849543dff({
|
|
5702
|
-
|
|
5720
|
+
max_rows_: () => props.max_rows,
|
|
5721
|
+
view_more_button_: () => props.view_more_button,
|
|
5703
5722
|
product_card_template_: function () {
|
|
5704
5723
|
return props.product_card_template(...arguments);
|
|
5705
5724
|
},
|
|
@@ -5712,7 +5731,7 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
5712
5731
|
});
|
|
5713
5732
|
}
|
|
5714
5733
|
}));
|
|
5715
|
-
return _el
|
|
5734
|
+
return _el$;
|
|
5716
5735
|
})();
|
|
5717
5736
|
}, "RecommendationGrid failed");
|
|
5718
5737
|
}
|
package/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.3.
|
|
13
|
+
export const version = "4.3.4";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -877,6 +877,17 @@ export function LooksSlider(props: {
|
|
|
877
877
|
display_: Accessor<ModernDisplay | null | undefined>;
|
|
878
878
|
}) => JSX.Element;
|
|
879
879
|
displayTransformers_?: DisplayTransformers<ModernDisplay, ModernDisplayWithPageUrl<ModernDisplay>>;
|
|
880
|
+
/**
|
|
881
|
+
* If provided, will render as grid instead of slider
|
|
882
|
+
*/
|
|
883
|
+
gridOptions_?: {
|
|
884
|
+
view_more_button?: {
|
|
885
|
+
text: string;
|
|
886
|
+
start_rows?: number;
|
|
887
|
+
rows_per_click?: number;
|
|
888
|
+
};
|
|
889
|
+
max_rows?: number;
|
|
890
|
+
};
|
|
880
891
|
onNavigation_?: OnNavigation;
|
|
881
892
|
priceFormatting_: plp_shared_i18n["price_formatting_"];
|
|
882
893
|
}): HTMLDivElement;
|