@depict-ai/ui 0.0.6 → 0.0.8
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 +20 -4
- package/dist/main.js +622 -476
- package/dist/module.js +624 -478
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accessor, JSX, Setter, Signal } from "solid-js";
|
|
2
|
-
import { Display, Node_Array, Elem, Extended_RR_Options, LayoutOptions, TwoLetterMarket } from "@depict-ai/utilishared";
|
|
2
|
+
import { Display, Node_Array, Elem, Extended_RR_Options, LayoutOptions, TwoLetterMarket, RR_PostProcessor, RR_PreProcessor } from "@depict-ai/utilishared";
|
|
3
3
|
import { SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
4
4
|
import { SearchRequest, SearchFilter } from "@depict-ai/types/api/SearchRequest";
|
|
5
5
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
@@ -1225,6 +1225,12 @@ export type RenderCategorySuggestion = (category_suggestion: Accessor<CategorySu
|
|
|
1225
1225
|
op: WithRequired<SearchFilter, "op">["op"];
|
|
1226
1226
|
data: WithRequired<SearchFilter, "data">["data"];
|
|
1227
1227
|
}[]>) => JSX.Element;
|
|
1228
|
+
type InstantCard = (display: unknown, context: {
|
|
1229
|
+
index: number;
|
|
1230
|
+
i18n: search_i18n;
|
|
1231
|
+
merchant: string;
|
|
1232
|
+
market: string;
|
|
1233
|
+
}) => JSX.Element;
|
|
1228
1234
|
type SDKColsAtSize = [number, number?][];
|
|
1229
1235
|
type _ConstructorOptions1 = {
|
|
1230
1236
|
search_query_url_param_name?: string;
|
|
@@ -1236,6 +1242,10 @@ type _ConstructorOptions1 = {
|
|
|
1236
1242
|
on_navigation?: (href: string) => unknown;
|
|
1237
1243
|
url_transformer?: (url_object: URL) => unknown;
|
|
1238
1244
|
enable_category_suggestions?: boolean;
|
|
1245
|
+
disable_scrolling_during_modal?: boolean;
|
|
1246
|
+
api?: DepictAPI;
|
|
1247
|
+
bottom_distance_under_modal_?: Accessor<number | undefined>;
|
|
1248
|
+
render_instant_card?: InstantCard;
|
|
1239
1249
|
};
|
|
1240
1250
|
type OpenModalArguments = [
|
|
1241
1251
|
options_for_modal?: {
|
|
@@ -1252,7 +1262,7 @@ type SDKGridSpacing = string | {
|
|
|
1252
1262
|
export const get_search_query_updating_blocked_signal: (depict_search: DepictSearch) => Signal<boolean> | undefined;
|
|
1253
1263
|
export class DepictSearch {
|
|
1254
1264
|
#private;
|
|
1255
|
-
constructor({ search_query_url_param_name, url_transformer, on_navigation, enable_category_suggestions, ...props_on_class }: _ConstructorOptions1);
|
|
1265
|
+
constructor({ search_query_url_param_name, url_transformer, on_navigation, enable_category_suggestions, disable_scrolling_during_modal, api, bottom_distance_under_modal_, render_instant_card, ...props_on_class }: _ConstructorOptions1);
|
|
1256
1266
|
get localization(): {
|
|
1257
1267
|
[K in keyof search_i18n]: ReturnType<search_i18n[K]>;
|
|
1258
1268
|
};
|
|
@@ -1266,7 +1276,7 @@ export class DepictSearch {
|
|
|
1266
1276
|
get market(): string;
|
|
1267
1277
|
set market(market: string);
|
|
1268
1278
|
}
|
|
1269
|
-
export function SearchPage({ depict_search, include_input_field, grid_spacing, cols_at_size, product_card_template, get_product_id, }: {
|
|
1279
|
+
export function SearchPage({ depict_search, include_input_field, grid_spacing, cols_at_size, product_card_template, get_product_id, extra_depict_options, }: {
|
|
1270
1280
|
depict_search: DepictSearch;
|
|
1271
1281
|
include_input_field?: boolean | {
|
|
1272
1282
|
on_open_?: VoidFunction;
|
|
@@ -1276,8 +1286,14 @@ export function SearchPage({ depict_search, include_input_field, grid_spacing, c
|
|
|
1276
1286
|
cols_at_size: SDKColsAtSize;
|
|
1277
1287
|
product_card_template: (display: Display, info: InfoForProcessing) => Promise<Node_Array> | Node_Array;
|
|
1278
1288
|
get_product_id: (url?: string) => string | Promise<string>;
|
|
1289
|
+
extra_depict_options?: {
|
|
1290
|
+
pre_processors?: RR_PreProcessor[];
|
|
1291
|
+
post_processors?: RR_PostProcessor[];
|
|
1292
|
+
recommendations_cols_at_size?: SDKColsAtSize;
|
|
1293
|
+
};
|
|
1279
1294
|
}): Node_Array;
|
|
1280
|
-
export function SearchField({ depict_search, modal_dispose_handler, }: {
|
|
1295
|
+
export function SearchField({ depict_search, modal_dispose_handler, click_handler, }: {
|
|
1281
1296
|
depict_search: DepictSearch;
|
|
1282
1297
|
modal_dispose_handler?: VoidFunction;
|
|
1298
|
+
click_handler?: (this: HTMLDivElement, ev: MouseEvent) => any;
|
|
1283
1299
|
}): Node_Array;
|