@depict-ai/ui 2.1.17 → 2.1.19
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 +56 -18
- package/ES10/index.d.ts +15 -10
- package/ES10/index.js +57 -19
- package/latest/index.cjs +56 -18
- package/latest/index.d.ts +15 -10
- package/latest/index.js +57 -19
- package/package.json +3 -3
- package/server/ES10/index.cjs +35 -10
- package/server/ES10/index.d.ts +15 -10
- package/server/ES10/index.js +36 -11
- package/server/latest/index.cjs +35 -10
- package/server/latest/index.d.ts +15 -10
- package/server/latest/index.js +36 -11
package/latest/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JSX, Accessor, Signal, Setter } from "solid-js";
|
|
2
2
|
import { report, Display, Amazing_Slider, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/latest";
|
|
3
|
-
import { SearchFilter,
|
|
3
|
+
import { SearchFilter, SearchRequestV2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
4
4
|
import { SearchFilter as _SearchFilter1, ContentLink, SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
5
|
-
import { BaseCategoryDisplay,
|
|
5
|
+
import { BaseCategoryDisplay, ProductListingResponseV2 } from "@depict-ai/types/api/ProductListingResponseV2";
|
|
6
6
|
import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/api/SearchSuggestionsResponse";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { BaseSearchRequestV2 } from "@depict-ai/types/api/BaseSearchRequestV2";
|
|
8
|
+
import { SearchSuggestionsRequestV2 } from "@depict-ai/types/api/SearchSuggestionsRequestV2";
|
|
9
9
|
import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
|
|
10
|
-
export const version = "2.1.
|
|
10
|
+
export const version = "2.1.19";
|
|
11
11
|
/**
|
|
12
12
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
13
13
|
*/
|
|
@@ -145,6 +145,7 @@ export function useListing(): Record<symbol, any> | undefined;
|
|
|
145
145
|
*/
|
|
146
146
|
export function ImageContainer(props: {
|
|
147
147
|
aspectRatio: number;
|
|
148
|
+
class?: string;
|
|
148
149
|
}): HTMLDivElement;
|
|
149
150
|
/**
|
|
150
151
|
* Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
@@ -173,10 +174,12 @@ export const shopifyContainedImageContextSymbol: unique symbol;
|
|
|
173
174
|
* This works because the listings (recs, search, plp) all are wrapped in `<ListingProvider>`'s. This means all components rendered within can use `useListing` to get an object to write data to that will be the same for all components rendered within that listing. The first instance of this component rendered within a listing puts a ResizeObserver on its div and the other components then just set the sizes attribute of their image to that.
|
|
174
175
|
* @property src image source
|
|
175
176
|
* @property aspectRatio aspect ratio of the image
|
|
177
|
+
* @property class extra class to add to the container
|
|
176
178
|
*/
|
|
177
179
|
export function ShopifyContainedImage(props: {
|
|
178
180
|
src: string;
|
|
179
181
|
aspectRatio: number;
|
|
182
|
+
class?: string;
|
|
180
183
|
}): HTMLDivElement;
|
|
181
184
|
/** @jsxImportSource solid-js */
|
|
182
185
|
export function GenericSliderArrowButton(props?: {
|
|
@@ -242,6 +245,7 @@ type RecommendationSliderBaseProps<T extends Display> = {
|
|
|
242
245
|
grid_spacing: SDKGridSpacing;
|
|
243
246
|
cols_at_size: SDKColsAtSize;
|
|
244
247
|
recommendations: Promise<T[]>;
|
|
248
|
+
title?: JSX.Element;
|
|
245
249
|
};
|
|
246
250
|
/**
|
|
247
251
|
* Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
|
|
@@ -260,6 +264,7 @@ export function RecommendationSlider<T extends Display>(props: {
|
|
|
260
264
|
type RecommendationGridBaseProps<T extends Display> = {
|
|
261
265
|
grid_spacing: SDKGridSpacing;
|
|
262
266
|
cols_at_size: SDKColsAtSize;
|
|
267
|
+
title?: JSX.Element;
|
|
263
268
|
recommendations: Promise<T[]>;
|
|
264
269
|
view_more_button?: {
|
|
265
270
|
text: string;
|
|
@@ -650,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
650
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
651
656
|
page_url: string;
|
|
652
657
|
})[];
|
|
653
|
-
type ProductListingResponseAfterURLCreator = { [K in keyof
|
|
658
|
+
type ProductListingResponseAfterURLCreator = { [K in keyof ProductListingResponseV2]: K extends "displays" ? _AddPageUrlToDisplay1<ProductListingResponseV2[K]> : K extends "breadcrumb" | "quick_links" ? ReplaceBaseCategoryDisplay<ProductListingResponseV2[K]> : K extends "filters" ? AddActualFieldToFilters<ProductListingResponseV2[K]> : ProductListingResponseV2[K] };
|
|
654
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
655
660
|
get_metadata?: () => Promise<{
|
|
656
661
|
[k: string]: string;
|
|
@@ -667,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
667
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
668
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
669
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
670
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
671
676
|
failed?: true;
|
|
672
677
|
}>;
|
|
673
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
674
679
|
failed?: true;
|
|
675
680
|
}>;
|
|
676
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
677
682
|
failed?: true;
|
|
678
683
|
}>;
|
|
679
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
680
685
|
displays: T[];
|
|
681
686
|
} & {
|
|
682
687
|
failed?: true | undefined;
|
|
@@ -1139,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1139
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1140
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1141
1146
|
}) => import("solid-js").JSX.Element;
|
|
1142
|
-
export type { SearchFilter } from "@depict-ai/types/api/
|
|
1147
|
+
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV2";
|
package/latest/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { add_to_version_info as $9HbP8$add_to_version_info, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, dlog as $9HbP8$dlog, queueMacroTask as $9HbP8$queueMacroTask, catchify as $9HbP8$catchify, is_safari as $9HbP8$is_safari, observer as $9HbP8$observer, dwarn as $9HbP8$dwarn, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, slider_fractional_factory as $9HbP8$slider_fractional_factory, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, fetch_recs as $9HbP8$fetch_recs, snakeCasifyObject as $9HbP8$snakeCasifyObject, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base_url as $9HbP8$base_url, get_depict_id as $9HbP8$get_depict_id, get_user_id as $9HbP8$get_user_id, get_session_id as $9HbP8$get_session_id, sort_obj as $9HbP8$sort_obj, fetch_retry as $9HbP8$fetch_retry, add_version_query_params as $9HbP8$add_version_query_params, make_url_with_query_params as $9HbP8$make_url_with_query_params, edit_current_page_meta_tags as $9HbP8$edit_current_page_meta_tags, javascript_media_query as $9HbP8$javascript_media_query, use_href_accessor as $9HbP8$use_href_accessor, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ListenableSet as $9HbP8$ListenableSet, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
|
-
import { createComponent as $9HbP8$createComponent, insert as $9HbP8$insert, template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, effect as $9HbP8$effect, style as $9HbP8$style, spread as $9HbP8$spread, setAttribute as $9HbP8$setAttribute, mergeProps as $9HbP8$mergeProps1, isServer as $9HbP8$isServer, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener,
|
|
2
|
+
import { createComponent as $9HbP8$createComponent, insert as $9HbP8$insert, template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, effect as $9HbP8$effect, style as $9HbP8$style, className as $9HbP8$className, spread as $9HbP8$spread, setAttribute as $9HbP8$setAttribute, mergeProps as $9HbP8$mergeProps1, isServer as $9HbP8$isServer, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, getNextMarker as $9HbP8$getNextMarker, classList as $9HbP8$classList, use as $9HbP8$use, Dynamic as $9HbP8$Dynamic, setProperty as $9HbP8$setProperty } from "solid-js/web";
|
|
3
3
|
import { createSignal as $9HbP8$createSignal, getOwner as $9HbP8$getOwner, createEffect as $9HbP8$createEffect, runWithOwner as $9HbP8$runWithOwner, onCleanup as $9HbP8$onCleanup, createMemo as $9HbP8$createMemo, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, mergeProps as $9HbP8$mergeProps, Show as $9HbP8$Show, createResource as $9HbP8$createResource, Suspense as $9HbP8$Suspense, untrack as $9HbP8$untrack, createRenderEffect as $9HbP8$createRenderEffect, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, For as $9HbP8$For, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, on as $9HbP8$on, batch as $9HbP8$batch, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
|
|
4
4
|
import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from "solid-js/store";
|
|
5
5
|
|
|
6
6
|
/*! Depict.ai search and product listing SDK */
|
|
7
7
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
8
8
|
register_es_version("ui", "latest");
|
|
9
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.
|
|
9
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.19";
|
|
10
10
|
const $4147651646da990a$var$fallback_operator = "in";
|
|
11
11
|
const $4147651646da990a$var$fallback_token = "";
|
|
12
12
|
const $4147651646da990a$var$legacy_filter_prefix = "filter_";
|
|
@@ -197,7 +197,16 @@ const $f18d425032111270$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`);
|
|
|
197
197
|
function $f18d425032111270$export$94026ee33dbabc26(props) {
|
|
198
198
|
return (() => {
|
|
199
199
|
const _el$ = $9HbP8$getNextElement($f18d425032111270$var$_tmpl$);
|
|
200
|
-
$9HbP8$effect(
|
|
200
|
+
$9HbP8$effect(_p$ => {
|
|
201
|
+
const _v$ = `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`,
|
|
202
|
+
_v$2 = props.class;
|
|
203
|
+
_p$._v$ = $9HbP8$style(_el$, _v$, _p$._v$);
|
|
204
|
+
_v$2 !== _p$._v$2 && $9HbP8$className(_el$, _p$._v$2 = _v$2);
|
|
205
|
+
return _p$;
|
|
206
|
+
}, {
|
|
207
|
+
_v$: undefined,
|
|
208
|
+
_v$2: undefined
|
|
209
|
+
});
|
|
201
210
|
return _el$;
|
|
202
211
|
})();
|
|
203
212
|
}
|
|
@@ -358,6 +367,9 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
|
|
|
358
367
|
const container = $9HbP8$createComponent((0, $f18d425032111270$export$94026ee33dbabc26), {
|
|
359
368
|
get aspectRatio() {
|
|
360
369
|
return props.aspectRatio;
|
|
370
|
+
},
|
|
371
|
+
get ["class"]() {
|
|
372
|
+
return props.class;
|
|
361
373
|
}
|
|
362
374
|
});
|
|
363
375
|
const owner = $9HbP8$getOwner();
|
|
@@ -918,16 +930,28 @@ function $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
918
930
|
return [container_element, $9HbP8$memo(view_more_button_container), $9HbP8$memo(view_less_button_container), style_element];
|
|
919
931
|
}
|
|
920
932
|
$9HbP8$delegateEvents(["click"]);
|
|
933
|
+
const $c4492d24952ed731$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<h2 class=recs-title>`);
|
|
921
934
|
function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
922
935
|
recommendations_resource_: recommendations_resource_,
|
|
923
936
|
product_card_template_: product_card_template_,
|
|
924
937
|
layout_options_: layout_options_,
|
|
925
938
|
merchant_: merchant_,
|
|
926
|
-
market_: market_
|
|
939
|
+
market_: market_,
|
|
940
|
+
title_: title_
|
|
927
941
|
}) {
|
|
928
942
|
const is_showing_something = $9HbP8$createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
943
|
+
const title = $9HbP8$createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
929
944
|
const num_placeholders_ = () => 20;
|
|
930
|
-
const slider = $9HbP8$createComponent((0, $
|
|
945
|
+
const slider = [$9HbP8$createComponent((0, $9HbP8$Show), {
|
|
946
|
+
get when() {
|
|
947
|
+
return title();
|
|
948
|
+
},
|
|
949
|
+
get children() {
|
|
950
|
+
const _el$ = $9HbP8$getNextElement($c4492d24952ed731$var$_tmpl$);
|
|
951
|
+
$9HbP8$insert(_el$, title);
|
|
952
|
+
return _el$;
|
|
953
|
+
}
|
|
954
|
+
}), $9HbP8$createComponent((0, $f32e14878e75af51$export$6649caad96ef8870), {
|
|
931
955
|
arrow_height_: 25,
|
|
932
956
|
arrow_width_: 12.5,
|
|
933
957
|
disable_fading_: true,
|
|
@@ -966,7 +990,7 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
|
966
990
|
}
|
|
967
991
|
});
|
|
968
992
|
}
|
|
969
|
-
});
|
|
993
|
+
})];
|
|
970
994
|
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
971
995
|
get when() {
|
|
972
996
|
return is_showing_something();
|
|
@@ -1034,6 +1058,7 @@ function $ee116da074deb002$export$9574e176201e5e8d(props) {
|
|
|
1034
1058
|
recommendations_resource_: recommendations_resource_,
|
|
1035
1059
|
market_: () => props.market,
|
|
1036
1060
|
merchant_: () => props.merchant,
|
|
1061
|
+
title_: () => props.title,
|
|
1037
1062
|
layout_options_: $9HbP8$createMemo(() => ({
|
|
1038
1063
|
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1039
1064
|
...grid_spacing_override()
|
|
@@ -1045,25 +1070,37 @@ function $ee116da074deb002$export$9574e176201e5e8d(props) {
|
|
|
1045
1070
|
})();
|
|
1046
1071
|
}, "RecommendationSlider failed");
|
|
1047
1072
|
}
|
|
1048
|
-
const $3da8afe3ed57cf34$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<
|
|
1073
|
+
const $3da8afe3ed57cf34$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<h2 class=recs-title>`),
|
|
1074
|
+
$3da8afe3ed57cf34$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
|
|
1049
1075
|
function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
1050
1076
|
recommendations_resource_: recommendations_resource_,
|
|
1051
1077
|
product_card_template_: product_card_template_,
|
|
1052
1078
|
layout_options_: layout_options_,
|
|
1053
1079
|
merchant_: merchant_,
|
|
1054
1080
|
market_: market_,
|
|
1055
|
-
rows_object_: rows_object_
|
|
1081
|
+
rows_object_: rows_object_,
|
|
1082
|
+
title_: title_
|
|
1056
1083
|
}) {
|
|
1057
1084
|
const is_showing_something = $9HbP8$createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
1085
|
+
const title = $9HbP8$createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
1058
1086
|
const num_placeholders_ = () => 20;
|
|
1059
|
-
const elements = (()
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1087
|
+
const elements = [$9HbP8$createComponent((0, $9HbP8$Show), {
|
|
1088
|
+
get when() {
|
|
1089
|
+
return title();
|
|
1090
|
+
},
|
|
1091
|
+
get children() {
|
|
1092
|
+
const _el$ = $9HbP8$getNextElement($3da8afe3ed57cf34$var$_tmpl$);
|
|
1093
|
+
$9HbP8$insert(_el$, title);
|
|
1094
|
+
return _el$;
|
|
1095
|
+
}
|
|
1096
|
+
}), (() => {
|
|
1097
|
+
const _el$2 = $9HbP8$getNextElement($3da8afe3ed57cf34$var$_tmpl$2),
|
|
1098
|
+
_el$3 = _el$2.firstChild,
|
|
1099
|
+
[_el$4, _co$] = $9HbP8$getNextMarker(_el$3.nextSibling),
|
|
1100
|
+
_el$5 = _el$4.nextSibling,
|
|
1101
|
+
[_el$6, _co$2] = $9HbP8$getNextMarker(_el$5.nextSibling);
|
|
1102
|
+
$9HbP8$insert(_el$2, (0, $a458486f22b22f63$export$a2cc176055f8f08), _el$4, _co$);
|
|
1103
|
+
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $9HbP8$mergeProps1({
|
|
1067
1104
|
get rows() {
|
|
1068
1105
|
return rows_object_();
|
|
1069
1106
|
},
|
|
@@ -1094,9 +1131,9 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
|
1094
1131
|
}
|
|
1095
1132
|
});
|
|
1096
1133
|
}
|
|
1097
|
-
})), _el$
|
|
1098
|
-
return _el
|
|
1099
|
-
})();
|
|
1134
|
+
})), _el$6, _co$2);
|
|
1135
|
+
return _el$2;
|
|
1136
|
+
})()];
|
|
1100
1137
|
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
1101
1138
|
get when() {
|
|
1102
1139
|
return is_showing_something();
|
|
@@ -1152,6 +1189,7 @@ function $9ea5383493360761$export$9756467d34d91cdb(props) {
|
|
|
1152
1189
|
recommendations_resource_: recommendations_resource_,
|
|
1153
1190
|
market_: () => props.market,
|
|
1154
1191
|
merchant_: () => props.merchant,
|
|
1192
|
+
title_: () => props.title,
|
|
1155
1193
|
layout_options_: $9HbP8$createMemo(() => ({
|
|
1156
1194
|
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1157
1195
|
...grid_spacing_override()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.19",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^1.2.
|
|
239
|
+
"@depict-ai/plp-styling": "^1.2.14",
|
|
240
240
|
"@depict-ai/types": "^1.0.39",
|
|
241
|
-
"@depict-ai/utilishared": "^1.0.
|
|
241
|
+
"@depict-ai/utilishared": "^1.0.49",
|
|
242
242
|
"solid-js": "^1.8.1"
|
|
243
243
|
},
|
|
244
244
|
"type": "module",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
76
76
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
77
77
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
78
78
|
/*! Depict.ai search and product listing SDK */
|
|
79
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.
|
|
79
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.19";
|
|
80
80
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
81
81
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
82
82
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -268,9 +268,9 @@ function $d067f3a30f047b41$export$e68cff63f76bd15b(props) {
|
|
|
268
268
|
function $d067f3a30f047b41$export$8d0c4fdbb05a2f2e() {
|
|
269
269
|
return $3hooq$solidjs.useContext($d067f3a30f047b41$var$ListingContext);
|
|
270
270
|
}
|
|
271
|
-
const $ce467edb5343cfcd$var$_tmpl$ = ["<div", ' style="', '"></div>
|
|
271
|
+
const $ce467edb5343cfcd$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
|
|
272
272
|
function $ce467edb5343cfcd$export$94026ee33dbabc26(props) {
|
|
273
|
-
return $3hooq$solidjsweb.ssr($ce467edb5343cfcd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")));
|
|
273
|
+
return $3hooq$solidjsweb.ssr($ce467edb5343cfcd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $3hooq$solidjsweb.ssrAttribute("class", $3hooq$solidjsweb.escape(props.class, true), false));
|
|
274
274
|
}
|
|
275
275
|
function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
|
|
276
276
|
const [size, setSize] = $3hooq$solidjs.createSignal(0);
|
|
@@ -432,6 +432,9 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
|
|
|
432
432
|
const container = $3hooq$solidjsweb.createComponent((0, $ce467edb5343cfcd$export$94026ee33dbabc26), {
|
|
433
433
|
get aspectRatio() {
|
|
434
434
|
return props.aspectRatio;
|
|
435
|
+
},
|
|
436
|
+
get ["class"]() {
|
|
437
|
+
return props.class;
|
|
435
438
|
}
|
|
436
439
|
});
|
|
437
440
|
const owner = $3hooq$solidjs.getOwner();
|
|
@@ -970,20 +973,30 @@ function $6c2c739b113a8ddf$export$445d8d3f5f706a40(props, container_element) {
|
|
|
970
973
|
if (insert_after_container) container_element.after(style_element);
|
|
971
974
|
return [container_element, view_more_button_container(), view_less_button_container(), style_element];
|
|
972
975
|
}
|
|
976
|
+
const $236a257ee52e5414$var$_tmpl$ = ["<h2", ' class="recs-title">', "</h2>"];
|
|
973
977
|
function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
974
978
|
let {
|
|
975
979
|
recommendations_resource_: recommendations_resource_,
|
|
976
980
|
product_card_template_: product_card_template_,
|
|
977
981
|
layout_options_: layout_options_,
|
|
978
982
|
merchant_: merchant_,
|
|
979
|
-
market_: market_
|
|
983
|
+
market_: market_,
|
|
984
|
+
title_: title_
|
|
980
985
|
} = _ref;
|
|
981
986
|
const is_showing_something = $3hooq$solidjs.createMemo(() => {
|
|
982
987
|
var _recommendations_reso;
|
|
983
988
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
984
989
|
});
|
|
990
|
+
const title = $3hooq$solidjs.createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
985
991
|
const num_placeholders_ = () => 20;
|
|
986
|
-
const slider = $3hooq$solidjsweb.createComponent((0, $
|
|
992
|
+
const slider = [$3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
993
|
+
get when() {
|
|
994
|
+
return title();
|
|
995
|
+
},
|
|
996
|
+
get children() {
|
|
997
|
+
return $3hooq$solidjsweb.ssr($236a257ee52e5414$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(title()));
|
|
998
|
+
}
|
|
999
|
+
}), $3hooq$solidjsweb.createComponent((0, $ad8ec7729fffeb9c$export$6649caad96ef8870), {
|
|
987
1000
|
arrow_height_: 25,
|
|
988
1001
|
arrow_width_: 12.5,
|
|
989
1002
|
disable_fading_: true,
|
|
@@ -1022,7 +1035,7 @@ function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
|
1022
1035
|
}
|
|
1023
1036
|
});
|
|
1024
1037
|
}
|
|
1025
|
-
});
|
|
1038
|
+
})];
|
|
1026
1039
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1027
1040
|
get when() {
|
|
1028
1041
|
return is_showing_something();
|
|
@@ -1091,6 +1104,7 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
|
|
|
1091
1104
|
recommendations_resource_: recommendations_resource_,
|
|
1092
1105
|
market_: () => props.market,
|
|
1093
1106
|
merchant_: () => props.merchant,
|
|
1107
|
+
title_: () => props.title,
|
|
1094
1108
|
layout_options_: $3hooq$solidjs.createMemo(() => ({
|
|
1095
1109
|
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1096
1110
|
...grid_spacing_override()
|
|
@@ -1100,7 +1114,8 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
|
|
|
1100
1114
|
})));
|
|
1101
1115
|
}, "RecommendationSlider failed");
|
|
1102
1116
|
}
|
|
1103
|
-
const $2c920813c92d6987$var$_tmpl$ = ["<
|
|
1117
|
+
const $2c920813c92d6987$var$_tmpl$ = ["<h2", ' class="recs-title">', "</h2>"],
|
|
1118
|
+
$2c920813c92d6987$var$_tmpl$2 = ["<div", ' class="recommendation-grid"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
|
|
1104
1119
|
function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
1105
1120
|
let {
|
|
1106
1121
|
recommendations_resource_: recommendations_resource_,
|
|
@@ -1108,14 +1123,23 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
1108
1123
|
layout_options_: layout_options_,
|
|
1109
1124
|
merchant_: merchant_,
|
|
1110
1125
|
market_: market_,
|
|
1111
|
-
rows_object_: rows_object_
|
|
1126
|
+
rows_object_: rows_object_,
|
|
1127
|
+
title_: title_
|
|
1112
1128
|
} = _ref;
|
|
1113
1129
|
const is_showing_something = $3hooq$solidjs.createMemo(() => {
|
|
1114
1130
|
var _recommendations_reso;
|
|
1115
1131
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
1116
1132
|
});
|
|
1133
|
+
const title = $3hooq$solidjs.createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
1117
1134
|
const num_placeholders_ = () => 20;
|
|
1118
|
-
const elements = $3hooq$solidjsweb.
|
|
1135
|
+
const elements = [$3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1136
|
+
get when() {
|
|
1137
|
+
return title();
|
|
1138
|
+
},
|
|
1139
|
+
get children() {
|
|
1140
|
+
return $3hooq$solidjsweb.ssr($2c920813c92d6987$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(title()));
|
|
1141
|
+
}
|
|
1142
|
+
}), $3hooq$solidjsweb.ssr($2c920813c92d6987$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($8edd3cf30d1fd8b4$export$a2cc176055f8f08()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $6c2c739b113a8ddf$export$d21e32dfedac04be), $3hooq$solidjsweb.mergeProps({
|
|
1119
1143
|
get rows() {
|
|
1120
1144
|
return rows_object_();
|
|
1121
1145
|
},
|
|
@@ -1146,7 +1170,7 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
1146
1170
|
}
|
|
1147
1171
|
});
|
|
1148
1172
|
}
|
|
1149
|
-
}))));
|
|
1173
|
+
}))))];
|
|
1150
1174
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1151
1175
|
get when() {
|
|
1152
1176
|
return is_showing_something();
|
|
@@ -1199,6 +1223,7 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
1199
1223
|
recommendations_resource_: recommendations_resource_,
|
|
1200
1224
|
market_: () => props.market,
|
|
1201
1225
|
merchant_: () => props.merchant,
|
|
1226
|
+
title_: () => props.title,
|
|
1202
1227
|
layout_options_: $3hooq$solidjs.createMemo(() => ({
|
|
1203
1228
|
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1204
1229
|
...grid_spacing_override()
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JSX, Accessor, Signal, Setter } from "solid-js";
|
|
2
2
|
import { report, Display, Amazing_Slider, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/ES10";
|
|
3
|
-
import { SearchFilter,
|
|
3
|
+
import { SearchFilter, SearchRequestV2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
4
4
|
import { SearchFilter as _SearchFilter1, ContentLink, SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
5
|
-
import { BaseCategoryDisplay,
|
|
5
|
+
import { BaseCategoryDisplay, ProductListingResponseV2 } from "@depict-ai/types/api/ProductListingResponseV2";
|
|
6
6
|
import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/api/SearchSuggestionsResponse";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { BaseSearchRequestV2 } from "@depict-ai/types/api/BaseSearchRequestV2";
|
|
8
|
+
import { SearchSuggestionsRequestV2 } from "@depict-ai/types/api/SearchSuggestionsRequestV2";
|
|
9
9
|
import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
|
|
10
|
-
export const version = "2.1.
|
|
10
|
+
export const version = "2.1.19";
|
|
11
11
|
/**
|
|
12
12
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
13
13
|
*/
|
|
@@ -145,6 +145,7 @@ export function useListing(): Record<symbol, any> | undefined;
|
|
|
145
145
|
*/
|
|
146
146
|
export function ImageContainer(props: {
|
|
147
147
|
aspectRatio: number;
|
|
148
|
+
class?: string;
|
|
148
149
|
}): HTMLDivElement;
|
|
149
150
|
/**
|
|
150
151
|
* Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
@@ -173,10 +174,12 @@ export const shopifyContainedImageContextSymbol: unique symbol;
|
|
|
173
174
|
* This works because the listings (recs, search, plp) all are wrapped in `<ListingProvider>`'s. This means all components rendered within can use `useListing` to get an object to write data to that will be the same for all components rendered within that listing. The first instance of this component rendered within a listing puts a ResizeObserver on its div and the other components then just set the sizes attribute of their image to that.
|
|
174
175
|
* @property src image source
|
|
175
176
|
* @property aspectRatio aspect ratio of the image
|
|
177
|
+
* @property class extra class to add to the container
|
|
176
178
|
*/
|
|
177
179
|
export function ShopifyContainedImage(props: {
|
|
178
180
|
src: string;
|
|
179
181
|
aspectRatio: number;
|
|
182
|
+
class?: string;
|
|
180
183
|
}): HTMLDivElement;
|
|
181
184
|
/** @jsxImportSource solid-js */
|
|
182
185
|
export function GenericSliderArrowButton(props?: {
|
|
@@ -242,6 +245,7 @@ type RecommendationSliderBaseProps<T extends Display> = {
|
|
|
242
245
|
grid_spacing: SDKGridSpacing;
|
|
243
246
|
cols_at_size: SDKColsAtSize;
|
|
244
247
|
recommendations: Promise<T[]>;
|
|
248
|
+
title?: JSX.Element;
|
|
245
249
|
};
|
|
246
250
|
/**
|
|
247
251
|
* Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
|
|
@@ -260,6 +264,7 @@ export function RecommendationSlider<T extends Display>(props: {
|
|
|
260
264
|
type RecommendationGridBaseProps<T extends Display> = {
|
|
261
265
|
grid_spacing: SDKGridSpacing;
|
|
262
266
|
cols_at_size: SDKColsAtSize;
|
|
267
|
+
title?: JSX.Element;
|
|
263
268
|
recommendations: Promise<T[]>;
|
|
264
269
|
view_more_button?: {
|
|
265
270
|
text: string;
|
|
@@ -650,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
650
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
651
656
|
page_url: string;
|
|
652
657
|
})[];
|
|
653
|
-
type ProductListingResponseAfterURLCreator = { [K in keyof
|
|
658
|
+
type ProductListingResponseAfterURLCreator = { [K in keyof ProductListingResponseV2]: K extends "displays" ? _AddPageUrlToDisplay1<ProductListingResponseV2[K]> : K extends "breadcrumb" | "quick_links" ? ReplaceBaseCategoryDisplay<ProductListingResponseV2[K]> : K extends "filters" ? AddActualFieldToFilters<ProductListingResponseV2[K]> : ProductListingResponseV2[K] };
|
|
654
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
655
660
|
get_metadata?: () => Promise<{
|
|
656
661
|
[k: string]: string;
|
|
@@ -667,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
667
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
668
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
669
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
670
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
671
676
|
failed?: true;
|
|
672
677
|
}>;
|
|
673
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
674
679
|
failed?: true;
|
|
675
680
|
}>;
|
|
676
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
677
682
|
failed?: true;
|
|
678
683
|
}>;
|
|
679
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
680
685
|
displays: T[];
|
|
681
686
|
} & {
|
|
682
687
|
failed?: true | undefined;
|
|
@@ -1139,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1139
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1140
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1141
1146
|
}) => import("solid-js").JSX.Element;
|
|
1142
|
-
export type { SearchFilter } from "@depict-ai/types/api/
|
|
1147
|
+
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV2";
|
package/server/ES10/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { add_to_version_info as $b8hua$add_to_version_info, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, dlog as $b8hua$dlog, queueMacroTask as $b8hua$queueMacroTask, catchify as $b8hua$catchify, is_safari as $b8hua$is_safari, observer as $b8hua$observer, dwarn as $b8hua$dwarn, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, slider_fractional_factory as $b8hua$slider_fractional_factory, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, fetch_recs as $b8hua$fetch_recs, snakeCasifyObject as $b8hua$snakeCasifyObject, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, base_url as $b8hua$base_url, get_depict_id as $b8hua$get_depict_id, get_user_id as $b8hua$get_user_id, get_session_id as $b8hua$get_session_id, make_url_with_query_params as $b8hua$make_url_with_query_params, fetch_retry as $b8hua$fetch_retry, add_version_query_params as $b8hua$add_version_query_params, sort_obj as $b8hua$sort_obj, edit_current_page_meta_tags as $b8hua$edit_current_page_meta_tags, javascript_media_query as $b8hua$javascript_media_query, use_href_accessor as $b8hua$use_href_accessor, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, ContainedImage as $b8hua$ContainedImage, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
|
-
import { createComponent as $b8hua$createComponent, insert as $b8hua$insert, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle,
|
|
2
|
+
import { createComponent as $b8hua$createComponent, insert as $b8hua$insert, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, ssrAttribute as $b8hua$ssrAttribute, escape as $b8hua$escape, spread as $b8hua$spread, mergeProps as $b8hua$mergeProps1, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createMemo as $b8hua$createMemo, createContext as $b8hua$createContext, useContext as $b8hua$useContext, mergeProps as $b8hua$mergeProps, Show as $b8hua$Show, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, For as $b8hua$For, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, batch as $b8hua$batch, on as $b8hua$on, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
4
4
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
5
5
|
import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -9,7 +9,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
9
9
|
/*! Depict.ai search and product listing SDK */
|
|
10
10
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
11
11
|
register_es_version("ui", "ES10");
|
|
12
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.
|
|
12
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.19";
|
|
13
13
|
const $2855bffe06ef7a03$var$fallback_operator = "in";
|
|
14
14
|
const $2855bffe06ef7a03$var$fallback_token = "";
|
|
15
15
|
const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
|
|
@@ -201,9 +201,9 @@ function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
|
201
201
|
function $5441862cd2f5e111$export$8d0c4fdbb05a2f2e() {
|
|
202
202
|
return $b8hua$useContext($5441862cd2f5e111$var$ListingContext);
|
|
203
203
|
}
|
|
204
|
-
const $801e8845d3fa3653$var$_tmpl$ = ["<div", ' style="', '"></div>
|
|
204
|
+
const $801e8845d3fa3653$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
|
|
205
205
|
function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
|
|
206
|
-
return $b8hua$ssr($801e8845d3fa3653$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")));
|
|
206
|
+
return $b8hua$ssr($801e8845d3fa3653$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $b8hua$ssrAttribute("class", $b8hua$escape(props.class, true), false));
|
|
207
207
|
}
|
|
208
208
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
209
209
|
const [size, setSize] = $b8hua$createSignal(0);
|
|
@@ -365,6 +365,9 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
365
365
|
const container = $b8hua$createComponent((0, $801e8845d3fa3653$export$94026ee33dbabc26), {
|
|
366
366
|
get aspectRatio() {
|
|
367
367
|
return props.aspectRatio;
|
|
368
|
+
},
|
|
369
|
+
get ["class"]() {
|
|
370
|
+
return props.class;
|
|
368
371
|
}
|
|
369
372
|
});
|
|
370
373
|
const owner = $b8hua$getOwner();
|
|
@@ -903,20 +906,30 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
903
906
|
if (insert_after_container) container_element.after(style_element);
|
|
904
907
|
return [container_element, view_more_button_container(), view_less_button_container(), style_element];
|
|
905
908
|
}
|
|
909
|
+
const $39ddb986053fb759$var$_tmpl$ = ["<h2", ' class="recs-title">', "</h2>"];
|
|
906
910
|
function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
907
911
|
let {
|
|
908
912
|
recommendations_resource_: recommendations_resource_,
|
|
909
913
|
product_card_template_: product_card_template_,
|
|
910
914
|
layout_options_: layout_options_,
|
|
911
915
|
merchant_: merchant_,
|
|
912
|
-
market_: market_
|
|
916
|
+
market_: market_,
|
|
917
|
+
title_: title_
|
|
913
918
|
} = _ref;
|
|
914
919
|
const is_showing_something = $b8hua$createMemo(() => {
|
|
915
920
|
var _recommendations_reso;
|
|
916
921
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
917
922
|
});
|
|
923
|
+
const title = $b8hua$createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
918
924
|
const num_placeholders_ = () => 20;
|
|
919
|
-
const slider = $b8hua$createComponent((0, $
|
|
925
|
+
const slider = [$b8hua$createComponent((0, $b8hua$Show), {
|
|
926
|
+
get when() {
|
|
927
|
+
return title();
|
|
928
|
+
},
|
|
929
|
+
get children() {
|
|
930
|
+
return $b8hua$ssr($39ddb986053fb759$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(title()));
|
|
931
|
+
}
|
|
932
|
+
}), $b8hua$createComponent((0, $002f09d00aac50b2$export$6649caad96ef8870), {
|
|
920
933
|
arrow_height_: 25,
|
|
921
934
|
arrow_width_: 12.5,
|
|
922
935
|
disable_fading_: true,
|
|
@@ -955,7 +968,7 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
955
968
|
}
|
|
956
969
|
});
|
|
957
970
|
}
|
|
958
|
-
});
|
|
971
|
+
})];
|
|
959
972
|
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
960
973
|
get when() {
|
|
961
974
|
return is_showing_something();
|
|
@@ -1024,6 +1037,7 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
1024
1037
|
recommendations_resource_: recommendations_resource_,
|
|
1025
1038
|
market_: () => props.market,
|
|
1026
1039
|
merchant_: () => props.merchant,
|
|
1040
|
+
title_: () => props.title,
|
|
1027
1041
|
layout_options_: $b8hua$createMemo(() => ({
|
|
1028
1042
|
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1029
1043
|
...grid_spacing_override()
|
|
@@ -1033,7 +1047,8 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
1033
1047
|
})));
|
|
1034
1048
|
}, "RecommendationSlider failed");
|
|
1035
1049
|
}
|
|
1036
|
-
const $e3efeb558d952696$var$_tmpl$ = ["<
|
|
1050
|
+
const $e3efeb558d952696$var$_tmpl$ = ["<h2", ' class="recs-title">', "</h2>"],
|
|
1051
|
+
$e3efeb558d952696$var$_tmpl$2 = ["<div", ' class="recommendation-grid"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"];
|
|
1037
1052
|
function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
1038
1053
|
let {
|
|
1039
1054
|
recommendations_resource_: recommendations_resource_,
|
|
@@ -1041,14 +1056,23 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
1041
1056
|
layout_options_: layout_options_,
|
|
1042
1057
|
merchant_: merchant_,
|
|
1043
1058
|
market_: market_,
|
|
1044
|
-
rows_object_: rows_object_
|
|
1059
|
+
rows_object_: rows_object_,
|
|
1060
|
+
title_: title_
|
|
1045
1061
|
} = _ref;
|
|
1046
1062
|
const is_showing_something = $b8hua$createMemo(() => {
|
|
1047
1063
|
var _recommendations_reso;
|
|
1048
1064
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
1049
1065
|
});
|
|
1066
|
+
const title = $b8hua$createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
1050
1067
|
const num_placeholders_ = () => 20;
|
|
1051
|
-
const elements = $b8hua$
|
|
1068
|
+
const elements = [$b8hua$createComponent((0, $b8hua$Show), {
|
|
1069
|
+
get when() {
|
|
1070
|
+
return title();
|
|
1071
|
+
},
|
|
1072
|
+
get children() {
|
|
1073
|
+
return $b8hua$ssr($e3efeb558d952696$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(title()));
|
|
1074
|
+
}
|
|
1075
|
+
}), $b8hua$ssr($e3efeb558d952696$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
1052
1076
|
get rows() {
|
|
1053
1077
|
return rows_object_();
|
|
1054
1078
|
},
|
|
@@ -1079,7 +1103,7 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
1079
1103
|
}
|
|
1080
1104
|
});
|
|
1081
1105
|
}
|
|
1082
|
-
}))));
|
|
1106
|
+
}))))];
|
|
1083
1107
|
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
1084
1108
|
get when() {
|
|
1085
1109
|
return is_showing_something();
|
|
@@ -1132,6 +1156,7 @@ function $b432b11321ad4c97$export$9756467d34d91cdb(props) {
|
|
|
1132
1156
|
recommendations_resource_: recommendations_resource_,
|
|
1133
1157
|
market_: () => props.market,
|
|
1134
1158
|
merchant_: () => props.merchant,
|
|
1159
|
+
title_: () => props.title,
|
|
1135
1160
|
layout_options_: $b8hua$createMemo(() => ({
|
|
1136
1161
|
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1137
1162
|
...grid_spacing_override()
|