@depict-ai/ui 0.0.35 → 0.0.37
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 +70 -10
- package/dist/main.js +97 -79
- package/dist/module.js +90 -73
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Display, Elem, InfoForProcessing, Node_Array, RR_PostProcessor, RR_PreProcessor } from "@depict-ai/utilishared";
|
|
1
2
|
import { Accessor, JSX, Setter, Signal } from "solid-js";
|
|
2
|
-
import { Elem, Display, InfoForProcessing, Node_Array, RR_PostProcessor, RR_PreProcessor } from "@depict-ai/utilishared";
|
|
3
3
|
import { search_i18n as _search_i18n1 } from "../../../locales";
|
|
4
4
|
import { SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
5
5
|
import { SearchRequest, SearchFilter } from "@depict-ai/types/api/SearchRequest";
|
|
@@ -9,7 +9,65 @@ import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestions
|
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
10
|
import { ProductListingResponse, BaseCategoryDisplay } from "@depict-ai/types/api/ProductListingResponse";
|
|
11
11
|
import { JSX as _JSX1 } from "solid-js/types/jsx";
|
|
12
|
-
export const version = "0.0.
|
|
12
|
+
export const version = "0.0.37";
|
|
13
|
+
type ExclusiveId = {
|
|
14
|
+
categoryId: string;
|
|
15
|
+
productId?: undefined;
|
|
16
|
+
productIds?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
categoryId?: undefined;
|
|
19
|
+
productId: string;
|
|
20
|
+
productIds?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
categoryId?: undefined;
|
|
23
|
+
productId?: undefined;
|
|
24
|
+
productIds: string[];
|
|
25
|
+
} | {
|
|
26
|
+
categoryId?: undefined;
|
|
27
|
+
productId?: undefined;
|
|
28
|
+
productIds?: undefined;
|
|
29
|
+
};
|
|
30
|
+
type RecsAPIWrapperOptions = {
|
|
31
|
+
type: string;
|
|
32
|
+
merchant: string;
|
|
33
|
+
market: string;
|
|
34
|
+
headers?: HeadersInit;
|
|
35
|
+
} & ExclusiveId;
|
|
36
|
+
/**
|
|
37
|
+
* Fetches recommendations from Depict's API.
|
|
38
|
+
* ## It is important that you make the correct choice out of: no id, `categoryId`, `productId` and `productIds` (choose ONE) so read the documentation carefully.
|
|
39
|
+
*
|
|
40
|
+
* @param merchant The name of the merchant (e.g. "acme")
|
|
41
|
+
* @param market The market to fetch recs for. Depict will provide this to you. (Example: "sv" or "sv-se".)
|
|
42
|
+
* @param type The type of the recommendations, e.g. `front_page`, `after_basket, `related`, etc. Ask Depict for this.
|
|
43
|
+
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
44
|
+
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
45
|
+
* @param productIds When requesting recommendations that should take multiple products into account, i.e. the contents of the basket/cart, pass an array of product ids as `productIds`
|
|
46
|
+
* @param headers Optional headers to send to the Depict API. This could be authentication for example. 99% of integrations can leave this unset.
|
|
47
|
+
* When no id is provided (none out of `categoryId`, `productId` and `productIds`) general recommendations will be fetched. This is for, for example, the frontpage where generally popular products get returned.
|
|
48
|
+
*
|
|
49
|
+
* @note If you only get recommendations when specifying the wrong id type (i.e. you only get basket recommendations if you provide a single product id while the recommendations should be based on everything in the basket) please ask Depict to re-configure the endpoint for you.
|
|
50
|
+
*
|
|
51
|
+
* @example Fetching frontpage recommendations
|
|
52
|
+
* ```
|
|
53
|
+
* const front_page_recs = await fetchDepictRecommendations({
|
|
54
|
+
* merchant: "oscarjacobson",
|
|
55
|
+
* market: "sv-se",
|
|
56
|
+
* type: "front_page",
|
|
57
|
+
* });
|
|
58
|
+
* ```
|
|
59
|
+
* @example Fetching recommendations for a product page
|
|
60
|
+
* ```
|
|
61
|
+
* const product_page_recs = await fetchDepictRecommendations({
|
|
62
|
+
* merchant: "stronger",
|
|
63
|
+
* market: "se",
|
|
64
|
+
* type: "product_normal",
|
|
65
|
+
* productId: "hero-sports-bra-luna",
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
* @return This function is guaranteed to return an array of Displays. If anything fails, you will get an empty array.
|
|
69
|
+
*/
|
|
70
|
+
export function fetchDepictRecommendations<T = Display>({ merchant, market, headers, ...fetch_recs_options }: RecsAPIWrapperOptions): Promise<T[]>;
|
|
13
71
|
/**
|
|
14
72
|
* Like standard_price_format except that the price and the formatting are reactive accessors
|
|
15
73
|
*/
|
|
@@ -131,6 +189,10 @@ export function media_query_to_accessor(media_query: string): import("solid-js")
|
|
|
131
189
|
export type WithRequired<T, K extends keyof T> = T & {
|
|
132
190
|
[P in K]-?: T[P];
|
|
133
191
|
};
|
|
192
|
+
type SDKGridSpacing = string | {
|
|
193
|
+
horizontal: string;
|
|
194
|
+
vertical: string;
|
|
195
|
+
};
|
|
134
196
|
export function show_toast({ children, on_close_, close_after_, ...more_attributes }: {
|
|
135
197
|
children?: JSX.Element;
|
|
136
198
|
close_after_: number;
|
|
@@ -168,10 +230,6 @@ export const embedded_num_products: ({ make_product_count_, set_observed_results
|
|
|
168
230
|
middle_elements_: Accessor<JSX.Element>;
|
|
169
231
|
on_filters_constructed_: () => void;
|
|
170
232
|
};
|
|
171
|
-
type SDKGridSpacing = string | {
|
|
172
|
-
horizontal: string;
|
|
173
|
-
vertical: string;
|
|
174
|
-
};
|
|
175
233
|
type SDKColsAtSize = [number, number?][];
|
|
176
234
|
type DepictCategoryConstructorOptions = {
|
|
177
235
|
market: string;
|
|
@@ -196,7 +254,7 @@ export function CategoryPage({ depict_category, grid_spacing, cols_at_size, prod
|
|
|
196
254
|
depict_category: DepictCategory;
|
|
197
255
|
grid_spacing: SDKGridSpacing;
|
|
198
256
|
cols_at_size: SDKColsAtSize;
|
|
199
|
-
product_card_template: (display: Display
|
|
257
|
+
product_card_template: (display: Display, info: InfoForProcessing) => Promise<Node_Array> | Node_Array;
|
|
200
258
|
get_product_id: (url?: string) => string | Promise<string>;
|
|
201
259
|
show_quicklinks?: boolean;
|
|
202
260
|
show_breadcrumbs?: boolean;
|
|
@@ -276,7 +334,7 @@ export function SearchPage({ depict_search, include_input_field, grid_spacing, c
|
|
|
276
334
|
};
|
|
277
335
|
grid_spacing: SDKGridSpacing;
|
|
278
336
|
cols_at_size: SDKColsAtSize;
|
|
279
|
-
product_card_template: (display: Display
|
|
337
|
+
product_card_template: (display: Display, info: InfoForProcessing) => Promise<Node_Array> | Node_Array;
|
|
280
338
|
get_product_id: (url?: string) => string | Promise<string>;
|
|
281
339
|
extra_depict_options?: {
|
|
282
340
|
pre_processors?: RR_PreProcessor[];
|
|
@@ -284,11 +342,13 @@ export function SearchPage({ depict_search, include_input_field, grid_spacing, c
|
|
|
284
342
|
recommendations_cols_at_size?: SDKColsAtSize;
|
|
285
343
|
};
|
|
286
344
|
}): Node_Array;
|
|
287
|
-
|
|
345
|
+
interface SearchFieldParams {
|
|
288
346
|
depict_search: DepictSearch;
|
|
289
347
|
modal_dispose_handler?: VoidFunction;
|
|
290
348
|
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
291
|
-
|
|
349
|
+
aligner_ref?: HTMLElement | null;
|
|
350
|
+
}
|
|
351
|
+
export function SearchField({ depict_search, modal_dispose_handler, click_handler, aligner_ref }: SearchFieldParams): Node_Array;
|
|
292
352
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
293
353
|
export interface PageReplacer {
|
|
294
354
|
readonly render_: (is_prerendering: boolean) => Node_Array;
|
package/dist/main.js
CHANGED
|
@@ -6,17 +6,18 @@ function $parcel$export(e, n, v, s) {
|
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
$parcel$export(module.exports, "
|
|
10
|
-
$parcel$export(module.exports, "
|
|
9
|
+
$parcel$export(module.exports, "fetchDepictRecommendations", () => $8c4e48a4bf96b284$export$58e808b1db15d3bc);
|
|
10
|
+
$parcel$export(module.exports, "QuickLinks", () => $068a627cc18f7bb6$export$de035477d6fef996);
|
|
11
|
+
$parcel$export(module.exports, "BreadCrumbs", () => $068a627cc18f7bb6$export$5b7c3ce0ebe51f86);
|
|
11
12
|
$parcel$export(module.exports, "CategoryTitle", () => $853f821e60bd06ea$export$b91cec6bdc6b32a1);
|
|
12
13
|
$parcel$export(module.exports, "embedded_num_products", () => $1a89c0064ad43e0d$export$824dde41348efed1);
|
|
13
14
|
$parcel$export(module.exports, "get_categories", () => $bfd8f91b5a75050a$export$643598a327b5833e);
|
|
14
|
-
$parcel$export(module.exports, "DepictCategory", () => $
|
|
15
|
-
$parcel$export(module.exports, "CategoryPage", () => $
|
|
16
|
-
$parcel$export(module.exports, "DepictSearch", () => $
|
|
17
|
-
$parcel$export(module.exports, "get_search_query_updating_blocked_signal", () => $
|
|
18
|
-
$parcel$export(module.exports, "SearchPage", () => $
|
|
19
|
-
$parcel$export(module.exports, "SearchField", () => $
|
|
15
|
+
$parcel$export(module.exports, "DepictCategory", () => $068a627cc18f7bb6$export$f34314aa9505732e);
|
|
16
|
+
$parcel$export(module.exports, "CategoryPage", () => $068a627cc18f7bb6$export$e2bf8ce7779e827e);
|
|
17
|
+
$parcel$export(module.exports, "DepictSearch", () => $79fbf145b15af988$export$ac6237957a15b3f0);
|
|
18
|
+
$parcel$export(module.exports, "get_search_query_updating_blocked_signal", () => $79fbf145b15af988$export$bde3eb976dfded9);
|
|
19
|
+
$parcel$export(module.exports, "SearchPage", () => $79fbf145b15af988$export$f2dc7e4e4aa11abb);
|
|
20
|
+
$parcel$export(module.exports, "SearchField", () => $79fbf145b15af988$export$b94867ecbd698f21);
|
|
20
21
|
$parcel$export(module.exports, "DefaultInstantCardPlaceholder", () => $17c49340edfdbb31$export$ee1733d9a8495996);
|
|
21
22
|
$parcel$export(module.exports, "align_field", () => $67b60b572b7b7059$export$b3ad617e9036868);
|
|
22
23
|
$parcel$export(module.exports, "styles_to_valid_css_string", () => $d3c94b3b96557917$export$1233ca167bf71f9a);
|
|
@@ -32,7 +33,16 @@ $parcel$export(module.exports, "solid_format_price", () => $5fc9fc23df1591db$exp
|
|
|
32
33
|
$parcel$export(module.exports, "PageReplacer", () => $37e96a5ebc768cc7$export$3ccaa27d81dd8556);
|
|
33
34
|
$parcel$export(module.exports, "version", () => $ae93561d5649a847$export$83d89fbfd8236492);
|
|
34
35
|
/*! Depict.ai search and product listing SDK */
|
|
35
|
-
const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.
|
|
36
|
+
const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.37";
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
async function $8c4e48a4bf96b284$export$58e808b1db15d3bc({ merchant: merchant , market: market , headers: headers , ...fetch_recs_options }) {
|
|
41
|
+
return await (0, $46MJV$depictaiutilishared.fetch_recs)({
|
|
42
|
+
tenant: merchant,
|
|
43
|
+
market: market
|
|
44
|
+
}, (0, $46MJV$depictaiutilishared.snakeCasifyObject)(fetch_recs_options), headers);
|
|
45
|
+
}
|
|
36
46
|
|
|
37
47
|
|
|
38
48
|
|
|
@@ -4876,7 +4886,22 @@ const $7958d3dbd96a4f87$export$6daf8749b65a1b77 = (cols_at_size)=>{
|
|
|
4876
4886
|
|
|
4877
4887
|
|
|
4878
4888
|
|
|
4879
|
-
|
|
4889
|
+
|
|
4890
|
+
function $623202ae203e9e59$export$f091cbac892643a4(obj) {
|
|
4891
|
+
const mapfn = (key)=>[
|
|
4892
|
+
key,
|
|
4893
|
+
(0, $46MJV$solidjs.createMemo)(()=>obj()[key])
|
|
4894
|
+
];
|
|
4895
|
+
const keys = Object.keys((0, $46MJV$solidjs.untrack)(()=>obj()));
|
|
4896
|
+
const mapped_stuff = keys.map(mapfn);
|
|
4897
|
+
return Object.fromEntries(mapped_stuff); // FUCK TYPESCRIPT, WHY CAN'T YOU DO THIS CORRECTLY???
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
|
|
4901
|
+
|
|
4902
|
+
|
|
4903
|
+
|
|
4904
|
+
function $f27b0b326e0a87e2$export$23fca46f3143581f(component, error_message) {
|
|
4880
4905
|
const component_in_error_boundary = (do_with_elements)=>{
|
|
4881
4906
|
return (0, $0f2f58dd60b11888$export$b69d0d92862de18b)({
|
|
4882
4907
|
severity_: "error",
|
|
@@ -4901,31 +4926,16 @@ function $b0e2c3c5b04d40cd$export$23fca46f3143581f(component, error_message) {
|
|
|
4901
4926
|
}
|
|
4902
4927
|
|
|
4903
4928
|
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
const mapfn = (key)=>[
|
|
4910
|
-
key,
|
|
4911
|
-
(0, $46MJV$solidjs.createMemo)(()=>obj()[key])
|
|
4912
|
-
];
|
|
4913
|
-
const keys = Object.keys((0, $46MJV$solidjs.untrack)(()=>obj()));
|
|
4914
|
-
const mapped_stuff = keys.map(mapfn);
|
|
4915
|
-
return Object.fromEntries(mapped_stuff); // FUCK TYPESCRIPT, WHY CAN'T YOU DO THIS CORRECTLY???
|
|
4916
|
-
}
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
const $b5bcdaaacb8b81f2$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="depict plp category"></div>`, 2);
|
|
4920
|
-
const $b5bcdaaacb8b81f2$var$min_products_to_fetch_ = 20;
|
|
4921
|
-
const $b5bcdaaacb8b81f2$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
4922
|
-
const $b5bcdaaacb8b81f2$var$InExternalAreaDiv = ({ children: children })=>(()=>{
|
|
4923
|
-
const _el$ = $b5bcdaaacb8b81f2$var$_tmpl$.cloneNode(true);
|
|
4929
|
+
const $068a627cc18f7bb6$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="depict plp category"></div>`, 2);
|
|
4930
|
+
const $068a627cc18f7bb6$var$min_products_to_fetch_ = 20;
|
|
4931
|
+
const $068a627cc18f7bb6$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
4932
|
+
const $068a627cc18f7bb6$var$InExternalAreaDiv = ({ children: children })=>(()=>{
|
|
4933
|
+
const _el$ = $068a627cc18f7bb6$var$_tmpl$.cloneNode(true);
|
|
4924
4934
|
(0, $46MJV$solidjsweb.insert)(_el$, children);
|
|
4925
4935
|
(0, $46MJV$solidjsweb.effect)(()=>(0, $46MJV$solidjsweb.setAttribute)(_el$, "id", (0, $29b757e2ae26852c$export$44dad306455dddf).PLP_CATEGORY));
|
|
4926
4936
|
return _el$;
|
|
4927
4937
|
})();
|
|
4928
|
-
class $
|
|
4938
|
+
class $068a627cc18f7bb6$export$f34314aa9505732e {
|
|
4929
4939
|
#locale_signal = (0, $46MJV$solidjs.createSignal)();
|
|
4930
4940
|
#merchant_signal = (0, $46MJV$solidjs.createSignal)();
|
|
4931
4941
|
#market_signal = (0, $46MJV$solidjs.createSignal)();
|
|
@@ -4957,8 +4967,8 @@ class $b5bcdaaacb8b81f2$export$f34314aa9505732e {
|
|
|
4957
4967
|
this.#market_signal[1](market);
|
|
4958
4968
|
}
|
|
4959
4969
|
constructor({ api: api , on_navigation: on_navigation , ...props_on_class }){
|
|
4960
|
-
if ($
|
|
4961
|
-
$
|
|
4970
|
+
if ($068a627cc18f7bb6$export$f34314aa9505732e.#has_been_constructed) throw new Error("You can only have one instance of DepictCategory due to state limitations");
|
|
4971
|
+
$068a627cc18f7bb6$export$f34314aa9505732e.#has_been_constructed = true;
|
|
4962
4972
|
Object.assign(this, props_on_class); // set initial signal values
|
|
4963
4973
|
(0, $33815c5a406b6cc0$export$5162a71f252e6122)();
|
|
4964
4974
|
const [reset_history_state_, state_] = (0, $0de081f67b6d15b5$export$9862539c89138352)(()=>({
|
|
@@ -4986,7 +4996,7 @@ class $b5bcdaaacb8b81f2$export$f34314aa9505732e {
|
|
|
4986
4996
|
});
|
|
4987
4997
|
}
|
|
4988
4998
|
});
|
|
4989
|
-
$
|
|
4999
|
+
$068a627cc18f7bb6$var$privately_shared_properties.set(this, {
|
|
4990
5000
|
state_: state_,
|
|
4991
5001
|
breadcrumb_signal_: (0, $46MJV$solidjs.createSignal)(),
|
|
4992
5002
|
quicklinks_signal_: (0, $46MJV$solidjs.createSignal)(),
|
|
@@ -5001,22 +5011,22 @@ class $b5bcdaaacb8b81f2$export$f34314aa9505732e {
|
|
|
5001
5011
|
});
|
|
5002
5012
|
}
|
|
5003
5013
|
}
|
|
5004
|
-
function $
|
|
5005
|
-
const shared_properties = $
|
|
5014
|
+
function $068a627cc18f7bb6$export$e2bf8ce7779e827e({ depict_category: depict_category , grid_spacing: grid_spacing , cols_at_size: cols_at_size , product_card_template: product_card_template , get_product_id: get_product_id , show_breadcrumbs: show_breadcrumbs = true , show_quicklinks: show_quicklinks = true , category_title: category_title }) {
|
|
5015
|
+
const shared_properties = $068a627cc18f7bb6$var$get_shared_properties(depict_category);
|
|
5006
5016
|
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
5007
5017
|
grid_spacing: grid_spacing
|
|
5008
5018
|
} : {
|
|
5009
5019
|
override_vertical_spacing: grid_spacing.vertical,
|
|
5010
5020
|
grid_spacing: grid_spacing.horizontal
|
|
5011
5021
|
};
|
|
5012
|
-
return (0, $
|
|
5022
|
+
return (0, $f27b0b326e0a87e2$export$23fca46f3143581f)(()=>{
|
|
5013
5023
|
const { state_: { category_local_filter_cache: local_filter_cache_ , category_sorting: current_sorting_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_selected_filters: selected_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , on_category_link_click_: on_category_link_click_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , slider_arrow_button_: slider_arrow_button_ } = shared_properties;
|
|
5014
5024
|
(0, $46MJV$solidjs.onCleanup)(reset_history_state_);
|
|
5015
5025
|
return (0, $671632478f2a7ce7$export$f7d2f673fc2f091d)({
|
|
5016
5026
|
tenant_: ()=>depict_category.merchant,
|
|
5017
5027
|
market_: ()=>depict_category.market,
|
|
5018
5028
|
depict_api_: depict_api_,
|
|
5019
|
-
min_products_to_fetch_: $
|
|
5029
|
+
min_products_to_fetch_: $068a627cc18f7bb6$var$min_products_to_fetch_,
|
|
5020
5030
|
local_filter_cache_: local_filter_cache_,
|
|
5021
5031
|
query_id_: ()=>depict_category.category_id,
|
|
5022
5032
|
i18n_: i18n_,
|
|
@@ -5040,17 +5050,14 @@ function $b5bcdaaacb8b81f2$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5040
5050
|
...grid_spacing_override
|
|
5041
5051
|
},
|
|
5042
5052
|
rr_options_: {
|
|
5043
|
-
template:
|
|
5044
|
-
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
5045
|
-
return product_card_template(is_placeholder ? null : display, info);
|
|
5046
|
-
}
|
|
5053
|
+
template: product_card_template
|
|
5047
5054
|
}
|
|
5048
5055
|
});
|
|
5049
5056
|
}, "Entire CategoryPage failed");
|
|
5050
5057
|
}
|
|
5051
|
-
function $
|
|
5052
|
-
const { i18n_: i18n_ , breadcrumb_signal_: [crumb_data_] , on_category_link_click_: on_crumb_click_ } = $
|
|
5053
|
-
return (0, $46MJV$solidjsweb.createComponent)($
|
|
5058
|
+
function $068a627cc18f7bb6$export$5b7c3ce0ebe51f86({ depict_category: depict_category }) {
|
|
5059
|
+
const { i18n_: i18n_ , breadcrumb_signal_: [crumb_data_] , on_category_link_click_: on_crumb_click_ } = $068a627cc18f7bb6$var$get_shared_properties(depict_category);
|
|
5060
|
+
return (0, $46MJV$solidjsweb.createComponent)($068a627cc18f7bb6$var$InExternalAreaDiv, {
|
|
5054
5061
|
get children () {
|
|
5055
5062
|
return (0, $495e9998757c5d32$export$5646050d516e06bc)({
|
|
5056
5063
|
i18n_: i18n_,
|
|
@@ -5060,9 +5067,9 @@ function $b5bcdaaacb8b81f2$export$5b7c3ce0ebe51f86({ depict_category: depict_cat
|
|
|
5060
5067
|
}
|
|
5061
5068
|
});
|
|
5062
5069
|
}
|
|
5063
|
-
function $
|
|
5064
|
-
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , on_category_link_click_: on_link_click_ , slider_arrow_button_: slider_arrow_button_ } = $
|
|
5065
|
-
return (0, $46MJV$solidjsweb.createComponent)($
|
|
5070
|
+
function $068a627cc18f7bb6$export$de035477d6fef996({ depict_category: depict_category }) {
|
|
5071
|
+
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , on_category_link_click_: on_link_click_ , slider_arrow_button_: slider_arrow_button_ } = $068a627cc18f7bb6$var$get_shared_properties(depict_category);
|
|
5072
|
+
return (0, $46MJV$solidjsweb.createComponent)($068a627cc18f7bb6$var$InExternalAreaDiv, {
|
|
5066
5073
|
get children () {
|
|
5067
5074
|
return (0, $cdc2c00c0a7da86e$export$466cdc317043f6cb)({
|
|
5068
5075
|
i18n_: i18n_,
|
|
@@ -5075,8 +5082,8 @@ function $b5bcdaaacb8b81f2$export$de035477d6fef996({ depict_category: depict_cat
|
|
|
5075
5082
|
}
|
|
5076
5083
|
});
|
|
5077
5084
|
}
|
|
5078
|
-
function $
|
|
5079
|
-
const shared_properties = $
|
|
5085
|
+
function $068a627cc18f7bb6$var$get_shared_properties(depict_category) {
|
|
5086
|
+
const shared_properties = $068a627cc18f7bb6$var$privately_shared_properties.get(depict_category);
|
|
5080
5087
|
if (!shared_properties) throw new Error("Can't connect to provided DepictCategory instance");
|
|
5081
5088
|
return shared_properties;
|
|
5082
5089
|
}
|
|
@@ -7335,13 +7342,14 @@ function $93779a41dce11249$export$a54ec244c8863715(opts) {
|
|
|
7335
7342
|
|
|
7336
7343
|
|
|
7337
7344
|
|
|
7338
|
-
|
|
7345
|
+
|
|
7346
|
+
const $79fbf145b15af988$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="depict plp search"></div>`, 2);
|
|
7339
7347
|
/**
|
|
7340
7348
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
7341
|
-
*/ const $
|
|
7342
|
-
const $
|
|
7343
|
-
const $
|
|
7344
|
-
class $
|
|
7349
|
+
*/ const $79fbf145b15af988$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
7350
|
+
const $79fbf145b15af988$var$min_products_to_fetch_ = 20;
|
|
7351
|
+
const $79fbf145b15af988$export$bde3eb976dfded9 = (depict_search)=>$79fbf145b15af988$var$privately_shared_properties.get(depict_search)?.search_query_updating_blocked_;
|
|
7352
|
+
class $79fbf145b15af988$export$ac6237957a15b3f0 {
|
|
7345
7353
|
#locale_signal = (0, $46MJV$solidjs.createSignal)();
|
|
7346
7354
|
#merchant_signal = (0, $46MJV$solidjs.createSignal)();
|
|
7347
7355
|
#market_signal = (0, $46MJV$solidjs.createSignal)();
|
|
@@ -7349,7 +7357,7 @@ class $2267618dcbb65a94$export$ac6237957a15b3f0 {
|
|
|
7349
7357
|
static #has_been_constructed = false;
|
|
7350
7358
|
constructor({ search_query_url_param_name: search_query_url_param_name = "search_query" , url_transformer: url_transformer , on_navigation: raw_on_navigation , enable_category_suggestions: enable_category_suggestions = true , disable_scrolling_during_modal: // Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
7351
7359
|
disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal_: bottom_distance_under_modal_ , render_instant_card: render_instant_card , ...props_on_class }){
|
|
7352
|
-
if ($
|
|
7360
|
+
if ($79fbf145b15af988$export$ac6237957a15b3f0.#has_been_constructed) throw new Error("You can only have one instance of DepictSearch");
|
|
7353
7361
|
Object.assign(this, props_on_class);
|
|
7354
7362
|
const on_navigation = raw_on_navigation && ((href)=>{
|
|
7355
7363
|
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
@@ -7414,7 +7422,7 @@ class $2267618dcbb65a94$export$ac6237957a15b3f0 {
|
|
|
7414
7422
|
const [, set_search_query_signal] = search_query_signal_; // this signal won't get written from anywhere, see url_params_to_signals JSDoc
|
|
7415
7423
|
if (!get_search_query_updating_blocked()) set_search_query_signal(get_raw_search_query_signal());
|
|
7416
7424
|
});
|
|
7417
|
-
$
|
|
7425
|
+
$79fbf145b15af988$var$privately_shared_properties.set(this, {
|
|
7418
7426
|
search_query_url_param_name_: search_query_url_param_name,
|
|
7419
7427
|
reset_history_state_: reset_history_state_,
|
|
7420
7428
|
state_: state_,
|
|
@@ -7450,7 +7458,7 @@ class $2267618dcbb65a94$export$ac6237957a15b3f0 {
|
|
|
7450
7458
|
navigate_page_to_href_: on_navigation,
|
|
7451
7459
|
on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
|
|
7452
7460
|
instant_results_options_: {
|
|
7453
|
-
min_products_to_fetch_: $
|
|
7461
|
+
min_products_to_fetch_: $79fbf145b15af988$var$min_products_to_fetch_,
|
|
7454
7462
|
render_instant_card_: render_instant_card,
|
|
7455
7463
|
render_instant_card_placeholder_: (0, $17c49340edfdbb31$export$ee1733d9a8495996),
|
|
7456
7464
|
has_sort_or_filters_: (0, $46MJV$solidjs.createMemo)(()=>!!(Object.keys(state_.search_selected_filters[0]())?.length || state_.search_sorting[0]()))
|
|
@@ -7470,7 +7478,7 @@ class $2267618dcbb65a94$export$ac6237957a15b3f0 {
|
|
|
7470
7478
|
close_modal_();
|
|
7471
7479
|
return;
|
|
7472
7480
|
}
|
|
7473
|
-
const { search_page_aligned_modal_body_style_signal_: search_page_aligned_modal_body_style_signal_ } = $
|
|
7481
|
+
const { search_page_aligned_modal_body_style_signal_: search_page_aligned_modal_body_style_signal_ } = $79fbf145b15af988$var$privately_shared_properties.get(this);
|
|
7474
7482
|
if (signal_value_is_options && open_signal_value[0]?.style_props_) {
|
|
7475
7483
|
// They know what they're doing, just call the modal with the provided options
|
|
7476
7484
|
open_modal_(...open_signal_value);
|
|
@@ -7520,7 +7528,7 @@ class $2267618dcbb65a94$export$ac6237957a15b3f0 {
|
|
|
7520
7528
|
if (owner != null) (0, $46MJV$solidjs.runWithOwner)(owner, ()=>(0, $46MJV$solidjs.createComputed)(computation));
|
|
7521
7529
|
else (0, $46MJV$solidjs.createComputed)(computation);
|
|
7522
7530
|
})();
|
|
7523
|
-
$
|
|
7531
|
+
$79fbf145b15af988$export$ac6237957a15b3f0.#has_been_constructed = true;
|
|
7524
7532
|
}
|
|
7525
7533
|
get localization() {
|
|
7526
7534
|
// allow reactive access
|
|
@@ -7548,20 +7556,20 @@ class $2267618dcbb65a94$export$ac6237957a15b3f0 {
|
|
|
7548
7556
|
this.#market_signal[1](market);
|
|
7549
7557
|
}
|
|
7550
7558
|
}
|
|
7551
|
-
function $
|
|
7552
|
-
const shared_properties = $
|
|
7559
|
+
function $79fbf145b15af988$var$get_shared_properties(depict_search) {
|
|
7560
|
+
const shared_properties = $79fbf145b15af988$var$privately_shared_properties.get(depict_search);
|
|
7553
7561
|
if (!shared_properties) throw new Error("Can't connect to provided DepictSearch instance");
|
|
7554
7562
|
return shared_properties;
|
|
7555
7563
|
}
|
|
7556
|
-
function $
|
|
7557
|
-
const shared_properties = $
|
|
7564
|
+
function $79fbf145b15af988$export$f2dc7e4e4aa11abb({ depict_search: depict_search , include_input_field: include_input_field , grid_spacing: grid_spacing , cols_at_size: cols_at_size , product_card_template: product_card_template , get_product_id: get_product_id = (0, $46MJV$depictaiutilishared.normal_get_product_id) , extra_depict_options: extra_depict_options }) {
|
|
7565
|
+
const shared_properties = $79fbf145b15af988$var$get_shared_properties(depict_search);
|
|
7558
7566
|
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
7559
7567
|
grid_spacing: grid_spacing
|
|
7560
7568
|
} : {
|
|
7561
7569
|
override_vertical_spacing: grid_spacing.vertical,
|
|
7562
7570
|
grid_spacing: grid_spacing.horizontal
|
|
7563
7571
|
};
|
|
7564
|
-
return (0, $
|
|
7572
|
+
return (0, $f27b0b326e0a87e2$export$23fca46f3143581f)(()=>{
|
|
7565
7573
|
const { state_: state_ } = shared_properties;
|
|
7566
7574
|
(0, $46MJV$solidjs.onCleanup)(shared_properties.reset_history_state_);
|
|
7567
7575
|
return (0, $93779a41dce11249$export$a54ec244c8863715)({
|
|
@@ -7569,7 +7577,7 @@ function $2267618dcbb65a94$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7569
7577
|
tenant_: ()=>depict_search.merchant,
|
|
7570
7578
|
market_: ()=>depict_search.market,
|
|
7571
7579
|
depict_api_: shared_properties.depict_api_,
|
|
7572
|
-
min_products_to_fetch_: $
|
|
7580
|
+
min_products_to_fetch_: $79fbf145b15af988$var$min_products_to_fetch_,
|
|
7573
7581
|
local_filter_cache_: state_.search_local_filter_cache,
|
|
7574
7582
|
search_field_value_: state_.search_field_value,
|
|
7575
7583
|
search_query_: shared_properties.search_query_signal_,
|
|
@@ -7578,16 +7586,16 @@ function $2267618dcbb65a94$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7578
7586
|
submit_query_: shared_properties.configured_submit_query_,
|
|
7579
7587
|
i18n_: shared_properties.i18n_,
|
|
7580
7588
|
modal_body_style_ref_: (style)=>{
|
|
7581
|
-
const shared_info_right_now = $
|
|
7589
|
+
const shared_info_right_now = $79fbf145b15af988$var$privately_shared_properties.get(depict_search);
|
|
7582
7590
|
if (!shared_info_right_now) return;
|
|
7583
|
-
$
|
|
7591
|
+
$79fbf145b15af988$var$privately_shared_properties.set(depict_search, {
|
|
7584
7592
|
...shared_info_right_now,
|
|
7585
7593
|
search_page_aligned_modal_body_style_signal_: style
|
|
7586
7594
|
});
|
|
7587
7595
|
(0, $46MJV$solidjs.onCleanup)(()=>{
|
|
7588
|
-
const shared_info_right_now = $
|
|
7596
|
+
const shared_info_right_now = $79fbf145b15af988$var$privately_shared_properties.get(depict_search);
|
|
7589
7597
|
if (!shared_info_right_now || shared_info_right_now.search_page_aligned_modal_body_style_signal_ !== style) return;
|
|
7590
|
-
$
|
|
7598
|
+
$79fbf145b15af988$var$privately_shared_properties.set(depict_search, {
|
|
7591
7599
|
...shared_info_right_now,
|
|
7592
7600
|
search_page_aligned_modal_body_style_signal_: undefined
|
|
7593
7601
|
});
|
|
@@ -7621,10 +7629,7 @@ function $2267618dcbb65a94$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7621
7629
|
width_: 6.46
|
|
7622
7630
|
}),
|
|
7623
7631
|
rr_options_: {
|
|
7624
|
-
template:
|
|
7625
|
-
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
7626
|
-
return product_card_template(is_placeholder ? null : display, info);
|
|
7627
|
-
},
|
|
7632
|
+
template: product_card_template,
|
|
7628
7633
|
pre_processors: extra_depict_options?.pre_processors,
|
|
7629
7634
|
post_processors: extra_depict_options?.post_processors
|
|
7630
7635
|
},
|
|
@@ -7632,9 +7637,9 @@ function $2267618dcbb65a94$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7632
7637
|
});
|
|
7633
7638
|
}, "Entire SearchPage failed");
|
|
7634
7639
|
}
|
|
7635
|
-
function $
|
|
7636
|
-
const shared_properties = $
|
|
7637
|
-
return (0, $
|
|
7640
|
+
function $79fbf145b15af988$export$b94867ecbd698f21({ depict_search: depict_search , modal_dispose_handler: modal_dispose_handler , click_handler: click_handler , aligner_ref: aligner_ref }) {
|
|
7641
|
+
const shared_properties = $79fbf145b15af988$var$get_shared_properties(depict_search);
|
|
7642
|
+
return (0, $f27b0b326e0a87e2$export$23fca46f3143581f)(()=>{
|
|
7638
7643
|
const input = (0, $46MJV$solidjsweb.createComponent)((0, $231c39725f8fde87$export$ff21851bb5d30e15), {
|
|
7639
7644
|
get search_query_ () {
|
|
7640
7645
|
return shared_properties.search_query_signal_;
|
|
@@ -7668,10 +7673,23 @@ function $2267618dcbb65a94$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7668
7673
|
const style_props_ = (0, $46MJV$solidjs.createSignal)({
|
|
7669
7674
|
position: "fixed"
|
|
7670
7675
|
});
|
|
7671
|
-
(
|
|
7676
|
+
if (aligner_ref) {
|
|
7677
|
+
const style_element = document.createElement("style");
|
|
7678
|
+
document.head.append(style_element);
|
|
7679
|
+
const resize_observer = new ResizeObserver((0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
7680
|
+
const styles = (0, $d3c94b3b96557917$export$1233ca167bf71f9a)({
|
|
7681
|
+
".depict.plp .depict-search-modal .query-input": {
|
|
7682
|
+
"height": `${aligner_ref?.clientHeight}px`
|
|
7683
|
+
}
|
|
7684
|
+
});
|
|
7685
|
+
style_element.replaceChildren(styles);
|
|
7686
|
+
}));
|
|
7687
|
+
resize_observer.observe(aligner_ref);
|
|
7688
|
+
(0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7689
|
+
} else (0, $67b60b572b7b7059$export$b3ad617e9036868)(style_props_, input);
|
|
7672
7690
|
return [
|
|
7673
7691
|
(()=>{
|
|
7674
|
-
const _el$ = $
|
|
7692
|
+
const _el$ = $79fbf145b15af988$var$_tmpl$.cloneNode(true);
|
|
7675
7693
|
(0, $46MJV$solidjsweb.insert)(_el$, input);
|
|
7676
7694
|
(0, $46MJV$solidjsweb.effect)(()=>(0, $46MJV$solidjsweb.setAttribute)(_el$, "id", (0, $29b757e2ae26852c$export$44dad306455dddf).SEARCH_MODAL));
|
|
7677
7695
|
return _el$;
|
package/dist/module.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import {dlog as $g9l4l$dlog, GenericSliderArrowButton as $g9l4l$GenericSliderArrowButton, catchify as $g9l4l$catchify, base_url as $g9l4l$base_url, get_depict_id as $g9l4l$get_depict_id, get_user_id as $g9l4l$get_user_id, get_session_id as $g9l4l$get_session_id, make_url_with_query_params as $g9l4l$make_url_with_query_params, fetch_retry as $g9l4l$fetch_retry, sort_obj as $g9l4l$sort_obj, version as $g9l4l$version, Tenant as $g9l4l$Tenant, Placeholder as $g9l4l$Placeholder, report as $g9l4l$report, javascript_media_query as $g9l4l$javascript_media_query, standard_price_format as $g9l4l$standard_price_format, deparallelize_no_drop as $g9l4l$deparallelize_no_drop, default_rr as $g9l4l$default_rr, make_random_classname as $g9l4l$make_random_classname, n_col_styling_with_dist as $g9l4l$n_col_styling_with_dist, observer as $g9l4l$observer, Lazyfier as $g9l4l$Lazyfier, queueMacroTask as $g9l4l$queueMacroTask, deparallelize as $g9l4l$deparallelize, Rec_Renderer as $g9l4l$Rec_Renderer, CrossIcon as $g9l4l$CrossIcon, useExpandingContainer as $g9l4l$useExpandingContainer, Amazing_Slider as $g9l4l$Amazing_Slider, slider_snap_css as $g9l4l$slider_snap_css, slider_fading_factory as $g9l4l$slider_fading_factory, MinusIcon as $g9l4l$MinusIcon, FilterIcon as $g9l4l$FilterIcon, SortIconAsc as $g9l4l$SortIconAsc, SortIconDesc as $g9l4l$SortIconDesc, PlusIcon as $g9l4l$PlusIcon, TickIcon as $g9l4l$TickIcon, ArrowUp as $g9l4l$ArrowUp, normal_get_product_id as $g9l4l$normal_get_product_id, ContainedPlaceholderImage as $g9l4l$ContainedPlaceholderImage, BackIcon as $g9l4l$BackIcon, SearchIcon as $g9l4l$SearchIcon, Layout as $g9l4l$Layout, make_placeholder_rr as $g9l4l$make_placeholder_rr, async_iterable_ipns as $g9l4l$async_iterable_ipns, make_asyncIterable_exiter as $g9l4l$make_asyncIterable_exiter, href_change_ipns as $g9l4l$href_change_ipns, depict_click as $g9l4l$depict_click, impression_track_element as $g9l4l$impression_track_element, add_new_tab_listener as $g9l4l$add_new_tab_listener, ContainedImage as $g9l4l$ContainedImage, buildThresholdList as $g9l4l$buildThresholdList, PreviousSearchIcon as $g9l4l$PreviousSearchIcon, insert_surfaces as $g9l4l$insert_surfaces} from "@depict-ai/utilishared";
|
|
1
|
+
import {dlog as $g9l4l$dlog, fetch_recs as $g9l4l$fetch_recs, snakeCasifyObject as $g9l4l$snakeCasifyObject, GenericSliderArrowButton as $g9l4l$GenericSliderArrowButton, catchify as $g9l4l$catchify, base_url as $g9l4l$base_url, get_depict_id as $g9l4l$get_depict_id, get_user_id as $g9l4l$get_user_id, get_session_id as $g9l4l$get_session_id, make_url_with_query_params as $g9l4l$make_url_with_query_params, fetch_retry as $g9l4l$fetch_retry, sort_obj as $g9l4l$sort_obj, version as $g9l4l$version, Tenant as $g9l4l$Tenant, Placeholder as $g9l4l$Placeholder, report as $g9l4l$report, javascript_media_query as $g9l4l$javascript_media_query, standard_price_format as $g9l4l$standard_price_format, deparallelize_no_drop as $g9l4l$deparallelize_no_drop, default_rr as $g9l4l$default_rr, make_random_classname as $g9l4l$make_random_classname, n_col_styling_with_dist as $g9l4l$n_col_styling_with_dist, observer as $g9l4l$observer, Lazyfier as $g9l4l$Lazyfier, queueMacroTask as $g9l4l$queueMacroTask, deparallelize as $g9l4l$deparallelize, Rec_Renderer as $g9l4l$Rec_Renderer, CrossIcon as $g9l4l$CrossIcon, useExpandingContainer as $g9l4l$useExpandingContainer, Amazing_Slider as $g9l4l$Amazing_Slider, slider_snap_css as $g9l4l$slider_snap_css, slider_fading_factory as $g9l4l$slider_fading_factory, MinusIcon as $g9l4l$MinusIcon, FilterIcon as $g9l4l$FilterIcon, SortIconAsc as $g9l4l$SortIconAsc, SortIconDesc as $g9l4l$SortIconDesc, PlusIcon as $g9l4l$PlusIcon, TickIcon as $g9l4l$TickIcon, ArrowUp as $g9l4l$ArrowUp, normal_get_product_id as $g9l4l$normal_get_product_id, ContainedPlaceholderImage as $g9l4l$ContainedPlaceholderImage, BackIcon as $g9l4l$BackIcon, SearchIcon as $g9l4l$SearchIcon, Layout as $g9l4l$Layout, make_placeholder_rr as $g9l4l$make_placeholder_rr, async_iterable_ipns as $g9l4l$async_iterable_ipns, make_asyncIterable_exiter as $g9l4l$make_asyncIterable_exiter, href_change_ipns as $g9l4l$href_change_ipns, depict_click as $g9l4l$depict_click, impression_track_element as $g9l4l$impression_track_element, add_new_tab_listener as $g9l4l$add_new_tab_listener, ContainedImage as $g9l4l$ContainedImage, buildThresholdList as $g9l4l$buildThresholdList, PreviousSearchIcon as $g9l4l$PreviousSearchIcon, insert_surfaces as $g9l4l$insert_surfaces} from "@depict-ai/utilishared";
|
|
2
2
|
import {template as $g9l4l$template, insert as $g9l4l$insert, effect as $g9l4l$effect, setAttribute as $g9l4l$setAttribute, createComponent as $g9l4l$createComponent, use as $g9l4l$use, addEventListener as $g9l4l$addEventListener, delegateEvents as $g9l4l$delegateEvents, spread as $g9l4l$spread, memo as $g9l4l$memo, style as $g9l4l$style, mergeProps as $g9l4l$mergeProps, classList as $g9l4l$classList, className as $g9l4l$className} from "solid-js/web";
|
|
3
3
|
import {createSignal as $g9l4l$createSignal, onCleanup as $g9l4l$onCleanup, createComputed as $g9l4l$createComputed, createEffect as $g9l4l$createEffect, untrack as $g9l4l$untrack, batch as $g9l4l$batch, createResource as $g9l4l$createResource, createMemo as $g9l4l$createMemo, Show as $g9l4l$Show, createRenderEffect as $g9l4l$createRenderEffect, runWithOwner as $g9l4l$runWithOwner, createRoot as $g9l4l$createRoot, getOwner as $g9l4l$getOwner, on as $g9l4l$on, Index as $g9l4l$Index, For as $g9l4l$For, ErrorBoundary as $g9l4l$ErrorBoundary} from "solid-js";
|
|
4
4
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
|
-
const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.
|
|
6
|
+
const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.37";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
async function $e95f1855a5e3864f$export$58e808b1db15d3bc({ merchant: merchant , market: market , headers: headers , ...fetch_recs_options }) {
|
|
11
|
+
return await (0, $g9l4l$fetch_recs)({
|
|
12
|
+
tenant: merchant,
|
|
13
|
+
market: market
|
|
14
|
+
}, (0, $g9l4l$snakeCasifyObject)(fetch_recs_options), headers);
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
|
|
9
18
|
|
|
@@ -4847,7 +4856,22 @@ const $b4e6a093ae83373b$export$6daf8749b65a1b77 = (cols_at_size)=>{
|
|
|
4847
4856
|
|
|
4848
4857
|
|
|
4849
4858
|
|
|
4850
|
-
|
|
4859
|
+
|
|
4860
|
+
function $0466953901b38f18$export$f091cbac892643a4(obj) {
|
|
4861
|
+
const mapfn = (key)=>[
|
|
4862
|
+
key,
|
|
4863
|
+
(0, $g9l4l$createMemo)(()=>obj()[key])
|
|
4864
|
+
];
|
|
4865
|
+
const keys = Object.keys((0, $g9l4l$untrack)(()=>obj()));
|
|
4866
|
+
const mapped_stuff = keys.map(mapfn);
|
|
4867
|
+
return Object.fromEntries(mapped_stuff); // FUCK TYPESCRIPT, WHY CAN'T YOU DO THIS CORRECTLY???
|
|
4868
|
+
}
|
|
4869
|
+
|
|
4870
|
+
|
|
4871
|
+
|
|
4872
|
+
|
|
4873
|
+
|
|
4874
|
+
function $c7f938ac40924f3b$export$23fca46f3143581f(component, error_message) {
|
|
4851
4875
|
const component_in_error_boundary = (do_with_elements)=>{
|
|
4852
4876
|
return (0, $a406ebe9523f192f$export$b69d0d92862de18b)({
|
|
4853
4877
|
severity_: "error",
|
|
@@ -4872,31 +4896,16 @@ function $4ed1c7ad68252512$export$23fca46f3143581f(component, error_message) {
|
|
|
4872
4896
|
}
|
|
4873
4897
|
|
|
4874
4898
|
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
const mapfn = (key)=>[
|
|
4881
|
-
key,
|
|
4882
|
-
(0, $g9l4l$createMemo)(()=>obj()[key])
|
|
4883
|
-
];
|
|
4884
|
-
const keys = Object.keys((0, $g9l4l$untrack)(()=>obj()));
|
|
4885
|
-
const mapped_stuff = keys.map(mapfn);
|
|
4886
|
-
return Object.fromEntries(mapped_stuff); // FUCK TYPESCRIPT, WHY CAN'T YOU DO THIS CORRECTLY???
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
const $a45c51e5e7aeb7f1$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict plp category"></div>`, 2);
|
|
4891
|
-
const $a45c51e5e7aeb7f1$var$min_products_to_fetch_ = 20;
|
|
4892
|
-
const $a45c51e5e7aeb7f1$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
4893
|
-
const $a45c51e5e7aeb7f1$var$InExternalAreaDiv = ({ children: children })=>(()=>{
|
|
4894
|
-
const _el$ = $a45c51e5e7aeb7f1$var$_tmpl$.cloneNode(true);
|
|
4899
|
+
const $ec52ef1e6c117813$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict plp category"></div>`, 2);
|
|
4900
|
+
const $ec52ef1e6c117813$var$min_products_to_fetch_ = 20;
|
|
4901
|
+
const $ec52ef1e6c117813$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
4902
|
+
const $ec52ef1e6c117813$var$InExternalAreaDiv = ({ children: children })=>(()=>{
|
|
4903
|
+
const _el$ = $ec52ef1e6c117813$var$_tmpl$.cloneNode(true);
|
|
4895
4904
|
(0, $g9l4l$insert)(_el$, children);
|
|
4896
4905
|
(0, $g9l4l$effect)(()=>(0, $g9l4l$setAttribute)(_el$, "id", (0, $01115659405f3c64$export$44dad306455dddf).PLP_CATEGORY));
|
|
4897
4906
|
return _el$;
|
|
4898
4907
|
})();
|
|
4899
|
-
class $
|
|
4908
|
+
class $ec52ef1e6c117813$export$f34314aa9505732e {
|
|
4900
4909
|
#locale_signal = (0, $g9l4l$createSignal)();
|
|
4901
4910
|
#merchant_signal = (0, $g9l4l$createSignal)();
|
|
4902
4911
|
#market_signal = (0, $g9l4l$createSignal)();
|
|
@@ -4928,8 +4937,8 @@ class $a45c51e5e7aeb7f1$export$f34314aa9505732e {
|
|
|
4928
4937
|
this.#market_signal[1](market);
|
|
4929
4938
|
}
|
|
4930
4939
|
constructor({ api: api , on_navigation: on_navigation , ...props_on_class }){
|
|
4931
|
-
if ($
|
|
4932
|
-
$
|
|
4940
|
+
if ($ec52ef1e6c117813$export$f34314aa9505732e.#has_been_constructed) throw new Error("You can only have one instance of DepictCategory due to state limitations");
|
|
4941
|
+
$ec52ef1e6c117813$export$f34314aa9505732e.#has_been_constructed = true;
|
|
4933
4942
|
Object.assign(this, props_on_class); // set initial signal values
|
|
4934
4943
|
(0, $2864fd26f57ff474$export$5162a71f252e6122)();
|
|
4935
4944
|
const [reset_history_state_, state_] = (0, $3075a4497054bec6$export$9862539c89138352)(()=>({
|
|
@@ -4957,7 +4966,7 @@ class $a45c51e5e7aeb7f1$export$f34314aa9505732e {
|
|
|
4957
4966
|
});
|
|
4958
4967
|
}
|
|
4959
4968
|
});
|
|
4960
|
-
$
|
|
4969
|
+
$ec52ef1e6c117813$var$privately_shared_properties.set(this, {
|
|
4961
4970
|
state_: state_,
|
|
4962
4971
|
breadcrumb_signal_: (0, $g9l4l$createSignal)(),
|
|
4963
4972
|
quicklinks_signal_: (0, $g9l4l$createSignal)(),
|
|
@@ -4972,22 +4981,22 @@ class $a45c51e5e7aeb7f1$export$f34314aa9505732e {
|
|
|
4972
4981
|
});
|
|
4973
4982
|
}
|
|
4974
4983
|
}
|
|
4975
|
-
function $
|
|
4976
|
-
const shared_properties = $
|
|
4984
|
+
function $ec52ef1e6c117813$export$e2bf8ce7779e827e({ depict_category: depict_category , grid_spacing: grid_spacing , cols_at_size: cols_at_size , product_card_template: product_card_template , get_product_id: get_product_id , show_breadcrumbs: show_breadcrumbs = true , show_quicklinks: show_quicklinks = true , category_title: category_title }) {
|
|
4985
|
+
const shared_properties = $ec52ef1e6c117813$var$get_shared_properties(depict_category);
|
|
4977
4986
|
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
4978
4987
|
grid_spacing: grid_spacing
|
|
4979
4988
|
} : {
|
|
4980
4989
|
override_vertical_spacing: grid_spacing.vertical,
|
|
4981
4990
|
grid_spacing: grid_spacing.horizontal
|
|
4982
4991
|
};
|
|
4983
|
-
return (0, $
|
|
4992
|
+
return (0, $c7f938ac40924f3b$export$23fca46f3143581f)(()=>{
|
|
4984
4993
|
const { state_: { category_local_filter_cache: local_filter_cache_ , category_sorting: current_sorting_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_selected_filters: selected_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , on_category_link_click_: on_category_link_click_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , slider_arrow_button_: slider_arrow_button_ } = shared_properties;
|
|
4985
4994
|
(0, $g9l4l$onCleanup)(reset_history_state_);
|
|
4986
4995
|
return (0, $1ae892b13d7746ab$export$f7d2f673fc2f091d)({
|
|
4987
4996
|
tenant_: ()=>depict_category.merchant,
|
|
4988
4997
|
market_: ()=>depict_category.market,
|
|
4989
4998
|
depict_api_: depict_api_,
|
|
4990
|
-
min_products_to_fetch_: $
|
|
4999
|
+
min_products_to_fetch_: $ec52ef1e6c117813$var$min_products_to_fetch_,
|
|
4991
5000
|
local_filter_cache_: local_filter_cache_,
|
|
4992
5001
|
query_id_: ()=>depict_category.category_id,
|
|
4993
5002
|
i18n_: i18n_,
|
|
@@ -5011,17 +5020,14 @@ function $a45c51e5e7aeb7f1$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5011
5020
|
...grid_spacing_override
|
|
5012
5021
|
},
|
|
5013
5022
|
rr_options_: {
|
|
5014
|
-
template:
|
|
5015
|
-
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
5016
|
-
return product_card_template(is_placeholder ? null : display, info);
|
|
5017
|
-
}
|
|
5023
|
+
template: product_card_template
|
|
5018
5024
|
}
|
|
5019
5025
|
});
|
|
5020
5026
|
}, "Entire CategoryPage failed");
|
|
5021
5027
|
}
|
|
5022
|
-
function $
|
|
5023
|
-
const { i18n_: i18n_ , breadcrumb_signal_: [crumb_data_] , on_category_link_click_: on_crumb_click_ } = $
|
|
5024
|
-
return (0, $g9l4l$createComponent)($
|
|
5028
|
+
function $ec52ef1e6c117813$export$5b7c3ce0ebe51f86({ depict_category: depict_category }) {
|
|
5029
|
+
const { i18n_: i18n_ , breadcrumb_signal_: [crumb_data_] , on_category_link_click_: on_crumb_click_ } = $ec52ef1e6c117813$var$get_shared_properties(depict_category);
|
|
5030
|
+
return (0, $g9l4l$createComponent)($ec52ef1e6c117813$var$InExternalAreaDiv, {
|
|
5025
5031
|
get children () {
|
|
5026
5032
|
return (0, $1b5a927e48d892a1$export$5646050d516e06bc)({
|
|
5027
5033
|
i18n_: i18n_,
|
|
@@ -5031,9 +5037,9 @@ function $a45c51e5e7aeb7f1$export$5b7c3ce0ebe51f86({ depict_category: depict_cat
|
|
|
5031
5037
|
}
|
|
5032
5038
|
});
|
|
5033
5039
|
}
|
|
5034
|
-
function $
|
|
5035
|
-
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , on_category_link_click_: on_link_click_ , slider_arrow_button_: slider_arrow_button_ } = $
|
|
5036
|
-
return (0, $g9l4l$createComponent)($
|
|
5040
|
+
function $ec52ef1e6c117813$export$de035477d6fef996({ depict_category: depict_category }) {
|
|
5041
|
+
const { i18n_: i18n_ , quicklinks_signal_: [quicklinks_data_] , breadcrumb_signal_: [breadcrumb_data_] , on_category_link_click_: on_link_click_ , slider_arrow_button_: slider_arrow_button_ } = $ec52ef1e6c117813$var$get_shared_properties(depict_category);
|
|
5042
|
+
return (0, $g9l4l$createComponent)($ec52ef1e6c117813$var$InExternalAreaDiv, {
|
|
5037
5043
|
get children () {
|
|
5038
5044
|
return (0, $6af87e1502f04aa3$export$466cdc317043f6cb)({
|
|
5039
5045
|
i18n_: i18n_,
|
|
@@ -5046,8 +5052,8 @@ function $a45c51e5e7aeb7f1$export$de035477d6fef996({ depict_category: depict_cat
|
|
|
5046
5052
|
}
|
|
5047
5053
|
});
|
|
5048
5054
|
}
|
|
5049
|
-
function $
|
|
5050
|
-
const shared_properties = $
|
|
5055
|
+
function $ec52ef1e6c117813$var$get_shared_properties(depict_category) {
|
|
5056
|
+
const shared_properties = $ec52ef1e6c117813$var$privately_shared_properties.get(depict_category);
|
|
5051
5057
|
if (!shared_properties) throw new Error("Can't connect to provided DepictCategory instance");
|
|
5052
5058
|
return shared_properties;
|
|
5053
5059
|
}
|
|
@@ -7306,13 +7312,14 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
|
|
|
7306
7312
|
|
|
7307
7313
|
|
|
7308
7314
|
|
|
7309
|
-
|
|
7315
|
+
|
|
7316
|
+
const $540e930c58500cbe$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict plp search"></div>`, 2);
|
|
7310
7317
|
/**
|
|
7311
7318
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
7312
|
-
*/ const $
|
|
7313
|
-
const $
|
|
7314
|
-
const $
|
|
7315
|
-
class $
|
|
7319
|
+
*/ const $540e930c58500cbe$var$privately_shared_properties = /*@__PURE__*/ new WeakMap();
|
|
7320
|
+
const $540e930c58500cbe$var$min_products_to_fetch_ = 20;
|
|
7321
|
+
const $540e930c58500cbe$export$bde3eb976dfded9 = (depict_search)=>$540e930c58500cbe$var$privately_shared_properties.get(depict_search)?.search_query_updating_blocked_;
|
|
7322
|
+
class $540e930c58500cbe$export$ac6237957a15b3f0 {
|
|
7316
7323
|
#locale_signal = (0, $g9l4l$createSignal)();
|
|
7317
7324
|
#merchant_signal = (0, $g9l4l$createSignal)();
|
|
7318
7325
|
#market_signal = (0, $g9l4l$createSignal)();
|
|
@@ -7320,7 +7327,7 @@ class $082017ac4cf9f917$export$ac6237957a15b3f0 {
|
|
|
7320
7327
|
static #has_been_constructed = false;
|
|
7321
7328
|
constructor({ search_query_url_param_name: search_query_url_param_name = "search_query" , url_transformer: url_transformer , on_navigation: raw_on_navigation , enable_category_suggestions: enable_category_suggestions = true , disable_scrolling_during_modal: // Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
7322
7329
|
disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal_: bottom_distance_under_modal_ , render_instant_card: render_instant_card , ...props_on_class }){
|
|
7323
|
-
if ($
|
|
7330
|
+
if ($540e930c58500cbe$export$ac6237957a15b3f0.#has_been_constructed) throw new Error("You can only have one instance of DepictSearch");
|
|
7324
7331
|
Object.assign(this, props_on_class);
|
|
7325
7332
|
const on_navigation = raw_on_navigation && ((href)=>{
|
|
7326
7333
|
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
@@ -7385,7 +7392,7 @@ class $082017ac4cf9f917$export$ac6237957a15b3f0 {
|
|
|
7385
7392
|
const [, set_search_query_signal] = search_query_signal_; // this signal won't get written from anywhere, see url_params_to_signals JSDoc
|
|
7386
7393
|
if (!get_search_query_updating_blocked()) set_search_query_signal(get_raw_search_query_signal());
|
|
7387
7394
|
});
|
|
7388
|
-
$
|
|
7395
|
+
$540e930c58500cbe$var$privately_shared_properties.set(this, {
|
|
7389
7396
|
search_query_url_param_name_: search_query_url_param_name,
|
|
7390
7397
|
reset_history_state_: reset_history_state_,
|
|
7391
7398
|
state_: state_,
|
|
@@ -7421,7 +7428,7 @@ class $082017ac4cf9f917$export$ac6237957a15b3f0 {
|
|
|
7421
7428
|
navigate_page_to_href_: on_navigation,
|
|
7422
7429
|
on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
|
|
7423
7430
|
instant_results_options_: {
|
|
7424
|
-
min_products_to_fetch_: $
|
|
7431
|
+
min_products_to_fetch_: $540e930c58500cbe$var$min_products_to_fetch_,
|
|
7425
7432
|
render_instant_card_: render_instant_card,
|
|
7426
7433
|
render_instant_card_placeholder_: (0, $aaacfac0064e97d9$export$ee1733d9a8495996),
|
|
7427
7434
|
has_sort_or_filters_: (0, $g9l4l$createMemo)(()=>!!(Object.keys(state_.search_selected_filters[0]())?.length || state_.search_sorting[0]()))
|
|
@@ -7441,7 +7448,7 @@ class $082017ac4cf9f917$export$ac6237957a15b3f0 {
|
|
|
7441
7448
|
close_modal_();
|
|
7442
7449
|
return;
|
|
7443
7450
|
}
|
|
7444
|
-
const { search_page_aligned_modal_body_style_signal_: search_page_aligned_modal_body_style_signal_ } = $
|
|
7451
|
+
const { search_page_aligned_modal_body_style_signal_: search_page_aligned_modal_body_style_signal_ } = $540e930c58500cbe$var$privately_shared_properties.get(this);
|
|
7445
7452
|
if (signal_value_is_options && open_signal_value[0]?.style_props_) {
|
|
7446
7453
|
// They know what they're doing, just call the modal with the provided options
|
|
7447
7454
|
open_modal_(...open_signal_value);
|
|
@@ -7491,7 +7498,7 @@ class $082017ac4cf9f917$export$ac6237957a15b3f0 {
|
|
|
7491
7498
|
if (owner != null) (0, $g9l4l$runWithOwner)(owner, ()=>(0, $g9l4l$createComputed)(computation));
|
|
7492
7499
|
else (0, $g9l4l$createComputed)(computation);
|
|
7493
7500
|
})();
|
|
7494
|
-
$
|
|
7501
|
+
$540e930c58500cbe$export$ac6237957a15b3f0.#has_been_constructed = true;
|
|
7495
7502
|
}
|
|
7496
7503
|
get localization() {
|
|
7497
7504
|
// allow reactive access
|
|
@@ -7519,20 +7526,20 @@ class $082017ac4cf9f917$export$ac6237957a15b3f0 {
|
|
|
7519
7526
|
this.#market_signal[1](market);
|
|
7520
7527
|
}
|
|
7521
7528
|
}
|
|
7522
|
-
function $
|
|
7523
|
-
const shared_properties = $
|
|
7529
|
+
function $540e930c58500cbe$var$get_shared_properties(depict_search) {
|
|
7530
|
+
const shared_properties = $540e930c58500cbe$var$privately_shared_properties.get(depict_search);
|
|
7524
7531
|
if (!shared_properties) throw new Error("Can't connect to provided DepictSearch instance");
|
|
7525
7532
|
return shared_properties;
|
|
7526
7533
|
}
|
|
7527
|
-
function $
|
|
7528
|
-
const shared_properties = $
|
|
7534
|
+
function $540e930c58500cbe$export$f2dc7e4e4aa11abb({ depict_search: depict_search , include_input_field: include_input_field , grid_spacing: grid_spacing , cols_at_size: cols_at_size , product_card_template: product_card_template , get_product_id: get_product_id = (0, $g9l4l$normal_get_product_id) , extra_depict_options: extra_depict_options }) {
|
|
7535
|
+
const shared_properties = $540e930c58500cbe$var$get_shared_properties(depict_search);
|
|
7529
7536
|
const grid_spacing_override = typeof grid_spacing === "string" ? {
|
|
7530
7537
|
grid_spacing: grid_spacing
|
|
7531
7538
|
} : {
|
|
7532
7539
|
override_vertical_spacing: grid_spacing.vertical,
|
|
7533
7540
|
grid_spacing: grid_spacing.horizontal
|
|
7534
7541
|
};
|
|
7535
|
-
return (0, $
|
|
7542
|
+
return (0, $c7f938ac40924f3b$export$23fca46f3143581f)(()=>{
|
|
7536
7543
|
const { state_: state_ } = shared_properties;
|
|
7537
7544
|
(0, $g9l4l$onCleanup)(shared_properties.reset_history_state_);
|
|
7538
7545
|
return (0, $b76e8f62b1f313ef$export$a54ec244c8863715)({
|
|
@@ -7540,7 +7547,7 @@ function $082017ac4cf9f917$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7540
7547
|
tenant_: ()=>depict_search.merchant,
|
|
7541
7548
|
market_: ()=>depict_search.market,
|
|
7542
7549
|
depict_api_: shared_properties.depict_api_,
|
|
7543
|
-
min_products_to_fetch_: $
|
|
7550
|
+
min_products_to_fetch_: $540e930c58500cbe$var$min_products_to_fetch_,
|
|
7544
7551
|
local_filter_cache_: state_.search_local_filter_cache,
|
|
7545
7552
|
search_field_value_: state_.search_field_value,
|
|
7546
7553
|
search_query_: shared_properties.search_query_signal_,
|
|
@@ -7549,16 +7556,16 @@ function $082017ac4cf9f917$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7549
7556
|
submit_query_: shared_properties.configured_submit_query_,
|
|
7550
7557
|
i18n_: shared_properties.i18n_,
|
|
7551
7558
|
modal_body_style_ref_: (style)=>{
|
|
7552
|
-
const shared_info_right_now = $
|
|
7559
|
+
const shared_info_right_now = $540e930c58500cbe$var$privately_shared_properties.get(depict_search);
|
|
7553
7560
|
if (!shared_info_right_now) return;
|
|
7554
|
-
$
|
|
7561
|
+
$540e930c58500cbe$var$privately_shared_properties.set(depict_search, {
|
|
7555
7562
|
...shared_info_right_now,
|
|
7556
7563
|
search_page_aligned_modal_body_style_signal_: style
|
|
7557
7564
|
});
|
|
7558
7565
|
(0, $g9l4l$onCleanup)(()=>{
|
|
7559
|
-
const shared_info_right_now = $
|
|
7566
|
+
const shared_info_right_now = $540e930c58500cbe$var$privately_shared_properties.get(depict_search);
|
|
7560
7567
|
if (!shared_info_right_now || shared_info_right_now.search_page_aligned_modal_body_style_signal_ !== style) return;
|
|
7561
|
-
$
|
|
7568
|
+
$540e930c58500cbe$var$privately_shared_properties.set(depict_search, {
|
|
7562
7569
|
...shared_info_right_now,
|
|
7563
7570
|
search_page_aligned_modal_body_style_signal_: undefined
|
|
7564
7571
|
});
|
|
@@ -7592,10 +7599,7 @@ function $082017ac4cf9f917$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7592
7599
|
width_: 6.46
|
|
7593
7600
|
}),
|
|
7594
7601
|
rr_options_: {
|
|
7595
|
-
template:
|
|
7596
|
-
const is_placeholder = info.rendering_options.type === "placeholder";
|
|
7597
|
-
return product_card_template(is_placeholder ? null : display, info);
|
|
7598
|
-
},
|
|
7602
|
+
template: product_card_template,
|
|
7599
7603
|
pre_processors: extra_depict_options?.pre_processors,
|
|
7600
7604
|
post_processors: extra_depict_options?.post_processors
|
|
7601
7605
|
},
|
|
@@ -7603,9 +7607,9 @@ function $082017ac4cf9f917$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
|
|
|
7603
7607
|
});
|
|
7604
7608
|
}, "Entire SearchPage failed");
|
|
7605
7609
|
}
|
|
7606
|
-
function $
|
|
7607
|
-
const shared_properties = $
|
|
7608
|
-
return (0, $
|
|
7610
|
+
function $540e930c58500cbe$export$b94867ecbd698f21({ depict_search: depict_search , modal_dispose_handler: modal_dispose_handler , click_handler: click_handler , aligner_ref: aligner_ref }) {
|
|
7611
|
+
const shared_properties = $540e930c58500cbe$var$get_shared_properties(depict_search);
|
|
7612
|
+
return (0, $c7f938ac40924f3b$export$23fca46f3143581f)(()=>{
|
|
7609
7613
|
const input = (0, $g9l4l$createComponent)((0, $3a2af5e36c43cf2f$export$ff21851bb5d30e15), {
|
|
7610
7614
|
get search_query_ () {
|
|
7611
7615
|
return shared_properties.search_query_signal_;
|
|
@@ -7639,10 +7643,23 @@ function $082017ac4cf9f917$export$b94867ecbd698f21({ depict_search: depict_searc
|
|
|
7639
7643
|
const style_props_ = (0, $g9l4l$createSignal)({
|
|
7640
7644
|
position: "fixed"
|
|
7641
7645
|
});
|
|
7642
|
-
(
|
|
7646
|
+
if (aligner_ref) {
|
|
7647
|
+
const style_element = document.createElement("style");
|
|
7648
|
+
document.head.append(style_element);
|
|
7649
|
+
const resize_observer = new ResizeObserver((0, $g9l4l$catchify)(()=>{
|
|
7650
|
+
const styles = (0, $246aa49a8f85c7f3$export$1233ca167bf71f9a)({
|
|
7651
|
+
".depict.plp .depict-search-modal .query-input": {
|
|
7652
|
+
"height": `${aligner_ref?.clientHeight}px`
|
|
7653
|
+
}
|
|
7654
|
+
});
|
|
7655
|
+
style_element.replaceChildren(styles);
|
|
7656
|
+
}));
|
|
7657
|
+
resize_observer.observe(aligner_ref);
|
|
7658
|
+
(0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, aligner_ref, undefined, false, "top");
|
|
7659
|
+
} else (0, $079defea521d5e2a$export$b3ad617e9036868)(style_props_, input);
|
|
7643
7660
|
return [
|
|
7644
7661
|
(()=>{
|
|
7645
|
-
const _el$ = $
|
|
7662
|
+
const _el$ = $540e930c58500cbe$var$_tmpl$.cloneNode(true);
|
|
7646
7663
|
(0, $g9l4l$insert)(_el$, input);
|
|
7647
7664
|
(0, $g9l4l$effect)(()=>(0, $g9l4l$setAttribute)(_el$, "id", (0, $01115659405f3c64$export$44dad306455dddf).SEARCH_MODAL));
|
|
7648
7665
|
return _el$;
|
|
@@ -7810,4 +7827,4 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7810
7827
|
(0, $g9l4l$dlog)("@depict-ai/ui version", (0, $18bf1d29fb889cca$export$83d89fbfd8236492));
|
|
7811
7828
|
|
|
7812
7829
|
|
|
7813
|
-
export {$
|
|
7830
|
+
export {$e95f1855a5e3864f$export$58e808b1db15d3bc as fetchDepictRecommendations, $ec52ef1e6c117813$export$de035477d6fef996 as QuickLinks, $ec52ef1e6c117813$export$5b7c3ce0ebe51f86 as BreadCrumbs, $6340962f8bafd049$export$b91cec6bdc6b32a1 as CategoryTitle, $9b693ea3ff420de6$export$824dde41348efed1 as embedded_num_products, $80a49d3809ecb080$export$643598a327b5833e as get_categories, $ec52ef1e6c117813$export$f34314aa9505732e as DepictCategory, $ec52ef1e6c117813$export$e2bf8ce7779e827e as CategoryPage, $540e930c58500cbe$export$ac6237957a15b3f0 as DepictSearch, $540e930c58500cbe$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $540e930c58500cbe$export$f2dc7e4e4aa11abb as SearchPage, $540e930c58500cbe$export$b94867ecbd698f21 as SearchField, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $246aa49a8f85c7f3$export$1233ca167bf71f9a as styles_to_valid_css_string, $a1123c5ed9b0ee29$export$fe334901e8bebd57 as disable_scrolling, $a3e81b85527bc866$export$d0596b5cae35ad4 as open_search_with_shift_slash, $972ebf2641490830$export$26df08e242fe83a3 as push_state_with_query_param_value, $3846bb34098c738f$export$e015ed2f2950f2e3 as DepictAPI, $f22123a20b6b80b3$export$2cefb7e61fcbae00 as add_to_version_info, $fefe7683325039b3$export$d9f36cf74e24d595 as media_query_to_accessor, $36316d7b4c897a03$export$689e204eadb33baf as setup_fast_leave, $886fa987db4f3805$export$5196e4c01fa56fcb as show_toast, $5178263ed1e394ca$export$469c7af753d08925 as solid_format_price, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": [
|
|
6
6
|
"src/index.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"ts-jest": "^29.0.3"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@depict-ai/utilishared": "^0.0.
|
|
85
|
+
"@depict-ai/utilishared": "^0.0.35",
|
|
86
86
|
"solid-js": "^1.6.2"
|
|
87
87
|
},
|
|
88
88
|
"types": "dist/index.d.ts"
|