@depict-ai/ui 4.3.11 → 4.3.12
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 +45 -56
- package/ES10/index.d.ts +4 -3
- package/ES10/index.js +46 -57
- package/latest/index.cjs +47 -55
- package/latest/index.d.ts +4 -3
- package/latest/index.js +48 -56
- package/package.json +2 -2
- package/server/ES10/index.cjs +35 -49
- package/server/ES10/index.d.ts +4 -3
- package/server/ES10/index.js +36 -50
- package/server/latest/index.cjs +37 -48
- package/server/latest/index.d.ts +4 -3
- package/server/latest/index.js +38 -49
package/server/ES10/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, standard_price_format as $b8hua$standard_price_format, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ContainedImage as $b8hua$ContainedImage, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj,
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, standard_price_format as $b8hua$standard_price_format, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ContainedImage as $b8hua$ContainedImage, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, ssrStyle as $b8hua$ssrStyle, createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, spread as $b8hua$spread, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $b8hua$createSignal, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, createEffect as $b8hua$createEffect, Show as $b8hua$Show, mergeProps as $b8hua$mergeProps1, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, splitProps as $b8hua$splitProps, on as $b8hua$on, batch as $b8hua$batch, createSelector as $b8hua$createSelector, children as $b8hua$children, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
4
4
|
import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
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.3.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.3.12";
|
|
14
14
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
15
15
|
const cols_at_size = [];
|
|
16
16
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -614,7 +614,8 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
614
614
|
recommendations_resource_: recommendations_resource_,
|
|
615
615
|
product_card_template_: product_card_template_,
|
|
616
616
|
layout_options_: layout_options_,
|
|
617
|
-
title_: title_
|
|
617
|
+
title_: title_,
|
|
618
|
+
NoResultsFallback_: NoResultsFallback_
|
|
618
619
|
} = _ref;
|
|
619
620
|
const is_showing_something = $b8hua$createMemo(() => {
|
|
620
621
|
var _recommendations_reso;
|
|
@@ -673,6 +674,9 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
673
674
|
get when() {
|
|
674
675
|
return is_showing_something();
|
|
675
676
|
},
|
|
677
|
+
get fallback() {
|
|
678
|
+
return NoResultsFallback_ === null || NoResultsFallback_ === void 0 ? void 0 : NoResultsFallback_();
|
|
679
|
+
},
|
|
676
680
|
children: slider
|
|
677
681
|
});
|
|
678
682
|
}
|
|
@@ -1654,7 +1658,8 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
1654
1658
|
layout_options_: layout_options_,
|
|
1655
1659
|
title_: title_,
|
|
1656
1660
|
max_rows_: max_rows_,
|
|
1657
|
-
view_more_button_: view_more_button_
|
|
1661
|
+
view_more_button_: view_more_button_,
|
|
1662
|
+
NoResultsFallback_: NoResultsFallback_
|
|
1658
1663
|
} = _ref;
|
|
1659
1664
|
const rows_object_ = $b8hua$createMemo(() => {
|
|
1660
1665
|
var _view_more_button$row;
|
|
@@ -1720,6 +1725,9 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
1720
1725
|
get when() {
|
|
1721
1726
|
return is_showing_something();
|
|
1722
1727
|
},
|
|
1728
|
+
get fallback() {
|
|
1729
|
+
return NoResultsFallback_ === null || NoResultsFallback_ === void 0 ? void 0 : NoResultsFallback_();
|
|
1730
|
+
},
|
|
1723
1731
|
children: elements
|
|
1724
1732
|
});
|
|
1725
1733
|
}
|
|
@@ -1789,7 +1797,8 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
1789
1797
|
layout_options_: $b8hua$createMemo(() => ({
|
|
1790
1798
|
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1791
1799
|
...grid_spacing_override()
|
|
1792
|
-
}))
|
|
1800
|
+
})),
|
|
1801
|
+
NoResultsFallback_: () => props.NoResultsFallback_
|
|
1793
1802
|
};
|
|
1794
1803
|
$b8hua$createEffect(() => {
|
|
1795
1804
|
const {
|
|
@@ -5683,40 +5692,13 @@ function $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_ran
|
|
|
5683
5692
|
new_value[index] = value_as_number;
|
|
5684
5693
|
current_range_signal[1](new_value);
|
|
5685
5694
|
}
|
|
5686
|
-
var $457279ff15864cb9$var$_tmpl$ = ["<div", ' class="
|
|
5695
|
+
var $457279ff15864cb9$var$_tmpl$ = ["<div", ' class="', '" role="img"', "><span></span><span></span></div>"];
|
|
5687
5696
|
function $457279ff15864cb9$export$e5c2828934226505(_ref) {
|
|
5688
5697
|
let {
|
|
5689
5698
|
expanded_: expanded_,
|
|
5690
5699
|
i18n_: i18n_
|
|
5691
5700
|
} = _ref;
|
|
5692
|
-
|
|
5693
|
-
let second_span;
|
|
5694
|
-
const animation_options = {
|
|
5695
|
-
fill: "forwards",
|
|
5696
|
-
duration: 200
|
|
5697
|
-
};
|
|
5698
|
-
const outer_div = $b8hua$ssr($457279ff15864cb9$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", expanded_() ? $b8hua$escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $b8hua$escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5699
|
-
const [is_in_dom, set_is_in_dom] = $b8hua$createSignal(false);
|
|
5700
|
-
(0, $b8hua$observer).wait_for_element(outer_div).then($b8hua$catchify(() => set_is_in_dom(true)));
|
|
5701
|
-
$b8hua$createEffect(() => {
|
|
5702
|
-
if (!is_in_dom())
|
|
5703
|
-
// wait for us to being in DOM as animations don't work otherwise
|
|
5704
|
-
return;
|
|
5705
|
-
try {
|
|
5706
|
-
const expanded = expanded_();
|
|
5707
|
-
for (const span of [first_span, second_span]) span.animate([{
|
|
5708
|
-
transform: "rotate(".concat(expanded ? 90 : "0", "deg)")
|
|
5709
|
-
}], animation_options);
|
|
5710
|
-
const percentage_value = "".concat(expanded ? 50 : 25, "%");
|
|
5711
|
-
second_span.animate([{
|
|
5712
|
-
left: percentage_value,
|
|
5713
|
-
right: percentage_value
|
|
5714
|
-
}], animation_options);
|
|
5715
|
-
} catch (e) {
|
|
5716
|
-
$b8hua$dlog("partial keyframes probably not supported", e);
|
|
5717
|
-
}
|
|
5718
|
-
});
|
|
5719
|
-
return outer_div;
|
|
5701
|
+
return $b8hua$ssr($457279ff15864cb9$var$_tmpl$, $b8hua$ssrHydrationKey(), "morphing-sign ".concat(expanded_() ? "expanded" : ""), $b8hua$ssrAttribute("aria-label", expanded_() ? $b8hua$escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $b8hua$escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5720
5702
|
}
|
|
5721
5703
|
var $f3a159279dc1a8fb$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"];
|
|
5722
5704
|
const $f3a159279dc1a8fb$var$dont_cut_in_between_less_than_characters = 30;
|
|
@@ -10795,7 +10777,7 @@ function $881e8953a9103f10$export$9ff751cd77687edc(_ref) {
|
|
|
10795
10777
|
let {
|
|
10796
10778
|
search_results_: search_results_,
|
|
10797
10779
|
router_: router_,
|
|
10798
|
-
|
|
10780
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10799
10781
|
get_search_query_: get_search_query_
|
|
10800
10782
|
} = _ref;
|
|
10801
10783
|
const content_results = $b8hua$createMemo(() => {
|
|
@@ -10814,7 +10796,11 @@ function $881e8953a9103f10$export$9ff751cd77687edc(_ref) {
|
|
|
10814
10796
|
});
|
|
10815
10797
|
$b8hua$createEffect(() => {
|
|
10816
10798
|
const results = content_results();
|
|
10817
|
-
|
|
10799
|
+
const numberResults = Array.isArray(results) ? results.length : 0;
|
|
10800
|
+
setNumberContentResultsPerQuery_(prev => {
|
|
10801
|
+
prev.set($b8hua$untrack(get_search_query_), numberResults);
|
|
10802
|
+
return prev;
|
|
10803
|
+
});
|
|
10818
10804
|
});
|
|
10819
10805
|
return $b8hua$createComponent((0, $b8hua$For), {
|
|
10820
10806
|
get each() {
|
|
@@ -10832,7 +10818,8 @@ function $881e8953a9103f10$export$9ff751cd77687edc(_ref) {
|
|
|
10832
10818
|
function $ad4f3c9872fbeb48$export$4405d077f0a20494(_ref) {
|
|
10833
10819
|
let {
|
|
10834
10820
|
content_results_rows_: [get_history_state_content_results_rows],
|
|
10835
|
-
cols_at_size_: cols_at_size_
|
|
10821
|
+
cols_at_size_: cols_at_size_,
|
|
10822
|
+
overrideAmount_: overrideAmount_
|
|
10836
10823
|
} = _ref;
|
|
10837
10824
|
const colsShowingNow = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
10838
10825
|
const largest_column = $b8hua$createMemo(() => {
|
|
@@ -10845,10 +10832,10 @@ function $ad4f3c9872fbeb48$export$4405d077f0a20494(_ref) {
|
|
|
10845
10832
|
});
|
|
10846
10833
|
const num_placeholders = $b8hua$createMemo(() => {
|
|
10847
10834
|
var _get_history_state_co;
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
);
|
|
10835
|
+
const override = overrideAmount_();
|
|
10836
|
+
if (override !== undefined) return override;
|
|
10837
|
+
// Use how many columns we're actually showing, if available, so that we're showing exactly as many placeholders as we'd show content, so that the view more button doesn't appear/disappear and makes the layout shift
|
|
10838
|
+
return ((_get_history_state_co = get_history_state_content_results_rows()) !== null && _get_history_state_co !== void 0 ? _get_history_state_co : (0, $d53ebed6f63304e4$export$70ceae36059a1036)) * (colsShowingNow() || largest_column());
|
|
10852
10839
|
});
|
|
10853
10840
|
return $b8hua$createComponent((0, $b8hua$Index), {
|
|
10854
10841
|
get each() {
|
|
@@ -10887,15 +10874,13 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
10887
10874
|
number_: num_results,
|
|
10888
10875
|
i18n_: i18n_
|
|
10889
10876
|
});
|
|
10890
|
-
const
|
|
10891
|
-
|
|
10892
|
-
const placeholders_enabled = $b8hua$createMemo(() => {
|
|
10893
|
-
// don't show placeholders when the user toggles filters
|
|
10894
|
-
check_query();
|
|
10895
|
-
return !queries_without_content_results_.has(get_search_query_());
|
|
10877
|
+
const [numberContentResultsPerQuery, setNumberContentResultsPerQuery_] = $b8hua$createSignal(new Map(), {
|
|
10878
|
+
equals: false
|
|
10896
10879
|
});
|
|
10880
|
+
const contentResultsForCurrentQuery = $b8hua$createMemo(() => numberContentResultsPerQuery().get(get_search_query_()));
|
|
10881
|
+
// Don't show placeholder if we know there will not be any content results and someone is just toggling filters
|
|
10882
|
+
const placeholders_enabled = $b8hua$createMemo(() => contentResultsForCurrentQuery() !== 0);
|
|
10897
10883
|
const rows_object = $d53ebed6f63304e4$var$make_state_saved_rows(content_results_rows_, i18n_);
|
|
10898
|
-
for (const ev of ["add", "delete"]) queries_without_content_results_.addEventListener(ev, () => set_check_query(prev => !prev));
|
|
10899
10884
|
return $b8hua$ssr($d53ebed6f63304e4$var$_tmpl$, $b8hua$ssrHydrationKey(), "display:" + (is_loading_() && placeholders_enabled() || ((_content_results2 = content_results()) === null || _content_results2 === void 0 ? void 0 : _content_results2.length) > 0 ? "" : "none"), $b8hua$escape($b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), {
|
|
10900
10885
|
get_search_query_: get_search_query_,
|
|
10901
10886
|
i18n_: i18n_,
|
|
@@ -10918,14 +10903,15 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
10918
10903
|
content_results_rows_: content_results_rows_,
|
|
10919
10904
|
get cols_at_size_() {
|
|
10920
10905
|
return $b8hua$createMemo(() => layout_options_().cols_at_size);
|
|
10921
|
-
}
|
|
10906
|
+
},
|
|
10907
|
+
overrideAmount_: contentResultsForCurrentQuery
|
|
10922
10908
|
});
|
|
10923
10909
|
},
|
|
10924
10910
|
get children() {
|
|
10925
10911
|
return $b8hua$createComponent((0, $881e8953a9103f10$export$9ff751cd77687edc), {
|
|
10926
10912
|
router_: router_,
|
|
10927
10913
|
search_results_: search_results_,
|
|
10928
|
-
|
|
10914
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10929
10915
|
get_search_query_: get_search_query_
|
|
10930
10916
|
});
|
|
10931
10917
|
}
|
package/server/latest/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
94
94
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
95
95
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.3.
|
|
97
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.3.12";
|
|
98
98
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
99
99
|
const cols_at_size = [];
|
|
100
100
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -670,7 +670,8 @@ function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
|
670
670
|
recommendations_resource_: recommendations_resource_,
|
|
671
671
|
product_card_template_: product_card_template_,
|
|
672
672
|
layout_options_: layout_options_,
|
|
673
|
-
title_: title_
|
|
673
|
+
title_: title_,
|
|
674
|
+
NoResultsFallback_: NoResultsFallback_
|
|
674
675
|
}) {
|
|
675
676
|
const is_showing_something = $5vyXB$solidjs.createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
676
677
|
const title = $5vyXB$solidjs.createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
@@ -726,6 +727,9 @@ function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
|
726
727
|
get when() {
|
|
727
728
|
return is_showing_something();
|
|
728
729
|
},
|
|
730
|
+
get fallback() {
|
|
731
|
+
return NoResultsFallback_?.();
|
|
732
|
+
},
|
|
729
733
|
children: slider
|
|
730
734
|
});
|
|
731
735
|
}
|
|
@@ -1655,7 +1659,8 @@ function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
|
1655
1659
|
layout_options_: layout_options_,
|
|
1656
1660
|
title_: title_,
|
|
1657
1661
|
max_rows_: max_rows_,
|
|
1658
|
-
view_more_button_: view_more_button_
|
|
1662
|
+
view_more_button_: view_more_button_,
|
|
1663
|
+
NoResultsFallback_: NoResultsFallback_
|
|
1659
1664
|
}) {
|
|
1660
1665
|
const rows_object_ = $5vyXB$solidjs.createMemo(() => {
|
|
1661
1666
|
const view_more_button = view_more_button_?.();
|
|
@@ -1717,6 +1722,9 @@ function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
|
1717
1722
|
get when() {
|
|
1718
1723
|
return is_showing_something();
|
|
1719
1724
|
},
|
|
1725
|
+
get fallback() {
|
|
1726
|
+
return NoResultsFallback_?.();
|
|
1727
|
+
},
|
|
1720
1728
|
children: elements
|
|
1721
1729
|
});
|
|
1722
1730
|
}
|
|
@@ -1784,7 +1792,8 @@ function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
|
1784
1792
|
layout_options_: $5vyXB$solidjs.createMemo(() => ({
|
|
1785
1793
|
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1786
1794
|
...grid_spacing_override()
|
|
1787
|
-
}))
|
|
1795
|
+
})),
|
|
1796
|
+
NoResultsFallback_: () => props.NoResultsFallback_
|
|
1788
1797
|
};
|
|
1789
1798
|
$5vyXB$solidjs.createEffect(() => {
|
|
1790
1799
|
const {
|
|
@@ -5477,39 +5486,12 @@ function $0b7222ba8a8bb72f$var$set_range_with_sanitation(min_, max_, current_ran
|
|
|
5477
5486
|
new_value[index] = value_as_number;
|
|
5478
5487
|
current_range_signal[1](new_value);
|
|
5479
5488
|
}
|
|
5480
|
-
var $7567511a7c3e4bd7$var$_tmpl$ = ["<div", ' class="
|
|
5489
|
+
var $7567511a7c3e4bd7$var$_tmpl$ = ["<div", ' class="', '" role="img"', "><span></span><span></span></div>"];
|
|
5481
5490
|
function $7567511a7c3e4bd7$export$e5c2828934226505({
|
|
5482
5491
|
expanded_: expanded_,
|
|
5483
5492
|
i18n_: i18n_
|
|
5484
5493
|
}) {
|
|
5485
|
-
|
|
5486
|
-
let second_span;
|
|
5487
|
-
const animation_options = {
|
|
5488
|
-
fill: "forwards",
|
|
5489
|
-
duration: 200
|
|
5490
|
-
};
|
|
5491
|
-
const outer_div = $5vyXB$solidjsweb.ssr($7567511a7c3e4bd7$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("aria-label", expanded_() ? $5vyXB$solidjsweb.escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $5vyXB$solidjsweb.escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5492
|
-
const [is_in_dom, set_is_in_dom] = $5vyXB$solidjs.createSignal(false);
|
|
5493
|
-
(0, $5vyXB$depictaiutilishared.observer).wait_for_element(outer_div).then($5vyXB$depictaiutilishared.catchify(() => set_is_in_dom(true)));
|
|
5494
|
-
$5vyXB$solidjs.createEffect(() => {
|
|
5495
|
-
if (!is_in_dom())
|
|
5496
|
-
// wait for us to being in DOM as animations don't work otherwise
|
|
5497
|
-
return;
|
|
5498
|
-
try {
|
|
5499
|
-
const expanded = expanded_();
|
|
5500
|
-
for (const span of [first_span, second_span]) span.animate([{
|
|
5501
|
-
transform: `rotate(${expanded ? 90 : "0"}deg)`
|
|
5502
|
-
}], animation_options);
|
|
5503
|
-
const percentage_value = `${expanded ? 50 : 25}%`;
|
|
5504
|
-
second_span.animate([{
|
|
5505
|
-
left: percentage_value,
|
|
5506
|
-
right: percentage_value
|
|
5507
|
-
}], animation_options);
|
|
5508
|
-
} catch (e) {
|
|
5509
|
-
$5vyXB$depictaiutilishared.dlog("partial keyframes probably not supported", e);
|
|
5510
|
-
}
|
|
5511
|
-
});
|
|
5512
|
-
return outer_div;
|
|
5494
|
+
return $5vyXB$solidjsweb.ssr($7567511a7c3e4bd7$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `morphing-sign ${expanded_() ? "expanded" : ""}`, $5vyXB$solidjsweb.ssrAttribute("aria-label", expanded_() ? $5vyXB$solidjsweb.escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $5vyXB$solidjsweb.escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5513
5495
|
}
|
|
5514
5496
|
var $5ea5a82e398f6f44$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"];
|
|
5515
5497
|
const $5ea5a82e398f6f44$var$dont_cut_in_between_less_than_characters = 30;
|
|
@@ -10192,7 +10174,7 @@ function $76227de40be817e5$export$f631859cab12b342({
|
|
|
10192
10174
|
function $8781fcec27b20709$export$9ff751cd77687edc({
|
|
10193
10175
|
search_results_: search_results_,
|
|
10194
10176
|
router_: router_,
|
|
10195
|
-
|
|
10177
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10196
10178
|
get_search_query_: get_search_query_
|
|
10197
10179
|
}) {
|
|
10198
10180
|
const content_results = $5vyXB$solidjs.createMemo(() => search_results_()?.content_search_links);
|
|
@@ -10208,7 +10190,11 @@ function $8781fcec27b20709$export$9ff751cd77687edc({
|
|
|
10208
10190
|
});
|
|
10209
10191
|
$5vyXB$solidjs.createEffect(() => {
|
|
10210
10192
|
const results = content_results();
|
|
10211
|
-
|
|
10193
|
+
const numberResults = Array.isArray(results) ? results.length : 0;
|
|
10194
|
+
setNumberContentResultsPerQuery_(prev => {
|
|
10195
|
+
prev.set($5vyXB$solidjs.untrack(get_search_query_), numberResults);
|
|
10196
|
+
return prev;
|
|
10197
|
+
});
|
|
10212
10198
|
});
|
|
10213
10199
|
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.For), {
|
|
10214
10200
|
get each() {
|
|
@@ -10225,7 +10211,8 @@ function $8781fcec27b20709$export$9ff751cd77687edc({
|
|
|
10225
10211
|
}
|
|
10226
10212
|
function $c2f92eb265a14529$export$4405d077f0a20494({
|
|
10227
10213
|
content_results_rows_: [get_history_state_content_results_rows],
|
|
10228
|
-
cols_at_size_: cols_at_size_
|
|
10214
|
+
cols_at_size_: cols_at_size_,
|
|
10215
|
+
overrideAmount_: overrideAmount_
|
|
10229
10216
|
}) {
|
|
10230
10217
|
const colsShowingNow = $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_);
|
|
10231
10218
|
const largest_column = $5vyXB$solidjs.createMemo(() => {
|
|
@@ -10233,9 +10220,12 @@ function $c2f92eb265a14529$export$4405d077f0a20494({
|
|
|
10233
10220
|
if (isNaN(largest_in_cols_at_size) || Math.abs(largest_in_cols_at_size) === Infinity) return 4; // fallback to something big so we always have the right amount of placeholders
|
|
10234
10221
|
return largest_in_cols_at_size;
|
|
10235
10222
|
});
|
|
10236
|
-
const num_placeholders = $5vyXB$solidjs.createMemo(() =>
|
|
10237
|
-
|
|
10238
|
-
|
|
10223
|
+
const num_placeholders = $5vyXB$solidjs.createMemo(() => {
|
|
10224
|
+
const override = overrideAmount_();
|
|
10225
|
+
if (override !== undefined) return override;
|
|
10226
|
+
// Use how many columns we're actually showing, if available, so that we're showing exactly as many placeholders as we'd show content, so that the view more button doesn't appear/disappear and makes the layout shift
|
|
10227
|
+
return (get_history_state_content_results_rows() ?? (0, $3716b8caf7f959e2$export$70ceae36059a1036)) * (colsShowingNow() || largest_column());
|
|
10228
|
+
});
|
|
10239
10229
|
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
|
|
10240
10230
|
get each() {
|
|
10241
10231
|
return Array.from({
|
|
@@ -10265,15 +10255,13 @@ function $3716b8caf7f959e2$export$6d0c9c22f6652669({
|
|
|
10265
10255
|
number_: num_results,
|
|
10266
10256
|
i18n_: i18n_
|
|
10267
10257
|
});
|
|
10268
|
-
const
|
|
10269
|
-
|
|
10270
|
-
const placeholders_enabled = $5vyXB$solidjs.createMemo(() => {
|
|
10271
|
-
// don't show placeholders when the user toggles filters
|
|
10272
|
-
check_query();
|
|
10273
|
-
return !queries_without_content_results_.has(get_search_query_());
|
|
10258
|
+
const [numberContentResultsPerQuery, setNumberContentResultsPerQuery_] = $5vyXB$solidjs.createSignal(new Map(), {
|
|
10259
|
+
equals: false
|
|
10274
10260
|
});
|
|
10261
|
+
const contentResultsForCurrentQuery = $5vyXB$solidjs.createMemo(() => numberContentResultsPerQuery().get(get_search_query_()));
|
|
10262
|
+
// Don't show placeholder if we know there will not be any content results and someone is just toggling filters
|
|
10263
|
+
const placeholders_enabled = $5vyXB$solidjs.createMemo(() => contentResultsForCurrentQuery() !== 0);
|
|
10275
10264
|
const rows_object = $3716b8caf7f959e2$var$make_state_saved_rows(content_results_rows_, i18n_);
|
|
10276
|
-
for (const ev of ["add", "delete"]) queries_without_content_results_.addEventListener(ev, () => set_check_query(prev => !prev));
|
|
10277
10265
|
return $5vyXB$solidjsweb.ssr($3716b8caf7f959e2$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "display:" + (is_loading_() && placeholders_enabled() || content_results()?.length > 0 ? "" : "none"), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $65a0c4b1c2eb5d0b$export$9dd50d35b9d94fdf), {
|
|
10278
10266
|
get_search_query_: get_search_query_,
|
|
10279
10267
|
i18n_: i18n_,
|
|
@@ -10296,14 +10284,15 @@ function $3716b8caf7f959e2$export$6d0c9c22f6652669({
|
|
|
10296
10284
|
content_results_rows_: content_results_rows_,
|
|
10297
10285
|
get cols_at_size_() {
|
|
10298
10286
|
return $5vyXB$solidjs.createMemo(() => layout_options_().cols_at_size);
|
|
10299
|
-
}
|
|
10287
|
+
},
|
|
10288
|
+
overrideAmount_: contentResultsForCurrentQuery
|
|
10300
10289
|
});
|
|
10301
10290
|
},
|
|
10302
10291
|
get children() {
|
|
10303
10292
|
return $5vyXB$solidjsweb.createComponent((0, $8781fcec27b20709$export$9ff751cd77687edc), {
|
|
10304
10293
|
router_: router_,
|
|
10305
10294
|
search_results_: search_results_,
|
|
10306
|
-
|
|
10295
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10307
10296
|
get_search_query_: get_search_query_
|
|
10308
10297
|
});
|
|
10309
10298
|
}
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.3.
|
|
13
|
+
export const version = "4.3.12";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -877,6 +877,7 @@ export function LooksSliderOrGrid(props: {
|
|
|
877
877
|
FavoriteButton_?: (props: {
|
|
878
878
|
display_: Accessor<ModernDisplay | null | undefined>;
|
|
879
879
|
}) => JSX.Element;
|
|
880
|
+
NoResultsFallback_?: () => JSX.Element;
|
|
880
881
|
displayTransformers_?: DisplayTransformers<ModernDisplay, ModernDisplayWithPageUrl<ModernDisplay>>;
|
|
881
882
|
/**
|
|
882
883
|
* If provided, will render as grid instead of slider
|
|
@@ -1398,7 +1399,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1398
1399
|
* Open the modal with support for alignment.
|
|
1399
1400
|
* @returns {void}
|
|
1400
1401
|
*/
|
|
1401
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1402
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1402
1403
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1403
1404
|
export interface PageReplacer {
|
|
1404
1405
|
readonly render_: () => Node_Array;
|
|
@@ -1476,5 +1477,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1476
1477
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1477
1478
|
layout?: PossibleLayout;
|
|
1478
1479
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1479
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1480
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1480
1481
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/latest/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $i7OB2$add_to_version_info, fetch_retry as $i7OB2$fetch_retry, base_url as $i7OB2$base_url, dwarn as $i7OB2$dwarn, slider_fractional_factory as $i7OB2$slider_fractional_factory, dlog as $i7OB2$dlog, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, catchify as $i7OB2$catchify, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, slider_fading_factory as $i7OB2$slider_fading_factory, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, observer as $i7OB2$observer, javascript_media_query as $i7OB2$javascript_media_query, queueMacroTask as $i7OB2$queueMacroTask, findMostFrequentItem as $i7OB2$findMostFrequentItem, standard_price_format as $i7OB2$standard_price_format, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ContainedImage as $i7OB2$ContainedImage, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, use_href_accessor as $i7OB2$use_href_accessor, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, useExpandingContainer as $i7OB2$useExpandingContainer, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params,
|
|
1
|
+
import { add_to_version_info as $i7OB2$add_to_version_info, fetch_retry as $i7OB2$fetch_retry, base_url as $i7OB2$base_url, dwarn as $i7OB2$dwarn, slider_fractional_factory as $i7OB2$slider_fractional_factory, dlog as $i7OB2$dlog, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, catchify as $i7OB2$catchify, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, slider_fading_factory as $i7OB2$slider_fading_factory, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, observer as $i7OB2$observer, javascript_media_query as $i7OB2$javascript_media_query, queueMacroTask as $i7OB2$queueMacroTask, findMostFrequentItem as $i7OB2$findMostFrequentItem, standard_price_format as $i7OB2$standard_price_format, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ContainedImage as $i7OB2$ContainedImage, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, use_href_accessor as $i7OB2$use_href_accessor, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, useExpandingContainer as $i7OB2$useExpandingContainer, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
2
|
import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as $i7OB2$escape, ssrStyle as $i7OB2$ssrStyle, createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, spread as $i7OB2$spread, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, createResource as $i7OB2$createResource, createEffect as $i7OB2$createEffect, Show as $i7OB2$Show, mergeProps as $i7OB2$mergeProps1, Suspense as $i7OB2$Suspense, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, onCleanup as $i7OB2$onCleanup, For as $i7OB2$For, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, splitProps as $i7OB2$splitProps, on as $i7OB2$on, batch as $i7OB2$batch, createSelector as $i7OB2$createSelector, children as $i7OB2$children, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
|
|
4
4
|
import { ListenableSet as $i7OB2$ListenableSet, catchify as $i7OB2$catchify1, use_href_accessor as $i7OB2$use_href_accessor1, report as $i7OB2$report1 } from "@depict-ai/utilishared/latest";
|
|
@@ -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.3.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.3.12";
|
|
11
11
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
12
12
|
const cols_at_size = [];
|
|
13
13
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -583,7 +583,8 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
|
583
583
|
recommendations_resource_: recommendations_resource_,
|
|
584
584
|
product_card_template_: product_card_template_,
|
|
585
585
|
layout_options_: layout_options_,
|
|
586
|
-
title_: title_
|
|
586
|
+
title_: title_,
|
|
587
|
+
NoResultsFallback_: NoResultsFallback_
|
|
587
588
|
}) {
|
|
588
589
|
const is_showing_something = $i7OB2$createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
589
590
|
const title = $i7OB2$createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
@@ -639,6 +640,9 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
|
639
640
|
get when() {
|
|
640
641
|
return is_showing_something();
|
|
641
642
|
},
|
|
643
|
+
get fallback() {
|
|
644
|
+
return NoResultsFallback_?.();
|
|
645
|
+
},
|
|
642
646
|
children: slider
|
|
643
647
|
});
|
|
644
648
|
}
|
|
@@ -1568,7 +1572,8 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
|
1568
1572
|
layout_options_: layout_options_,
|
|
1569
1573
|
title_: title_,
|
|
1570
1574
|
max_rows_: max_rows_,
|
|
1571
|
-
view_more_button_: view_more_button_
|
|
1575
|
+
view_more_button_: view_more_button_,
|
|
1576
|
+
NoResultsFallback_: NoResultsFallback_
|
|
1572
1577
|
}) {
|
|
1573
1578
|
const rows_object_ = $i7OB2$createMemo(() => {
|
|
1574
1579
|
const view_more_button = view_more_button_?.();
|
|
@@ -1630,6 +1635,9 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
|
1630
1635
|
get when() {
|
|
1631
1636
|
return is_showing_something();
|
|
1632
1637
|
},
|
|
1638
|
+
get fallback() {
|
|
1639
|
+
return NoResultsFallback_?.();
|
|
1640
|
+
},
|
|
1633
1641
|
children: elements
|
|
1634
1642
|
});
|
|
1635
1643
|
}
|
|
@@ -1697,7 +1705,8 @@ function $07ef910e8ef6b783$export$2c9f9bf2092486aa(props) {
|
|
|
1697
1705
|
layout_options_: $i7OB2$createMemo(() => ({
|
|
1698
1706
|
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1699
1707
|
...grid_spacing_override()
|
|
1700
|
-
}))
|
|
1708
|
+
})),
|
|
1709
|
+
NoResultsFallback_: () => props.NoResultsFallback_
|
|
1701
1710
|
};
|
|
1702
1711
|
$i7OB2$createEffect(() => {
|
|
1703
1712
|
const {
|
|
@@ -5390,39 +5399,12 @@ function $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_ran
|
|
|
5390
5399
|
new_value[index] = value_as_number;
|
|
5391
5400
|
current_range_signal[1](new_value);
|
|
5392
5401
|
}
|
|
5393
|
-
var $0b6bc2f8309efa8a$var$_tmpl$ = ["<div", ' class="
|
|
5402
|
+
var $0b6bc2f8309efa8a$var$_tmpl$ = ["<div", ' class="', '" role="img"', "><span></span><span></span></div>"];
|
|
5394
5403
|
function $0b6bc2f8309efa8a$export$e5c2828934226505({
|
|
5395
5404
|
expanded_: expanded_,
|
|
5396
5405
|
i18n_: i18n_
|
|
5397
5406
|
}) {
|
|
5398
|
-
|
|
5399
|
-
let second_span;
|
|
5400
|
-
const animation_options = {
|
|
5401
|
-
fill: "forwards",
|
|
5402
|
-
duration: 200
|
|
5403
|
-
};
|
|
5404
|
-
const outer_div = $i7OB2$ssr($0b6bc2f8309efa8a$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("aria-label", expanded_() ? $i7OB2$escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $i7OB2$escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5405
|
-
const [is_in_dom, set_is_in_dom] = $i7OB2$createSignal(false);
|
|
5406
|
-
(0, $i7OB2$observer).wait_for_element(outer_div).then($i7OB2$catchify(() => set_is_in_dom(true)));
|
|
5407
|
-
$i7OB2$createEffect(() => {
|
|
5408
|
-
if (!is_in_dom())
|
|
5409
|
-
// wait for us to being in DOM as animations don't work otherwise
|
|
5410
|
-
return;
|
|
5411
|
-
try {
|
|
5412
|
-
const expanded = expanded_();
|
|
5413
|
-
for (const span of [first_span, second_span]) span.animate([{
|
|
5414
|
-
transform: `rotate(${expanded ? 90 : "0"}deg)`
|
|
5415
|
-
}], animation_options);
|
|
5416
|
-
const percentage_value = `${expanded ? 50 : 25}%`;
|
|
5417
|
-
second_span.animate([{
|
|
5418
|
-
left: percentage_value,
|
|
5419
|
-
right: percentage_value
|
|
5420
|
-
}], animation_options);
|
|
5421
|
-
} catch (e) {
|
|
5422
|
-
$i7OB2$dlog("partial keyframes probably not supported", e);
|
|
5423
|
-
}
|
|
5424
|
-
});
|
|
5425
|
-
return outer_div;
|
|
5407
|
+
return $i7OB2$ssr($0b6bc2f8309efa8a$var$_tmpl$, $i7OB2$ssrHydrationKey(), `morphing-sign ${expanded_() ? "expanded" : ""}`, $i7OB2$ssrAttribute("aria-label", expanded_() ? $i7OB2$escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $i7OB2$escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5426
5408
|
}
|
|
5427
5409
|
var $522a690e0e2bd46d$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"];
|
|
5428
5410
|
const $522a690e0e2bd46d$var$dont_cut_in_between_less_than_characters = 30;
|
|
@@ -10105,7 +10087,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
10105
10087
|
function $b26bdbd081f63e3f$export$9ff751cd77687edc({
|
|
10106
10088
|
search_results_: search_results_,
|
|
10107
10089
|
router_: router_,
|
|
10108
|
-
|
|
10090
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10109
10091
|
get_search_query_: get_search_query_
|
|
10110
10092
|
}) {
|
|
10111
10093
|
const content_results = $i7OB2$createMemo(() => search_results_()?.content_search_links);
|
|
@@ -10121,7 +10103,11 @@ function $b26bdbd081f63e3f$export$9ff751cd77687edc({
|
|
|
10121
10103
|
});
|
|
10122
10104
|
$i7OB2$createEffect(() => {
|
|
10123
10105
|
const results = content_results();
|
|
10124
|
-
|
|
10106
|
+
const numberResults = Array.isArray(results) ? results.length : 0;
|
|
10107
|
+
setNumberContentResultsPerQuery_(prev => {
|
|
10108
|
+
prev.set($i7OB2$untrack(get_search_query_), numberResults);
|
|
10109
|
+
return prev;
|
|
10110
|
+
});
|
|
10125
10111
|
});
|
|
10126
10112
|
return $i7OB2$createComponent((0, $i7OB2$For), {
|
|
10127
10113
|
get each() {
|
|
@@ -10138,7 +10124,8 @@ function $b26bdbd081f63e3f$export$9ff751cd77687edc({
|
|
|
10138
10124
|
}
|
|
10139
10125
|
function $9d5b3ed1fc91c672$export$4405d077f0a20494({
|
|
10140
10126
|
content_results_rows_: [get_history_state_content_results_rows],
|
|
10141
|
-
cols_at_size_: cols_at_size_
|
|
10127
|
+
cols_at_size_: cols_at_size_,
|
|
10128
|
+
overrideAmount_: overrideAmount_
|
|
10142
10129
|
}) {
|
|
10143
10130
|
const colsShowingNow = $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_);
|
|
10144
10131
|
const largest_column = $i7OB2$createMemo(() => {
|
|
@@ -10146,9 +10133,12 @@ function $9d5b3ed1fc91c672$export$4405d077f0a20494({
|
|
|
10146
10133
|
if (isNaN(largest_in_cols_at_size) || Math.abs(largest_in_cols_at_size) === Infinity) return 4; // fallback to something big so we always have the right amount of placeholders
|
|
10147
10134
|
return largest_in_cols_at_size;
|
|
10148
10135
|
});
|
|
10149
|
-
const num_placeholders = $i7OB2$createMemo(() =>
|
|
10150
|
-
|
|
10151
|
-
|
|
10136
|
+
const num_placeholders = $i7OB2$createMemo(() => {
|
|
10137
|
+
const override = overrideAmount_();
|
|
10138
|
+
if (override !== undefined) return override;
|
|
10139
|
+
// Use how many columns we're actually showing, if available, so that we're showing exactly as many placeholders as we'd show content, so that the view more button doesn't appear/disappear and makes the layout shift
|
|
10140
|
+
return (get_history_state_content_results_rows() ?? (0, $49de9d31aeea1b5e$export$70ceae36059a1036)) * (colsShowingNow() || largest_column());
|
|
10141
|
+
});
|
|
10152
10142
|
return $i7OB2$createComponent((0, $i7OB2$Index), {
|
|
10153
10143
|
get each() {
|
|
10154
10144
|
return Array.from({
|
|
@@ -10178,15 +10168,13 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
|
|
|
10178
10168
|
number_: num_results,
|
|
10179
10169
|
i18n_: i18n_
|
|
10180
10170
|
});
|
|
10181
|
-
const
|
|
10182
|
-
|
|
10183
|
-
const placeholders_enabled = $i7OB2$createMemo(() => {
|
|
10184
|
-
// don't show placeholders when the user toggles filters
|
|
10185
|
-
check_query();
|
|
10186
|
-
return !queries_without_content_results_.has(get_search_query_());
|
|
10171
|
+
const [numberContentResultsPerQuery, setNumberContentResultsPerQuery_] = $i7OB2$createSignal(new Map(), {
|
|
10172
|
+
equals: false
|
|
10187
10173
|
});
|
|
10174
|
+
const contentResultsForCurrentQuery = $i7OB2$createMemo(() => numberContentResultsPerQuery().get(get_search_query_()));
|
|
10175
|
+
// Don't show placeholder if we know there will not be any content results and someone is just toggling filters
|
|
10176
|
+
const placeholders_enabled = $i7OB2$createMemo(() => contentResultsForCurrentQuery() !== 0);
|
|
10188
10177
|
const rows_object = $49de9d31aeea1b5e$var$make_state_saved_rows(content_results_rows_, i18n_);
|
|
10189
|
-
for (const ev of ["add", "delete"]) queries_without_content_results_.addEventListener(ev, () => set_check_query(prev => !prev));
|
|
10190
10178
|
return $i7OB2$ssr($49de9d31aeea1b5e$var$_tmpl$, $i7OB2$ssrHydrationKey(), "display:" + (is_loading_() && placeholders_enabled() || content_results()?.length > 0 ? "" : "none"), $i7OB2$escape($i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), {
|
|
10191
10179
|
get_search_query_: get_search_query_,
|
|
10192
10180
|
i18n_: i18n_,
|
|
@@ -10209,14 +10197,15 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
|
|
|
10209
10197
|
content_results_rows_: content_results_rows_,
|
|
10210
10198
|
get cols_at_size_() {
|
|
10211
10199
|
return $i7OB2$createMemo(() => layout_options_().cols_at_size);
|
|
10212
|
-
}
|
|
10200
|
+
},
|
|
10201
|
+
overrideAmount_: contentResultsForCurrentQuery
|
|
10213
10202
|
});
|
|
10214
10203
|
},
|
|
10215
10204
|
get children() {
|
|
10216
10205
|
return $i7OB2$createComponent((0, $b26bdbd081f63e3f$export$9ff751cd77687edc), {
|
|
10217
10206
|
router_: router_,
|
|
10218
10207
|
search_results_: search_results_,
|
|
10219
|
-
|
|
10208
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10220
10209
|
get_search_query_: get_search_query_
|
|
10221
10210
|
});
|
|
10222
10211
|
}
|