@depict-ai/ui 4.10.4 → 4.10.6
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 +32 -27
- package/ES10/index.d.ts +5 -4
- package/ES10/index.js +32 -27
- package/latest/index.cjs +24 -19
- package/latest/index.d.ts +5 -4
- package/latest/index.js +24 -19
- package/package.json +1 -1
- package/server/ES10/index.cjs +32 -27
- package/server/ES10/index.d.ts +5 -4
- package/server/ES10/index.js +32 -27
- package/server/latest/index.cjs +24 -19
- package/server/latest/index.d.ts +5 -4
- package/server/latest/index.js +24 -19
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.6";
|
|
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, ({
|
|
@@ -4710,7 +4710,8 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4710
4710
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
4711
4711
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
4712
4712
|
filterModalParent_: filterModalParent_,
|
|
4713
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
4713
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
4714
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
4714
4715
|
}) {
|
|
4715
4716
|
const Self = () => {
|
|
4716
4717
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -4719,11 +4720,10 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4719
4720
|
selected_filters_: selected_filters_,
|
|
4720
4721
|
local_filter_cache_: local_filter_cache_
|
|
4721
4722
|
});
|
|
4722
|
-
const cleanup_promise = new Promise(r => $5vyXB$solidjs.onCleanup(r));
|
|
4723
4723
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
4724
4724
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4725
4725
|
const [get_current_sorting_] = current_sorting_;
|
|
4726
|
-
const
|
|
4726
|
+
const isSmall = $5vyXB$solidjs.createMemo(() => $b54e6192d0caa293$export$d9f36cf74e24d595(`(max-width:${switchToFiltersDrawerBreakpoint_() ?? 651}px)`));
|
|
4727
4727
|
const dismiss_modal_ = $5vyXB$depictaiutilishared.catchify(() => {
|
|
4728
4728
|
set_filters_open(false);
|
|
4729
4729
|
set_sorting_open(false);
|
|
@@ -4775,7 +4775,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4775
4775
|
$5vyXB$solidjs.createComputed(() => {
|
|
4776
4776
|
const fi_o = filters_open();
|
|
4777
4777
|
const so_o = sorting_open();
|
|
4778
|
-
const i_s =
|
|
4778
|
+
const i_s = isSmall()();
|
|
4779
4779
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4780
4780
|
if ((fi_o || so_o) && !i_s) {
|
|
4781
4781
|
if (!grid_is_in_original_state) return;
|
|
@@ -4790,7 +4790,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4790
4790
|
if (!filters_open() && !sorting_open()) {
|
|
4791
4791
|
close_modal_?.();
|
|
4792
4792
|
set_extra_els_in_results_container_("");
|
|
4793
|
-
} else if (
|
|
4793
|
+
} else if (isSmall()()) {
|
|
4794
4794
|
if ($5vyXB$solidjs.untrack(() => input_modal_open_?.())) {
|
|
4795
4795
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
4796
4796
|
set_filters_open(false);
|
|
@@ -4824,12 +4824,6 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4824
4824
|
dismiss_modal_: dismiss_modal_,
|
|
4825
4825
|
i18n_: i18n_
|
|
4826
4826
|
}, filterModalParent_));
|
|
4827
|
-
const {
|
|
4828
|
-
remove: remove
|
|
4829
|
-
} = $5vyXB$depictaiutilishared.javascript_media_query("(max-width:651px)", ({
|
|
4830
|
-
matches: matches
|
|
4831
|
-
}) => set_is_small(matches));
|
|
4832
|
-
cleanup_promise.then(remove);
|
|
4833
4827
|
})();
|
|
4834
4828
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
4835
4829
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
@@ -6302,12 +6296,17 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6302
6296
|
}
|
|
6303
6297
|
}));
|
|
6304
6298
|
}
|
|
6305
|
-
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
6299
|
+
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6306
6300
|
let hasSeenContentBlock = false;
|
|
6307
6301
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6308
6302
|
const contentComponents = new Map();
|
|
6303
|
+
const delayedServerBlocks = $5vyXB$solidjs.createMemo(prev => {
|
|
6304
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
6305
|
+
if (products_request_loading_()) return prev;
|
|
6306
|
+
return plp_meta()?.content_blocks;
|
|
6307
|
+
});
|
|
6309
6308
|
$5vyXB$solidjs.createEffect(() => {
|
|
6310
|
-
const serverContentBlock =
|
|
6309
|
+
const serverContentBlock = delayedServerBlocks();
|
|
6311
6310
|
const currentHistory = $5vyXB$solidjs.untrack(historyContentBlocks);
|
|
6312
6311
|
// 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
6312
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -6413,7 +6412,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6413
6412
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
6414
6413
|
filterModalParent_: filterModalParent_,
|
|
6415
6414
|
showSliderArrow_: showSliderArrow_,
|
|
6416
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6415
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6416
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6417
6417
|
}) {
|
|
6418
6418
|
let results_for;
|
|
6419
6419
|
let only_show_filters_opener_;
|
|
@@ -6509,7 +6509,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6509
6509
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6510
6510
|
return result;
|
|
6511
6511
|
}));
|
|
6512
|
-
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
6512
|
+
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6513
6513
|
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6514
6514
|
const available_sortings_ = $5vyXB$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
6515
6515
|
...sort,
|
|
@@ -6618,6 +6618,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6618
6618
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6619
6619
|
filterModalParent_: filterModalParent_,
|
|
6620
6620
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6621
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6621
6622
|
...extra_sort_and_filter_args_
|
|
6622
6623
|
});
|
|
6623
6624
|
$5vyXB$depictaiutilisharedlatest.catchify((0, $276380e4607fb9fb$export$6e49da55e449af7c))({
|
|
@@ -11965,7 +11966,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
11965
11966
|
filterModalParent_: filterModalParent_,
|
|
11966
11967
|
class_: class_,
|
|
11967
11968
|
showSliderArrow_: showSliderArrow_,
|
|
11968
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
11969
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
11970
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
11969
11971
|
}) {
|
|
11970
11972
|
const [get_sorting] = current_sorting_;
|
|
11971
11973
|
const all_products_loaded_ = $5vyXB$solidjs.createSignal(false);
|
|
@@ -12074,7 +12076,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
12074
12076
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
12075
12077
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
12076
12078
|
filterModalParent_: filterModalParent_,
|
|
12077
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
12079
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
12080
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
12078
12081
|
});
|
|
12079
12082
|
const results_filters = $5vyXB$solidjs.createSignal();
|
|
12080
12083
|
const shouldActuallyShowInputField = $5vyXB$solidjs.createMemo(() => include_input_field_?.() ?? true); // default to showing input field
|
|
@@ -12685,6 +12688,7 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
12685
12688
|
search_sorting_open_: state_.sorting_open,
|
|
12686
12689
|
expanded_filters_: state_.expanded_filters,
|
|
12687
12690
|
content_results_rows_: state_.content_results_rows,
|
|
12691
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
12688
12692
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
12689
12693
|
router_: shared_properties.router_,
|
|
12690
12694
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -13273,7 +13277,8 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
13273
13277
|
})),
|
|
13274
13278
|
product_card_template_: product_card_template,
|
|
13275
13279
|
sorting_query_param_: sorting_query_param_,
|
|
13276
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
13280
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
13281
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
13277
13282
|
});
|
|
13278
13283
|
}, "Entire CategoryPage failed");
|
|
13279
13284
|
}
|
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.6";
|
|
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.
|
|
@@ -1502,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1502
1501
|
class?: string;
|
|
1503
1502
|
showSliderArrow_?: boolean;
|
|
1504
1503
|
hideCount0FilterOptions_?: boolean;
|
|
1504
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1505
1505
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1506
1506
|
/**
|
|
1507
1507
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1541,7 +1541,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1541
1541
|
* Open the modal with support for alignment.
|
|
1542
1542
|
* @returns {void}
|
|
1543
1543
|
*/
|
|
1544
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1544
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1545
1545
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1546
1546
|
export interface PageReplacer {
|
|
1547
1547
|
readonly render_: () => Node_Array;
|
|
@@ -1613,6 +1613,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1613
1613
|
grid_spacing: SDKGridSpacing;
|
|
1614
1614
|
cols_at_size: SDKColsAtSize;
|
|
1615
1615
|
product_card_template: ProductCardTemplate<[OutputDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<OutputDisplay>>;
|
|
1616
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1616
1617
|
show_quicklinks?: boolean;
|
|
1617
1618
|
show_breadcrumbs?: boolean;
|
|
1618
1619
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
@@ -1622,5 +1623,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1622
1623
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1623
1624
|
showSliderArrow_?: boolean;
|
|
1624
1625
|
hideCount0FilterOptions_?: boolean;
|
|
1625
|
-
}): import("@depict-ai/utilishared
|
|
1626
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1626
1627
|
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.6";
|
|
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, ({
|
|
@@ -4608,7 +4608,8 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4608
4608
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
4609
4609
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
4610
4610
|
filterModalParent_: filterModalParent_,
|
|
4611
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
4611
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
4612
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
4612
4613
|
}) {
|
|
4613
4614
|
const Self = () => {
|
|
4614
4615
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -4617,11 +4618,10 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4617
4618
|
selected_filters_: selected_filters_,
|
|
4618
4619
|
local_filter_cache_: local_filter_cache_
|
|
4619
4620
|
});
|
|
4620
|
-
const cleanup_promise = new Promise(r => $i7OB2$onCleanup(r));
|
|
4621
4621
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
4622
4622
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4623
4623
|
const [get_current_sorting_] = current_sorting_;
|
|
4624
|
-
const
|
|
4624
|
+
const isSmall = $i7OB2$createMemo(() => $dc9262ef6f786812$export$d9f36cf74e24d595(`(max-width:${switchToFiltersDrawerBreakpoint_() ?? 651}px)`));
|
|
4625
4625
|
const dismiss_modal_ = $i7OB2$catchify1(() => {
|
|
4626
4626
|
set_filters_open(false);
|
|
4627
4627
|
set_sorting_open(false);
|
|
@@ -4673,7 +4673,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4673
4673
|
$i7OB2$createComputed(() => {
|
|
4674
4674
|
const fi_o = filters_open();
|
|
4675
4675
|
const so_o = sorting_open();
|
|
4676
|
-
const i_s =
|
|
4676
|
+
const i_s = isSmall()();
|
|
4677
4677
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4678
4678
|
if ((fi_o || so_o) && !i_s) {
|
|
4679
4679
|
if (!grid_is_in_original_state) return;
|
|
@@ -4688,7 +4688,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4688
4688
|
if (!filters_open() && !sorting_open()) {
|
|
4689
4689
|
close_modal_?.();
|
|
4690
4690
|
set_extra_els_in_results_container_("");
|
|
4691
|
-
} else if (
|
|
4691
|
+
} else if (isSmall()()) {
|
|
4692
4692
|
if ($i7OB2$untrack(() => input_modal_open_?.())) {
|
|
4693
4693
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
4694
4694
|
set_filters_open(false);
|
|
@@ -4722,12 +4722,6 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4722
4722
|
dismiss_modal_: dismiss_modal_,
|
|
4723
4723
|
i18n_: i18n_
|
|
4724
4724
|
}, filterModalParent_));
|
|
4725
|
-
const {
|
|
4726
|
-
remove: remove
|
|
4727
|
-
} = $i7OB2$javascript_media_query("(max-width:651px)", ({
|
|
4728
|
-
matches: matches
|
|
4729
|
-
}) => set_is_small(matches));
|
|
4730
|
-
cleanup_promise.then(remove);
|
|
4731
4725
|
})();
|
|
4732
4726
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
4733
4727
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
@@ -6200,12 +6194,17 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
6200
6194
|
}
|
|
6201
6195
|
}));
|
|
6202
6196
|
}
|
|
6203
|
-
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
6197
|
+
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6204
6198
|
let hasSeenContentBlock = false;
|
|
6205
6199
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6206
6200
|
const contentComponents = new Map();
|
|
6201
|
+
const delayedServerBlocks = $i7OB2$createMemo(prev => {
|
|
6202
|
+
// Do not update the server blocks while the products request is loading, to avoid this: https://depictaiworkspace.slack.com/archives/C01JB6E7K7G/p1750861454651319
|
|
6203
|
+
if (products_request_loading_()) return prev;
|
|
6204
|
+
return plp_meta()?.content_blocks;
|
|
6205
|
+
});
|
|
6207
6206
|
$i7OB2$createEffect(() => {
|
|
6208
|
-
const serverContentBlock =
|
|
6207
|
+
const serverContentBlock = delayedServerBlocks();
|
|
6209
6208
|
const currentHistory = $i7OB2$untrack(historyContentBlocks);
|
|
6210
6209
|
// 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
6210
|
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
@@ -6311,7 +6310,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6311
6310
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
6312
6311
|
filterModalParent_: filterModalParent_,
|
|
6313
6312
|
showSliderArrow_: showSliderArrow_,
|
|
6314
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6313
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6314
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6315
6315
|
}) {
|
|
6316
6316
|
let results_for;
|
|
6317
6317
|
let only_show_filters_opener_;
|
|
@@ -6407,7 +6407,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6407
6407
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6408
6408
|
return result;
|
|
6409
6409
|
}));
|
|
6410
|
-
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
6410
|
+
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6411
6411
|
const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6412
6412
|
const available_sortings_ = $i7OB2$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
6413
6413
|
...sort,
|
|
@@ -6516,6 +6516,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6516
6516
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6517
6517
|
filterModalParent_: filterModalParent_,
|
|
6518
6518
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6519
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6519
6520
|
...extra_sort_and_filter_args_
|
|
6520
6521
|
});
|
|
6521
6522
|
$i7OB2$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
@@ -11863,7 +11864,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
11863
11864
|
filterModalParent_: filterModalParent_,
|
|
11864
11865
|
class_: class_,
|
|
11865
11866
|
showSliderArrow_: showSliderArrow_,
|
|
11866
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
11867
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
11868
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
11867
11869
|
}) {
|
|
11868
11870
|
const [get_sorting] = current_sorting_;
|
|
11869
11871
|
const all_products_loaded_ = $i7OB2$createSignal(false);
|
|
@@ -11972,7 +11974,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
11972
11974
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
11973
11975
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
11974
11976
|
filterModalParent_: filterModalParent_,
|
|
11975
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
11977
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
11978
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
11976
11979
|
});
|
|
11977
11980
|
const results_filters = $i7OB2$createSignal();
|
|
11978
11981
|
const shouldActuallyShowInputField = $i7OB2$createMemo(() => include_input_field_?.() ?? true); // default to showing input field
|
|
@@ -12583,6 +12586,7 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
12583
12586
|
search_sorting_open_: state_.sorting_open,
|
|
12584
12587
|
expanded_filters_: state_.expanded_filters,
|
|
12585
12588
|
content_results_rows_: state_.content_results_rows,
|
|
12589
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
12586
12590
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
12587
12591
|
router_: shared_properties.router_,
|
|
12588
12592
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -13171,7 +13175,8 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
13171
13175
|
})),
|
|
13172
13176
|
product_card_template_: product_card_template,
|
|
13173
13177
|
sorting_query_param_: sorting_query_param_,
|
|
13174
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
13178
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
13179
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
13175
13180
|
});
|
|
13176
13181
|
}, "Entire CategoryPage failed");
|
|
13177
13182
|
}
|