@depict-ai/ui 2.1.14 → 2.1.16
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 +101 -45
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +101 -45
- package/latest/index.cjs +80 -25
- package/latest/index.d.ts +1 -1
- package/latest/index.js +80 -25
- package/package.json +2 -2
- package/server/ES10/index.cjs +99 -43
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +99 -43
- package/server/latest/index.cjs +80 -25
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +80 -25
package/server/ES10/index.cjs
CHANGED
|
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
76
76
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
77
77
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
78
78
|
/*! Depict.ai search and product listing SDK */
|
|
79
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.
|
|
79
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.16";
|
|
80
80
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
81
81
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
82
82
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -1695,16 +1695,26 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
|
|
|
1695
1695
|
return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === value));
|
|
1696
1696
|
});
|
|
1697
1697
|
const value = $3hooq$solidjs.createMemo(() => checkbox().value_);
|
|
1698
|
+
const is_count_zero = $3hooq$solidjs.createMemo(() => checkbox().count_ === 0);
|
|
1699
|
+
const display_text = $3hooq$solidjs.createMemo(() => checkbox().name_ || value());
|
|
1698
1700
|
return $3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
1699
1701
|
get value_() {
|
|
1700
1702
|
return value();
|
|
1701
1703
|
},
|
|
1702
1704
|
get label_() {
|
|
1703
|
-
return $3hooq$solidjsweb.createComponent((0, $
|
|
1704
|
-
get
|
|
1705
|
-
return
|
|
1705
|
+
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1706
|
+
get when() {
|
|
1707
|
+
return is_count_zero();
|
|
1706
1708
|
},
|
|
1707
|
-
|
|
1709
|
+
get fallback() {
|
|
1710
|
+
return $3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
1711
|
+
whole_text_to_display_: display_text,
|
|
1712
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
1713
|
+
});
|
|
1714
|
+
},
|
|
1715
|
+
get children() {
|
|
1716
|
+
return display_text();
|
|
1717
|
+
}
|
|
1708
1718
|
});
|
|
1709
1719
|
},
|
|
1710
1720
|
get count_() {
|
|
@@ -1748,6 +1758,7 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
|
|
|
1748
1758
|
i18n_: i18n_
|
|
1749
1759
|
}) : []);
|
|
1750
1760
|
});
|
|
1761
|
+
$3hooq$solidjs.onCleanup(() => set_view_more_button_below_group_());
|
|
1751
1762
|
$3hooq$solidjs.createEffect($3hooq$depictaiutilishared.catchify(async () => {
|
|
1752
1763
|
if (!togglable_rest()) {
|
|
1753
1764
|
await collapse();
|
|
@@ -1808,9 +1819,19 @@ function $d9239dad9a9d899b$export$430444115f70a734(_ref) {
|
|
|
1808
1819
|
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1809
1820
|
if ($e2d74bb03cc5252e$export$325f75597868c4f0(data) === $e2d74bb03cc5252e$export$325f75597868c4f0(v)) return true;
|
|
1810
1821
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1811
|
-
})(), true), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $
|
|
1812
|
-
|
|
1813
|
-
|
|
1822
|
+
})(), true), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1823
|
+
get when() {
|
|
1824
|
+
return count() !== 0;
|
|
1825
|
+
},
|
|
1826
|
+
get fallback() {
|
|
1827
|
+
return label();
|
|
1828
|
+
},
|
|
1829
|
+
get children() {
|
|
1830
|
+
return $3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
1831
|
+
whole_text_to_display_: label,
|
|
1832
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1814
1835
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
1815
1836
|
get when() {
|
|
1816
1837
|
return count() != undefined;
|
|
@@ -2332,7 +2353,7 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
|
|
|
2332
2353
|
filter_: filter_,
|
|
2333
2354
|
selected_filters_: selected_filters_,
|
|
2334
2355
|
i18n_: i18n_,
|
|
2335
|
-
view_more_button_below_group_:
|
|
2356
|
+
view_more_button_below_group_: [, set_view_more_button_below_group],
|
|
2336
2357
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
2337
2358
|
filter_query_: filter_query_
|
|
2338
2359
|
} = _ref;
|
|
@@ -2457,11 +2478,12 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
|
|
|
2457
2478
|
}
|
|
2458
2479
|
});
|
|
2459
2480
|
$3hooq$solidjs.createRenderEffect(() => {
|
|
2460
|
-
|
|
2481
|
+
set_view_more_button_below_group(some_top_level_are_hidden() ? $3hooq$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
|
|
2461
2482
|
show_extras_: show_extras,
|
|
2462
2483
|
i18n_: i18n_
|
|
2463
2484
|
}) : []);
|
|
2464
2485
|
});
|
|
2486
|
+
$3hooq$solidjs.onCleanup(() => set_view_more_button_below_group());
|
|
2465
2487
|
$3hooq$solidjs.createEffect($3hooq$depictaiutilishared.catchify(async () => {
|
|
2466
2488
|
if (!some_top_level_are_hidden()) {
|
|
2467
2489
|
await collapse();
|
|
@@ -2502,43 +2524,54 @@ function $9c1d49181fb3002a$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2502
2524
|
return value_as_string();
|
|
2503
2525
|
},
|
|
2504
2526
|
get label_() {
|
|
2505
|
-
return $3hooq$solidjsweb.createComponent((0, $
|
|
2506
|
-
get
|
|
2507
|
-
|
|
2527
|
+
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
2528
|
+
get when() {
|
|
2529
|
+
var _value4;
|
|
2530
|
+
return ((_value4 = value()) === null || _value4 === void 0 ? void 0 : _value4.count_) === 0;
|
|
2531
|
+
},
|
|
2532
|
+
get fallback() {
|
|
2533
|
+
return $3hooq$solidjsweb.createComponent((0, $dc5db6bf7093867a$export$8e79c28529dbfa90), {
|
|
2534
|
+
get text_() {
|
|
2535
|
+
return label_text();
|
|
2536
|
+
},
|
|
2537
|
+
get to_highlight_() {
|
|
2538
|
+
return filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_();
|
|
2539
|
+
}
|
|
2540
|
+
});
|
|
2508
2541
|
},
|
|
2509
|
-
get
|
|
2510
|
-
return
|
|
2542
|
+
get children() {
|
|
2543
|
+
return label_text();
|
|
2511
2544
|
}
|
|
2512
2545
|
});
|
|
2513
2546
|
},
|
|
2514
2547
|
get count_() {
|
|
2515
|
-
var
|
|
2516
|
-
return has_expandable() ? undefined : (
|
|
2548
|
+
var _value5;
|
|
2549
|
+
return has_expandable() ? undefined : (_value5 = value()) === null || _value5 === void 0 ? void 0 : _value5.count_;
|
|
2517
2550
|
},
|
|
2518
2551
|
get is_count_zero_() {
|
|
2519
|
-
var
|
|
2520
|
-
return has_expandable() && ((
|
|
2552
|
+
var _value6;
|
|
2553
|
+
return has_expandable() && ((_value6 = value()) === null || _value6 === void 0 ? void 0 : _value6.count_) === 0;
|
|
2521
2554
|
},
|
|
2522
2555
|
get checked_() {
|
|
2523
|
-
var _value$is_checked_$,
|
|
2524
|
-
return (_value$is_checked_$ = (
|
|
2556
|
+
var _value$is_checked_$, _value7, _value7$is_checked_, _value7$is_checked_$;
|
|
2557
|
+
return (_value$is_checked_$ = (_value7 = value()) === null || _value7 === void 0 ? void 0 : (_value7$is_checked_ = _value7.is_checked_) === null || _value7$is_checked_ === void 0 ? void 0 : (_value7$is_checked_$ = _value7$is_checked_[0]) === null || _value7$is_checked_$ === void 0 ? void 0 : _value7$is_checked_$.call(_value7$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
2525
2558
|
},
|
|
2526
2559
|
input_ref_: input => {
|
|
2527
2560
|
input.addEventListener("change", $3hooq$depictaiutilishared.catchify(() => $3hooq$solidjs.untrack(() => {
|
|
2528
|
-
var
|
|
2561
|
+
var _value9;
|
|
2529
2562
|
const {
|
|
2530
2563
|
checked: checked
|
|
2531
2564
|
} = input;
|
|
2532
2565
|
if (checked) {
|
|
2533
|
-
var
|
|
2534
|
-
(
|
|
2566
|
+
var _value8;
|
|
2567
|
+
(_value8 = value()) === null || _value8 === void 0 || _value8.is_expanded_.set_user_expanded_(true);
|
|
2535
2568
|
}
|
|
2536
|
-
(
|
|
2569
|
+
(_value9 = value()) === null || _value9 === void 0 || _value9.is_checked_[1](checked);
|
|
2537
2570
|
})));
|
|
2538
2571
|
const any_kids_checked = $3hooq$solidjs.createMemo(() => {
|
|
2539
|
-
var
|
|
2572
|
+
var _value10;
|
|
2540
2573
|
let are_checked = false;
|
|
2541
|
-
const to_check = Object.values(((
|
|
2574
|
+
const to_check = Object.values(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.children_) || {});
|
|
2542
2575
|
while (to_check.length) {
|
|
2543
2576
|
const kid_to_check = to_check.pop();
|
|
2544
2577
|
to_check.push(...Object.values(kid_to_check.children_));
|
|
@@ -2575,13 +2608,13 @@ function $9c1d49181fb3002a$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2575
2608
|
return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey());
|
|
2576
2609
|
},
|
|
2577
2610
|
get summary_() {
|
|
2578
|
-
var
|
|
2579
|
-
return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "count ".concat(((
|
|
2611
|
+
var _value11, _value12;
|
|
2612
|
+
return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "count ".concat(((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_) === 0 ? "count-0" : ""), $3hooq$solidjsweb.escape((_value12 = value()) === null || _value12 === void 0 ? void 0 : _value12.count_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
|
|
2580
2613
|
i18n_: i18n_,
|
|
2581
2614
|
get expanded_() {
|
|
2582
2615
|
return $3hooq$solidjs.createMemo(() => {
|
|
2583
|
-
var _value$is_expanded_$u,
|
|
2584
|
-
return (_value$is_expanded_$u = (
|
|
2616
|
+
var _value$is_expanded_$u, _value13, _value13$is_expanded_, _value13$is_expanded_2;
|
|
2617
|
+
return (_value$is_expanded_$u = (_value13 = value()) === null || _value13 === void 0 ? void 0 : (_value13$is_expanded_ = _value13.is_expanded_) === null || _value13$is_expanded_ === void 0 ? void 0 : (_value13$is_expanded_2 = _value13$is_expanded_.ui_should_show_expanded_) === null || _value13$is_expanded_2 === void 0 ? void 0 : _value13$is_expanded_2.call(_value13$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
|
|
2585
2618
|
});
|
|
2586
2619
|
}
|
|
2587
2620
|
})));
|
|
@@ -2591,8 +2624,8 @@ function $9c1d49181fb3002a$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2591
2624
|
},
|
|
2592
2625
|
get children() {
|
|
2593
2626
|
return $9c1d49181fb3002a$var$render_stuff($3hooq$solidjs.createMemo(() => {
|
|
2594
|
-
var
|
|
2595
|
-
return ((
|
|
2627
|
+
var _value14;
|
|
2628
|
+
return ((_value14 = value()) === null || _value14 === void 0 ? void 0 : _value14.children_) || {};
|
|
2596
2629
|
}), existing_filter, i18n_, filter_query_);
|
|
2597
2630
|
}
|
|
2598
2631
|
});
|
|
@@ -2859,9 +2892,10 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
|
|
|
2859
2892
|
});
|
|
2860
2893
|
const MakeButton = attributes => {
|
|
2861
2894
|
const label = $3hooq$solidjs.createMemo(() => value().name_ || value().value_ + "");
|
|
2895
|
+
const count_zero = $3hooq$solidjs.createMemo(() => value().count_ === 0);
|
|
2862
2896
|
return $3hooq$solidjsweb.ssrElement("button", $3hooq$solidjsweb.mergeProps(attributes, {
|
|
2863
2897
|
get disabled() {
|
|
2864
|
-
return
|
|
2898
|
+
return count_zero() && !is_selected();
|
|
2865
2899
|
},
|
|
2866
2900
|
get classList() {
|
|
2867
2901
|
return {
|
|
@@ -2870,9 +2904,19 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
|
|
|
2870
2904
|
"major-minor-transition": true
|
|
2871
2905
|
};
|
|
2872
2906
|
}
|
|
2873
|
-
}), () => ["<!--$-->", $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $
|
|
2874
|
-
|
|
2875
|
-
|
|
2907
|
+
}), () => ["<!--$-->", $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
2908
|
+
get when() {
|
|
2909
|
+
return count_zero();
|
|
2910
|
+
},
|
|
2911
|
+
get fallback() {
|
|
2912
|
+
return $3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
2913
|
+
whole_text_to_display_: label,
|
|
2914
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
2915
|
+
});
|
|
2916
|
+
},
|
|
2917
|
+
get children() {
|
|
2918
|
+
return label();
|
|
2919
|
+
}
|
|
2876
2920
|
})), "<!--/-->", "<!--$-->", $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
2877
2921
|
get when() {
|
|
2878
2922
|
return value().count_ != undefined;
|
|
@@ -2971,7 +3015,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
2971
3015
|
filter_: filter_,
|
|
2972
3016
|
selected_filters_: [get_selected_filters, set_selected_filters],
|
|
2973
3017
|
i18n_: i18n_,
|
|
2974
|
-
view_more_button_below_group_: [
|
|
3018
|
+
view_more_button_below_group_: [, set_view_more_button_below_group_],
|
|
2975
3019
|
filter_query_: filter_query_
|
|
2976
3020
|
} = _ref;
|
|
2977
3021
|
// same as in CheckboxFilter, maybe we should make this DRY at some point
|
|
@@ -3019,18 +3063,29 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
3019
3063
|
});
|
|
3020
3064
|
const value = $3hooq$solidjs.createMemo(() => checkbox().value_);
|
|
3021
3065
|
const label_text = $3hooq$solidjs.createMemo(() => checkbox().name_ || value() + "");
|
|
3066
|
+
const count = $3hooq$solidjs.createMemo(() => checkbox().count_);
|
|
3022
3067
|
const input_row = $3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
3023
3068
|
get value_() {
|
|
3024
3069
|
return value();
|
|
3025
3070
|
},
|
|
3026
3071
|
get label_() {
|
|
3027
|
-
return $3hooq$solidjsweb.createComponent((0, $
|
|
3028
|
-
|
|
3029
|
-
|
|
3072
|
+
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
3073
|
+
get when() {
|
|
3074
|
+
return count() !== 0;
|
|
3075
|
+
},
|
|
3076
|
+
get fallback() {
|
|
3077
|
+
return label_text();
|
|
3078
|
+
},
|
|
3079
|
+
get children() {
|
|
3080
|
+
return $3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
3081
|
+
whole_text_to_display_: label_text,
|
|
3082
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
3083
|
+
});
|
|
3084
|
+
}
|
|
3030
3085
|
});
|
|
3031
3086
|
},
|
|
3032
3087
|
get count_() {
|
|
3033
|
-
return
|
|
3088
|
+
return count();
|
|
3034
3089
|
},
|
|
3035
3090
|
get checked_() {
|
|
3036
3091
|
return is_checked();
|
|
@@ -3092,6 +3147,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
3092
3147
|
i18n_: i18n_
|
|
3093
3148
|
}) : []);
|
|
3094
3149
|
});
|
|
3150
|
+
$3hooq$solidjs.onCleanup(() => set_view_more_button_below_group_());
|
|
3095
3151
|
$3hooq$solidjs.createEffect($3hooq$depictaiutilishared.catchify(async () => {
|
|
3096
3152
|
if (!togglable_rest()) {
|
|
3097
3153
|
await collapse();
|
|
@@ -3296,7 +3352,7 @@ function $5b88b077e48a4451$export$82eafebb825fc23f() {
|
|
|
3296
3352
|
}, props), () => $3hooq$solidjsweb.ssr($5b88b077e48a4451$var$_tmpl$), true);
|
|
3297
3353
|
}
|
|
3298
3354
|
const $8e7ac26c00243687$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
|
|
3299
|
-
const $8e7ac26c00243687$var$min_items_to_enable_filter_searching =
|
|
3355
|
+
const $8e7ac26c00243687$var$min_items_to_enable_filter_searching = 15; // For checkbox color and checkbox grid we 3x this
|
|
3300
3356
|
function $8e7ac26c00243687$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
|
|
3301
3357
|
const [filter_query_, set_filter_query_] = $3hooq$solidjs.createSignal();
|
|
3302
3358
|
// Check if we have enough items to enable searching
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
|
|
10
|
-
export const version = "2.1.
|
|
10
|
+
export const version = "2.1.16";
|
|
11
11
|
/**
|
|
12
12
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
13
13
|
*/
|
package/server/ES10/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
9
9
|
/*! Depict.ai search and product listing SDK */
|
|
10
10
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
11
11
|
register_es_version("ui", "ES10");
|
|
12
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.
|
|
12
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.16";
|
|
13
13
|
const $2855bffe06ef7a03$var$fallback_operator = "in";
|
|
14
14
|
const $2855bffe06ef7a03$var$fallback_token = "";
|
|
15
15
|
const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
|
|
@@ -1628,16 +1628,26 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
1628
1628
|
return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === value));
|
|
1629
1629
|
});
|
|
1630
1630
|
const value = $b8hua$createMemo(() => checkbox().value_);
|
|
1631
|
+
const is_count_zero = $b8hua$createMemo(() => checkbox().count_ === 0);
|
|
1632
|
+
const display_text = $b8hua$createMemo(() => checkbox().name_ || value());
|
|
1631
1633
|
return $b8hua$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
|
|
1632
1634
|
get value_() {
|
|
1633
1635
|
return value();
|
|
1634
1636
|
},
|
|
1635
1637
|
get label_() {
|
|
1636
|
-
return $b8hua$createComponent((0, $
|
|
1637
|
-
get
|
|
1638
|
-
return
|
|
1638
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
1639
|
+
get when() {
|
|
1640
|
+
return is_count_zero();
|
|
1639
1641
|
},
|
|
1640
|
-
|
|
1642
|
+
get fallback() {
|
|
1643
|
+
return $b8hua$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
1644
|
+
whole_text_to_display_: display_text,
|
|
1645
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
1646
|
+
});
|
|
1647
|
+
},
|
|
1648
|
+
get children() {
|
|
1649
|
+
return display_text();
|
|
1650
|
+
}
|
|
1641
1651
|
});
|
|
1642
1652
|
},
|
|
1643
1653
|
get count_() {
|
|
@@ -1681,6 +1691,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
1681
1691
|
i18n_: i18n_
|
|
1682
1692
|
}) : []);
|
|
1683
1693
|
});
|
|
1694
|
+
$b8hua$onCleanup(() => set_view_more_button_below_group_());
|
|
1684
1695
|
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
1685
1696
|
if (!togglable_rest()) {
|
|
1686
1697
|
await collapse();
|
|
@@ -1741,9 +1752,19 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
1741
1752
|
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1742
1753
|
if ($af5d8e0b7d97a7f6$export$325f75597868c4f0(data) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(v)) return true;
|
|
1743
1754
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1744
|
-
})(), true), $b8hua$escape($b8hua$createComponent((0, $
|
|
1745
|
-
|
|
1746
|
-
|
|
1755
|
+
})(), true), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1756
|
+
get when() {
|
|
1757
|
+
return count() !== 0;
|
|
1758
|
+
},
|
|
1759
|
+
get fallback() {
|
|
1760
|
+
return label();
|
|
1761
|
+
},
|
|
1762
|
+
get children() {
|
|
1763
|
+
return $b8hua$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
1764
|
+
whole_text_to_display_: label,
|
|
1765
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1747
1768
|
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1748
1769
|
get when() {
|
|
1749
1770
|
return count() != undefined;
|
|
@@ -2265,7 +2286,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
2265
2286
|
filter_: filter_,
|
|
2266
2287
|
selected_filters_: selected_filters_,
|
|
2267
2288
|
i18n_: i18n_,
|
|
2268
|
-
view_more_button_below_group_:
|
|
2289
|
+
view_more_button_below_group_: [, set_view_more_button_below_group],
|
|
2269
2290
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
2270
2291
|
filter_query_: filter_query_
|
|
2271
2292
|
} = _ref;
|
|
@@ -2390,11 +2411,12 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
2390
2411
|
}
|
|
2391
2412
|
});
|
|
2392
2413
|
$b8hua$createRenderEffect(() => {
|
|
2393
|
-
|
|
2414
|
+
set_view_more_button_below_group(some_top_level_are_hidden() ? $b8hua$createComponent((0, $3e850b2f2cca761f$export$ca21a16d65b3dd8), {
|
|
2394
2415
|
show_extras_: show_extras,
|
|
2395
2416
|
i18n_: i18n_
|
|
2396
2417
|
}) : []);
|
|
2397
2418
|
});
|
|
2419
|
+
$b8hua$onCleanup(() => set_view_more_button_below_group());
|
|
2398
2420
|
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
2399
2421
|
if (!some_top_level_are_hidden()) {
|
|
2400
2422
|
await collapse();
|
|
@@ -2435,43 +2457,54 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2435
2457
|
return value_as_string();
|
|
2436
2458
|
},
|
|
2437
2459
|
get label_() {
|
|
2438
|
-
return $b8hua$createComponent((0, $
|
|
2439
|
-
get
|
|
2440
|
-
|
|
2460
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
2461
|
+
get when() {
|
|
2462
|
+
var _value4;
|
|
2463
|
+
return ((_value4 = value()) === null || _value4 === void 0 ? void 0 : _value4.count_) === 0;
|
|
2464
|
+
},
|
|
2465
|
+
get fallback() {
|
|
2466
|
+
return $b8hua$createComponent((0, $b0e2100b511ec9a4$export$8e79c28529dbfa90), {
|
|
2467
|
+
get text_() {
|
|
2468
|
+
return label_text();
|
|
2469
|
+
},
|
|
2470
|
+
get to_highlight_() {
|
|
2471
|
+
return filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_();
|
|
2472
|
+
}
|
|
2473
|
+
});
|
|
2441
2474
|
},
|
|
2442
|
-
get
|
|
2443
|
-
return
|
|
2475
|
+
get children() {
|
|
2476
|
+
return label_text();
|
|
2444
2477
|
}
|
|
2445
2478
|
});
|
|
2446
2479
|
},
|
|
2447
2480
|
get count_() {
|
|
2448
|
-
var
|
|
2449
|
-
return has_expandable() ? undefined : (
|
|
2481
|
+
var _value5;
|
|
2482
|
+
return has_expandable() ? undefined : (_value5 = value()) === null || _value5 === void 0 ? void 0 : _value5.count_;
|
|
2450
2483
|
},
|
|
2451
2484
|
get is_count_zero_() {
|
|
2452
|
-
var
|
|
2453
|
-
return has_expandable() && ((
|
|
2485
|
+
var _value6;
|
|
2486
|
+
return has_expandable() && ((_value6 = value()) === null || _value6 === void 0 ? void 0 : _value6.count_) === 0;
|
|
2454
2487
|
},
|
|
2455
2488
|
get checked_() {
|
|
2456
|
-
var _value$is_checked_$,
|
|
2457
|
-
return (_value$is_checked_$ = (
|
|
2489
|
+
var _value$is_checked_$, _value7, _value7$is_checked_, _value7$is_checked_$;
|
|
2490
|
+
return (_value$is_checked_$ = (_value7 = value()) === null || _value7 === void 0 ? void 0 : (_value7$is_checked_ = _value7.is_checked_) === null || _value7$is_checked_ === void 0 ? void 0 : (_value7$is_checked_$ = _value7$is_checked_[0]) === null || _value7$is_checked_$ === void 0 ? void 0 : _value7$is_checked_$.call(_value7$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
2458
2491
|
},
|
|
2459
2492
|
input_ref_: input => {
|
|
2460
2493
|
input.addEventListener("change", $b8hua$catchify(() => $b8hua$untrack(() => {
|
|
2461
|
-
var
|
|
2494
|
+
var _value9;
|
|
2462
2495
|
const {
|
|
2463
2496
|
checked: checked
|
|
2464
2497
|
} = input;
|
|
2465
2498
|
if (checked) {
|
|
2466
|
-
var
|
|
2467
|
-
(
|
|
2499
|
+
var _value8;
|
|
2500
|
+
(_value8 = value()) === null || _value8 === void 0 || _value8.is_expanded_.set_user_expanded_(true);
|
|
2468
2501
|
}
|
|
2469
|
-
(
|
|
2502
|
+
(_value9 = value()) === null || _value9 === void 0 || _value9.is_checked_[1](checked);
|
|
2470
2503
|
})));
|
|
2471
2504
|
const any_kids_checked = $b8hua$createMemo(() => {
|
|
2472
|
-
var
|
|
2505
|
+
var _value10;
|
|
2473
2506
|
let are_checked = false;
|
|
2474
|
-
const to_check = Object.values(((
|
|
2507
|
+
const to_check = Object.values(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.children_) || {});
|
|
2475
2508
|
while (to_check.length) {
|
|
2476
2509
|
const kid_to_check = to_check.pop();
|
|
2477
2510
|
to_check.push(...Object.values(kid_to_check.children_));
|
|
@@ -2508,13 +2541,13 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2508
2541
|
return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$3, $b8hua$ssrHydrationKey());
|
|
2509
2542
|
},
|
|
2510
2543
|
get summary_() {
|
|
2511
|
-
var
|
|
2512
|
-
return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$4, $b8hua$ssrHydrationKey(), "count ".concat(((
|
|
2544
|
+
var _value11, _value12;
|
|
2545
|
+
return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$4, $b8hua$ssrHydrationKey(), "count ".concat(((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_) === 0 ? "count-0" : ""), $b8hua$escape((_value12 = value()) === null || _value12 === void 0 ? void 0 : _value12.count_), $b8hua$escape($b8hua$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
|
|
2513
2546
|
i18n_: i18n_,
|
|
2514
2547
|
get expanded_() {
|
|
2515
2548
|
return $b8hua$createMemo(() => {
|
|
2516
|
-
var _value$is_expanded_$u,
|
|
2517
|
-
return (_value$is_expanded_$u = (
|
|
2549
|
+
var _value$is_expanded_$u, _value13, _value13$is_expanded_, _value13$is_expanded_2;
|
|
2550
|
+
return (_value$is_expanded_$u = (_value13 = value()) === null || _value13 === void 0 ? void 0 : (_value13$is_expanded_ = _value13.is_expanded_) === null || _value13$is_expanded_ === void 0 ? void 0 : (_value13$is_expanded_2 = _value13$is_expanded_.ui_should_show_expanded_) === null || _value13$is_expanded_2 === void 0 ? void 0 : _value13$is_expanded_2.call(_value13$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
|
|
2518
2551
|
});
|
|
2519
2552
|
}
|
|
2520
2553
|
})));
|
|
@@ -2524,8 +2557,8 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2524
2557
|
},
|
|
2525
2558
|
get children() {
|
|
2526
2559
|
return $0ae614c5c7babb43$var$render_stuff($b8hua$createMemo(() => {
|
|
2527
|
-
var
|
|
2528
|
-
return ((
|
|
2560
|
+
var _value14;
|
|
2561
|
+
return ((_value14 = value()) === null || _value14 === void 0 ? void 0 : _value14.children_) || {};
|
|
2529
2562
|
}), existing_filter, i18n_, filter_query_);
|
|
2530
2563
|
}
|
|
2531
2564
|
});
|
|
@@ -2792,9 +2825,10 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
2792
2825
|
});
|
|
2793
2826
|
const MakeButton = attributes => {
|
|
2794
2827
|
const label = $b8hua$createMemo(() => value().name_ || value().value_ + "");
|
|
2828
|
+
const count_zero = $b8hua$createMemo(() => value().count_ === 0);
|
|
2795
2829
|
return $b8hua$ssrElement("button", $b8hua$mergeProps1(attributes, {
|
|
2796
2830
|
get disabled() {
|
|
2797
|
-
return
|
|
2831
|
+
return count_zero() && !is_selected();
|
|
2798
2832
|
},
|
|
2799
2833
|
get classList() {
|
|
2800
2834
|
return {
|
|
@@ -2803,9 +2837,19 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
2803
2837
|
"major-minor-transition": true
|
|
2804
2838
|
};
|
|
2805
2839
|
}
|
|
2806
|
-
}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $
|
|
2807
|
-
|
|
2808
|
-
|
|
2840
|
+
}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
2841
|
+
get when() {
|
|
2842
|
+
return count_zero();
|
|
2843
|
+
},
|
|
2844
|
+
get fallback() {
|
|
2845
|
+
return $b8hua$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
2846
|
+
whole_text_to_display_: label,
|
|
2847
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
2848
|
+
});
|
|
2849
|
+
},
|
|
2850
|
+
get children() {
|
|
2851
|
+
return label();
|
|
2852
|
+
}
|
|
2809
2853
|
})), "<!--/-->", "<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
2810
2854
|
get when() {
|
|
2811
2855
|
return value().count_ != undefined;
|
|
@@ -2904,7 +2948,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2904
2948
|
filter_: filter_,
|
|
2905
2949
|
selected_filters_: [get_selected_filters, set_selected_filters],
|
|
2906
2950
|
i18n_: i18n_,
|
|
2907
|
-
view_more_button_below_group_: [
|
|
2951
|
+
view_more_button_below_group_: [, set_view_more_button_below_group_],
|
|
2908
2952
|
filter_query_: filter_query_
|
|
2909
2953
|
} = _ref;
|
|
2910
2954
|
// same as in CheckboxFilter, maybe we should make this DRY at some point
|
|
@@ -2952,18 +2996,29 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2952
2996
|
});
|
|
2953
2997
|
const value = $b8hua$createMemo(() => checkbox().value_);
|
|
2954
2998
|
const label_text = $b8hua$createMemo(() => checkbox().name_ || value() + "");
|
|
2999
|
+
const count = $b8hua$createMemo(() => checkbox().count_);
|
|
2955
3000
|
const input_row = $b8hua$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
|
|
2956
3001
|
get value_() {
|
|
2957
3002
|
return value();
|
|
2958
3003
|
},
|
|
2959
3004
|
get label_() {
|
|
2960
|
-
return $b8hua$createComponent((0, $
|
|
2961
|
-
|
|
2962
|
-
|
|
3005
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
3006
|
+
get when() {
|
|
3007
|
+
return count() !== 0;
|
|
3008
|
+
},
|
|
3009
|
+
get fallback() {
|
|
3010
|
+
return label_text();
|
|
3011
|
+
},
|
|
3012
|
+
get children() {
|
|
3013
|
+
return $b8hua$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
3014
|
+
whole_text_to_display_: label_text,
|
|
3015
|
+
searching_for_value_: () => filter_query_ === null || filter_query_ === void 0 ? void 0 : filter_query_()
|
|
3016
|
+
});
|
|
3017
|
+
}
|
|
2963
3018
|
});
|
|
2964
3019
|
},
|
|
2965
3020
|
get count_() {
|
|
2966
|
-
return
|
|
3021
|
+
return count();
|
|
2967
3022
|
},
|
|
2968
3023
|
get checked_() {
|
|
2969
3024
|
return is_checked();
|
|
@@ -3025,6 +3080,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
3025
3080
|
i18n_: i18n_
|
|
3026
3081
|
}) : []);
|
|
3027
3082
|
});
|
|
3083
|
+
$b8hua$onCleanup(() => set_view_more_button_below_group_());
|
|
3028
3084
|
$b8hua$createEffect($b8hua$catchify(async () => {
|
|
3029
3085
|
if (!togglable_rest()) {
|
|
3030
3086
|
await collapse();
|
|
@@ -3229,7 +3285,7 @@ function $ef0f18a578b32578$export$82eafebb825fc23f() {
|
|
|
3229
3285
|
}, props), () => $b8hua$ssr($ef0f18a578b32578$var$_tmpl$), true);
|
|
3230
3286
|
}
|
|
3231
3287
|
const $e354b2f9ce33cb75$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
|
|
3232
|
-
const $e354b2f9ce33cb75$var$min_items_to_enable_filter_searching =
|
|
3288
|
+
const $e354b2f9ce33cb75$var$min_items_to_enable_filter_searching = 15; // For checkbox color and checkbox grid we 3x this
|
|
3233
3289
|
function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
|
|
3234
3290
|
const [filter_query_, set_filter_query_] = $b8hua$createSignal();
|
|
3235
3291
|
// Check if we have enough items to enable searching
|