@depict-ai/ui 0.0.8 → 0.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 +4 -0
- package/dist/main.js +73 -11
- package/dist/module.js +72 -12
- package/package.json +4 -4
- 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
|
@@ -34,6 +34,10 @@ export const embedded_num_products: ({ make_product_count_, set_observed_results
|
|
|
34
34
|
middle_elements_: Accessor<JSX.Element>;
|
|
35
35
|
on_filters_constructed_: () => void;
|
|
36
36
|
};
|
|
37
|
+
export const version = "0.0.10";
|
|
38
|
+
export function add_to_version_info(stuff_to_add: {
|
|
39
|
+
[key: string]: string;
|
|
40
|
+
}): void;
|
|
37
41
|
export class DepictAPI {
|
|
38
42
|
#private;
|
|
39
43
|
constructor(get_metadata?: () => Promise<{
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var $iBTHO$solidjsweb = require("solid-js/web");
|
|
2
1
|
var $iBTHO$depictaiutilishared = require("@depict-ai/utilishared");
|
|
2
|
+
var $iBTHO$solidjsweb = require("solid-js/web");
|
|
3
3
|
var $iBTHO$solidjs = require("solid-js");
|
|
4
4
|
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
@@ -51,6 +51,9 @@ $parcel$export(module.exports, "DepictSearch", () => $fd2d5ef67fc09716$export$ac
|
|
|
51
51
|
$parcel$export(module.exports, "SearchPage", () => $fd2d5ef67fc09716$export$f2dc7e4e4aa11abb);
|
|
52
52
|
$parcel$export(module.exports, "SearchField", () => $fd2d5ef67fc09716$export$b94867ecbd698f21);
|
|
53
53
|
$parcel$export(module.exports, "get_search_query_updating_blocked_signal", () => $fd2d5ef67fc09716$export$bde3eb976dfded9);
|
|
54
|
+
$parcel$export(module.exports, "add_to_version_info", () => $770e2bea06889bf6$export$2cefb7e61fcbae00);
|
|
55
|
+
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
56
|
+
/*! Depict.ai search and product listing SDK */
|
|
54
57
|
|
|
55
58
|
|
|
56
59
|
|
|
@@ -165,6 +168,17 @@ const $93e94e7b0aa8ca88$export$824dde41348efed1 = /*@__PURE__*/ (()=>{
|
|
|
165
168
|
|
|
166
169
|
|
|
167
170
|
|
|
171
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "0.0.10";
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Adds things to the object we send to backend as a header to report the package versions used
|
|
176
|
+
*/ const $770e2bea06889bf6$export$89a2f5e6eb5005b6 = {};
|
|
177
|
+
function $770e2bea06889bf6$export$2cefb7e61fcbae00(stuff_to_add) {
|
|
178
|
+
Object.assign($770e2bea06889bf6$export$89a2f5e6eb5005b6, stuff_to_add);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
168
182
|
const $e1d6c0f3d89d531c$var$v2_base_url = (0, $iBTHO$depictaiutilishared.base_url) + "/v2/";
|
|
169
183
|
const $e1d6c0f3d89d531c$var$search_base_url = $e1d6c0f3d89d531c$var$v2_base_url + "search/";
|
|
170
184
|
const $e1d6c0f3d89d531c$var$add_ids_to_request = (input_req)=>{
|
|
@@ -200,9 +214,7 @@ class $e1d6c0f3d89d531c$export$e015ed2f2950f2e3 {
|
|
|
200
214
|
const results = await (0, $iBTHO$depictaiutilishared.fetch_retry)(url, {
|
|
201
215
|
headers: {
|
|
202
216
|
"Content-Type": "text/plain",
|
|
203
|
-
|
|
204
|
-
"X-DEBUG": "true"
|
|
205
|
-
} : {}
|
|
217
|
+
...$e1d6c0f3d89d531c$var$get_version_headers()
|
|
206
218
|
}
|
|
207
219
|
});
|
|
208
220
|
attempt_to_return_api_response: {
|
|
@@ -233,7 +245,8 @@ class $e1d6c0f3d89d531c$export$e015ed2f2950f2e3 {
|
|
|
233
245
|
try {
|
|
234
246
|
const search_results = await (0, $iBTHO$depictaiutilishared.fetch_retry)(endpoint1, {
|
|
235
247
|
headers: {
|
|
236
|
-
"Content-Type": "text/plain"
|
|
248
|
+
"Content-Type": "text/plain",
|
|
249
|
+
...$e1d6c0f3d89d531c$var$get_version_headers()
|
|
237
250
|
},
|
|
238
251
|
method: "POST",
|
|
239
252
|
body: body
|
|
@@ -248,7 +261,7 @@ class $e1d6c0f3d89d531c$export$e015ed2f2950f2e3 {
|
|
|
248
261
|
resolve_in_progress(result);
|
|
249
262
|
setTimeout((0, $iBTHO$depictaiutilishared.catchify)(()=>{
|
|
250
263
|
if (this.#supports_finalization_registry) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
251
|
-
else // delete things from cache after 5 minutes so it doesn't get too heavy
|
|
264
|
+
else // delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
252
265
|
setTimeout((0, $iBTHO$depictaiutilishared.catchify)(()=>delete cache_obj.cache_[body]), 300000);
|
|
253
266
|
}), 30000 // cache values for at least 30 seconds
|
|
254
267
|
);
|
|
@@ -285,6 +298,15 @@ class $e1d6c0f3d89d531c$export$e015ed2f2950f2e3 {
|
|
|
285
298
|
}));
|
|
286
299
|
}
|
|
287
300
|
}
|
|
301
|
+
function $e1d6c0f3d89d531c$var$get_version_headers() {
|
|
302
|
+
return {
|
|
303
|
+
Versions: JSON.stringify({
|
|
304
|
+
...(0, $770e2bea06889bf6$export$89a2f5e6eb5005b6),
|
|
305
|
+
"@depict-ai/utilishared": (0, $iBTHO$depictaiutilishared.version),
|
|
306
|
+
"@depict-ai/ui": (0, $b757f75811f3261f$export$83d89fbfd8236492)
|
|
307
|
+
})
|
|
308
|
+
};
|
|
309
|
+
}
|
|
288
310
|
|
|
289
311
|
|
|
290
312
|
|
|
@@ -5961,7 +5983,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5961
5983
|
get_breadcrumb_accessor_?.(crumb_data_);
|
|
5962
5984
|
get_quicklinks_accessor_?.(quicklinks_data_);
|
|
5963
5985
|
return [
|
|
5964
|
-
document.createComment("
|
|
5986
|
+
document.createComment("Category page based on Depict SDK"),
|
|
5965
5987
|
(()=>{
|
|
5966
5988
|
const _el$5 = $840d88a04b2d22a7$var$_tmpl$4.cloneNode(true), _el$6 = _el$5.firstChild;
|
|
5967
5989
|
(0, $iBTHO$solidjsweb.insert)(_el$6, (0, $iBTHO$solidjsweb.createComponent)((0, $iBTHO$solidjs.Show), {
|
|
@@ -6346,7 +6368,6 @@ function $2f8c7dc07090fca9$export$ff21851bb5d30e15({ search_field_value_: search
|
|
|
6346
6368
|
once: true
|
|
6347
6369
|
});
|
|
6348
6370
|
}
|
|
6349
|
-
(0, $iBTHO$depictaiutilishared.dlog)("select", e);
|
|
6350
6371
|
}));
|
|
6351
6372
|
(0, $iBTHO$solidjsweb.addEventListener)(_el$4, "input", (0, $iBTHO$depictaiutilishared.catchify)(()=>{
|
|
6352
6373
|
const { value: value } = input_field;
|
|
@@ -6672,7 +6693,6 @@ function $b7d0212db218bf0b$export$2542ffb77b620b02(params_to_default_value) {
|
|
|
6672
6693
|
|
|
6673
6694
|
|
|
6674
6695
|
|
|
6675
|
-
|
|
6676
6696
|
|
|
6677
6697
|
|
|
6678
6698
|
const $6ae613870d3380fc$var$_tmpl$ = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<span class="orig price"></span>`, 2), $6ae613870d3380fc$var$_tmpl$2 = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<a class="instant-card"><div class="img-part"></div><div class="right-part"><div class="title-brand-tagline"><span class="brand"></span><span class="title"></span></div><div class="price-container"><span class="price"></span></div></div></a>`, 16), $6ae613870d3380fc$var$_tmpl$3 = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<div class="tagline"></div>`, 2);
|
|
@@ -7642,6 +7662,30 @@ function $036d367ce3058351$export$3340fdd8259bd4fd({ get_search_field_value_: ge
|
|
|
7642
7662
|
|
|
7643
7663
|
|
|
7644
7664
|
|
|
7665
|
+
|
|
7666
|
+
|
|
7667
|
+
const $f978ab22f3df4bd7$export$af8311b651139246 = (css_properties)=>{
|
|
7668
|
+
return Object.entries(css_properties).map(([key, value])=>`${key}: ${value};`).join(" ");
|
|
7669
|
+
};
|
|
7670
|
+
const $f978ab22f3df4bd7$export$1233ca167bf71f9a = (styles)=>{
|
|
7671
|
+
return Object.entries(styles).map(([selector, css_properties])=>`${selector} { ${$f978ab22f3df4bd7$export$af8311b651139246(css_properties)} }`).join(" ");
|
|
7672
|
+
};
|
|
7673
|
+
|
|
7674
|
+
|
|
7675
|
+
|
|
7676
|
+
const $b776f25acdda22eb$var$_tmpl$ = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<style></style>`, 2);
|
|
7677
|
+
function $b776f25acdda22eb$export$f021bdedd3ec901a(props) {
|
|
7678
|
+
const valid_css_string = (0, $iBTHO$solidjs.createMemo)(()=>{
|
|
7679
|
+
return (0, $f978ab22f3df4bd7$export$1233ca167bf71f9a)(props.styles());
|
|
7680
|
+
});
|
|
7681
|
+
return (()=>{
|
|
7682
|
+
const _el$ = $b776f25acdda22eb$var$_tmpl$.cloneNode(true);
|
|
7683
|
+
(0, $iBTHO$solidjsweb.insert)(_el$, valid_css_string);
|
|
7684
|
+
return _el$;
|
|
7685
|
+
})();
|
|
7686
|
+
}
|
|
7687
|
+
|
|
7688
|
+
|
|
7645
7689
|
const $f40a47a30a358305$var$_tmpl$ = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<div class="discover-more"><button class="major" type="button"></button></div>`, 4), $f40a47a30a358305$var$_tmpl$2 = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<b></b>`, 2), $f40a47a30a358305$var$_tmpl$3 = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<div class="depict-search-modal"><div class="body"><div class="padded"></div></div></div>`, 6), $f40a47a30a358305$var$_tmpl$4 = /*#__PURE__*/ (0, $iBTHO$solidjsweb.template)(`<div class="depict plp search"><div class="depict-search-modal-backdrop"></div></div>`, 4);
|
|
7646
7690
|
function $f40a47a30a358305$export$1c593cbd6f1e10bc({ search_field_value_: search_field_value_ , search_query_: search_query_ , search_page_url_param_name_: search_page_url_param_name_ , previous_searches_: previous_searches_ , close_modal_: close_modal_ , style_props_: style_props_ = (0, $iBTHO$solidjs.createSignal)({}) , depict_api_: depict_api_ , tenant_: tenant_ , market_: market_ , submit_query_: submit_query_ , instant_results_options_: instant_results_options_ , register_closing_animation_: register_closing_animation_ , url_transformer_: url_transformer_ , closing_animation_: closing_animation_ , alternative_query_submitter_for_spas_: alternative_query_submitter_for_spas_ , clear_filters_: clear_filters_ , i18n_: i18n_ , disable_scrolling_: disable_scrolling_ = true , enable_category_suggestions_: enable_category_suggestions_ , class_list_: class_list_ , after_submit_: after_submit_ , bottom_distance_under_modal_: bottom_distance_under_modal_ , navigate_page_to_href_: navigate_page_to_href_ , on_submit_with_unchanged_value_: on_submit_with_unchanged_value_ }) {
|
|
7647
7691
|
let on_enter_in_query_input_function;
|
|
@@ -7684,6 +7728,16 @@ function $f40a47a30a358305$export$1c593cbd6f1e10bc({ search_field_value_: search
|
|
|
7684
7728
|
search_page_url_param_name_: search_page_url_param_name_,
|
|
7685
7729
|
get_search_query_: search_query_[0]
|
|
7686
7730
|
});
|
|
7731
|
+
const random_classname = (0, $iBTHO$depictaiutilishared.make_random_classname)();
|
|
7732
|
+
const body_style = (0, $iBTHO$solidjs.createMemo)(()=>{
|
|
7733
|
+
const style_obj = {
|
|
7734
|
+
width: "80vw",
|
|
7735
|
+
...style_props_[0]()
|
|
7736
|
+
};
|
|
7737
|
+
return {
|
|
7738
|
+
[`.depict .${random_classname}`]: style_obj
|
|
7739
|
+
};
|
|
7740
|
+
});
|
|
7687
7741
|
const modal_element = (()=>{
|
|
7688
7742
|
const _el$4 = $f40a47a30a358305$var$_tmpl$3.cloneNode(true), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
7689
7743
|
(0, $iBTHO$solidjsweb.addEventListener)(_el$4, "click", (0, $iBTHO$depictaiutilishared.catchify)(({ target: target })=>{
|
|
@@ -7746,7 +7800,12 @@ function $f40a47a30a358305$export$1c593cbd6f1e10bc({ search_field_value_: search
|
|
|
7746
7800
|
}), null);
|
|
7747
7801
|
(0, $iBTHO$solidjsweb.insert)(_el$6, elements_inside_scrollable, null);
|
|
7748
7802
|
(0, $iBTHO$solidjsweb.insert)(_el$5, elements_outside_scrollable, null);
|
|
7749
|
-
(0, $iBTHO$solidjsweb.
|
|
7803
|
+
(0, $iBTHO$solidjsweb.insert)(_el$4, (0, $iBTHO$solidjsweb.createComponent)((0, $b776f25acdda22eb$export$f021bdedd3ec901a), {
|
|
7804
|
+
styles: body_style
|
|
7805
|
+
}), null);
|
|
7806
|
+
(0, $iBTHO$solidjsweb.effect)((_$p)=>(0, $iBTHO$solidjsweb.classList)(_el$5, {
|
|
7807
|
+
[random_classname]: true
|
|
7808
|
+
}, _$p));
|
|
7750
7809
|
return _el$4;
|
|
7751
7810
|
})();
|
|
7752
7811
|
return [
|
|
@@ -8050,7 +8109,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715(opts) {
|
|
|
8050
8109
|
tenant_object_.market = tenant_object_.MARKET = market_();
|
|
8051
8110
|
});
|
|
8052
8111
|
return [
|
|
8053
|
-
document.createComment("
|
|
8112
|
+
document.createComment("Search page based on Depict SDK"),
|
|
8054
8113
|
(()=>{
|
|
8055
8114
|
const _el$2 = $f1d7cb69f839a526$var$_tmpl$2.cloneNode(true), _el$3 = _el$2.firstChild;
|
|
8056
8115
|
(0, $iBTHO$solidjsweb.insert)(_el$3, input_field, null);
|
|
@@ -8585,3 +8644,6 @@ function $fd2d5ef67fc09716$var$run_in_root_or_auto_cleanup(component, error_mess
|
|
|
8585
8644
|
|
|
8586
8645
|
|
|
8587
8646
|
|
|
8647
|
+
(0, $iBTHO$depictaiutilishared.dlog)("@depict-ai/ui version", (0, $b757f75811f3261f$export$83d89fbfd8236492));
|
|
8648
|
+
|
|
8649
|
+
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import {dlog as $kyEB6$dlog, Placeholder as $kyEB6$Placeholder, catchify as $kyEB6$catchify, base_url as $kyEB6$base_url, get_depict_id as $kyEB6$get_depict_id, get_user_id as $kyEB6$get_user_id, get_session_id as $kyEB6$get_session_id, make_url_with_query_params as $kyEB6$make_url_with_query_params, fetch_retry as $kyEB6$fetch_retry, sort_obj as $kyEB6$sort_obj, version as $kyEB6$version, observer as $kyEB6$observer, report as $kyEB6$report, ContainedPlaceholderImage as $kyEB6$ContainedPlaceholderImage, javascript_media_query as $kyEB6$javascript_media_query, href_change_ipns as $kyEB6$href_change_ipns, standard_price_format as $kyEB6$standard_price_format, deparallelize as $kyEB6$deparallelize, make_asyncIterable_exiter as $kyEB6$make_asyncIterable_exiter, insert_surfaces as $kyEB6$insert_surfaces, Tenant as $kyEB6$Tenant, deparallelize_no_drop as $kyEB6$deparallelize_no_drop, default_rr as $kyEB6$default_rr, make_random_classname as $kyEB6$make_random_classname, n_col_styling_with_dist as $kyEB6$n_col_styling_with_dist, Lazyfier as $kyEB6$Lazyfier, queueMacroTask as $kyEB6$queueMacroTask, Rec_Renderer as $kyEB6$Rec_Renderer, CrossIcon as $kyEB6$CrossIcon, useExpandingContainer as $kyEB6$useExpandingContainer, Amazing_Slider as $kyEB6$Amazing_Slider, slider_snap_css as $kyEB6$slider_snap_css, slider_fading_factory as $kyEB6$slider_fading_factory, MinusIcon as $kyEB6$MinusIcon, FilterIcon as $kyEB6$FilterIcon, SortIconAsc as $kyEB6$SortIconAsc, SortIconDesc as $kyEB6$SortIconDesc, PlusIcon as $kyEB6$PlusIcon, TickIcon as $kyEB6$TickIcon, ArrowUp as $kyEB6$ArrowUp, normal_get_product_id as $kyEB6$normal_get_product_id, GenericSliderArrowButton as $kyEB6$GenericSliderArrowButton, BackIcon as $kyEB6$BackIcon, SearchIcon as $kyEB6$SearchIcon, Layout as $kyEB6$Layout, make_placeholder_rr as $kyEB6$make_placeholder_rr, async_iterable_ipns as $kyEB6$async_iterable_ipns, depict_click as $kyEB6$depict_click, impression_track_element as $kyEB6$impression_track_element, add_new_tab_listener as $kyEB6$add_new_tab_listener, ContainedImage as $kyEB6$ContainedImage, buildThresholdList as $kyEB6$buildThresholdList, PreviousSearchIcon as $kyEB6$PreviousSearchIcon} from "@depict-ai/utilishared";
|
|
1
2
|
import {template as $kyEB6$template, insert as $kyEB6$insert, createComponent as $kyEB6$createComponent, spread as $kyEB6$spread, effect as $kyEB6$effect, setAttribute as $kyEB6$setAttribute, use as $kyEB6$use, addEventListener as $kyEB6$addEventListener, delegateEvents as $kyEB6$delegateEvents, memo as $kyEB6$memo, style as $kyEB6$style, mergeProps as $kyEB6$mergeProps, classList as $kyEB6$classList, className as $kyEB6$className} from "solid-js/web";
|
|
2
|
-
import {Placeholder as $kyEB6$Placeholder, catchify as $kyEB6$catchify, base_url as $kyEB6$base_url, get_depict_id as $kyEB6$get_depict_id, get_user_id as $kyEB6$get_user_id, get_session_id as $kyEB6$get_session_id, dlog as $kyEB6$dlog, make_url_with_query_params as $kyEB6$make_url_with_query_params, fetch_retry as $kyEB6$fetch_retry, sort_obj as $kyEB6$sort_obj, observer as $kyEB6$observer, report as $kyEB6$report, ContainedPlaceholderImage as $kyEB6$ContainedPlaceholderImage, javascript_media_query as $kyEB6$javascript_media_query, href_change_ipns as $kyEB6$href_change_ipns, standard_price_format as $kyEB6$standard_price_format, deparallelize as $kyEB6$deparallelize, make_asyncIterable_exiter as $kyEB6$make_asyncIterable_exiter, insert_surfaces as $kyEB6$insert_surfaces, Tenant as $kyEB6$Tenant, deparallelize_no_drop as $kyEB6$deparallelize_no_drop, default_rr as $kyEB6$default_rr, make_random_classname as $kyEB6$make_random_classname, n_col_styling_with_dist as $kyEB6$n_col_styling_with_dist, Lazyfier as $kyEB6$Lazyfier, queueMacroTask as $kyEB6$queueMacroTask, Rec_Renderer as $kyEB6$Rec_Renderer, CrossIcon as $kyEB6$CrossIcon, useExpandingContainer as $kyEB6$useExpandingContainer, Amazing_Slider as $kyEB6$Amazing_Slider, slider_snap_css as $kyEB6$slider_snap_css, slider_fading_factory as $kyEB6$slider_fading_factory, MinusIcon as $kyEB6$MinusIcon, FilterIcon as $kyEB6$FilterIcon, SortIconAsc as $kyEB6$SortIconAsc, SortIconDesc as $kyEB6$SortIconDesc, PlusIcon as $kyEB6$PlusIcon, TickIcon as $kyEB6$TickIcon, ArrowUp as $kyEB6$ArrowUp, normal_get_product_id as $kyEB6$normal_get_product_id, GenericSliderArrowButton as $kyEB6$GenericSliderArrowButton, BackIcon as $kyEB6$BackIcon, SearchIcon as $kyEB6$SearchIcon, Layout as $kyEB6$Layout, make_placeholder_rr as $kyEB6$make_placeholder_rr, async_iterable_ipns as $kyEB6$async_iterable_ipns, depict_click as $kyEB6$depict_click, impression_track_element as $kyEB6$impression_track_element, add_new_tab_listener as $kyEB6$add_new_tab_listener, ContainedImage as $kyEB6$ContainedImage, buildThresholdList as $kyEB6$buildThresholdList, PreviousSearchIcon as $kyEB6$PreviousSearchIcon} from "@depict-ai/utilishared";
|
|
3
3
|
import {createSignal as $kyEB6$createSignal, untrack as $kyEB6$untrack, createMemo as $kyEB6$createMemo, onCleanup as $kyEB6$onCleanup, createEffect as $kyEB6$createEffect, createComputed as $kyEB6$createComputed, createRoot as $kyEB6$createRoot, createResource as $kyEB6$createResource, Show as $kyEB6$Show, createRenderEffect as $kyEB6$createRenderEffect, runWithOwner as $kyEB6$runWithOwner, getOwner as $kyEB6$getOwner, on as $kyEB6$on, Index as $kyEB6$Index, batch as $kyEB6$batch, For as $kyEB6$For, ErrorBoundary as $kyEB6$ErrorBoundary} from "solid-js";
|
|
4
4
|
|
|
5
|
+
/*! Depict.ai search and product listing SDK */
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
@@ -116,6 +117,17 @@ const $a79d86d64fb64e8e$export$824dde41348efed1 = /*@__PURE__*/ (()=>{
|
|
|
116
117
|
|
|
117
118
|
|
|
118
119
|
|
|
120
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "0.0.10";
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Adds things to the object we send to backend as a header to report the package versions used
|
|
125
|
+
*/ const $8d80d8d4afb6dcd3$export$89a2f5e6eb5005b6 = {};
|
|
126
|
+
function $8d80d8d4afb6dcd3$export$2cefb7e61fcbae00(stuff_to_add) {
|
|
127
|
+
Object.assign($8d80d8d4afb6dcd3$export$89a2f5e6eb5005b6, stuff_to_add);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
119
131
|
const $7fa23e2a0079eca4$var$v2_base_url = (0, $kyEB6$base_url) + "/v2/";
|
|
120
132
|
const $7fa23e2a0079eca4$var$search_base_url = $7fa23e2a0079eca4$var$v2_base_url + "search/";
|
|
121
133
|
const $7fa23e2a0079eca4$var$add_ids_to_request = (input_req)=>{
|
|
@@ -151,9 +163,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
151
163
|
const results = await (0, $kyEB6$fetch_retry)(url, {
|
|
152
164
|
headers: {
|
|
153
165
|
"Content-Type": "text/plain",
|
|
154
|
-
|
|
155
|
-
"X-DEBUG": "true"
|
|
156
|
-
} : {}
|
|
166
|
+
...$7fa23e2a0079eca4$var$get_version_headers()
|
|
157
167
|
}
|
|
158
168
|
});
|
|
159
169
|
attempt_to_return_api_response: {
|
|
@@ -184,7 +194,8 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
184
194
|
try {
|
|
185
195
|
const search_results = await (0, $kyEB6$fetch_retry)(endpoint1, {
|
|
186
196
|
headers: {
|
|
187
|
-
"Content-Type": "text/plain"
|
|
197
|
+
"Content-Type": "text/plain",
|
|
198
|
+
...$7fa23e2a0079eca4$var$get_version_headers()
|
|
188
199
|
},
|
|
189
200
|
method: "POST",
|
|
190
201
|
body: body
|
|
@@ -199,7 +210,7 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
199
210
|
resolve_in_progress(result);
|
|
200
211
|
setTimeout((0, $kyEB6$catchify)(()=>{
|
|
201
212
|
if (this.#supports_finalization_registry) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
202
|
-
else // delete things from cache after 5 minutes so it doesn't get too heavy
|
|
213
|
+
else // delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
203
214
|
setTimeout((0, $kyEB6$catchify)(()=>delete cache_obj.cache_[body]), 300000);
|
|
204
215
|
}), 30000 // cache values for at least 30 seconds
|
|
205
216
|
);
|
|
@@ -236,6 +247,15 @@ class $7fa23e2a0079eca4$export$e015ed2f2950f2e3 {
|
|
|
236
247
|
}));
|
|
237
248
|
}
|
|
238
249
|
}
|
|
250
|
+
function $7fa23e2a0079eca4$var$get_version_headers() {
|
|
251
|
+
return {
|
|
252
|
+
Versions: JSON.stringify({
|
|
253
|
+
...(0, $8d80d8d4afb6dcd3$export$89a2f5e6eb5005b6),
|
|
254
|
+
"@depict-ai/utilishared": (0, $kyEB6$version),
|
|
255
|
+
"@depict-ai/ui": (0, $ec291e0010116877$export$83d89fbfd8236492)
|
|
256
|
+
})
|
|
257
|
+
};
|
|
258
|
+
}
|
|
239
259
|
|
|
240
260
|
|
|
241
261
|
|
|
@@ -5912,7 +5932,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5912
5932
|
get_breadcrumb_accessor_?.(crumb_data_);
|
|
5913
5933
|
get_quicklinks_accessor_?.(quicklinks_data_);
|
|
5914
5934
|
return [
|
|
5915
|
-
document.createComment("
|
|
5935
|
+
document.createComment("Category page based on Depict SDK"),
|
|
5916
5936
|
(()=>{
|
|
5917
5937
|
const _el$5 = $df5d81d0fe61ff21$var$_tmpl$4.cloneNode(true), _el$6 = _el$5.firstChild;
|
|
5918
5938
|
(0, $kyEB6$insert)(_el$6, (0, $kyEB6$createComponent)((0, $kyEB6$Show), {
|
|
@@ -6297,7 +6317,6 @@ function $857105c41ea47bee$export$ff21851bb5d30e15({ search_field_value_: search
|
|
|
6297
6317
|
once: true
|
|
6298
6318
|
});
|
|
6299
6319
|
}
|
|
6300
|
-
(0, $kyEB6$dlog)("select", e);
|
|
6301
6320
|
}));
|
|
6302
6321
|
(0, $kyEB6$addEventListener)(_el$4, "input", (0, $kyEB6$catchify)(()=>{
|
|
6303
6322
|
const { value: value } = input_field;
|
|
@@ -6623,7 +6642,6 @@ function $13e008d5237dbbee$export$2542ffb77b620b02(params_to_default_value) {
|
|
|
6623
6642
|
|
|
6624
6643
|
|
|
6625
6644
|
|
|
6626
|
-
|
|
6627
6645
|
|
|
6628
6646
|
|
|
6629
6647
|
const $e003be2a50d9e5bc$var$_tmpl$ = /*#__PURE__*/ (0, $kyEB6$template)(`<span class="orig price"></span>`, 2), $e003be2a50d9e5bc$var$_tmpl$2 = /*#__PURE__*/ (0, $kyEB6$template)(`<a class="instant-card"><div class="img-part"></div><div class="right-part"><div class="title-brand-tagline"><span class="brand"></span><span class="title"></span></div><div class="price-container"><span class="price"></span></div></div></a>`, 16), $e003be2a50d9e5bc$var$_tmpl$3 = /*#__PURE__*/ (0, $kyEB6$template)(`<div class="tagline"></div>`, 2);
|
|
@@ -7593,6 +7611,30 @@ function $c64d28ca12452b21$export$3340fdd8259bd4fd({ get_search_field_value_: ge
|
|
|
7593
7611
|
|
|
7594
7612
|
|
|
7595
7613
|
|
|
7614
|
+
|
|
7615
|
+
|
|
7616
|
+
const $4df637cb4cf113fa$export$af8311b651139246 = (css_properties)=>{
|
|
7617
|
+
return Object.entries(css_properties).map(([key, value])=>`${key}: ${value};`).join(" ");
|
|
7618
|
+
};
|
|
7619
|
+
const $4df637cb4cf113fa$export$1233ca167bf71f9a = (styles)=>{
|
|
7620
|
+
return Object.entries(styles).map(([selector, css_properties])=>`${selector} { ${$4df637cb4cf113fa$export$af8311b651139246(css_properties)} }`).join(" ");
|
|
7621
|
+
};
|
|
7622
|
+
|
|
7623
|
+
|
|
7624
|
+
|
|
7625
|
+
const $19f1f3e588d63502$var$_tmpl$ = /*#__PURE__*/ (0, $kyEB6$template)(`<style></style>`, 2);
|
|
7626
|
+
function $19f1f3e588d63502$export$f021bdedd3ec901a(props) {
|
|
7627
|
+
const valid_css_string = (0, $kyEB6$createMemo)(()=>{
|
|
7628
|
+
return (0, $4df637cb4cf113fa$export$1233ca167bf71f9a)(props.styles());
|
|
7629
|
+
});
|
|
7630
|
+
return (()=>{
|
|
7631
|
+
const _el$ = $19f1f3e588d63502$var$_tmpl$.cloneNode(true);
|
|
7632
|
+
(0, $kyEB6$insert)(_el$, valid_css_string);
|
|
7633
|
+
return _el$;
|
|
7634
|
+
})();
|
|
7635
|
+
}
|
|
7636
|
+
|
|
7637
|
+
|
|
7596
7638
|
const $fabfda1230351b1a$var$_tmpl$ = /*#__PURE__*/ (0, $kyEB6$template)(`<div class="discover-more"><button class="major" type="button"></button></div>`, 4), $fabfda1230351b1a$var$_tmpl$2 = /*#__PURE__*/ (0, $kyEB6$template)(`<b></b>`, 2), $fabfda1230351b1a$var$_tmpl$3 = /*#__PURE__*/ (0, $kyEB6$template)(`<div class="depict-search-modal"><div class="body"><div class="padded"></div></div></div>`, 6), $fabfda1230351b1a$var$_tmpl$4 = /*#__PURE__*/ (0, $kyEB6$template)(`<div class="depict plp search"><div class="depict-search-modal-backdrop"></div></div>`, 4);
|
|
7597
7639
|
function $fabfda1230351b1a$export$1c593cbd6f1e10bc({ search_field_value_: search_field_value_ , search_query_: search_query_ , search_page_url_param_name_: search_page_url_param_name_ , previous_searches_: previous_searches_ , close_modal_: close_modal_ , style_props_: style_props_ = (0, $kyEB6$createSignal)({}) , depict_api_: depict_api_ , tenant_: tenant_ , market_: market_ , submit_query_: submit_query_ , instant_results_options_: instant_results_options_ , register_closing_animation_: register_closing_animation_ , url_transformer_: url_transformer_ , closing_animation_: closing_animation_ , alternative_query_submitter_for_spas_: alternative_query_submitter_for_spas_ , clear_filters_: clear_filters_ , i18n_: i18n_ , disable_scrolling_: disable_scrolling_ = true , enable_category_suggestions_: enable_category_suggestions_ , class_list_: class_list_ , after_submit_: after_submit_ , bottom_distance_under_modal_: bottom_distance_under_modal_ , navigate_page_to_href_: navigate_page_to_href_ , on_submit_with_unchanged_value_: on_submit_with_unchanged_value_ }) {
|
|
7598
7640
|
let on_enter_in_query_input_function;
|
|
@@ -7635,6 +7677,16 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({ search_field_value_: search
|
|
|
7635
7677
|
search_page_url_param_name_: search_page_url_param_name_,
|
|
7636
7678
|
get_search_query_: search_query_[0]
|
|
7637
7679
|
});
|
|
7680
|
+
const random_classname = (0, $kyEB6$make_random_classname)();
|
|
7681
|
+
const body_style = (0, $kyEB6$createMemo)(()=>{
|
|
7682
|
+
const style_obj = {
|
|
7683
|
+
width: "80vw",
|
|
7684
|
+
...style_props_[0]()
|
|
7685
|
+
};
|
|
7686
|
+
return {
|
|
7687
|
+
[`.depict .${random_classname}`]: style_obj
|
|
7688
|
+
};
|
|
7689
|
+
});
|
|
7638
7690
|
const modal_element = (()=>{
|
|
7639
7691
|
const _el$4 = $fabfda1230351b1a$var$_tmpl$3.cloneNode(true), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
7640
7692
|
(0, $kyEB6$addEventListener)(_el$4, "click", (0, $kyEB6$catchify)(({ target: target })=>{
|
|
@@ -7697,7 +7749,12 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({ search_field_value_: search
|
|
|
7697
7749
|
}), null);
|
|
7698
7750
|
(0, $kyEB6$insert)(_el$6, elements_inside_scrollable, null);
|
|
7699
7751
|
(0, $kyEB6$insert)(_el$5, elements_outside_scrollable, null);
|
|
7700
|
-
(0, $kyEB6$
|
|
7752
|
+
(0, $kyEB6$insert)(_el$4, (0, $kyEB6$createComponent)((0, $19f1f3e588d63502$export$f021bdedd3ec901a), {
|
|
7753
|
+
styles: body_style
|
|
7754
|
+
}), null);
|
|
7755
|
+
(0, $kyEB6$effect)((_$p)=>(0, $kyEB6$classList)(_el$5, {
|
|
7756
|
+
[random_classname]: true
|
|
7757
|
+
}, _$p));
|
|
7701
7758
|
return _el$4;
|
|
7702
7759
|
})();
|
|
7703
7760
|
return [
|
|
@@ -8001,7 +8058,7 @@ function $7097477c78a89208$export$a54ec244c8863715(opts) {
|
|
|
8001
8058
|
tenant_object_.market = tenant_object_.MARKET = market_();
|
|
8002
8059
|
});
|
|
8003
8060
|
return [
|
|
8004
|
-
document.createComment("
|
|
8061
|
+
document.createComment("Search page based on Depict SDK"),
|
|
8005
8062
|
(()=>{
|
|
8006
8063
|
const _el$2 = $7097477c78a89208$var$_tmpl$2.cloneNode(true), _el$3 = _el$2.firstChild;
|
|
8007
8064
|
(0, $kyEB6$insert)(_el$3, input_field, null);
|
|
@@ -8536,4 +8593,7 @@ function $59f48be661ca9195$var$run_in_root_or_auto_cleanup(component, error_mess
|
|
|
8536
8593
|
|
|
8537
8594
|
|
|
8538
8595
|
|
|
8539
|
-
|
|
8596
|
+
(0, $kyEB6$dlog)("@depict-ai/ui version", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
8597
|
+
|
|
8598
|
+
|
|
8599
|
+
export {$e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a79d86d64fb64e8e$export$824dde41348efed1 as embedded_num_products, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $d1d4dbcadcf4cb02$export$26df08e242fe83a3 as push_state_with_query_param_value, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $5c5f95951393e5d1$export$643598a327b5833e as get_categories, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $2e7dbdfa682bea45$export$93916862db74da11 as czech_category_translation, $2e7dbdfa682bea45$export$62ef558576ddaf3d as czech_search_translation, $88b98b9d8654446d$export$70578856b2420b5d as danish_search_translation, $88b98b9d8654446d$export$f816e22bdb8038e1 as danish_category_translation, $45ff89a5006dbeee$export$e6614b50d36f30aa as dutch_category_translation, $45ff89a5006dbeee$export$5d14584e27bf4bc5 as dutch_search_translation, $8e57f28e9b8ba103$export$434b5d2e9cbbcde1 as english_search_translation, $8e57f28e9b8ba103$export$61b15fe6451cdba0 as english_category_translation, $17bb4bc19a558158$export$bf7930000f7ad633 as finnish_category_translation, $17bb4bc19a558158$export$bb9c5e11b9203620 as finnish_search_translation, $8f244ab97fceb5b3$export$ef75fbff2e809c9 as french_category_translation, $8f244ab97fceb5b3$export$e608b2bb21ba1862 as french_search_translation, $52d8525a7f06f813$export$f1905e1353ecf78e as german_category_translation, $52d8525a7f06f813$export$b43a5e72c07b4d2a as german_search_translation, $af10c927f9d40ee9$export$3812cbf78064c3ab as italian_category_translation, $af10c927f9d40ee9$export$c05550c0848a3fe4 as italian_search_translation, $b6fc9ca373acfd8e$export$e3024c30c728ef08 as norwegian_category_translation, $b6fc9ca373acfd8e$export$dcb702a89633f297 as norwegian_search_translation, $02d28687f3e70797$export$ca594fc9015508ad as polish_category_translation, $02d28687f3e70797$export$b0eb0dd41442f532 as polish_search_translation, $f6f89421463e8473$export$b3b5aa2c4df8976f as portuguese_search_translation, $f6f89421463e8473$export$d8290cf1bac152ab as portuguese_category_translation, $eb8757bc61f65db5$export$40e5a8a77e52bc27 as spanish_category_translation, $eb8757bc61f65db5$export$49b8f20513f0ff25 as spanish_search_translation, $ee9ca02aebefa7e4$export$7ba4dc17618f444f as swedish_category_translation, $ee9ca02aebefa7e4$export$596caee559c76764 as swedish_search_translation, $8c0f86cb3e266eeb$export$469c7af753d08925 as solid_format_price, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $9653a36120f642b0$export$3a8840c5b2ecf003 as Category, $59f48be661ca9195$export$ac6237957a15b3f0 as DepictSearch, $59f48be661ca9195$export$f2dc7e4e4aa11abb as SearchPage, $59f48be661ca9195$export$b94867ecbd698f21 as SearchField, $59f48be661ca9195$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $8d80d8d4afb6dcd3$export$2cefb7e61fcbae00 as add_to_version_info, $ec291e0010116877$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.10",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@depict-ai/utilishared": "
|
|
39
|
+
"@depict-ai/utilishared": "workspace:^",
|
|
40
40
|
"solid-js": "^1.6.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@babel/preset-typescript": "latest",
|
|
46
46
|
"@babel/runtime": "latest",
|
|
47
47
|
"@babel/runtime-corejs3": "latest",
|
|
48
|
-
"@depict-ai/types": "
|
|
48
|
+
"@depict-ai/types": "workspace:^",
|
|
49
49
|
"@jest/globals": "^29.3.1",
|
|
50
50
|
"@parcel/babel-preset-env": "latest",
|
|
51
51
|
"@parcel/resolver-default": "^2.8.0",
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
"parcel": "latest",
|
|
57
57
|
"ts-jest": "^29.0.3"
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An enumeration.
|
|
10
|
-
*/
|
|
11
|
-
export type SortingOrder = "asc" | "desc";
|
|
12
|
-
|
|
13
|
-
export interface BaseSearchRequest {
|
|
14
|
-
tenant: string;
|
|
15
|
-
market: string;
|
|
16
|
-
/**
|
|
17
|
-
* List of filters to apply to the results.
|
|
18
|
-
*/
|
|
19
|
-
filters?: SearchFilter[];
|
|
20
|
-
/**
|
|
21
|
-
* Specifies the sorting method. By default, the results are ordered by relevance. To find the possible values for this field, query the endpoint and look at the `sorts` field.
|
|
22
|
-
*/
|
|
23
|
-
sort?: SortModel;
|
|
24
|
-
/**
|
|
25
|
-
* User identifier
|
|
26
|
-
*/
|
|
27
|
-
user_id?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Session identifier
|
|
30
|
-
*/
|
|
31
|
-
session_id?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Populated for integrations performed by Depict.ai only. Depict.ai Session Id
|
|
34
|
-
*/
|
|
35
|
-
dsid?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Metadata that can be used to modify the behaviour of the search.
|
|
38
|
-
*/
|
|
39
|
-
metadata?: {
|
|
40
|
-
[k: string]: string;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* The search query.
|
|
44
|
-
*/
|
|
45
|
-
query?: string;
|
|
46
|
-
}
|
|
47
|
-
export interface SearchFilter {
|
|
48
|
-
/**
|
|
49
|
-
* The field to filter by.
|
|
50
|
-
*/
|
|
51
|
-
field: string;
|
|
52
|
-
/**
|
|
53
|
-
* The operation used for filtering. The filtering should be read as `field op data`, for example `brand in ["Nike", "Adidas"]`.
|
|
54
|
-
*/
|
|
55
|
-
op: "eq" | "neq" | "in" | "nin" | "leq" | "geq" | "inrange";
|
|
56
|
-
/**
|
|
57
|
-
* Data for the filter.
|
|
58
|
-
*/
|
|
59
|
-
data?:
|
|
60
|
-
| ("true" | "false")
|
|
61
|
-
| number
|
|
62
|
-
| number
|
|
63
|
-
| string
|
|
64
|
-
| [number, number]
|
|
65
|
-
| [number, number]
|
|
66
|
-
| [number, number]
|
|
67
|
-
| [number, number]
|
|
68
|
-
| (
|
|
69
|
-
| ("true" | "false")
|
|
70
|
-
| number
|
|
71
|
-
| number
|
|
72
|
-
| string
|
|
73
|
-
| [number, number]
|
|
74
|
-
| [number, number]
|
|
75
|
-
| [number, number]
|
|
76
|
-
| [number, number]
|
|
77
|
-
)[]
|
|
78
|
-
| (("true" | "false") | number | number | string)[][];
|
|
79
|
-
/**
|
|
80
|
-
* Metadata about the filter that can be used for rendering. For example, this could contain the possible values to filter by and their counts in the results.
|
|
81
|
-
*/
|
|
82
|
-
meta?: RangeFilterMeta | ValuesFilterMeta | HierarchicalValuesFilterMeta;
|
|
83
|
-
/**
|
|
84
|
-
* ID of the filter. If multiple filters share the same ID, they should be grouped together in the UI.
|
|
85
|
-
*/
|
|
86
|
-
id?: string;
|
|
87
|
-
}
|
|
88
|
-
export interface RangeFilterMeta {
|
|
89
|
-
/**
|
|
90
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
91
|
-
*/
|
|
92
|
-
group_title?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Whether the filter group should be expanded by default or not.
|
|
95
|
-
*/
|
|
96
|
-
group_expanded?: boolean;
|
|
97
|
-
type?: "range";
|
|
98
|
-
/**
|
|
99
|
-
* The minimum value that can be selected in the range.
|
|
100
|
-
*/
|
|
101
|
-
min: number;
|
|
102
|
-
/**
|
|
103
|
-
* The maximum value that can be selected in the range.
|
|
104
|
-
*/
|
|
105
|
-
max: number;
|
|
106
|
-
/**
|
|
107
|
-
* The unit of the range values.
|
|
108
|
-
*/
|
|
109
|
-
unit?: string;
|
|
110
|
-
/**
|
|
111
|
-
* The currency of the range values.
|
|
112
|
-
*/
|
|
113
|
-
currency?: string;
|
|
114
|
-
}
|
|
115
|
-
export interface ValuesFilterMeta {
|
|
116
|
-
/**
|
|
117
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
118
|
-
*/
|
|
119
|
-
group_title?: string;
|
|
120
|
-
/**
|
|
121
|
-
* Whether the filter group should be expanded by default or not.
|
|
122
|
-
*/
|
|
123
|
-
group_expanded?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Type of filter.
|
|
126
|
-
*/
|
|
127
|
-
type?: "radio" | "checkbox" | "checkbox-grid";
|
|
128
|
-
/**
|
|
129
|
-
* Selectable values
|
|
130
|
-
*/
|
|
131
|
-
values: (
|
|
132
|
-
| ("true" | "false")
|
|
133
|
-
| number
|
|
134
|
-
| number
|
|
135
|
-
| string
|
|
136
|
-
| [number, number]
|
|
137
|
-
| [number, number]
|
|
138
|
-
| [number, number]
|
|
139
|
-
| [number, number]
|
|
140
|
-
)[];
|
|
141
|
-
/**
|
|
142
|
-
* Counts for values
|
|
143
|
-
*/
|
|
144
|
-
counts?: number[];
|
|
145
|
-
/**
|
|
146
|
-
* Names for values
|
|
147
|
-
*/
|
|
148
|
-
names?: string[];
|
|
149
|
-
}
|
|
150
|
-
export interface HierarchicalValuesFilterMeta {
|
|
151
|
-
/**
|
|
152
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
153
|
-
*/
|
|
154
|
-
group_title?: string;
|
|
155
|
-
/**
|
|
156
|
-
* Whether the filter group should be expanded by default or not.
|
|
157
|
-
*/
|
|
158
|
-
group_expanded?: boolean;
|
|
159
|
-
type?: "checkbox-hierarchical";
|
|
160
|
-
/**
|
|
161
|
-
* Selectable hierarchical values
|
|
162
|
-
*/
|
|
163
|
-
values: (("true" | "false") | number | number | string)[][];
|
|
164
|
-
/**
|
|
165
|
-
* Counts for values
|
|
166
|
-
*/
|
|
167
|
-
counts?: number[];
|
|
168
|
-
/**
|
|
169
|
-
* Names for hierarchical values
|
|
170
|
-
*/
|
|
171
|
-
names?: string[];
|
|
172
|
-
}
|
|
173
|
-
export interface SortModel {
|
|
174
|
-
/**
|
|
175
|
-
* The field to sort by.
|
|
176
|
-
*/
|
|
177
|
-
field: string;
|
|
178
|
-
/**
|
|
179
|
-
* The order to sort by.
|
|
180
|
-
*/
|
|
181
|
-
order: SortingOrder;
|
|
182
|
-
/**
|
|
183
|
-
* Metadata about the sort that can be used for rendering.
|
|
184
|
-
*/
|
|
185
|
-
meta?: SortMeta;
|
|
186
|
-
}
|
|
187
|
-
export interface SortMeta {
|
|
188
|
-
title: string;
|
|
189
|
-
/**
|
|
190
|
-
* Selectable values
|
|
191
|
-
*/
|
|
192
|
-
values?: SortingOrder[];
|
|
193
|
-
/**
|
|
194
|
-
* Names for orders
|
|
195
|
-
*/
|
|
196
|
-
names?: string[];
|
|
197
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface ProductListingQueriesRequest {
|
|
9
|
-
tenant: string;
|
|
10
|
-
market: string;
|
|
11
|
-
metadata?: {
|
|
12
|
-
[k: string]: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface ProductListingQueriesResponse {
|
|
9
|
-
query_ids?: string[];
|
|
10
|
-
}
|