@depict-ai/ui 4.7.31 → 4.7.32
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/ES10/index.cjs +110 -92
- package/ES10/index.d.ts +7 -6
- package/ES10/index.js +110 -92
- package/latest/index.cjs +100 -85
- package/latest/index.d.ts +7 -6
- package/latest/index.js +100 -85
- package/package.json +1 -1
- package/server/ES10/index.cjs +83 -34
- package/server/ES10/index.d.ts +7 -6
- package/server/ES10/index.js +83 -34
- package/server/latest/index.cjs +73 -27
- package/server/latest/index.d.ts +7 -6
- package/server/latest/index.js +73 -27
package/server/latest/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { report, Amazing_Slider, Display, useExpandingContainer, ColsAtSize, Ele
|
|
|
3
3
|
import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
|
|
4
4
|
import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
|
|
5
5
|
import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
|
|
6
|
-
import { ProductListing, GetListingResponse } from "@depict-ai/types/api/GetListingResponse";
|
|
6
|
+
import { ProductListing, GetListingResponse, ContentBlock as _ContentBlock1 } from "@depict-ai/types/api/GetListingResponse";
|
|
7
7
|
import { ProductListingResponseV3, SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/ProductListingResponseV3";
|
|
8
8
|
import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestionsRequestV3";
|
|
9
9
|
import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
|
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.7.
|
|
14
|
+
export const version = "4.7.32";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -108,10 +108,10 @@ export function remap_blocks_to_index<T = () => JSX.Element | Promise<JSX.Elemen
|
|
|
108
108
|
})[];
|
|
109
109
|
n_cols_currently_showing_: number | null;
|
|
110
110
|
}): {
|
|
111
|
-
content_blocks_by_index_:
|
|
111
|
+
content_blocks_by_index_: (Awaited<T> | T[])[];
|
|
112
112
|
readonly displaced_products_?: undefined;
|
|
113
113
|
} | {
|
|
114
|
-
readonly content_blocks_by_index_:
|
|
114
|
+
readonly content_blocks_by_index_: (Awaited<T> | T[])[];
|
|
115
115
|
readonly displaced_products_: (number | (true | undefined)[])[];
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
@@ -1334,6 +1334,7 @@ export class DepictCategory<InputDisplay extends Display, OutputDisplay extends
|
|
|
1334
1334
|
expanded_: boolean;
|
|
1335
1335
|
}[]>;
|
|
1336
1336
|
scroll_restoration_data: Signal<ScrollRestorationData>;
|
|
1337
|
+
history_content_blocks: Signal<_ContentBlock1[]>;
|
|
1337
1338
|
};
|
|
1338
1339
|
/**
|
|
1339
1340
|
* Signal representing the currently selected filters. Will update to always reflect the state of the current URL. Calling the setter triggers a navigation (replaceState) to an updated URL.
|
|
@@ -1484,7 +1485,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1484
1485
|
* Open the modal with support for alignment.
|
|
1485
1486
|
* @returns {void}
|
|
1486
1487
|
*/
|
|
1487
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1488
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1488
1489
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1489
1490
|
export interface PageReplacer {
|
|
1490
1491
|
readonly render_: () => Node_Array;
|
|
@@ -1563,5 +1564,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1563
1564
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1564
1565
|
layout?: PossibleLayout;
|
|
1565
1566
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1566
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1567
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1567
1568
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { dlog as $i7OB2$dlog, catchify as $i7OB2$catchify, ListenableSet as $i7O
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.32";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $i7OB2$createSignal(false);
|
|
13
13
|
$i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
|
|
@@ -68,7 +68,7 @@ function $7f60f09116a3fe61$export$3f37af283f8fb843(props) {
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
var $e7a7eb102ddc0c79$var$_tmpl$ = ["<div", ' class="
|
|
71
|
+
var $e7a7eb102ddc0c79$var$_tmpl$ = ["<div", ' class="', '" style="', '">', "</div>"];
|
|
72
72
|
function $e7a7eb102ddc0c79$export$791ef57e62e21c3f({
|
|
73
73
|
content_blocks_: incoming_content_blocks,
|
|
74
74
|
cols_at_size_: cols_at_size_,
|
|
@@ -191,7 +191,7 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
191
191
|
return !rendering_delayed();
|
|
192
192
|
},
|
|
193
193
|
get children() {
|
|
194
|
-
return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), "grid-column:" + `span ${$i7OB2$escape(final_span_columns(), true)}` + (";grid-row:" + `span ${$i7OB2$escape(final_span_rows(), true)}`) + (";spans_columns_variable_name:" + $i7OB2$escape(final_span_columns(), true)), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
|
|
194
|
+
return $i7OB2$ssr($e7a7eb102ddc0c79$var$_tmpl$, $i7OB2$ssrHydrationKey(), `content-block-wrapper ${final_span_columns() === max_span_columns() ? "spans-whole-row" : ""}`, "grid-column:" + `span ${$i7OB2$escape(final_span_columns(), true)}` + (";grid-row:" + `span ${$i7OB2$escape(final_span_rows(), true)}`) + (";spans_columns_variable_name:" + $i7OB2$escape(final_span_columns(), true)), $i7OB2$escape($i7OB2$createComponent($e7a7eb102ddc0c79$var$RenderContent, {
|
|
195
195
|
get content() {
|
|
196
196
|
return block.content;
|
|
197
197
|
}
|
|
@@ -8298,7 +8298,8 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
8298
8298
|
// Please make sure that the signal created by below line always updates AFTER selected_filters_ updates on a "popstate" event. If the filter cache is popped before the selected filters are the code in create_modified_filters() is going to re-calculate search_local_filter_cache without knowing the real value of search_selected_filters, and we'll end up with too few filters in search_local_filter_cache in some cases
|
|
8299
8299
|
local_filter_cache: [],
|
|
8300
8300
|
expanded_hierarchical_filters: [],
|
|
8301
|
-
scroll_restoration_data: []
|
|
8301
|
+
scroll_restoration_data: [],
|
|
8302
|
+
history_content_blocks: []
|
|
8302
8303
|
}),
|
|
8303
8304
|
router_: this.#router,
|
|
8304
8305
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
@@ -12236,14 +12237,72 @@ function $e7fce80abe608e01$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
12236
12237
|
});
|
|
12237
12238
|
tracking_function_for_plp_results(plp_results_);
|
|
12238
12239
|
}
|
|
12239
|
-
var $f916989c4b1be9f7$var$_tmpl$ = ["<a", "><
|
|
12240
|
-
$f916989c4b1be9f7$var$_tmpl$2 = ["<a", "><video", ' muted="" autoplay="" playsinline="" loop style="', '"></video></a>'];
|
|
12240
|
+
var $f916989c4b1be9f7$var$_tmpl$ = ["<a", ' class="d-standard-content-wrapper"', "><video", ' muted="" autoplay="" playsinline="" loop class="d-standard-content"></video></a>'];
|
|
12241
12241
|
function $f916989c4b1be9f7$export$780a853d15174484({
|
|
12242
|
-
|
|
12242
|
+
contentBlock_: {
|
|
12243
|
+
content: {
|
|
12244
|
+
link: link,
|
|
12245
|
+
type: type,
|
|
12246
|
+
url: mediaUrl
|
|
12247
|
+
}
|
|
12248
|
+
},
|
|
12243
12249
|
router_: router_
|
|
12244
12250
|
}) {
|
|
12245
|
-
if (
|
|
12246
|
-
|
|
12251
|
+
if (type === "image") {
|
|
12252
|
+
const [wrapperSize, setWrapperSize] = $i7OB2$createSignal();
|
|
12253
|
+
return $i7OB2$createComponent((0, $i7OB2$Dynamic), $i7OB2$mergeProps1({
|
|
12254
|
+
component: link ? "a" : "div",
|
|
12255
|
+
"class": "d-standard-content-wrapper",
|
|
12256
|
+
get onClick() {
|
|
12257
|
+
return $i7OB2$catchify(ev => link && router_.navigate_.go_to_({
|
|
12258
|
+
new_url_: link,
|
|
12259
|
+
is_replace_: false,
|
|
12260
|
+
event_: ev
|
|
12261
|
+
}));
|
|
12262
|
+
}
|
|
12263
|
+
}, link && {
|
|
12264
|
+
href: link
|
|
12265
|
+
}, {
|
|
12266
|
+
get children() {
|
|
12267
|
+
return $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
|
|
12268
|
+
get size() {
|
|
12269
|
+
return $i7OB2$createMemo(() => wrapperSize()?.() || 0);
|
|
12270
|
+
},
|
|
12271
|
+
src: mediaUrl,
|
|
12272
|
+
"class": "d-standard-content"
|
|
12273
|
+
});
|
|
12274
|
+
}
|
|
12275
|
+
}));
|
|
12276
|
+
}
|
|
12277
|
+
if (type === "video") {
|
|
12278
|
+
const pageVisible = $5e3d278ef4c80cd7$export$54299a3c81f5425();
|
|
12279
|
+
return $i7OB2$ssr($f916989c4b1be9f7$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("href", $i7OB2$escape(link, true), false), $i7OB2$ssrAttribute("src", $i7OB2$escape(mediaUrl, true), false));
|
|
12280
|
+
}
|
|
12281
|
+
}
|
|
12282
|
+
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
12283
|
+
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
12284
|
+
$i7OB2$createEffect(() => {
|
|
12285
|
+
const serverContentBlock = plp_meta()?.content_blocks;
|
|
12286
|
+
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(historyContentBlocks())) setHistoryContentBlocks(serverContentBlock);
|
|
12287
|
+
});
|
|
12288
|
+
const contentBlocksByRow = $i7OB2$createMemo(() => {
|
|
12289
|
+
if (content_blocks_by_row_()) return content_blocks_by_row_();
|
|
12290
|
+
const content = [];
|
|
12291
|
+
historyContentBlocks().forEach(row => {
|
|
12292
|
+
const contentBlock = {
|
|
12293
|
+
span_columns: row.span_columns,
|
|
12294
|
+
span_rows: row.span_rows,
|
|
12295
|
+
position: row.position,
|
|
12296
|
+
content: () => $i7OB2$createComponent((0, $f916989c4b1be9f7$export$780a853d15174484), {
|
|
12297
|
+
contentBlock_: row,
|
|
12298
|
+
router_: router_
|
|
12299
|
+
})
|
|
12300
|
+
};
|
|
12301
|
+
content[row.row] = contentBlock;
|
|
12302
|
+
});
|
|
12303
|
+
return content;
|
|
12304
|
+
});
|
|
12305
|
+
return contentBlocksByRow;
|
|
12247
12306
|
}
|
|
12248
12307
|
var $df5d81d0fe61ff21$var$_tmpl$ = ["<div", ' class="product-count"><!--$-->', "<!--/--> <!--$-->", "<!--/--></div>"],
|
|
12249
12308
|
$df5d81d0fe61ff21$var$_tmpl$2 = ["<div", "></div>"],
|
|
@@ -12272,6 +12331,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
12272
12331
|
show_breadcrumbs_: show_breadcrumbs_,
|
|
12273
12332
|
layout_options_: layout_options_,
|
|
12274
12333
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
12334
|
+
history_content_blocks_: history_content_blocks_,
|
|
12275
12335
|
product_card_template_: product_card_template_,
|
|
12276
12336
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
12277
12337
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -12340,23 +12400,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
12340
12400
|
}));
|
|
12341
12401
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
12342
12402
|
const [plp_meta] = $i7OB2$createResource(meta_query_base, $i7OB2$catchify(query => depict_api_.get_listing(query)));
|
|
12343
|
-
const contentBlocksByRow = $
|
|
12344
|
-
if (content_blocks_by_row_()) return content_blocks_by_row_();
|
|
12345
|
-
const content = [];
|
|
12346
|
-
plp_meta()?.content_blocks?.forEach(row => {
|
|
12347
|
-
const contentBlock = {
|
|
12348
|
-
span_columns: row.span_columns,
|
|
12349
|
-
span_rows: row.span_rows,
|
|
12350
|
-
position: row.position,
|
|
12351
|
-
content: $f916989c4b1be9f7$export$780a853d15174484({
|
|
12352
|
-
contentBlock: row,
|
|
12353
|
-
router_: router_
|
|
12354
|
-
})
|
|
12355
|
-
};
|
|
12356
|
-
content[row.row] = contentBlock;
|
|
12357
|
-
});
|
|
12358
|
-
return content;
|
|
12359
|
-
});
|
|
12403
|
+
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
12360
12404
|
const available_sortings_ = $i7OB2$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
12361
12405
|
...sort,
|
|
12362
12406
|
order: sort.order ?? "desc"
|
|
@@ -12665,7 +12709,8 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
12665
12709
|
sorting_open: category_sorting_open_,
|
|
12666
12710
|
expanded_filters: expanded_filters_,
|
|
12667
12711
|
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
12668
|
-
scroll_restoration_data: scroll_restoration_data_
|
|
12712
|
+
scroll_restoration_data: scroll_restoration_data_,
|
|
12713
|
+
history_content_blocks: history_content_blocks_
|
|
12669
12714
|
} = depict_category.historyStateSignals_;
|
|
12670
12715
|
const {
|
|
12671
12716
|
current_sorting_: current_sorting_,
|
|
@@ -12711,6 +12756,7 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
12711
12756
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
12712
12757
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
12713
12758
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
12759
|
+
history_content_blocks_: history_content_blocks_,
|
|
12714
12760
|
layout_options_: $i7OB2$createMemo(() => ({
|
|
12715
12761
|
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
12716
12762
|
...grid_spacing_override(),
|