@depict-ai/ui 0.0.54 → 0.0.56
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 +48 -13
- package/dist/main.js +23 -14
- package/dist/module.js +23 -15
- package/package.json +3 -3
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Display, Elem, InfoForProcessing, Node_Array, RR_PostProcessor, RR_PreProcessor } from "@depict-ai/utilishared";
|
|
1
|
+
import { Display, Elem, ColsAtSize, InfoForProcessing, Node_Array, RR_PostProcessor, RR_PreProcessor } from "@depict-ai/utilishared";
|
|
2
2
|
import { Accessor, JSX, Setter, Signal } from "solid-js";
|
|
3
3
|
import { search_i18n as _search_i18n1 } from "../../../locales";
|
|
4
4
|
import { SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
@@ -9,7 +9,7 @@ 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.56";
|
|
13
13
|
type ExclusiveId = {
|
|
14
14
|
categoryId: string;
|
|
15
15
|
productId?: undefined;
|
|
@@ -223,6 +223,12 @@ export const embedded_num_products: ({ make_product_count_, set_observed_results
|
|
|
223
223
|
on_filters_constructed_: () => void;
|
|
224
224
|
};
|
|
225
225
|
type SDKColsAtSize = [number, number?][];
|
|
226
|
+
/**
|
|
227
|
+
* Transform SDK ColsAtSize into valid Layout ColsAtSize
|
|
228
|
+
* @param cols_at_size [nbCol, maxWidth]
|
|
229
|
+
* @returns
|
|
230
|
+
*/
|
|
231
|
+
export const convert_sdk_cols_at_size_to_layout: (cols_at_size: SDKColsAtSize) => ColsAtSize;
|
|
226
232
|
type DepictCategoryConstructorOptions = {
|
|
227
233
|
market: string;
|
|
228
234
|
merchant: string;
|
|
@@ -349,7 +355,7 @@ interface SearchFieldParams {
|
|
|
349
355
|
aligner_ref?: HTMLElement | null;
|
|
350
356
|
}
|
|
351
357
|
export function SearchField({ depict_search, modal_dispose_handler, click_handler, aligner_ref, }: SearchFieldParams): Node_Array;
|
|
352
|
-
export type
|
|
358
|
+
export type BaseProviderConfig = {
|
|
353
359
|
/**
|
|
354
360
|
* The merchant to use for the search.
|
|
355
361
|
* @example "YOUR_MERCHANT", "stronger"
|
|
@@ -361,7 +367,7 @@ export type DepictBaseConfig = {
|
|
|
361
367
|
*/
|
|
362
368
|
market: string;
|
|
363
369
|
};
|
|
364
|
-
export type
|
|
370
|
+
export type BaseSearchProviderConfig = {
|
|
365
371
|
/**
|
|
366
372
|
* The path to the search page.
|
|
367
373
|
* @example "/search", "/sok"
|
|
@@ -379,14 +385,7 @@ export type DepictSearchConfig = {
|
|
|
379
385
|
*/
|
|
380
386
|
enableCategorySuggestions?: boolean;
|
|
381
387
|
};
|
|
382
|
-
export interface
|
|
383
|
-
/**
|
|
384
|
-
* Whether to show the search input field in the search page.
|
|
385
|
-
* @default true
|
|
386
|
-
*/
|
|
387
|
-
includeInputField?: boolean;
|
|
388
|
-
}
|
|
389
|
-
export interface BasePLPConfig {
|
|
388
|
+
export interface BaseProductListingConfig {
|
|
390
389
|
/**
|
|
391
390
|
* How many columns to show at each media size.
|
|
392
391
|
* @default
|
|
@@ -404,6 +403,25 @@ export interface BasePLPConfig {
|
|
|
404
403
|
*/
|
|
405
404
|
gridSpacing?: SDKGridSpacing;
|
|
406
405
|
}
|
|
406
|
+
export interface BaseSearchPageConfig extends BaseProductListingConfig {
|
|
407
|
+
/**
|
|
408
|
+
* Whether to show the search input field in the search page.
|
|
409
|
+
* @default true
|
|
410
|
+
*/
|
|
411
|
+
includeInputField?: boolean;
|
|
412
|
+
}
|
|
413
|
+
export interface BaseCategoryPageConfig extends BaseProductListingConfig {
|
|
414
|
+
/**
|
|
415
|
+
* Whether to show the breadcrumbs in the category page.
|
|
416
|
+
* @default true
|
|
417
|
+
*/
|
|
418
|
+
showBreadcrumbs?: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Whether to show the quicklinks in the category page.
|
|
421
|
+
* @default true
|
|
422
|
+
*/
|
|
423
|
+
showQuicklinks?: boolean;
|
|
424
|
+
}
|
|
407
425
|
type CenteredLocation = {
|
|
408
426
|
location?: "centered";
|
|
409
427
|
};
|
|
@@ -425,15 +443,32 @@ type OpenModalParams<T extends Display> = ModalLocation & {
|
|
|
425
443
|
export const open_modal_with_alignment: <T extends Display>(openModalParams: OpenModalParams<T>) => void;
|
|
426
444
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
427
445
|
export interface PageReplacer {
|
|
428
|
-
readonly render_: (
|
|
446
|
+
readonly render_: () => Node_Array;
|
|
429
447
|
readonly is_page_: (url: URL) => boolean;
|
|
430
448
|
readonly title_?: string;
|
|
431
449
|
readonly selector_: string;
|
|
432
450
|
readonly append_instead_of_replace_?: boolean;
|
|
433
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* PageReplacer is a class that can be used to layer an SPA (single page application) on top of a non-SPA, for certain pages.
|
|
454
|
+
* An example use case is that we want to make it absolutely instant to go to a search page or to go from one search query to the next (so basically one can navigate to pages without reloading the page).
|
|
455
|
+
* PageReplacer works by, when something has changed the URL (using history.pushState) to the page where it should take effect, replacing a specified element with another element.
|
|
456
|
+
* The element that is replaced is specified by a CSS selector and usually represents the element containing "main content" of the page. The "replacement" works by setting `display: none` on the original page and then adding the "new page"-element after it in the DOM:
|
|
457
|
+
* @param render_ A function that returns the elements which replace the "page" when is_page_ returns true.
|
|
458
|
+
* @param title_ The title that document.title should be changed to when is_page_ returns true (the replacement page is open).
|
|
459
|
+
* @param is_page_ A function that returns true if the provided URL is the page where the replacement should take effect.
|
|
460
|
+
* @param selector_ A CSS selector that selects the element that should be replaced.
|
|
461
|
+
* @param append_instead_of_replace_ If true, the replacement element will be appended to the element that is found by selector_ instead of replacing it. This is useful if one doesn't actually want it to replace the element because one has other logic.
|
|
462
|
+
*/
|
|
434
463
|
export class PageReplacer extends EventTarget {
|
|
435
464
|
#private;
|
|
465
|
+
/**
|
|
466
|
+
* Returns if the "replacement page" is currently open
|
|
467
|
+
*/
|
|
436
468
|
get open_(): boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Stops listening to URL changes and closes the page (if it is currently open)
|
|
471
|
+
*/
|
|
437
472
|
destroy_(): void;
|
|
438
473
|
constructor({ is_spa_, ...options }: Omit<PageReplacer, "destroy_" | "addEventListener" | "removeEventListener" | "dispatchEvent" | "open_"> & {
|
|
439
474
|
is_spa_?: boolean;
|
package/dist/main.js
CHANGED
|
@@ -21,6 +21,7 @@ $parcel$export(module.exports, "SearchField", () => $79fbf145b15af988$export$316
|
|
|
21
21
|
$parcel$export(module.exports, "open_modal_with_alignment", () => $9c5a1d57540c06e5$export$d86a33413558014e);
|
|
22
22
|
$parcel$export(module.exports, "DefaultInstantCardPlaceholder", () => $17c49340edfdbb31$export$ee1733d9a8495996);
|
|
23
23
|
$parcel$export(module.exports, "align_field", () => $67b60b572b7b7059$export$b3ad617e9036868);
|
|
24
|
+
$parcel$export(module.exports, "convert_sdk_cols_at_size_to_layout", () => $7958d3dbd96a4f87$export$6daf8749b65a1b77);
|
|
24
25
|
$parcel$export(module.exports, "styles_to_valid_css_string", () => $d3c94b3b96557917$export$1233ca167bf71f9a);
|
|
25
26
|
$parcel$export(module.exports, "disable_scrolling", () => $fa41c421eb980e23$export$fe334901e8bebd57);
|
|
26
27
|
$parcel$export(module.exports, "open_search_with_shift_slash", () => $308e64f91bb9f839$export$d0596b5cae35ad4);
|
|
@@ -33,7 +34,7 @@ $parcel$export(module.exports, "solid_format_price", () => $5fc9fc23df1591db$exp
|
|
|
33
34
|
$parcel$export(module.exports, "connect_search_field_height_to_aligner_height", () => $246e3e89a097f014$export$828dcdd425fd3231);
|
|
34
35
|
$parcel$export(module.exports, "PageReplacer", () => $37e96a5ebc768cc7$export$3ccaa27d81dd8556);
|
|
35
36
|
$parcel$export(module.exports, "version", () => $ae93561d5649a847$export$83d89fbfd8236492);
|
|
36
|
-
/*! Depict.ai search and product listing SDK */ const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.
|
|
37
|
+
/*! Depict.ai search and product listing SDK */ const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.56";
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
@@ -6818,21 +6819,23 @@ function $121d25ca6af2898f$export$1c593cbd6f1e10bc({ search_field_value_: search
|
|
|
6818
6819
|
[`.depict .${random_classname}`]: style_obj
|
|
6819
6820
|
};
|
|
6820
6821
|
});
|
|
6822
|
+
const search_field = (0, $2989e355f64e18e1$export$b94867ecbd698f21)({
|
|
6823
|
+
input_field_ref_: (element)=>set_input_field(element),
|
|
6824
|
+
override_on_enter_: (e)=>on_enter_in_search_field_function?.(e),
|
|
6825
|
+
on_back_: close_modal_,
|
|
6826
|
+
search_query_: search_query_,
|
|
6827
|
+
search_field_value_: search_field_value_,
|
|
6828
|
+
submit_query_: submit_query_,
|
|
6829
|
+
clear_filters_: clear_filters_,
|
|
6830
|
+
i18n_: i18n_
|
|
6831
|
+
});
|
|
6832
|
+
search_field.classList.add("in-modal");
|
|
6821
6833
|
const modal_element = (()=>{
|
|
6822
6834
|
const _el$4 = $121d25ca6af2898f$var$_tmpl$3.cloneNode(true), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
6823
6835
|
(0, $46MJV$solidjsweb.addEventListener)(_el$4, "click", (0, $46MJV$depictaiutilishared.catchify)(({ target: target })=>{
|
|
6824
6836
|
if (target === modal_element) close_modal_();
|
|
6825
6837
|
}), true);
|
|
6826
|
-
(0, $46MJV$solidjsweb.insert)(_el$5,
|
|
6827
|
-
input_field_ref_: (element)=>set_input_field(element),
|
|
6828
|
-
search_query_: search_query_,
|
|
6829
|
-
search_field_value_: search_field_value_,
|
|
6830
|
-
submit_query_: submit_query_,
|
|
6831
|
-
override_on_enter_: (e)=>on_enter_in_search_field_function?.(e),
|
|
6832
|
-
clear_filters_: clear_filters_,
|
|
6833
|
-
on_back_: close_modal_,
|
|
6834
|
-
i18n_: i18n_
|
|
6835
|
-
}), _el$6);
|
|
6838
|
+
(0, $46MJV$solidjsweb.insert)(_el$5, search_field, _el$6);
|
|
6836
6839
|
(0, $46MJV$solidjsweb.use)((el)=>(0, $46MJV$depictaiutilishared.catchify)((0, $6ea05d3ebaa81958$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
6837
6840
|
(0, $46MJV$solidjsweb.insert)(_el$6, (0, $46MJV$solidjsweb.createComponent)((0, $0f2f58dd60b11888$export$b69d0d92862de18b), {
|
|
6838
6841
|
severity_: "error",
|
|
@@ -7689,6 +7692,7 @@ function $79fbf145b15af988$export$316f6f283ae64765({ depict_search: depict_searc
|
|
|
7689
7692
|
});
|
|
7690
7693
|
}
|
|
7691
7694
|
});
|
|
7695
|
+
// We assume this to be an array containing exactly on div in js-ui
|
|
7692
7696
|
return [
|
|
7693
7697
|
(()=>{
|
|
7694
7698
|
const _el$ = $79fbf145b15af988$var$_tmpl$.cloneNode(true);
|
|
@@ -7765,6 +7769,7 @@ const $9c5a1d57540c06e5$export$d86a33413558014e = (openModalParams)=>{
|
|
|
7765
7769
|
|
|
7766
7770
|
|
|
7767
7771
|
|
|
7772
|
+
|
|
7768
7773
|
function $308e64f91bb9f839$export$d0596b5cae35ad4(open_search) {
|
|
7769
7774
|
const handler = (0, $46MJV$depictaiutilishared.catchify)((e)=>{
|
|
7770
7775
|
const { key: key , target: target } = e;
|
|
@@ -7835,7 +7840,9 @@ class $37e96a5ebc768cc7$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7835
7840
|
})();
|
|
7836
7841
|
return new Set();
|
|
7837
7842
|
})();
|
|
7838
|
-
|
|
7843
|
+
/**
|
|
7844
|
+
* Returns if the "replacement page" is currently open
|
|
7845
|
+
*/ get open_() {
|
|
7839
7846
|
// make this "readonly" from the outside, the only way to open is by making the url change so that is_page_ returns true
|
|
7840
7847
|
return this.#is_open;
|
|
7841
7848
|
}
|
|
@@ -7860,7 +7867,7 @@ class $37e96a5ebc768cc7$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7860
7867
|
this.addEventListener("close", dispose, {
|
|
7861
7868
|
once: true
|
|
7862
7869
|
});
|
|
7863
|
-
return (0, $46MJV$depictaiutilishared.catchify)(this.render_, "rendering failed")(
|
|
7870
|
+
return (0, $46MJV$depictaiutilishared.catchify)(this.render_, "rendering failed")() || [];
|
|
7864
7871
|
});
|
|
7865
7872
|
}
|
|
7866
7873
|
#unload = (0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
@@ -7946,7 +7953,9 @@ class $37e96a5ebc768cc7$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7946
7953
|
(0, $46MJV$depictaiutilishared.instant_exec_on_popstate_before_ipns_update).add(on_popstate);
|
|
7947
7954
|
this.#revert_fns.push(()=>(0, $46MJV$depictaiutilishared.instant_exec_on_popstate_before_ipns_update).delete(on_popstate)); // Don't run the bugfixer if there isn't a PageReplacer page open since I assume the bug only happens when going back from a PageReplace'd page
|
|
7948
7955
|
}
|
|
7949
|
-
|
|
7956
|
+
/**
|
|
7957
|
+
* Stops listening to URL changes and closes the page (if it is currently open)
|
|
7958
|
+
*/ destroy_() {
|
|
7950
7959
|
this.#unload();
|
|
7951
7960
|
this.#stop_listening?.();
|
|
7952
7961
|
}
|
package/dist/module.js
CHANGED
|
@@ -2,7 +2,7 @@ import {add_to_version_info as $g9l4l$add_to_version_info, fetch_recs as $g9l4l$
|
|
|
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
|
-
/*! Depict.ai search and product listing SDK */ const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.
|
|
5
|
+
/*! Depict.ai search and product listing SDK */ const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.56";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -6787,21 +6787,23 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: search
|
|
|
6787
6787
|
[`.depict .${random_classname}`]: style_obj
|
|
6788
6788
|
};
|
|
6789
6789
|
});
|
|
6790
|
+
const search_field = (0, $6ded59a142c93078$export$b94867ecbd698f21)({
|
|
6791
|
+
input_field_ref_: (element)=>set_input_field(element),
|
|
6792
|
+
override_on_enter_: (e)=>on_enter_in_search_field_function?.(e),
|
|
6793
|
+
on_back_: close_modal_,
|
|
6794
|
+
search_query_: search_query_,
|
|
6795
|
+
search_field_value_: search_field_value_,
|
|
6796
|
+
submit_query_: submit_query_,
|
|
6797
|
+
clear_filters_: clear_filters_,
|
|
6798
|
+
i18n_: i18n_
|
|
6799
|
+
});
|
|
6800
|
+
search_field.classList.add("in-modal");
|
|
6790
6801
|
const modal_element = (()=>{
|
|
6791
6802
|
const _el$4 = $a9f6faeac82c322b$var$_tmpl$3.cloneNode(true), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild;
|
|
6792
6803
|
(0, $g9l4l$addEventListener)(_el$4, "click", (0, $g9l4l$catchify)(({ target: target })=>{
|
|
6793
6804
|
if (target === modal_element) close_modal_();
|
|
6794
6805
|
}), true);
|
|
6795
|
-
(0, $g9l4l$insert)(_el$5,
|
|
6796
|
-
input_field_ref_: (element)=>set_input_field(element),
|
|
6797
|
-
search_query_: search_query_,
|
|
6798
|
-
search_field_value_: search_field_value_,
|
|
6799
|
-
submit_query_: submit_query_,
|
|
6800
|
-
override_on_enter_: (e)=>on_enter_in_search_field_function?.(e),
|
|
6801
|
-
clear_filters_: clear_filters_,
|
|
6802
|
-
on_back_: close_modal_,
|
|
6803
|
-
i18n_: i18n_
|
|
6804
|
-
}), _el$6);
|
|
6806
|
+
(0, $g9l4l$insert)(_el$5, search_field, _el$6);
|
|
6805
6807
|
(0, $g9l4l$use)((el)=>(0, $g9l4l$catchify)((0, $ced3551536e52fa1$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
6806
6808
|
(0, $g9l4l$insert)(_el$6, (0, $g9l4l$createComponent)((0, $a406ebe9523f192f$export$b69d0d92862de18b), {
|
|
6807
6809
|
severity_: "error",
|
|
@@ -7658,6 +7660,7 @@ function $540e930c58500cbe$export$316f6f283ae64765({ depict_search: depict_searc
|
|
|
7658
7660
|
});
|
|
7659
7661
|
}
|
|
7660
7662
|
});
|
|
7663
|
+
// We assume this to be an array containing exactly on div in js-ui
|
|
7661
7664
|
return [
|
|
7662
7665
|
(()=>{
|
|
7663
7666
|
const _el$ = $540e930c58500cbe$var$_tmpl$.cloneNode(true);
|
|
@@ -7734,6 +7737,7 @@ const $7cbfd6122dbaf087$export$d86a33413558014e = (openModalParams)=>{
|
|
|
7734
7737
|
|
|
7735
7738
|
|
|
7736
7739
|
|
|
7740
|
+
|
|
7737
7741
|
function $a3e81b85527bc866$export$d0596b5cae35ad4(open_search) {
|
|
7738
7742
|
const handler = (0, $g9l4l$catchify)((e)=>{
|
|
7739
7743
|
const { key: key , target: target } = e;
|
|
@@ -7804,7 +7808,9 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7804
7808
|
})();
|
|
7805
7809
|
return new Set();
|
|
7806
7810
|
})();
|
|
7807
|
-
|
|
7811
|
+
/**
|
|
7812
|
+
* Returns if the "replacement page" is currently open
|
|
7813
|
+
*/ get open_() {
|
|
7808
7814
|
// make this "readonly" from the outside, the only way to open is by making the url change so that is_page_ returns true
|
|
7809
7815
|
return this.#is_open;
|
|
7810
7816
|
}
|
|
@@ -7829,7 +7835,7 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7829
7835
|
this.addEventListener("close", dispose, {
|
|
7830
7836
|
once: true
|
|
7831
7837
|
});
|
|
7832
|
-
return (0, $g9l4l$catchify)(this.render_, "rendering failed")(
|
|
7838
|
+
return (0, $g9l4l$catchify)(this.render_, "rendering failed")() || [];
|
|
7833
7839
|
});
|
|
7834
7840
|
}
|
|
7835
7841
|
#unload = (0, $g9l4l$catchify)(()=>{
|
|
@@ -7915,7 +7921,9 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7915
7921
|
(0, $g9l4l$instant_exec_on_popstate_before_ipns_update).add(on_popstate);
|
|
7916
7922
|
this.#revert_fns.push(()=>(0, $g9l4l$instant_exec_on_popstate_before_ipns_update).delete(on_popstate)); // Don't run the bugfixer if there isn't a PageReplacer page open since I assume the bug only happens when going back from a PageReplace'd page
|
|
7917
7923
|
}
|
|
7918
|
-
|
|
7924
|
+
/**
|
|
7925
|
+
* Stops listening to URL changes and closes the page (if it is currently open)
|
|
7926
|
+
*/ destroy_() {
|
|
7919
7927
|
this.#unload();
|
|
7920
7928
|
this.#stop_listening?.();
|
|
7921
7929
|
}
|
|
@@ -7943,4 +7951,4 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
7943
7951
|
(0, $g9l4l$add_to_version_info)("ui", (0, $18bf1d29fb889cca$export$83d89fbfd8236492));
|
|
7944
7952
|
|
|
7945
7953
|
|
|
7946
|
-
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$316f6f283ae64765 as SearchField, $7cbfd6122dbaf087$export$d86a33413558014e as open_modal_with_alignment, $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, $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, $a79ffb1cbfbd2a09$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};
|
|
7954
|
+
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$316f6f283ae64765 as SearchField, $7cbfd6122dbaf087$export$d86a33413558014e as open_modal_with_alignment, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $b4e6a093ae83373b$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $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, $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, $a79ffb1cbfbd2a09$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $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.56",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": [
|
|
6
6
|
"src/index.ts",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"ts-jest": "^29.0.3"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@depict-ai/types": "^0.0.
|
|
85
|
-
"@depict-ai/utilishared": "^0.0.
|
|
84
|
+
"@depict-ai/types": "^0.0.8",
|
|
85
|
+
"@depict-ai/utilishared": "^0.0.53",
|
|
86
86
|
"solid-js": "^1.6.2"
|
|
87
87
|
},
|
|
88
88
|
"types": "dist/index.d.ts"
|
|
@@ -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
|
-
}
|