@depict-ai/ui 4.8.3 → 4.8.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 +49 -31
- package/ES10/index.d.ts +3 -3
- package/ES10/index.js +49 -31
- package/latest/index.cjs +38 -15
- package/latest/index.d.ts +3 -3
- package/latest/index.js +38 -15
- package/package.json +1 -1
- package/server/ES10/index.cjs +46 -35
- package/server/ES10/index.d.ts +3 -3
- package/server/ES10/index.js +46 -35
- package/server/latest/index.cjs +39 -18
- package/server/latest/index.d.ts +3 -3
- package/server/latest/index.js +39 -18
package/latest/index.cjs
CHANGED
|
@@ -108,7 +108,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
108
108
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
109
109
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
110
110
|
/*! Depict.ai search and product listing SDK */
|
|
111
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.
|
|
111
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.5";
|
|
112
112
|
function $128302ab61dab8f1$export$54c6d6ff54e72743(whatToWatch) {
|
|
113
113
|
const [width, setWidth] = $gVhhF$solidjs.createSignal(0);
|
|
114
114
|
const [height, setHeight] = $gVhhF$solidjs.createSignal(0);
|
|
@@ -3088,10 +3088,10 @@ function $0f400c3f7248d5f1$export$92f2da32c6e7e7ee({
|
|
|
3088
3088
|
i18n_: i18n_
|
|
3089
3089
|
}) {
|
|
3090
3090
|
return $gVhhF$solidjs.createMemo(() => {
|
|
3091
|
-
const
|
|
3092
|
-
if (isNaN(
|
|
3091
|
+
const numberToFormat = number_();
|
|
3092
|
+
if (isNaN(numberToFormat)) return "";
|
|
3093
3093
|
const price_formatting = i18n_.price_formatting_();
|
|
3094
|
-
return $gVhhF$depictaiutilishared.standard_price_format(
|
|
3094
|
+
return $gVhhF$depictaiutilishared.standard_price_format(numberToFormat, 0,
|
|
3095
3095
|
// we never want places after comma here it looks weird as hell
|
|
3096
3096
|
price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
3097
3097
|
});
|
|
@@ -5518,7 +5518,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
5518
5518
|
// total number of results = content results + product results + category suggestions
|
|
5519
5519
|
const totalNumberResults = $gVhhF$solidjs.createMemo(() => {
|
|
5520
5520
|
const results = get_modal_search_results_()?.();
|
|
5521
|
-
|
|
5521
|
+
// Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
|
|
5522
|
+
const hits = results?.cursor ? results?.n_hits : results?.displays?.length;
|
|
5522
5523
|
const content_results = content_search_enabled_() && results?.content_search_links?.length || 0;
|
|
5523
5524
|
const category_results = listing_suggestions_()?.length || 0;
|
|
5524
5525
|
return (hits ?? 0) + content_results + category_results;
|
|
@@ -7034,6 +7035,7 @@ function $235a2771a44e28e9$export$fecbb157621501bd({
|
|
|
7034
7035
|
}
|
|
7035
7036
|
}), _el$21, _co$7);
|
|
7036
7037
|
$gVhhF$solidjsweb.insert(_el$10, () => price_formatting_().post_, _el$23, _co$8);
|
|
7038
|
+
$gVhhF$solidjsweb.effect(() => $gVhhF$solidjsweb.setAttribute(_el$9, "data-group-title", matching_filter()?.meta?.group_title));
|
|
7037
7039
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
7038
7040
|
return _el$9;
|
|
7039
7041
|
})();
|
|
@@ -7121,6 +7123,7 @@ function $235a2771a44e28e9$export$fecbb157621501bd({
|
|
|
7121
7123
|
}), true);
|
|
7122
7124
|
$gVhhF$solidjsweb.insert(_el$26, $gVhhF$solidjsweb.createComponent((0, $c77c68e559a1506c$export$3b621d86b1566b2), {}), _el$29, _co$10);
|
|
7123
7125
|
$gVhhF$solidjsweb.insert(_el$27, name);
|
|
7126
|
+
$gVhhF$solidjsweb.effect(() => $gVhhF$solidjsweb.setAttribute(_el$26, "data-group-title", matching_filter()?.meta?.group_title));
|
|
7124
7127
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
7125
7128
|
return _el$26;
|
|
7126
7129
|
})();
|
|
@@ -11321,7 +11324,8 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
|
|
|
11321
11324
|
query_base_: query_base_,
|
|
11322
11325
|
depict_api_: depict_api_,
|
|
11323
11326
|
is_loading_: is_loading_,
|
|
11324
|
-
content_blocks_: content_blocks_
|
|
11327
|
+
content_blocks_: content_blocks_,
|
|
11328
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
11325
11329
|
}) {
|
|
11326
11330
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
11327
11331
|
const [get_extra_displays, set_extra_displays_] = $gVhhF$solidjs.createSignal([], {
|
|
@@ -11345,6 +11349,7 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
|
|
|
11345
11349
|
is_loading_: is_loading_,
|
|
11346
11350
|
get_extra_displays: get_extra_displays
|
|
11347
11351
|
});
|
|
11352
|
+
$gVhhF$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
11348
11353
|
$3f08fe2992a2a8ca$export$5e4aed86c12acdd9({
|
|
11349
11354
|
percentage_in_view_: percentage_in_view_,
|
|
11350
11355
|
set_extra_displays_: set_extra_displays_,
|
|
@@ -11400,7 +11405,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
11400
11405
|
layout_options_: layout_options_,
|
|
11401
11406
|
id_currently_querying_for_: id_currently_querying_for_,
|
|
11402
11407
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
11403
|
-
ConfiguredScrollStatus_: ConfiguredScrollStatus_
|
|
11408
|
+
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
11409
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
11404
11410
|
}) {
|
|
11405
11411
|
// The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
|
|
11406
11412
|
const is_loading_ = $gVhhF$solidjs.createMemo(() => plp_results_.loading || query_base_.loading);
|
|
@@ -11531,7 +11537,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
11531
11537
|
query_base_: query_base_,
|
|
11532
11538
|
depict_api_: depict_api_,
|
|
11533
11539
|
is_loading_: is_loading_,
|
|
11534
|
-
content_blocks_: content_blocks_
|
|
11540
|
+
content_blocks_: content_blocks_,
|
|
11541
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
11535
11542
|
});
|
|
11536
11543
|
$gVhhF$solidjs.onCleanup(() => suspense_contents = undefined);
|
|
11537
11544
|
return suspense_contents;
|
|
@@ -13298,6 +13305,15 @@ function $5cbaffcb5602e671$export$44f738469d5570cf({
|
|
|
13298
13305
|
};
|
|
13299
13306
|
});
|
|
13300
13307
|
}
|
|
13308
|
+
function $13796d59ea8af231$export$a86bc18439445599(plp_products_, [allProductsLoaded], currentlyLoadedDisplays) {
|
|
13309
|
+
return $gVhhF$solidjs.createMemo(() => {
|
|
13310
|
+
const backendSays = plp_products_()?.n_hits;
|
|
13311
|
+
const loadedAll = allProductsLoaded();
|
|
13312
|
+
if (!backendSays || !loadedAll) return backendSays;
|
|
13313
|
+
// People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
|
|
13314
|
+
return currentlyLoadedDisplays();
|
|
13315
|
+
});
|
|
13316
|
+
}
|
|
13301
13317
|
var $f1d7cb69f839a526$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
13302
13318
|
$f1d7cb69f839a526$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
13303
13319
|
function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
@@ -13338,6 +13354,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13338
13354
|
}) {
|
|
13339
13355
|
const [get_sorting] = current_sorting_;
|
|
13340
13356
|
const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
|
|
13357
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $gVhhF$solidjs.createSignal(0);
|
|
13341
13358
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
13342
13359
|
const number_of_rendered_selected_filters_items_ = $gVhhF$solidjs.createSignal(0);
|
|
13343
13360
|
const first_result_in_viewport_ = $gVhhF$solidjs.createSignal();
|
|
@@ -13407,9 +13424,9 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13407
13424
|
const SafeSearchField = $gVhhF$depictaiutilishared.catchify((0, $66b8b9a9613c141d$export$b94867ecbd698f21));
|
|
13408
13425
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $gVhhF$solidjs.createSignal(false);
|
|
13409
13426
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $gVhhF$solidjs.createSignal();
|
|
13410
|
-
const
|
|
13427
|
+
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
|
|
13411
13428
|
const formatted_number_of_results_ = $0f400c3f7248d5f1$export$92f2da32c6e7e7ee({
|
|
13412
|
-
number_:
|
|
13429
|
+
number_: countOfProductsForUI,
|
|
13413
13430
|
i18n_: i18n_
|
|
13414
13431
|
});
|
|
13415
13432
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $gVhhF$solidjs.createSignal();
|
|
@@ -13418,7 +13435,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13418
13435
|
get type() {
|
|
13419
13436
|
return (0, $65a0c4b1c2eb5d0b$export$2452208c79fe93ea).products;
|
|
13420
13437
|
},
|
|
13421
|
-
number_of_results_:
|
|
13438
|
+
number_of_results_: countOfProductsForUI
|
|
13422
13439
|
}, {
|
|
13423
13440
|
get_search_query_: get_search_query_,
|
|
13424
13441
|
i18n_: i18n_,
|
|
@@ -13672,6 +13689,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13672
13689
|
sort_or_filter_open_: sort_or_filter_open_,
|
|
13673
13690
|
id_currently_querying_for_: get_search_query_,
|
|
13674
13691
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
13692
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
13675
13693
|
no_results_options_: {
|
|
13676
13694
|
selected_filters_: selected_filters_,
|
|
13677
13695
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
@@ -13714,7 +13732,7 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
13714
13732
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
13715
13733
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
13716
13734
|
i18n_: i18n_,
|
|
13717
|
-
number_of_results_:
|
|
13735
|
+
number_of_results_: countOfProductsForUI
|
|
13718
13736
|
});
|
|
13719
13737
|
}
|
|
13720
13738
|
}), _el$23, _co$10);
|
|
@@ -15116,6 +15134,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15116
15134
|
const number_of_rendered_selected_filters_items_ = $gVhhF$solidjs.createSignal(0);
|
|
15117
15135
|
const first_result_in_viewport_ = $gVhhF$solidjs.createSignal();
|
|
15118
15136
|
const last_result_in_viewport_ = $gVhhF$solidjs.createSignal();
|
|
15137
|
+
const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
|
|
15138
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $gVhhF$solidjs.createSignal(0);
|
|
15119
15139
|
const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $gVhhF$solidjs.createSignal(false);
|
|
15120
15140
|
const products_query_base_ = $8cd545330f2674dc$export$210f130a61ac1e8d(() => {
|
|
15121
15141
|
const sort_obj = get_sorting() && {
|
|
@@ -15162,6 +15182,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15162
15182
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
15163
15183
|
const [plp_meta] = $gVhhF$solidjs.createResource(meta_query_base, $gVhhF$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
|
|
15164
15184
|
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
15185
|
+
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
15165
15186
|
const available_sortings_ = $gVhhF$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
15166
15187
|
...sort,
|
|
15167
15188
|
order: sort.order ?? "desc"
|
|
@@ -15173,7 +15194,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15173
15194
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $gVhhF$solidjs.createSignal(false);
|
|
15174
15195
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $gVhhF$solidjs.createSignal();
|
|
15175
15196
|
const formatted_number_of_results_ = $0f400c3f7248d5f1$export$92f2da32c6e7e7ee({
|
|
15176
|
-
number_:
|
|
15197
|
+
number_: countOfProductsForUI,
|
|
15177
15198
|
i18n_: i18n_
|
|
15178
15199
|
});
|
|
15179
15200
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $gVhhF$solidjs.createSignal();
|
|
@@ -15194,7 +15215,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15194
15215
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
15195
15216
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
15196
15217
|
i18n_: i18n_,
|
|
15197
|
-
number_of_results_:
|
|
15218
|
+
number_of_results_: countOfProductsForUI,
|
|
15198
15219
|
...extraProps
|
|
15199
15220
|
});
|
|
15200
15221
|
}
|
|
@@ -15220,7 +15241,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15220
15241
|
}), _el$4, _co$);
|
|
15221
15242
|
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
15222
15243
|
get when() {
|
|
15223
|
-
return
|
|
15244
|
+
return countOfProductsForUI() === 1;
|
|
15224
15245
|
},
|
|
15225
15246
|
get fallback() {
|
|
15226
15247
|
return i18n_.products_();
|
|
@@ -15425,6 +15446,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15425
15446
|
content_blocks_by_row_: contentBlocksByRow,
|
|
15426
15447
|
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
15427
15448
|
id_currently_querying_for_: id_to_query_for_,
|
|
15449
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
15450
|
+
all_products_loaded_: all_products_loaded_,
|
|
15428
15451
|
no_results_options_: {
|
|
15429
15452
|
selected_filters_: selected_filters_,
|
|
15430
15453
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
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.8.
|
|
14
|
+
export const version = "4.8.5";
|
|
15
15
|
/**
|
|
16
16
|
* Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
17
17
|
*/
|
|
@@ -1506,7 +1506,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1506
1506
|
* Open the modal with support for alignment.
|
|
1507
1507
|
* @returns {void}
|
|
1508
1508
|
*/
|
|
1509
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1509
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1510
1510
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1511
1511
|
export interface PageReplacer {
|
|
1512
1512
|
readonly render_: () => Node_Array;
|
|
@@ -1585,5 +1585,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1585
1585
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1586
1586
|
layout?: PossibleLayout;
|
|
1587
1587
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1588
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1588
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1589
1589
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { dlog as $9HbP8$dlog, catchify as $9HbP8$catchify1, ListenableSet as $9H
|
|
|
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.8.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.5";
|
|
11
11
|
function $a444a52bafa0dacc$export$54c6d6ff54e72743(whatToWatch) {
|
|
12
12
|
const [width, setWidth] = $9HbP8$createSignal(0);
|
|
13
13
|
const [height, setHeight] = $9HbP8$createSignal(0);
|
|
@@ -2987,10 +2987,10 @@ function $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
|
|
|
2987
2987
|
i18n_: i18n_
|
|
2988
2988
|
}) {
|
|
2989
2989
|
return $9HbP8$createMemo(() => {
|
|
2990
|
-
const
|
|
2991
|
-
if (isNaN(
|
|
2990
|
+
const numberToFormat = number_();
|
|
2991
|
+
if (isNaN(numberToFormat)) return "";
|
|
2992
2992
|
const price_formatting = i18n_.price_formatting_();
|
|
2993
|
-
return $9HbP8$standard_price_format(
|
|
2993
|
+
return $9HbP8$standard_price_format(numberToFormat, 0,
|
|
2994
2994
|
// we never want places after comma here it looks weird as hell
|
|
2995
2995
|
price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
2996
2996
|
});
|
|
@@ -5417,7 +5417,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
5417
5417
|
// total number of results = content results + product results + category suggestions
|
|
5418
5418
|
const totalNumberResults = $9HbP8$createMemo(() => {
|
|
5419
5419
|
const results = get_modal_search_results_()?.();
|
|
5420
|
-
|
|
5420
|
+
// Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
|
|
5421
|
+
const hits = results?.cursor ? results?.n_hits : results?.displays?.length;
|
|
5421
5422
|
const content_results = content_search_enabled_() && results?.content_search_links?.length || 0;
|
|
5422
5423
|
const category_results = listing_suggestions_()?.length || 0;
|
|
5423
5424
|
return (hits ?? 0) + content_results + category_results;
|
|
@@ -6933,6 +6934,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
6933
6934
|
}
|
|
6934
6935
|
}), _el$21, _co$7);
|
|
6935
6936
|
$9HbP8$insert(_el$10, () => price_formatting_().post_, _el$23, _co$8);
|
|
6937
|
+
$9HbP8$effect(() => $9HbP8$setAttribute(_el$9, "data-group-title", matching_filter()?.meta?.group_title));
|
|
6936
6938
|
$9HbP8$runHydrationEvents();
|
|
6937
6939
|
return _el$9;
|
|
6938
6940
|
})();
|
|
@@ -7020,6 +7022,7 @@ function $1adfe60f3a14a1d7$export$fecbb157621501bd({
|
|
|
7020
7022
|
}), true);
|
|
7021
7023
|
$9HbP8$insert(_el$26, $9HbP8$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {}), _el$29, _co$10);
|
|
7022
7024
|
$9HbP8$insert(_el$27, name);
|
|
7025
|
+
$9HbP8$effect(() => $9HbP8$setAttribute(_el$26, "data-group-title", matching_filter()?.meta?.group_title));
|
|
7023
7026
|
$9HbP8$runHydrationEvents();
|
|
7024
7027
|
return _el$26;
|
|
7025
7028
|
})();
|
|
@@ -11220,7 +11223,8 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
11220
11223
|
query_base_: query_base_,
|
|
11221
11224
|
depict_api_: depict_api_,
|
|
11222
11225
|
is_loading_: is_loading_,
|
|
11223
|
-
content_blocks_: content_blocks_
|
|
11226
|
+
content_blocks_: content_blocks_,
|
|
11227
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
11224
11228
|
}) {
|
|
11225
11229
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
11226
11230
|
const [get_extra_displays, set_extra_displays_] = $9HbP8$createSignal([], {
|
|
@@ -11244,6 +11248,7 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
11244
11248
|
is_loading_: is_loading_,
|
|
11245
11249
|
get_extra_displays: get_extra_displays
|
|
11246
11250
|
});
|
|
11251
|
+
$9HbP8$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
11247
11252
|
$056f6ac0a6caa919$export$5e4aed86c12acdd9({
|
|
11248
11253
|
percentage_in_view_: percentage_in_view_,
|
|
11249
11254
|
set_extra_displays_: set_extra_displays_,
|
|
@@ -11299,7 +11304,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
11299
11304
|
layout_options_: layout_options_,
|
|
11300
11305
|
id_currently_querying_for_: id_currently_querying_for_,
|
|
11301
11306
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
11302
|
-
ConfiguredScrollStatus_: ConfiguredScrollStatus_
|
|
11307
|
+
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
11308
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
11303
11309
|
}) {
|
|
11304
11310
|
// The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
|
|
11305
11311
|
const is_loading_ = $9HbP8$createMemo(() => plp_results_.loading || query_base_.loading);
|
|
@@ -11430,7 +11436,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
11430
11436
|
query_base_: query_base_,
|
|
11431
11437
|
depict_api_: depict_api_,
|
|
11432
11438
|
is_loading_: is_loading_,
|
|
11433
|
-
content_blocks_: content_blocks_
|
|
11439
|
+
content_blocks_: content_blocks_,
|
|
11440
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
11434
11441
|
});
|
|
11435
11442
|
$9HbP8$onCleanup(() => suspense_contents = undefined);
|
|
11436
11443
|
return suspense_contents;
|
|
@@ -13197,6 +13204,15 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
|
|
|
13197
13204
|
};
|
|
13198
13205
|
});
|
|
13199
13206
|
}
|
|
13207
|
+
function $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, [allProductsLoaded], currentlyLoadedDisplays) {
|
|
13208
|
+
return $9HbP8$createMemo(() => {
|
|
13209
|
+
const backendSays = plp_products_()?.n_hits;
|
|
13210
|
+
const loadedAll = allProductsLoaded();
|
|
13211
|
+
if (!backendSays || !loadedAll) return backendSays;
|
|
13212
|
+
// People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
|
|
13213
|
+
return currentlyLoadedDisplays();
|
|
13214
|
+
});
|
|
13215
|
+
}
|
|
13200
13216
|
var $7097477c78a89208$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
13201
13217
|
$7097477c78a89208$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
|
|
13202
13218
|
function $7097477c78a89208$export$a54ec244c8863715({
|
|
@@ -13237,6 +13253,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13237
13253
|
}) {
|
|
13238
13254
|
const [get_sorting] = current_sorting_;
|
|
13239
13255
|
const all_products_loaded_ = $9HbP8$createSignal(false);
|
|
13256
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $9HbP8$createSignal(0);
|
|
13240
13257
|
const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
|
|
13241
13258
|
const number_of_rendered_selected_filters_items_ = $9HbP8$createSignal(0);
|
|
13242
13259
|
const first_result_in_viewport_ = $9HbP8$createSignal();
|
|
@@ -13306,9 +13323,9 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13306
13323
|
const SafeSearchField = $9HbP8$catchify((0, $5285d2814d0fac0c$export$b94867ecbd698f21));
|
|
13307
13324
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
|
|
13308
13325
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
|
|
13309
|
-
const
|
|
13326
|
+
const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
|
|
13310
13327
|
const formatted_number_of_results_ = $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
|
|
13311
|
-
number_:
|
|
13328
|
+
number_: countOfProductsForUI,
|
|
13312
13329
|
i18n_: i18n_
|
|
13313
13330
|
});
|
|
13314
13331
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
|
|
@@ -13317,7 +13334,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13317
13334
|
get type() {
|
|
13318
13335
|
return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
|
|
13319
13336
|
},
|
|
13320
|
-
number_of_results_:
|
|
13337
|
+
number_of_results_: countOfProductsForUI
|
|
13321
13338
|
}, {
|
|
13322
13339
|
get_search_query_: get_search_query_,
|
|
13323
13340
|
i18n_: i18n_,
|
|
@@ -13571,6 +13588,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13571
13588
|
sort_or_filter_open_: sort_or_filter_open_,
|
|
13572
13589
|
id_currently_querying_for_: get_search_query_,
|
|
13573
13590
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
13591
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
13574
13592
|
no_results_options_: {
|
|
13575
13593
|
selected_filters_: selected_filters_,
|
|
13576
13594
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
@@ -13613,7 +13631,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
13613
13631
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
13614
13632
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
13615
13633
|
i18n_: i18n_,
|
|
13616
|
-
number_of_results_:
|
|
13634
|
+
number_of_results_: countOfProductsForUI
|
|
13617
13635
|
});
|
|
13618
13636
|
}
|
|
13619
13637
|
}), _el$23, _co$10);
|
|
@@ -15015,6 +15033,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
15015
15033
|
const number_of_rendered_selected_filters_items_ = $9HbP8$createSignal(0);
|
|
15016
15034
|
const first_result_in_viewport_ = $9HbP8$createSignal();
|
|
15017
15035
|
const last_result_in_viewport_ = $9HbP8$createSignal();
|
|
15036
|
+
const all_products_loaded_ = $9HbP8$createSignal(false);
|
|
15037
|
+
const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $9HbP8$createSignal(0);
|
|
15018
15038
|
const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $9HbP8$createSignal(false);
|
|
15019
15039
|
const products_query_base_ = $587cd61972788655$export$210f130a61ac1e8d(() => {
|
|
15020
15040
|
const sort_obj = get_sorting() && {
|
|
@@ -15061,6 +15081,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
15061
15081
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
15062
15082
|
const [plp_meta] = $9HbP8$createResource(meta_query_base, $9HbP8$catchify1(query => depict_api_.get_listing(query)));
|
|
15063
15083
|
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
15084
|
+
const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
15064
15085
|
const available_sortings_ = $9HbP8$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
15065
15086
|
...sort,
|
|
15066
15087
|
order: sort.order ?? "desc"
|
|
@@ -15072,7 +15093,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
15072
15093
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
|
|
15073
15094
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
|
|
15074
15095
|
const formatted_number_of_results_ = $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
|
|
15075
|
-
number_:
|
|
15096
|
+
number_: countOfProductsForUI,
|
|
15076
15097
|
i18n_: i18n_
|
|
15077
15098
|
});
|
|
15078
15099
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
|
|
@@ -15093,7 +15114,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
15093
15114
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
15094
15115
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
15095
15116
|
i18n_: i18n_,
|
|
15096
|
-
number_of_results_:
|
|
15117
|
+
number_of_results_: countOfProductsForUI,
|
|
15097
15118
|
...extraProps
|
|
15098
15119
|
});
|
|
15099
15120
|
}
|
|
@@ -15119,7 +15140,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
15119
15140
|
}), _el$4, _co$);
|
|
15120
15141
|
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
15121
15142
|
get when() {
|
|
15122
|
-
return
|
|
15143
|
+
return countOfProductsForUI() === 1;
|
|
15123
15144
|
},
|
|
15124
15145
|
get fallback() {
|
|
15125
15146
|
return i18n_.products_();
|
|
@@ -15324,6 +15345,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
15324
15345
|
content_blocks_by_row_: contentBlocksByRow,
|
|
15325
15346
|
ConfiguredScrollStatus_: ConfiguredScrollStatus_,
|
|
15326
15347
|
id_currently_querying_for_: id_to_query_for_,
|
|
15348
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
15349
|
+
all_products_loaded_: all_products_loaded_,
|
|
15327
15350
|
no_results_options_: {
|
|
15328
15351
|
selected_filters_: selected_filters_,
|
|
15329
15352
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.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",
|