@depict-ai/ui 4.10.3 → 4.10.5
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 +11 -6
- package/ES10/index.d.ts +3 -4
- package/ES10/index.js +11 -6
- package/latest/index.cjs +10 -5
- package/latest/index.d.ts +3 -4
- package/latest/index.js +10 -5
- package/package.json +1 -1
- package/server/ES10/index.cjs +11 -6
- package/server/ES10/index.d.ts +3 -4
- package/server/ES10/index.js +11 -6
- package/server/latest/index.cjs +10 -5
- package/server/latest/index.d.ts +3 -4
- package/server/latest/index.js +10 -5
package/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.5";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -8167,13 +8167,18 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8167
8167
|
}
|
|
8168
8168
|
}));
|
|
8169
8169
|
}
|
|
8170
|
-
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
8170
|
+
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
8171
8171
|
let hasSeenContentBlock = false;
|
|
8172
8172
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
8173
8173
|
const contentComponents = new Map();
|
|
8174
|
-
$52FdA$solidjs.
|
|
8174
|
+
const delayedServerBlocks = $52FdA$solidjs.createMemo(prev => {
|
|
8175
8175
|
var _plp_meta;
|
|
8176
|
-
|
|
8176
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
8177
|
+
if (products_request_loading_()) return prev;
|
|
8178
|
+
return (_plp_meta = plp_meta()) === null || _plp_meta === void 0 ? void 0 : _plp_meta.content_blocks;
|
|
8179
|
+
});
|
|
8180
|
+
$52FdA$solidjs.createEffect(() => {
|
|
8181
|
+
const serverContentBlock = delayedServerBlocks();
|
|
8177
8182
|
const currentHistory = $52FdA$solidjs.untrack(historyContentBlocks);
|
|
8178
8183
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
8179
8184
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -8189,7 +8194,7 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8189
8194
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
8190
8195
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
8191
8196
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
8192
|
-
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return;
|
|
8197
|
+
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return developerProvided;
|
|
8193
8198
|
const content = [...(developerProvided || [])];
|
|
8194
8199
|
hasSeenContentBlock = true;
|
|
8195
8200
|
blocksFromHistory.forEach(row => {
|
|
@@ -8378,7 +8383,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
8378
8383
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
8379
8384
|
return result;
|
|
8380
8385
|
}));
|
|
8381
|
-
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
8386
|
+
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
8382
8387
|
const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
8383
8388
|
const available_sortings_ = $52FdA$solidjs.createMemo(() => {
|
|
8384
8389
|
var _plp_products_, _plp_products_$sorts;
|
package/ES10/index.d.ts
CHANGED
|
@@ -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.10.
|
|
14
|
+
export const version = "4.10.5";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1318,7 +1318,6 @@ type RecsAPIWrapperOptions = {
|
|
|
1318
1318
|
* @param market The market to fetch recs for. Depict will provide this to you. (Example: "sv" or "sv-se".)
|
|
1319
1319
|
* @param locale The locale to fetch for.
|
|
1320
1320
|
* @param type The type of the recommendations, e.g. `front_page`, `after_basket, `related`, etc. Ask Depict for this.
|
|
1321
|
-
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
1322
1321
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
1323
1322
|
* @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`
|
|
1324
1323
|
* @param sessionId Optional unique identifier of the current session. Only necessary when performing server side requests to Depict.
|
|
@@ -1541,7 +1540,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1541
1540
|
* Open the modal with support for alignment.
|
|
1542
1541
|
* @returns {void}
|
|
1543
1542
|
*/
|
|
1544
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1543
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1545
1544
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1546
1545
|
export interface PageReplacer {
|
|
1547
1546
|
readonly render_: () => Node_Array;
|
|
@@ -1622,5 +1621,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1622
1621
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1623
1622
|
showSliderArrow_?: boolean;
|
|
1624
1623
|
hideCount0FilterOptions_?: boolean;
|
|
1625
|
-
}): import("@depict-ai/utilishared
|
|
1624
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1626
1625
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.5";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -8062,13 +8062,18 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8062
8062
|
}
|
|
8063
8063
|
}));
|
|
8064
8064
|
}
|
|
8065
|
-
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
8065
|
+
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
8066
8066
|
let hasSeenContentBlock = false;
|
|
8067
8067
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
8068
8068
|
const contentComponents = new Map();
|
|
8069
|
-
$8tj43$
|
|
8069
|
+
const delayedServerBlocks = $8tj43$createMemo(prev => {
|
|
8070
8070
|
var _plp_meta;
|
|
8071
|
-
|
|
8071
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
8072
|
+
if (products_request_loading_()) return prev;
|
|
8073
|
+
return (_plp_meta = plp_meta()) === null || _plp_meta === void 0 ? void 0 : _plp_meta.content_blocks;
|
|
8074
|
+
});
|
|
8075
|
+
$8tj43$createEffect(() => {
|
|
8076
|
+
const serverContentBlock = delayedServerBlocks();
|
|
8072
8077
|
const currentHistory = $8tj43$untrack(historyContentBlocks);
|
|
8073
8078
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
8074
8079
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -8084,7 +8089,7 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8084
8089
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
8085
8090
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
8086
8091
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
8087
|
-
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return;
|
|
8092
|
+
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return developerProvided;
|
|
8088
8093
|
const content = [...(developerProvided || [])];
|
|
8089
8094
|
hasSeenContentBlock = true;
|
|
8090
8095
|
blocksFromHistory.forEach(row => {
|
|
@@ -8273,7 +8278,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8273
8278
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
8274
8279
|
return result;
|
|
8275
8280
|
}));
|
|
8276
|
-
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
8281
|
+
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
8277
8282
|
const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
8278
8283
|
const available_sortings_ = $8tj43$createMemo(() => {
|
|
8279
8284
|
var _plp_products_, _plp_products_$sorts;
|
package/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.5";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -7729,12 +7729,17 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
7729
7729
|
}
|
|
7730
7730
|
}));
|
|
7731
7731
|
}
|
|
7732
|
-
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
7732
|
+
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
7733
7733
|
let hasSeenContentBlock = false;
|
|
7734
7734
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
7735
7735
|
const contentComponents = new Map();
|
|
7736
|
+
const delayedServerBlocks = $gVhhF$solidjs.createMemo(prev => {
|
|
7737
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
7738
|
+
if (products_request_loading_()) return prev;
|
|
7739
|
+
return plp_meta()?.content_blocks;
|
|
7740
|
+
});
|
|
7736
7741
|
$gVhhF$solidjs.createEffect(() => {
|
|
7737
|
-
const serverContentBlock =
|
|
7742
|
+
const serverContentBlock = delayedServerBlocks();
|
|
7738
7743
|
const currentHistory = $gVhhF$solidjs.untrack(historyContentBlocks);
|
|
7739
7744
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
7740
7745
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -7750,7 +7755,7 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7750
7755
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
7751
7756
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
7752
7757
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
7753
|
-
if (!blocksFromHistory?.length && !hasSeenContentBlock) return;
|
|
7758
|
+
if (!blocksFromHistory?.length && !hasSeenContentBlock) return developerProvided;
|
|
7754
7759
|
const content = [...(developerProvided || [])];
|
|
7755
7760
|
hasSeenContentBlock = true;
|
|
7756
7761
|
blocksFromHistory.forEach(row => {
|
|
@@ -7936,7 +7941,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
7936
7941
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
7937
7942
|
return result;
|
|
7938
7943
|
}));
|
|
7939
|
-
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
7944
|
+
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
7940
7945
|
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
7941
7946
|
const available_sortings_ = $gVhhF$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
7942
7947
|
...sort,
|
package/latest/index.d.ts
CHANGED
|
@@ -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.10.
|
|
14
|
+
export const version = "4.10.5";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1318,7 +1318,6 @@ type RecsAPIWrapperOptions = {
|
|
|
1318
1318
|
* @param market The market to fetch recs for. Depict will provide this to you. (Example: "sv" or "sv-se".)
|
|
1319
1319
|
* @param locale The locale to fetch for.
|
|
1320
1320
|
* @param type The type of the recommendations, e.g. `front_page`, `after_basket, `related`, etc. Ask Depict for this.
|
|
1321
|
-
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
1322
1321
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
1323
1322
|
* @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`
|
|
1324
1323
|
* @param sessionId Optional unique identifier of the current session. Only necessary when performing server side requests to Depict.
|
|
@@ -1541,7 +1540,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1541
1540
|
* Open the modal with support for alignment.
|
|
1542
1541
|
* @returns {void}
|
|
1543
1542
|
*/
|
|
1544
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1543
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1545
1544
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1546
1545
|
export interface PageReplacer {
|
|
1547
1546
|
readonly render_: () => Node_Array;
|
|
@@ -1622,5 +1621,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1622
1621
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1623
1622
|
showSliderArrow_?: boolean;
|
|
1624
1623
|
hideCount0FilterOptions_?: boolean;
|
|
1625
|
-
}): import("@depict-ai/utilishared
|
|
1624
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1626
1625
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
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.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.5";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $9HbP8$createSignal(false);
|
|
13
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -7627,12 +7627,17 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
7627
7627
|
}
|
|
7628
7628
|
}));
|
|
7629
7629
|
}
|
|
7630
|
-
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
7630
|
+
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
7631
7631
|
let hasSeenContentBlock = false;
|
|
7632
7632
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
7633
7633
|
const contentComponents = new Map();
|
|
7634
|
+
const delayedServerBlocks = $9HbP8$createMemo(prev => {
|
|
7635
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
7636
|
+
if (products_request_loading_()) return prev;
|
|
7637
|
+
return plp_meta()?.content_blocks;
|
|
7638
|
+
});
|
|
7634
7639
|
$9HbP8$createEffect(() => {
|
|
7635
|
-
const serverContentBlock =
|
|
7640
|
+
const serverContentBlock = delayedServerBlocks();
|
|
7636
7641
|
const currentHistory = $9HbP8$untrack(historyContentBlocks);
|
|
7637
7642
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
7638
7643
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -7648,7 +7653,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7648
7653
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
7649
7654
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
7650
7655
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
7651
|
-
if (!blocksFromHistory?.length && !hasSeenContentBlock) return;
|
|
7656
|
+
if (!blocksFromHistory?.length && !hasSeenContentBlock) return developerProvided;
|
|
7652
7657
|
const content = [...(developerProvided || [])];
|
|
7653
7658
|
hasSeenContentBlock = true;
|
|
7654
7659
|
blocksFromHistory.forEach(row => {
|
|
@@ -7834,7 +7839,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
7834
7839
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
7835
7840
|
return result;
|
|
7836
7841
|
}));
|
|
7837
|
-
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
7842
|
+
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
7838
7843
|
const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
7839
7844
|
const available_sortings_ = $9HbP8$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
7840
7845
|
...sort,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.5",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.5";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
121
121
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -6687,13 +6687,18 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6687
6687
|
}
|
|
6688
6688
|
}));
|
|
6689
6689
|
}
|
|
6690
|
-
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
6690
|
+
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6691
6691
|
let hasSeenContentBlock = false;
|
|
6692
6692
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6693
6693
|
const contentComponents = new Map();
|
|
6694
|
-
$3hooq$solidjs.
|
|
6694
|
+
const delayedServerBlocks = $3hooq$solidjs.createMemo(prev => {
|
|
6695
6695
|
var _plp_meta;
|
|
6696
|
-
|
|
6696
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
6697
|
+
if (products_request_loading_()) return prev;
|
|
6698
|
+
return (_plp_meta = plp_meta()) === null || _plp_meta === void 0 ? void 0 : _plp_meta.content_blocks;
|
|
6699
|
+
});
|
|
6700
|
+
$3hooq$solidjs.createEffect(() => {
|
|
6701
|
+
const serverContentBlock = delayedServerBlocks();
|
|
6697
6702
|
const currentHistory = $3hooq$solidjs.untrack(historyContentBlocks);
|
|
6698
6703
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
6699
6704
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -6709,7 +6714,7 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6709
6714
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
6710
6715
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
6711
6716
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
6712
|
-
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return;
|
|
6717
|
+
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return developerProvided;
|
|
6713
6718
|
const content = [...(developerProvided || [])];
|
|
6714
6719
|
hasSeenContentBlock = true;
|
|
6715
6720
|
blocksFromHistory.forEach(row => {
|
|
@@ -6898,7 +6903,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6898
6903
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6899
6904
|
return result;
|
|
6900
6905
|
}));
|
|
6901
|
-
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
6906
|
+
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6902
6907
|
const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6903
6908
|
const available_sortings_ = $3hooq$solidjs.createMemo(() => {
|
|
6904
6909
|
var _plp_products_, _plp_products_$sorts;
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -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.10.
|
|
14
|
+
export const version = "4.10.5";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1318,7 +1318,6 @@ type RecsAPIWrapperOptions = {
|
|
|
1318
1318
|
* @param market The market to fetch recs for. Depict will provide this to you. (Example: "sv" or "sv-se".)
|
|
1319
1319
|
* @param locale The locale to fetch for.
|
|
1320
1320
|
* @param type The type of the recommendations, e.g. `front_page`, `after_basket, `related`, etc. Ask Depict for this.
|
|
1321
|
-
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
1322
1321
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
1323
1322
|
* @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`
|
|
1324
1323
|
* @param sessionId Optional unique identifier of the current session. Only necessary when performing server side requests to Depict.
|
|
@@ -1541,7 +1540,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1541
1540
|
* Open the modal with support for alignment.
|
|
1542
1541
|
* @returns {void}
|
|
1543
1542
|
*/
|
|
1544
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1543
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1545
1544
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1546
1545
|
export interface PageReplacer {
|
|
1547
1546
|
readonly render_: () => Node_Array;
|
|
@@ -1622,5 +1621,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1622
1621
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1623
1622
|
showSliderArrow_?: boolean;
|
|
1624
1623
|
hideCount0FilterOptions_?: boolean;
|
|
1625
|
-
}): import("@depict-ai/utilishared
|
|
1624
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1626
1625
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.5";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $b8hua$createSignal(false);
|
|
16
16
|
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
@@ -6582,13 +6582,18 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
6582
6582
|
}
|
|
6583
6583
|
}));
|
|
6584
6584
|
}
|
|
6585
|
-
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
6585
|
+
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6586
6586
|
let hasSeenContentBlock = false;
|
|
6587
6587
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6588
6588
|
const contentComponents = new Map();
|
|
6589
|
-
$b8hua$
|
|
6589
|
+
const delayedServerBlocks = $b8hua$createMemo(prev => {
|
|
6590
6590
|
var _plp_meta;
|
|
6591
|
-
|
|
6591
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
6592
|
+
if (products_request_loading_()) return prev;
|
|
6593
|
+
return (_plp_meta = plp_meta()) === null || _plp_meta === void 0 ? void 0 : _plp_meta.content_blocks;
|
|
6594
|
+
});
|
|
6595
|
+
$b8hua$createEffect(() => {
|
|
6596
|
+
const serverContentBlock = delayedServerBlocks();
|
|
6592
6597
|
const currentHistory = $b8hua$untrack(historyContentBlocks);
|
|
6593
6598
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
6594
6599
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -6604,7 +6609,7 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6604
6609
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
6605
6610
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
6606
6611
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
6607
|
-
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return;
|
|
6612
|
+
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return developerProvided;
|
|
6608
6613
|
const content = [...(developerProvided || [])];
|
|
6609
6614
|
hasSeenContentBlock = true;
|
|
6610
6615
|
blocksFromHistory.forEach(row => {
|
|
@@ -6793,7 +6798,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6793
6798
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6794
6799
|
return result;
|
|
6795
6800
|
}));
|
|
6796
|
-
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
6801
|
+
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6797
6802
|
const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6798
6803
|
const available_sortings_ = $b8hua$createMemo(() => {
|
|
6799
6804
|
var _plp_products_, _plp_products_$sorts;
|
package/server/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.5";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $5vyXB$solidjs.createSignal(false);
|
|
115
115
|
$5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -6302,12 +6302,17 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6302
6302
|
}
|
|
6303
6303
|
}));
|
|
6304
6304
|
}
|
|
6305
|
-
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
6305
|
+
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6306
6306
|
let hasSeenContentBlock = false;
|
|
6307
6307
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6308
6308
|
const contentComponents = new Map();
|
|
6309
|
+
const delayedServerBlocks = $5vyXB$solidjs.createMemo(prev => {
|
|
6310
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
6311
|
+
if (products_request_loading_()) return prev;
|
|
6312
|
+
return plp_meta()?.content_blocks;
|
|
6313
|
+
});
|
|
6309
6314
|
$5vyXB$solidjs.createEffect(() => {
|
|
6310
|
-
const serverContentBlock =
|
|
6315
|
+
const serverContentBlock = delayedServerBlocks();
|
|
6311
6316
|
const currentHistory = $5vyXB$solidjs.untrack(historyContentBlocks);
|
|
6312
6317
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
6313
6318
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -6323,7 +6328,7 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6323
6328
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
6324
6329
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
6325
6330
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
6326
|
-
if (!blocksFromHistory?.length && !hasSeenContentBlock) return;
|
|
6331
|
+
if (!blocksFromHistory?.length && !hasSeenContentBlock) return developerProvided;
|
|
6327
6332
|
const content = [...(developerProvided || [])];
|
|
6328
6333
|
hasSeenContentBlock = true;
|
|
6329
6334
|
blocksFromHistory.forEach(row => {
|
|
@@ -6509,7 +6514,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6509
6514
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6510
6515
|
return result;
|
|
6511
6516
|
}));
|
|
6512
|
-
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
6517
|
+
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6513
6518
|
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6514
6519
|
const available_sortings_ = $5vyXB$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
6515
6520
|
...sort,
|
package/server/latest/index.d.ts
CHANGED
|
@@ -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.10.
|
|
14
|
+
export const version = "4.10.5";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1318,7 +1318,6 @@ type RecsAPIWrapperOptions = {
|
|
|
1318
1318
|
* @param market The market to fetch recs for. Depict will provide this to you. (Example: "sv" or "sv-se".)
|
|
1319
1319
|
* @param locale The locale to fetch for.
|
|
1320
1320
|
* @param type The type of the recommendations, e.g. `front_page`, `after_basket, `related`, etc. Ask Depict for this.
|
|
1321
|
-
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
1322
1321
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
1323
1322
|
* @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`
|
|
1324
1323
|
* @param sessionId Optional unique identifier of the current session. Only necessary when performing server side requests to Depict.
|
|
@@ -1541,7 +1540,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1541
1540
|
* Open the modal with support for alignment.
|
|
1542
1541
|
* @returns {void}
|
|
1543
1542
|
*/
|
|
1544
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1543
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1545
1544
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1546
1545
|
export interface PageReplacer {
|
|
1547
1546
|
readonly render_: () => Node_Array;
|
|
@@ -1622,5 +1621,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1622
1621
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1623
1622
|
showSliderArrow_?: boolean;
|
|
1624
1623
|
hideCount0FilterOptions_?: boolean;
|
|
1625
|
-
}): import("@depict-ai/utilishared
|
|
1624
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1626
1625
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
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.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.5";
|
|
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, ({
|
|
@@ -6200,12 +6200,17 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
6200
6200
|
}
|
|
6201
6201
|
}));
|
|
6202
6202
|
}
|
|
6203
|
-
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
6203
|
+
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6204
6204
|
let hasSeenContentBlock = false;
|
|
6205
6205
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6206
6206
|
const contentComponents = new Map();
|
|
6207
|
+
const delayedServerBlocks = $i7OB2$createMemo(prev => {
|
|
6208
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
6209
|
+
if (products_request_loading_()) return prev;
|
|
6210
|
+
return plp_meta()?.content_blocks;
|
|
6211
|
+
});
|
|
6207
6212
|
$i7OB2$createEffect(() => {
|
|
6208
|
-
const serverContentBlock =
|
|
6213
|
+
const serverContentBlock = delayedServerBlocks();
|
|
6209
6214
|
const currentHistory = $i7OB2$untrack(historyContentBlocks);
|
|
6210
6215
|
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
6211
6216
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -6221,7 +6226,7 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6221
6226
|
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
6222
6227
|
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
6223
6228
|
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
6224
|
-
if (!blocksFromHistory?.length && !hasSeenContentBlock) return;
|
|
6229
|
+
if (!blocksFromHistory?.length && !hasSeenContentBlock) return developerProvided;
|
|
6225
6230
|
const content = [...(developerProvided || [])];
|
|
6226
6231
|
hasSeenContentBlock = true;
|
|
6227
6232
|
blocksFromHistory.forEach(row => {
|
|
@@ -6407,7 +6412,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6407
6412
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6408
6413
|
return result;
|
|
6409
6414
|
}));
|
|
6410
|
-
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
6415
|
+
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6411
6416
|
const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6412
6417
|
const available_sortings_ = $i7OB2$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
6413
6418
|
...sort,
|