@depict-ai/ui 4.10.12 → 4.10.13
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 +62 -22
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +62 -22
- package/latest/index.cjs +62 -22
- package/latest/index.d.ts +1 -1
- package/latest/index.js +62 -22
- package/package.json +4 -4
- package/server/ES10/index.cjs +38 -15
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +38 -15
- package/server/latest/index.cjs +38 -15
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +38 -15
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.13";
|
|
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, ({
|
|
@@ -2210,12 +2210,12 @@ function $cc43b6428000c4bf$export$f21ab0717a89c77f(props) {
|
|
|
2210
2210
|
height: "12"
|
|
2211
2211
|
}), () => $5vyXB$solidjsweb.ssr($cc43b6428000c4bf$var$_tmpl$), true);
|
|
2212
2212
|
}
|
|
2213
|
-
var $0fe1e7efdf4200d6$var$_tmpl$ = ["<button", ' type="button" class="', '"
|
|
2213
|
+
var $0fe1e7efdf4200d6$var$_tmpl$ = ["<button", ' type="button" class="', '"', "><!--$-->", "<!--/--><span>", "</span></button>"];
|
|
2214
2214
|
function $0fe1e7efdf4200d6$export$ca21a16d65b3dd8({
|
|
2215
2215
|
show_extras_: [get_show_extras, set_show_extras],
|
|
2216
2216
|
i18n_: i18n_
|
|
2217
2217
|
}) {
|
|
2218
|
-
return $5vyXB$solidjsweb.ssr($0fe1e7efdf4200d6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `expand-filter ${get_show_extras() ? "expanded" : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $cc43b6428000c4bf$export$f21ab0717a89c77f), {})), get_show_extras() ? $5vyXB$solidjsweb.escape(i18n_.view_less_()) : $5vyXB$solidjsweb.escape(i18n_.view_more_()));
|
|
2218
|
+
return $5vyXB$solidjsweb.ssr($0fe1e7efdf4200d6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `expand-filter ${get_show_extras() ? "expanded" : ""}`, $5vyXB$solidjsweb.ssrAttribute("aria-expanded", $5vyXB$solidjsweb.escape(get_show_extras(), true), false), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $cc43b6428000c4bf$export$f21ab0717a89c77f), {})), get_show_extras() ? $5vyXB$solidjsweb.escape(i18n_.view_less_()) : $5vyXB$solidjsweb.escape(i18n_.view_more_()));
|
|
2219
2219
|
}
|
|
2220
2220
|
var $d023ed916c84e75d$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"],
|
|
2221
2221
|
$d023ed916c84e75d$var$_tmpl$2 = ["<span", ' class="', '"', ">", "</span>"];
|
|
@@ -2446,7 +2446,7 @@ function $c1dc1554c1b94233$export$430444115f70a734({
|
|
|
2446
2446
|
}
|
|
2447
2447
|
})));
|
|
2448
2448
|
}
|
|
2449
|
-
var $0b7222ba8a8bb72f$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
|
|
2449
|
+
var $0b7222ba8a8bb72f$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator" aria-hidden="true">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
|
|
2450
2450
|
$0b7222ba8a8bb72f$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
|
|
2451
2451
|
$0b7222ba8a8bb72f$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
|
|
2452
2452
|
function $0b7222ba8a8bb72f$export$e0d834a0ad870cda({
|
|
@@ -2539,7 +2539,8 @@ function $0b7222ba8a8bb72f$var$RangeSelector({
|
|
|
2539
2539
|
min_: min_,
|
|
2540
2540
|
current_range_: current_range_,
|
|
2541
2541
|
i18n_: i18n_,
|
|
2542
|
-
should_be_disabled_: should_be_disabled_
|
|
2542
|
+
should_be_disabled_: should_be_disabled_,
|
|
2543
|
+
priceFormatting_: price_formatting_
|
|
2543
2544
|
})), $5vyXB$solidjsweb.escape(pre_price()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $d659702496cb72ea$export$a71e92cfbb498adc), {
|
|
2544
2545
|
get price_() {
|
|
2545
2546
|
return min_();
|
|
@@ -2561,7 +2562,8 @@ function $0b7222ba8a8bb72f$var$ExponentialSlider({
|
|
|
2561
2562
|
min_: min_,
|
|
2562
2563
|
i18n_: i18n_,
|
|
2563
2564
|
max_: max_,
|
|
2564
|
-
should_be_disabled_: should_be_disabled_
|
|
2565
|
+
should_be_disabled_: should_be_disabled_,
|
|
2566
|
+
priceFormatting_: priceFormatting_
|
|
2565
2567
|
}) {
|
|
2566
2568
|
// inspired by https://observablehq.com/@mbostock/nonlinear-slider
|
|
2567
2569
|
const transform_linear_to_nonlinear = ([smaller, larger]) => [Math.sqrt(smaller), Math.sqrt(larger)];
|
|
@@ -2595,7 +2597,8 @@ function $0b7222ba8a8bb72f$var$ExponentialSlider({
|
|
|
2595
2597
|
max_: modified_max,
|
|
2596
2598
|
offset_value_calculator_: offset_value_calculator_,
|
|
2597
2599
|
i18n_: i18n_,
|
|
2598
|
-
should_be_disabled_: should_be_disabled_
|
|
2600
|
+
should_be_disabled_: should_be_disabled_,
|
|
2601
|
+
priceFormatting_: priceFormatting_
|
|
2599
2602
|
});
|
|
2600
2603
|
}
|
|
2601
2604
|
function $0b7222ba8a8bb72f$var$LinearSlider({
|
|
@@ -2604,12 +2607,17 @@ function $0b7222ba8a8bb72f$var$LinearSlider({
|
|
|
2604
2607
|
current_range_: current_range_,
|
|
2605
2608
|
offset_value_calculator_: offset_value_calculator_,
|
|
2606
2609
|
i18n_: i18n_,
|
|
2607
|
-
should_be_disabled_: should_be_disabled_
|
|
2610
|
+
should_be_disabled_: should_be_disabled_,
|
|
2611
|
+
priceFormatting_: priceFormatting_
|
|
2608
2612
|
}) {
|
|
2609
2613
|
let range_input_1;
|
|
2610
2614
|
let range_input_2;
|
|
2611
2615
|
let clickable_slider;
|
|
2612
2616
|
const [get_current_range, set_current_range] = current_range_;
|
|
2617
|
+
const formatRealPrice = value => {
|
|
2618
|
+
const priceFormatting = priceFormatting_();
|
|
2619
|
+
return priceFormatting.pre_ + $5vyXB$depictaiutilishared.standard_price_format(value, priceFormatting.places_after_comma_, priceFormatting.decimal_places_delimiter_, priceFormatting.thousands_delimiter_) + priceFormatting.post_;
|
|
2620
|
+
};
|
|
2613
2621
|
const progress_styling = $5vyXB$solidjs.createMemo(() => {
|
|
2614
2622
|
const min = min_();
|
|
2615
2623
|
const span = max_() - min;
|
|
@@ -2628,13 +2636,13 @@ function $0b7222ba8a8bb72f$var$LinearSlider({
|
|
|
2628
2636
|
el.value = get_current_range()[index];
|
|
2629
2637
|
});
|
|
2630
2638
|
};
|
|
2631
|
-
return [$5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(progress_styling())), $5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("value", $5vyXB$solidjsweb.escape($5vyXB$solidjs.createMemo(() => {
|
|
2639
|
+
return [$5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(progress_styling())), $5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("aria-valuetext", $5vyXB$solidjsweb.escape(formatRealPrice(get_current_range()[0]), true), false) + $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("value", $5vyXB$solidjsweb.escape($5vyXB$solidjs.createMemo(() => {
|
|
2632
2640
|
min_();
|
|
2633
2641
|
max_();
|
|
2634
2642
|
return get_current_range()[0];
|
|
2635
2643
|
}, undefined, {
|
|
2636
2644
|
equals: false
|
|
2637
|
-
})(), true), false), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false))];
|
|
2645
|
+
})(), true), false), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("aria-valuetext", $5vyXB$solidjsweb.escape(formatRealPrice(get_current_range()[1]), true), false), $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false))];
|
|
2638
2646
|
}
|
|
2639
2647
|
function $0b7222ba8a8bb72f$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el, get_offset_value = (value, how_many) => value + how_many) {
|
|
2640
2648
|
let value_as_number = +target_el.value;
|
|
@@ -3430,6 +3438,13 @@ const $0ef1681699140f1a$export$414f6a19d38e655c = ({
|
|
|
3430
3438
|
const label = $5vyXB$solidjs.createMemo(() => value().name_ || value().value_ + "");
|
|
3431
3439
|
const count_zero = $5vyXB$solidjs.createMemo(() => value().count_ === 0);
|
|
3432
3440
|
return $5vyXB$solidjsweb.ssrElement("button", $5vyXB$solidjsweb.mergeProps(attributes, {
|
|
3441
|
+
type: "button",
|
|
3442
|
+
get ["aria-pressed"]() {
|
|
3443
|
+
return is_selected();
|
|
3444
|
+
},
|
|
3445
|
+
get ["aria-label"]() {
|
|
3446
|
+
return value().count_ != undefined ? `${label()}, ${value().count_}` : label();
|
|
3447
|
+
},
|
|
3433
3448
|
get disabled() {
|
|
3434
3449
|
return count_zero() && !is_selected();
|
|
3435
3450
|
},
|
|
@@ -3600,7 +3615,14 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
|
|
|
3600
3615
|
return !!data?.some(item => $daa394359b026187$export$325f75597868c4f0(item) === value);
|
|
3601
3616
|
});
|
|
3602
3617
|
const value = $5vyXB$solidjs.createMemo(() => checkbox().value_);
|
|
3603
|
-
const label_text = $5vyXB$solidjs.createMemo(() =>
|
|
3618
|
+
const label_text = $5vyXB$solidjs.createMemo(() => {
|
|
3619
|
+
const name = checkbox().name_;
|
|
3620
|
+
if (name) return name;
|
|
3621
|
+
const value_string = value() + "";
|
|
3622
|
+
if (backendFilterV2()) return value_string;
|
|
3623
|
+
// Legacy values are "Name;#hex" - split is used to get the name so that screen readers don't announce the hex code
|
|
3624
|
+
return value_string.split(";")[0] || value_string;
|
|
3625
|
+
});
|
|
3604
3626
|
const count = $5vyXB$solidjs.createMemo(() => checkbox().count_);
|
|
3605
3627
|
const colorNameDatasetValue = $5vyXB$solidjs.createMemo(() => {
|
|
3606
3628
|
if (backendFilterV2()) return label_text();
|
|
@@ -4011,9 +4033,9 @@ function $47d8681015b71901$var$find_str_arr_in_str_arr_arr(operation, haystack,
|
|
|
4011
4033
|
var $aff9a96d30ed3563$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "</div>"],
|
|
4012
4034
|
$aff9a96d30ed3563$var$_tmpl$2 = ["<button", ' class="clear-group"><!--$-->', "<!--/--><span>", "</span></button>"],
|
|
4013
4035
|
$aff9a96d30ed3563$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
4014
|
-
$aff9a96d30ed3563$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><
|
|
4036
|
+
$aff9a96d30ed3563$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><fieldset class="filter-part"', "><!--$-->", "<!--/--><!--$-->", "<!--/--></fieldset><!--$-->", "<!--/--></div>"],
|
|
4015
4037
|
$aff9a96d30ed3563$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
|
|
4016
|
-
$aff9a96d30ed3563$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span
|
|
4038
|
+
$aff9a96d30ed3563$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span', ">", '</span><div class="selected-w-sign"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div></summary>"],
|
|
4017
4039
|
$aff9a96d30ed3563$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
|
|
4018
4040
|
$aff9a96d30ed3563$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
|
|
4019
4041
|
function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
|
|
@@ -4097,13 +4119,14 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
|
|
|
4097
4119
|
const a_filter_is_selected = $5vyXB$solidjs.createMemo(() => selected_filters_in_group().size);
|
|
4098
4120
|
const [get_details_width, set_get_details_width] = $5vyXB$solidjs.createSignal();
|
|
4099
4121
|
const details_element_width_ = $5vyXB$solidjs.createMemo(() => get_details_width?.()?.());
|
|
4122
|
+
const title_id = $5vyXB$depictaiutilishared.make_random_classname();
|
|
4100
4123
|
return $5vyXB$solidjsweb.createComponent((0, $a69e505a12a77874$export$6c6d7a51fa9aa15d), {
|
|
4101
4124
|
is_open_: is_open,
|
|
4102
4125
|
get details_() {
|
|
4103
4126
|
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$5, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("data-group-title", $5vyXB$solidjsweb.escape(section_, true), false));
|
|
4104
4127
|
},
|
|
4105
4128
|
get summary_() {
|
|
4106
|
-
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$6, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(section_), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
4129
|
+
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$6, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("id", $5vyXB$solidjsweb.escape(title_id, true), false), $5vyXB$solidjsweb.escape(section_), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
4107
4130
|
get when() {
|
|
4108
4131
|
return a_filter_is_selected();
|
|
4109
4132
|
},
|
|
@@ -4125,7 +4148,7 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
|
|
|
4125
4148
|
})));
|
|
4126
4149
|
},
|
|
4127
4150
|
get children() {
|
|
4128
|
-
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$4, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(SearchThisFilterGroup_, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
|
|
4151
|
+
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$4, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("aria-labelledby", $5vyXB$solidjsweb.escape(title_id, true), false), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(SearchThisFilterGroup_, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
|
|
4129
4152
|
get each() {
|
|
4130
4153
|
return searched_filter_array_();
|
|
4131
4154
|
},
|
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.13";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
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.13";
|
|
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, ({
|
|
@@ -2108,12 +2108,12 @@ function $f8a56ba74eedd0c6$export$f21ab0717a89c77f(props) {
|
|
|
2108
2108
|
height: "12"
|
|
2109
2109
|
}), () => $i7OB2$ssr($f8a56ba74eedd0c6$var$_tmpl$), true);
|
|
2110
2110
|
}
|
|
2111
|
-
var $67b173f9db427028$var$_tmpl$ = ["<button", ' type="button" class="', '"
|
|
2111
|
+
var $67b173f9db427028$var$_tmpl$ = ["<button", ' type="button" class="', '"', "><!--$-->", "<!--/--><span>", "</span></button>"];
|
|
2112
2112
|
function $67b173f9db427028$export$ca21a16d65b3dd8({
|
|
2113
2113
|
show_extras_: [get_show_extras, set_show_extras],
|
|
2114
2114
|
i18n_: i18n_
|
|
2115
2115
|
}) {
|
|
2116
|
-
return $i7OB2$ssr($67b173f9db427028$var$_tmpl$, $i7OB2$ssrHydrationKey(), `expand-filter ${get_show_extras() ? "expanded" : ""}`, $i7OB2$escape($i7OB2$createComponent((0, $f8a56ba74eedd0c6$export$f21ab0717a89c77f), {})), get_show_extras() ? $i7OB2$escape(i18n_.view_less_()) : $i7OB2$escape(i18n_.view_more_()));
|
|
2116
|
+
return $i7OB2$ssr($67b173f9db427028$var$_tmpl$, $i7OB2$ssrHydrationKey(), `expand-filter ${get_show_extras() ? "expanded" : ""}`, $i7OB2$ssrAttribute("aria-expanded", $i7OB2$escape(get_show_extras(), true), false), $i7OB2$escape($i7OB2$createComponent((0, $f8a56ba74eedd0c6$export$f21ab0717a89c77f), {})), get_show_extras() ? $i7OB2$escape(i18n_.view_less_()) : $i7OB2$escape(i18n_.view_more_()));
|
|
2117
2117
|
}
|
|
2118
2118
|
var $f3213c0640246d58$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"],
|
|
2119
2119
|
$f3213c0640246d58$var$_tmpl$2 = ["<span", ' class="', '"', ">", "</span>"];
|
|
@@ -2344,7 +2344,7 @@ function $eb8d9bf3b5700c26$export$430444115f70a734({
|
|
|
2344
2344
|
}
|
|
2345
2345
|
})));
|
|
2346
2346
|
}
|
|
2347
|
-
var $a6b08770e164eced$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
|
|
2347
|
+
var $a6b08770e164eced$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator" aria-hidden="true">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
|
|
2348
2348
|
$a6b08770e164eced$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
|
|
2349
2349
|
$a6b08770e164eced$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
|
|
2350
2350
|
function $a6b08770e164eced$export$e0d834a0ad870cda({
|
|
@@ -2437,7 +2437,8 @@ function $a6b08770e164eced$var$RangeSelector({
|
|
|
2437
2437
|
min_: min_,
|
|
2438
2438
|
current_range_: current_range_,
|
|
2439
2439
|
i18n_: i18n_,
|
|
2440
|
-
should_be_disabled_: should_be_disabled_
|
|
2440
|
+
should_be_disabled_: should_be_disabled_,
|
|
2441
|
+
priceFormatting_: price_formatting_
|
|
2441
2442
|
})), $i7OB2$escape(pre_price()), $i7OB2$escape($i7OB2$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
|
|
2442
2443
|
get price_() {
|
|
2443
2444
|
return min_();
|
|
@@ -2459,7 +2460,8 @@ function $a6b08770e164eced$var$ExponentialSlider({
|
|
|
2459
2460
|
min_: min_,
|
|
2460
2461
|
i18n_: i18n_,
|
|
2461
2462
|
max_: max_,
|
|
2462
|
-
should_be_disabled_: should_be_disabled_
|
|
2463
|
+
should_be_disabled_: should_be_disabled_,
|
|
2464
|
+
priceFormatting_: priceFormatting_
|
|
2463
2465
|
}) {
|
|
2464
2466
|
// inspired by https://observablehq.com/@mbostock/nonlinear-slider
|
|
2465
2467
|
const transform_linear_to_nonlinear = ([smaller, larger]) => [Math.sqrt(smaller), Math.sqrt(larger)];
|
|
@@ -2493,7 +2495,8 @@ function $a6b08770e164eced$var$ExponentialSlider({
|
|
|
2493
2495
|
max_: modified_max,
|
|
2494
2496
|
offset_value_calculator_: offset_value_calculator_,
|
|
2495
2497
|
i18n_: i18n_,
|
|
2496
|
-
should_be_disabled_: should_be_disabled_
|
|
2498
|
+
should_be_disabled_: should_be_disabled_,
|
|
2499
|
+
priceFormatting_: priceFormatting_
|
|
2497
2500
|
});
|
|
2498
2501
|
}
|
|
2499
2502
|
function $a6b08770e164eced$var$LinearSlider({
|
|
@@ -2502,12 +2505,17 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
2502
2505
|
current_range_: current_range_,
|
|
2503
2506
|
offset_value_calculator_: offset_value_calculator_,
|
|
2504
2507
|
i18n_: i18n_,
|
|
2505
|
-
should_be_disabled_: should_be_disabled_
|
|
2508
|
+
should_be_disabled_: should_be_disabled_,
|
|
2509
|
+
priceFormatting_: priceFormatting_
|
|
2506
2510
|
}) {
|
|
2507
2511
|
let range_input_1;
|
|
2508
2512
|
let range_input_2;
|
|
2509
2513
|
let clickable_slider;
|
|
2510
2514
|
const [get_current_range, set_current_range] = current_range_;
|
|
2515
|
+
const formatRealPrice = value => {
|
|
2516
|
+
const priceFormatting = priceFormatting_();
|
|
2517
|
+
return priceFormatting.pre_ + $i7OB2$standard_price_format(value, priceFormatting.places_after_comma_, priceFormatting.decimal_places_delimiter_, priceFormatting.thousands_delimiter_) + priceFormatting.post_;
|
|
2518
|
+
};
|
|
2511
2519
|
const progress_styling = $i7OB2$createMemo(() => {
|
|
2512
2520
|
const min = min_();
|
|
2513
2521
|
const span = max_() - min;
|
|
@@ -2526,13 +2534,13 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
2526
2534
|
el.value = get_current_range()[index];
|
|
2527
2535
|
});
|
|
2528
2536
|
};
|
|
2529
|
-
return [$i7OB2$ssr($a6b08770e164eced$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$ssrStyle(progress_styling())), $i7OB2$ssr($a6b08770e164eced$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("disabled", should_be_disabled_(), true), $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $i7OB2$ssrAttribute("min", $i7OB2$escape(min_(), true), false) + $i7OB2$ssrAttribute("max", $i7OB2$escape(max_(), true), false) + $i7OB2$ssrAttribute("value", $i7OB2$escape($i7OB2$createMemo(() => {
|
|
2537
|
+
return [$i7OB2$ssr($a6b08770e164eced$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$ssrStyle(progress_styling())), $i7OB2$ssr($a6b08770e164eced$var$_tmpl$3, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("disabled", should_be_disabled_(), true), $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $i7OB2$ssrAttribute("aria-valuetext", $i7OB2$escape(formatRealPrice(get_current_range()[0]), true), false) + $i7OB2$ssrAttribute("min", $i7OB2$escape(min_(), true), false) + $i7OB2$ssrAttribute("max", $i7OB2$escape(max_(), true), false) + $i7OB2$ssrAttribute("value", $i7OB2$escape($i7OB2$createMemo(() => {
|
|
2530
2538
|
min_();
|
|
2531
2539
|
max_();
|
|
2532
2540
|
return get_current_range()[0];
|
|
2533
2541
|
}, undefined, {
|
|
2534
2542
|
equals: false
|
|
2535
|
-
})(), true), false), $i7OB2$ssrAttribute("disabled", should_be_disabled_(), true) + $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.range_filter_high_point_aria_label_(), true), false), $i7OB2$ssrAttribute("min", $i7OB2$escape(min_(), true), false) + $i7OB2$ssrAttribute("max", $i7OB2$escape(max_(), true), false))];
|
|
2543
|
+
})(), true), false), $i7OB2$ssrAttribute("disabled", should_be_disabled_(), true) + $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.range_filter_high_point_aria_label_(), true), false) + $i7OB2$ssrAttribute("aria-valuetext", $i7OB2$escape(formatRealPrice(get_current_range()[1]), true), false), $i7OB2$ssrAttribute("min", $i7OB2$escape(min_(), true), false) + $i7OB2$ssrAttribute("max", $i7OB2$escape(max_(), true), false))];
|
|
2536
2544
|
}
|
|
2537
2545
|
function $a6b08770e164eced$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el, get_offset_value = (value, how_many) => value + how_many) {
|
|
2538
2546
|
let value_as_number = +target_el.value;
|
|
@@ -3328,6 +3336,13 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
3328
3336
|
const label = $i7OB2$createMemo(() => value().name_ || value().value_ + "");
|
|
3329
3337
|
const count_zero = $i7OB2$createMemo(() => value().count_ === 0);
|
|
3330
3338
|
return $i7OB2$ssrElement("button", $i7OB2$mergeProps1(attributes, {
|
|
3339
|
+
type: "button",
|
|
3340
|
+
get ["aria-pressed"]() {
|
|
3341
|
+
return is_selected();
|
|
3342
|
+
},
|
|
3343
|
+
get ["aria-label"]() {
|
|
3344
|
+
return value().count_ != undefined ? `${label()}, ${value().count_}` : label();
|
|
3345
|
+
},
|
|
3331
3346
|
get disabled() {
|
|
3332
3347
|
return count_zero() && !is_selected();
|
|
3333
3348
|
},
|
|
@@ -3498,7 +3513,14 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
3498
3513
|
return !!data?.some(item => $91aa8ee9f431800d$export$325f75597868c4f0(item) === value);
|
|
3499
3514
|
});
|
|
3500
3515
|
const value = $i7OB2$createMemo(() => checkbox().value_);
|
|
3501
|
-
const label_text = $i7OB2$createMemo(() =>
|
|
3516
|
+
const label_text = $i7OB2$createMemo(() => {
|
|
3517
|
+
const name = checkbox().name_;
|
|
3518
|
+
if (name) return name;
|
|
3519
|
+
const value_string = value() + "";
|
|
3520
|
+
if (backendFilterV2()) return value_string;
|
|
3521
|
+
// Legacy values are "Name;#hex" - split is used to get the name so that screen readers don't announce the hex code
|
|
3522
|
+
return value_string.split(";")[0] || value_string;
|
|
3523
|
+
});
|
|
3502
3524
|
const count = $i7OB2$createMemo(() => checkbox().count_);
|
|
3503
3525
|
const colorNameDatasetValue = $i7OB2$createMemo(() => {
|
|
3504
3526
|
if (backendFilterV2()) return label_text();
|
|
@@ -3909,9 +3931,9 @@ function $e01b34f289b61435$var$find_str_arr_in_str_arr_arr(operation, haystack,
|
|
|
3909
3931
|
var $fab07f52c9861732$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "</div>"],
|
|
3910
3932
|
$fab07f52c9861732$var$_tmpl$2 = ["<button", ' class="clear-group"><!--$-->', "<!--/--><span>", "</span></button>"],
|
|
3911
3933
|
$fab07f52c9861732$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
3912
|
-
$fab07f52c9861732$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><
|
|
3934
|
+
$fab07f52c9861732$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><fieldset class="filter-part"', "><!--$-->", "<!--/--><!--$-->", "<!--/--></fieldset><!--$-->", "<!--/--></div>"],
|
|
3913
3935
|
$fab07f52c9861732$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
|
|
3914
|
-
$fab07f52c9861732$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span
|
|
3936
|
+
$fab07f52c9861732$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span', ">", '</span><div class="selected-w-sign"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div></summary>"],
|
|
3915
3937
|
$fab07f52c9861732$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
|
|
3916
3938
|
$fab07f52c9861732$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
|
|
3917
3939
|
function $fab07f52c9861732$export$3f1a388cc0d8fed7(props) {
|
|
@@ -3995,13 +4017,14 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
3995
4017
|
const a_filter_is_selected = $i7OB2$createMemo(() => selected_filters_in_group().size);
|
|
3996
4018
|
const [get_details_width, set_get_details_width] = $i7OB2$createSignal();
|
|
3997
4019
|
const details_element_width_ = $i7OB2$createMemo(() => get_details_width?.()?.());
|
|
4020
|
+
const title_id = $i7OB2$make_random_classname();
|
|
3998
4021
|
return $i7OB2$createComponent((0, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d), {
|
|
3999
4022
|
is_open_: is_open,
|
|
4000
4023
|
get details_() {
|
|
4001
4024
|
return $i7OB2$ssr($fab07f52c9861732$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("data-group-title", $i7OB2$escape(section_, true), false));
|
|
4002
4025
|
},
|
|
4003
4026
|
get summary_() {
|
|
4004
|
-
return $i7OB2$ssr($fab07f52c9861732$var$_tmpl$6, $i7OB2$ssrHydrationKey(), $i7OB2$escape(section_), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
4027
|
+
return $i7OB2$ssr($fab07f52c9861732$var$_tmpl$6, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("id", $i7OB2$escape(title_id, true), false), $i7OB2$escape(section_), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
4005
4028
|
get when() {
|
|
4006
4029
|
return a_filter_is_selected();
|
|
4007
4030
|
},
|
|
@@ -4023,7 +4046,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
4023
4046
|
})));
|
|
4024
4047
|
},
|
|
4025
4048
|
get children() {
|
|
4026
|
-
return $i7OB2$ssr($fab07f52c9861732$var$_tmpl$4, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(SearchThisFilterGroup_, {})), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Index), {
|
|
4049
|
+
return $i7OB2$ssr($fab07f52c9861732$var$_tmpl$4, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("aria-labelledby", $i7OB2$escape(title_id, true), false), $i7OB2$escape($i7OB2$createComponent(SearchThisFilterGroup_, {})), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Index), {
|
|
4027
4050
|
get each() {
|
|
4028
4051
|
return searched_filter_array_();
|
|
4029
4052
|
},
|