@depict-ai/ui 1.0.8 → 1.0.10
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/index.d.ts +46 -26
- package/dist/main.js +102 -15
- package/dist/module.js +102 -18
- package/package.json +48 -10
- package/dist/typescript_schema/BaseSearchRequest.d.ts +0 -197
- package/dist/typescript_schema/ProductListingQueriesRequest.d.ts +0 -14
- package/dist/typescript_schema/ProductListingQueriesResponse.d.ts +0 -10
- package/dist/typescript_schema/ProductListingRequest.d.ts +0 -221
- package/dist/typescript_schema/ProductListingResponse.d.ts +0 -232
- package/dist/typescript_schema/RecommendResponse.d.ts +0 -15
- package/dist/typescript_schema/SearchRequest.d.ts +0 -213
- package/dist/typescript_schema/SearchResponse.d.ts +0 -192
- package/dist/typescript_schema/SearchSuggestionsRequest.d.ts +0 -18
- package/dist/typescript_schema/SearchSuggestionsResponse.d.ts +0 -182
- package/dist/typescript_schema/TrackV2Request.d.ts +0 -115
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.10";
|
|
11
11
|
export type OnNavigation = ((options: {
|
|
12
12
|
is_replace: boolean;
|
|
13
13
|
new_url: URL;
|
|
@@ -214,6 +214,27 @@ declare class SDKError extends Error {
|
|
|
214
214
|
export class ProductCardError extends SDKError {
|
|
215
215
|
constructor(templateError: Error);
|
|
216
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Base placeholder component used by ImagePlaceholder and TextPlaceholder
|
|
219
|
+
*/
|
|
220
|
+
export function BasePlaceholder(props: {
|
|
221
|
+
style: JSX.CSSProperties;
|
|
222
|
+
class?: string;
|
|
223
|
+
}): JSX.Element;
|
|
224
|
+
/**
|
|
225
|
+
* A Placeholder to use instead of some text, while it's loading. This is the inline version, meant to be embedded into sentences (or exist instead of them), etc.
|
|
226
|
+
* If you want a block version, use `ImagePlaceholder` with `width`and `height` set instead.
|
|
227
|
+
* @property height height of the placeholder. Set to `1em` by default.
|
|
228
|
+
* @property width width of the placeholder. For specific number of characters use `ch`, ex: `width="7ch"`
|
|
229
|
+
* @property class extra classes to add to the placeholder
|
|
230
|
+
* @property style extra styles to add to the placeholder
|
|
231
|
+
*/
|
|
232
|
+
export function TextPlaceholder(props: {
|
|
233
|
+
style?: JSX.CSSProperties;
|
|
234
|
+
height: string;
|
|
235
|
+
width: string;
|
|
236
|
+
class?: string;
|
|
237
|
+
}): JSX.Element;
|
|
217
238
|
/**
|
|
218
239
|
* Disables scrolling until the solidjs reactive scoped is disposed (onCleanup)
|
|
219
240
|
* @returns A cleanup function to manually re-enable scrolling.
|
|
@@ -222,7 +243,7 @@ export function disable_scrolling(): () => void;
|
|
|
222
243
|
export const CategoryTitle: ({ category_title_, product_count_, }: {
|
|
223
244
|
category_title_: Accessor<string | undefined>;
|
|
224
245
|
product_count_: JSX.Element;
|
|
225
|
-
}) =>
|
|
246
|
+
}) => JSX.Element;
|
|
226
247
|
/**
|
|
227
248
|
* Embeds number of products between sort and filter buttons on mobile if possible, only supported for category pages right now. Pass it as category_title_ to Category.
|
|
228
249
|
* Note: this will add an invisible element as first element in depict-search-page which will confuse the flex-gap SCSS mixin a bit so you'll get some extra spacing at the beginning of the search page
|
|
@@ -288,6 +309,27 @@ export function QuickLinks({ depict_category }: {
|
|
|
288
309
|
depict_category: DepictCategory;
|
|
289
310
|
}): HTMLElement;
|
|
290
311
|
export function get_categories(tenant: string, market: string): Promise<string[]>;
|
|
312
|
+
type ImagePlaceholderBaseOptions = {
|
|
313
|
+
style?: JSX.CSSProperties;
|
|
314
|
+
class?: string;
|
|
315
|
+
};
|
|
316
|
+
type ImagePlaceholderBlockOptions = {
|
|
317
|
+
width: string;
|
|
318
|
+
height: string;
|
|
319
|
+
};
|
|
320
|
+
type ImagePlaceholderImageOptions = {
|
|
321
|
+
aspectRatio: number;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* A placeholder that can be used instead of an image or other block of content while it's loading.
|
|
325
|
+
* The placeholder has `display:block`, meaning it will create a new "row" in the layout for itself. Can be used either for images with a defined aspect ratio (ContainedImage) or blocks.
|
|
326
|
+
* @property aspectRatio if aspectRatio is defined the placeholder will be in "image mode" and fill out the available width and then adjust the height according to the aspectRatio
|
|
327
|
+
* @property width If width and height is set, the defined width and height will be used.
|
|
328
|
+
* @property height If width and height is set, the defined width and height will be used.
|
|
329
|
+
* @property class extra classes to add to the placeholder
|
|
330
|
+
* @property style extra styles to add to the placeholder
|
|
331
|
+
*/
|
|
332
|
+
export function ImagePlaceholder(props: ImagePlaceholderBaseOptions & (ImagePlaceholderBlockOptions | ImagePlaceholderImageOptions)): JSX.Element;
|
|
291
333
|
export function DefaultInstantCardPlaceholder(): HTMLDivElement;
|
|
292
334
|
/**
|
|
293
335
|
* Useful for aligning the search modal to an element, like an existing input field
|
|
@@ -350,7 +392,7 @@ export class DepictSearch<T extends Display> {
|
|
|
350
392
|
set merchant(tenant: string);
|
|
351
393
|
get market(): string;
|
|
352
394
|
set market(market: string);
|
|
353
|
-
fetchSearchResults(query: string, filters?: SearchFilter[],
|
|
395
|
+
fetchSearchResults(query: string, filters?: SearchFilter[], maxResults?: number): Promise<T[]>;
|
|
354
396
|
}
|
|
355
397
|
export function SearchPage<T extends Display>({ depict_search, include_input_field, grid_spacing, cols_at_size, product_card_template, extra_depict_options, }: {
|
|
356
398
|
depict_search: DepictSearch<T>;
|
|
@@ -451,28 +493,6 @@ export interface BaseCategoryPageConfig extends BaseProductListingConfig {
|
|
|
451
493
|
*/
|
|
452
494
|
showQuicklinks?: boolean;
|
|
453
495
|
}
|
|
454
|
-
/**
|
|
455
|
-
* Props for the TextPlaceholder component.
|
|
456
|
-
*/
|
|
457
|
-
export interface TextPlaceholderProps {
|
|
458
|
-
/**
|
|
459
|
-
* The height of the text, including a unit.
|
|
460
|
-
* @example "1em"
|
|
461
|
-
*/
|
|
462
|
-
height: string;
|
|
463
|
-
/**
|
|
464
|
-
* The width of the text.
|
|
465
|
-
* @example "60px", "10em"
|
|
466
|
-
*/
|
|
467
|
-
width: string;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Props for the ImagePlaceholder component.
|
|
471
|
-
*/
|
|
472
|
-
export interface ImagePlaceholderProps {
|
|
473
|
-
/** The aspect ratio of the image that will be displayed. */
|
|
474
|
-
aspectRatio: number;
|
|
475
|
-
}
|
|
476
496
|
type CenteredLocation = {
|
|
477
497
|
location?: "centered";
|
|
478
498
|
};
|
|
@@ -538,5 +558,5 @@ export const defaultGridSpacing = "2%";
|
|
|
538
558
|
export const defaultCategoryTitlePlugin: ({ category_title_, product_count_, }: {
|
|
539
559
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
540
560
|
product_count_: import("solid-js").JSX.Element;
|
|
541
|
-
}) =>
|
|
561
|
+
}) => import("solid-js").JSX.Element;
|
|
542
562
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequest";
|
package/dist/main.js
CHANGED
|
@@ -32,12 +32,15 @@ $parcel$export(module.exports, "setup_fast_leave", () => $08e7f10b1831645f$expor
|
|
|
32
32
|
$parcel$export(module.exports, "show_toast", () => $ee498ec5e7dc2bba$export$5196e4c01fa56fcb);
|
|
33
33
|
$parcel$export(module.exports, "SolidFormatPrice", () => $d659702496cb72ea$export$a71e92cfbb498adc);
|
|
34
34
|
$parcel$export(module.exports, "connect_search_field_height_to_aligner_height", () => $d8e94ea381ab57fa$export$828dcdd425fd3231);
|
|
35
|
+
$parcel$export(module.exports, "BasePlaceholder", () => $9fe9883b1d8ecccc$export$acb3eaade4b23afd);
|
|
36
|
+
$parcel$export(module.exports, "TextPlaceholder", () => $061ff5b4c3d36171$export$89c6019e4baa40b1);
|
|
37
|
+
$parcel$export(module.exports, "ImagePlaceholder", () => $3bc4a89b971a3af5$export$3f37af283f8fb843);
|
|
35
38
|
$parcel$export(module.exports, "PageReplacer", () => $0a6acf31d1eae57c$export$3ccaa27d81dd8556);
|
|
36
39
|
$parcel$export(module.exports, "defaultGridSpacing", () => $a3280f0aad997933$export$864d304a0bc46829);
|
|
37
40
|
$parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$export$c3834fa86c616831);
|
|
38
41
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
39
42
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
40
|
-
/*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.0.
|
|
43
|
+
/*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.0.10";
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
|
|
@@ -3187,6 +3190,52 @@ function $8c939a05b87fbbbc$export$ab34afce88557c0e(props) {
|
|
|
3187
3190
|
|
|
3188
3191
|
|
|
3189
3192
|
|
|
3193
|
+
|
|
3194
|
+
|
|
3195
|
+
|
|
3196
|
+
|
|
3197
|
+
|
|
3198
|
+
const $9fe9883b1d8ecccc$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<span></span>`, 2);
|
|
3199
|
+
function $9fe9883b1d8ecccc$export$acb3eaade4b23afd(props) {
|
|
3200
|
+
return (()=>{
|
|
3201
|
+
const _el$ = $9fe9883b1d8ecccc$var$_tmpl$.cloneNode(true);
|
|
3202
|
+
(0, $iBTHO$solidjsweb.effect)((_p$)=>{
|
|
3203
|
+
const _v$ = `depict-placeholder ${props.class || ""}`, _v$2 = props.style;
|
|
3204
|
+
_v$ !== _p$._v$ && (0, $iBTHO$solidjsweb.className)(_el$, _p$._v$ = _v$);
|
|
3205
|
+
_p$._v$2 = (0, $iBTHO$solidjsweb.style)(_el$, _v$2, _p$._v$2);
|
|
3206
|
+
return _p$;
|
|
3207
|
+
}, {
|
|
3208
|
+
_v$: undefined,
|
|
3209
|
+
_v$2: undefined
|
|
3210
|
+
});
|
|
3211
|
+
return _el$;
|
|
3212
|
+
})();
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
|
|
3216
|
+
|
|
3217
|
+
function $061ff5b4c3d36171$export$89c6019e4baa40b1(props) {
|
|
3218
|
+
const style = (0, $iBTHO$solidjs.createMemo)(()=>{
|
|
3219
|
+
const { style: style , height: height , width: width } = props;
|
|
3220
|
+
return {
|
|
3221
|
+
...style || {},
|
|
3222
|
+
height: height ?? "1em",
|
|
3223
|
+
...width && {
|
|
3224
|
+
width: width
|
|
3225
|
+
}
|
|
3226
|
+
};
|
|
3227
|
+
});
|
|
3228
|
+
return (0, $iBTHO$solidjsweb.createComponent)((0, $9fe9883b1d8ecccc$export$acb3eaade4b23afd), {
|
|
3229
|
+
get style () {
|
|
3230
|
+
return style();
|
|
3231
|
+
},
|
|
3232
|
+
get ["class"] () {
|
|
3233
|
+
return props.class;
|
|
3234
|
+
}
|
|
3235
|
+
});
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
|
|
3190
3239
|
const $aff9a96d30ed3563$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="filter-collapsible"></div>`, 2), $aff9a96d30ed3563$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<button class="clear-group"><span></span></button>`, 4), $aff9a96d30ed3563$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="view-more-clear"></div>`, 2), $aff9a96d30ed3563$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="filter-collapsible-body"><div class="filter-part"></div></div>`, 4), $aff9a96d30ed3563$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<details class="filter-collapsible"></details>`, 2), $aff9a96d30ed3563$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<summary class="filter-group-summary"><div class="summary"><span></span><div class="selected-w-sign"></div></div></summary>`, 8), $aff9a96d30ed3563$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="ungrouped"></div>`, 2), $aff9a96d30ed3563$var$_tmpl$8 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<button class="clear-all-filters major"></button>`, 2);
|
|
3191
3240
|
function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
|
|
3192
3241
|
// Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
|
|
@@ -3199,7 +3248,7 @@ function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
|
|
|
3199
3248
|
length: 5
|
|
3200
3249
|
}).map(()=>(()=>{
|
|
3201
3250
|
const _el$ = $aff9a96d30ed3563$var$_tmpl$.cloneNode(true);
|
|
3202
|
-
(0, $iBTHO$solidjsweb.insert)(_el$, (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
3251
|
+
(0, $iBTHO$solidjsweb.insert)(_el$, (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
3203
3252
|
width: "100%",
|
|
3204
3253
|
height: "50px"
|
|
3205
3254
|
}));
|
|
@@ -3429,6 +3478,7 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
|
|
|
3429
3478
|
|
|
3430
3479
|
|
|
3431
3480
|
|
|
3481
|
+
|
|
3432
3482
|
const $be89be42ce9ea60f$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="sorting-attributes"></div>`, 2), $be89be42ce9ea60f$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="sorting-direction"></div>`, 2), $be89be42ce9ea60f$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div><div class="input-row"><input type="radio"><span class="custom-indicator"></span></div></div>`, 7), $be89be42ce9ea60f$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div><label class="input-row"><input type="radio"><span class="custom-indicator"></span></label></div>`, 7);
|
|
3433
3483
|
function $be89be42ce9ea60f$export$1f1775a58da589b5({ available_sortings_: available_sortings_ , current_sorting_: [get_current_sorting, set_current_sorting] , meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_ }) {
|
|
3434
3484
|
const title_radio_name = (0, $iBTHO$depictaiutilishared.make_random_classname)();
|
|
@@ -3445,7 +3495,7 @@ function $be89be42ce9ea60f$export$1f1775a58da589b5({ available_sortings_: availa
|
|
|
3445
3495
|
}).map(()=>(()=>{
|
|
3446
3496
|
const _el$4 = $be89be42ce9ea60f$var$_tmpl$3.cloneNode(true), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
3447
3497
|
_el$6.disabled = true;
|
|
3448
|
-
(0, $iBTHO$solidjsweb.insert)(_el$5, (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
3498
|
+
(0, $iBTHO$solidjsweb.insert)(_el$5, (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
3449
3499
|
height: "1.2em",
|
|
3450
3500
|
width: "100%"
|
|
3451
3501
|
}), null);
|
|
@@ -4526,6 +4576,7 @@ function $1ab22f2cd39b3061$export$43cd1e747fecd42e(to_url, set_clearing_flag, fr
|
|
|
4526
4576
|
}
|
|
4527
4577
|
|
|
4528
4578
|
|
|
4579
|
+
|
|
4529
4580
|
const $e53b2e7e632ac4cb$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<nav class="crumbs"></nav>`, 2), $e53b2e7e632ac4cb$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<a class="crumb"></a>`, 2), $e53b2e7e632ac4cb$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<span class="separator"></span>`, 2);
|
|
4530
4581
|
function $e53b2e7e632ac4cb$export$5646050d516e06bc({ crumb_data_: get_api_crumb_data , router_: router_ , i18n_: i18n_ }) {
|
|
4531
4582
|
const placeholder_crumb_data = [
|
|
@@ -4551,7 +4602,7 @@ function $e53b2e7e632ac4cb$export$5646050d516e06bc({ crumb_data_: get_api_crumb_
|
|
|
4551
4602
|
return display_accessor();
|
|
4552
4603
|
},
|
|
4553
4604
|
get fallback () {
|
|
4554
|
-
return (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
4605
|
+
return (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
4555
4606
|
height: "calc(1em + 1px)",
|
|
4556
4607
|
width: "10ch"
|
|
4557
4608
|
});
|
|
@@ -4604,6 +4655,7 @@ function $e53b2e7e632ac4cb$export$5646050d516e06bc({ crumb_data_: get_api_crumb_
|
|
|
4604
4655
|
|
|
4605
4656
|
|
|
4606
4657
|
|
|
4658
|
+
|
|
4607
4659
|
const $8cceb1d3a967f369$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<nav class="quicklinks"></nav>`, 2), $8cceb1d3a967f369$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div>QuickLinks failed</div>`, 2), $8cceb1d3a967f369$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<a class="quicklink"></a>`, 2);
|
|
4608
4660
|
function $8cceb1d3a967f369$export$466cdc317043f6cb({ quicklinks_data_: quicklinks_data_ , router_: router_ , current_query_id_: current_query_id_ , slider_arrow_button_: slider_arrow_button_ , breadcrumb_data_: breadcrumb_data_ , i18n_: i18n_ }) {
|
|
4609
4661
|
let scrolling_logic_ran_for_query_id = false;
|
|
@@ -4756,7 +4808,7 @@ function $8cceb1d3a967f369$export$466cdc317043f6cb({ quicklinks_data_: quicklink
|
|
|
4756
4808
|
category_query_id_: display_accessor()?.query_id
|
|
4757
4809
|
});
|
|
4758
4810
|
}), true);
|
|
4759
|
-
(0, $iBTHO$solidjsweb.insert)(_el$3, ()=>display_accessor()?.title || (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
4811
|
+
(0, $iBTHO$solidjsweb.insert)(_el$3, ()=>display_accessor()?.title || (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
4760
4812
|
height: "1em",
|
|
4761
4813
|
width: "10ch"
|
|
4762
4814
|
}));
|
|
@@ -4976,14 +5028,14 @@ function $cc7c480116d2eba0$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
4976
5028
|
|
|
4977
5029
|
|
|
4978
5030
|
|
|
4979
|
-
const $cafad5eca9f09cb5$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="statement">No category ID specified, this is probably unintentional. Make sure to
|
|
5031
|
+
const $cafad5eca9f09cb5$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="statement">No category ID specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a category ID in your Depict Provider.</div>`, 2), $cafad5eca9f09cb5$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="buttons"><button class="ok major"></button></div>`, 4);
|
|
4980
5032
|
function $cafad5eca9f09cb5$export$d4fc5c0e68a52116(el, query_id_, i18n_) {
|
|
4981
5033
|
if (!(0, $iBTHO$depictaiutilishared.is_debug)) return; // Just to make sure we don't show this in production
|
|
4982
5034
|
const owner = (0, $iBTHO$solidjs.getOwner)();
|
|
4983
5035
|
const disconnect = (0, $iBTHO$depictaiutilishared.observer).onexists(el, ({ element: element })=>(0, $iBTHO$solidjs.runWithOwner)(owner, ()=>(0, $iBTHO$solidjs.createEffect)(()=>{
|
|
4984
5036
|
if (!document.documentElement.contains(element)) return;
|
|
4985
5037
|
if (!query_id_()) {
|
|
4986
|
-
const warning = "No category ID specified, this is probably unintentional. Make sure to
|
|
5038
|
+
const warning = "No category ID specified, this is probably unintentional. Make sure to create (and insert) the CategoryPage *after* you have specified a category ID in your Depict Provider.";
|
|
4987
5039
|
(0, $iBTHO$depictaiutilishared.dwarn)(warning);
|
|
4988
5040
|
const { close_toast_: close_toast_ } = (0, $ee498ec5e7dc2bba$export$5196e4c01fa56fcb)({
|
|
4989
5041
|
class: "warning",
|
|
@@ -5010,6 +5062,7 @@ function $cafad5eca9f09cb5$export$d4fc5c0e68a52116(el, query_id_, i18n_) {
|
|
|
5010
5062
|
]);
|
|
5011
5063
|
|
|
5012
5064
|
|
|
5065
|
+
|
|
5013
5066
|
const $840d88a04b2d22a7$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="product-count"> </div>`, 2), $840d88a04b2d22a7$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div></div>`, 2), $840d88a04b2d22a7$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="filter-results-for-one-row"></div>`, 2), $840d88a04b2d22a7$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="depict plp category"><div class="listing-page"></div></div>`, 4);
|
|
5014
5067
|
function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , category_filters_open_: category_filters_open_ , category_sorting_open_: category_sorting_open_ , expanded_filters_: expanded_filters_ , selected_filters_: selected_filters_ , get_quicklinks_accessor_: get_quicklinks_accessor_ , i18n_: incoming_i18n , get_breadcrumb_accessor_: get_breadcrumb_accessor_ , slider_arrow_button_: slider_arrow_button_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , local_filter_cache_: local_filter_cache_ , tenant_: tenant_ , market_: market_ , router_: router_ , show_quicklinks_: show_quicklinks_ , category_title_: category_title_ , show_breadcrumbs_: show_breadcrumbs_ , layout_options_: layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ }) {
|
|
5015
5068
|
let results_for;
|
|
@@ -5086,7 +5139,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5086
5139
|
get children () {
|
|
5087
5140
|
return [
|
|
5088
5141
|
" ",
|
|
5089
|
-
(0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
5142
|
+
(0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
5090
5143
|
height: "1em",
|
|
5091
5144
|
width: "3ch"
|
|
5092
5145
|
})
|
|
@@ -5804,7 +5857,7 @@ const $0b23bfd073d9a4e8$export$b91cec6bdc6b32a1 = /*@__PURE__*/ (()=>{
|
|
|
5804
5857
|
const actual_function = ({ category_title_: category_title_ , product_count_: product_count_ })=>{
|
|
5805
5858
|
return (()=>{
|
|
5806
5859
|
const _el$ = $0b23bfd073d9a4e8$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
5807
|
-
(0, $iBTHO$solidjsweb.insert)(_el$2, ()=>category_title_() || (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
5860
|
+
(0, $iBTHO$solidjsweb.insert)(_el$2, ()=>category_title_() || (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
5808
5861
|
height: "1em",
|
|
5809
5862
|
width: "10ch"
|
|
5810
5863
|
}));
|
|
@@ -5982,14 +6035,45 @@ async function $7b4bc889571cc67b$var$download_categories(tenant, market) {
|
|
|
5982
6035
|
|
|
5983
6036
|
|
|
5984
6037
|
|
|
6038
|
+
|
|
6039
|
+
|
|
6040
|
+
function $3bc4a89b971a3af5$export$3f37af283f8fb843(props) {
|
|
6041
|
+
const style = (0, $iBTHO$solidjs.createMemo)(()=>{
|
|
6042
|
+
const { style: style , height: height , width: width , aspectRatio: aspectRatio } = props;
|
|
6043
|
+
const is_image = aspectRatio != undefined;
|
|
6044
|
+
const size_data = is_image ? {
|
|
6045
|
+
width: "100%",
|
|
6046
|
+
"padding-bottom": 1 / aspectRatio * 100 + "%"
|
|
6047
|
+
} : {
|
|
6048
|
+
width: width,
|
|
6049
|
+
height: height
|
|
6050
|
+
};
|
|
6051
|
+
return {
|
|
6052
|
+
display: "block",
|
|
6053
|
+
...style || {},
|
|
6054
|
+
...size_data
|
|
6055
|
+
};
|
|
6056
|
+
});
|
|
6057
|
+
return (0, $iBTHO$solidjsweb.createComponent)((0, $9fe9883b1d8ecccc$export$acb3eaade4b23afd), {
|
|
6058
|
+
get style () {
|
|
6059
|
+
return style();
|
|
6060
|
+
},
|
|
6061
|
+
get ["class"] () {
|
|
6062
|
+
return props.class;
|
|
6063
|
+
}
|
|
6064
|
+
});
|
|
6065
|
+
}
|
|
6066
|
+
|
|
6067
|
+
|
|
6068
|
+
|
|
5985
6069
|
const $6f604560873e4f69$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$iBTHO$solidjsweb.template)(`<div class="instant-card"><div class="img-part"></div><div class="right-part"><div class="title-brand-tagline"><span class="title"></span></div></div></div>`, 10);
|
|
5986
6070
|
function $6f604560873e4f69$export$ee1733d9a8495996() {
|
|
5987
6071
|
return (()=>{
|
|
5988
6072
|
const _el$ = $6f604560873e4f69$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
5989
|
-
(0, $iBTHO$solidjsweb.insert)(_el$2, (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
5990
|
-
|
|
6073
|
+
(0, $iBTHO$solidjsweb.insert)(_el$2, (0, $iBTHO$solidjsweb.createComponent)((0, $3bc4a89b971a3af5$export$3f37af283f8fb843), {
|
|
6074
|
+
aspectRatio: 1
|
|
5991
6075
|
}));
|
|
5992
|
-
(0, $iBTHO$solidjsweb.insert)(_el$5, (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
6076
|
+
(0, $iBTHO$solidjsweb.insert)(_el$5, (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
5993
6077
|
width: "20ch",
|
|
5994
6078
|
height: "1em"
|
|
5995
6079
|
}));
|
|
@@ -7572,7 +7656,7 @@ function $04048c1bef16c249$export$c05a196222ba1302({ suggestions_: suggestions_
|
|
|
7572
7656
|
get fallback () {
|
|
7573
7657
|
return (()=>{
|
|
7574
7658
|
const _el$2 = $04048c1bef16c249$var$_tmpl$2.cloneNode(true);
|
|
7575
|
-
(0, $iBTHO$solidjsweb.insert)(_el$2, (0, $iBTHO$solidjsweb.createComponent)((0, $
|
|
7659
|
+
(0, $iBTHO$solidjsweb.insert)(_el$2, (0, $iBTHO$solidjsweb.createComponent)((0, $061ff5b4c3d36171$export$89c6019e4baa40b1), {
|
|
7576
7660
|
height: "19px",
|
|
7577
7661
|
width: "133px"
|
|
7578
7662
|
}));
|
|
@@ -8148,14 +8232,14 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
8148
8232
|
set market(market) {
|
|
8149
8233
|
this.#market_signal[1](market);
|
|
8150
8234
|
}
|
|
8151
|
-
async fetchSearchResults(query, filters,
|
|
8235
|
+
async fetchSearchResults(query, filters, maxResults = 48) {
|
|
8152
8236
|
const { depict_api_: depict_api_ } = $2c61e4cd8229c49a$var$privately_shared_properties.get(this);
|
|
8153
8237
|
const result = await depict_api_.query({
|
|
8154
8238
|
tenant: this.merchant,
|
|
8155
8239
|
market: this.market,
|
|
8156
8240
|
query: query,
|
|
8157
8241
|
filters: filters,
|
|
8158
|
-
limit:
|
|
8242
|
+
limit: maxResults
|
|
8159
8243
|
});
|
|
8160
8244
|
if (result.failed) throw new Error("Failed to fetch search results");
|
|
8161
8245
|
return result.displays;
|
|
@@ -8425,6 +8509,9 @@ function $08e7f10b1831645f$export$689e204eadb33baf(pr) {
|
|
|
8425
8509
|
|
|
8426
8510
|
|
|
8427
8511
|
|
|
8512
|
+
|
|
8513
|
+
|
|
8514
|
+
|
|
8428
8515
|
class $0a6acf31d1eae57c$export$3ccaa27d81dd8556 extends EventTarget {
|
|
8429
8516
|
#stop_listening;
|
|
8430
8517
|
#disconnect_observer;
|