@depict-ai/ui 2.1.15 → 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 +95 -42
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +95 -42
- package/latest/index.cjs +74 -22
- package/latest/index.d.ts +1 -1
- package/latest/index.js +74 -22
- package/package.json +1 -1
- package/server/ES10/index.cjs +93 -40
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +93 -40
- package/server/latest/index.cjs +74 -22
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +74 -22
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_() {
|
|
@@ -1742,9 +1752,19 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
1742
1752
|
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1743
1753
|
if ($af5d8e0b7d97a7f6$export$325f75597868c4f0(data) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(v)) return true;
|
|
1744
1754
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1745
|
-
})(), true), $b8hua$escape($b8hua$createComponent((0, $
|
|
1746
|
-
|
|
1747
|
-
|
|
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
|
+
}
|
|
1748
1768
|
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1749
1769
|
get when() {
|
|
1750
1770
|
return count() != undefined;
|
|
@@ -2437,43 +2457,54 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2437
2457
|
return value_as_string();
|
|
2438
2458
|
},
|
|
2439
2459
|
get label_() {
|
|
2440
|
-
return $b8hua$createComponent((0, $
|
|
2441
|
-
get
|
|
2442
|
-
|
|
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
|
+
});
|
|
2443
2474
|
},
|
|
2444
|
-
get
|
|
2445
|
-
return
|
|
2475
|
+
get children() {
|
|
2476
|
+
return label_text();
|
|
2446
2477
|
}
|
|
2447
2478
|
});
|
|
2448
2479
|
},
|
|
2449
2480
|
get count_() {
|
|
2450
|
-
var
|
|
2451
|
-
return has_expandable() ? undefined : (
|
|
2481
|
+
var _value5;
|
|
2482
|
+
return has_expandable() ? undefined : (_value5 = value()) === null || _value5 === void 0 ? void 0 : _value5.count_;
|
|
2452
2483
|
},
|
|
2453
2484
|
get is_count_zero_() {
|
|
2454
|
-
var
|
|
2455
|
-
return has_expandable() && ((
|
|
2485
|
+
var _value6;
|
|
2486
|
+
return has_expandable() && ((_value6 = value()) === null || _value6 === void 0 ? void 0 : _value6.count_) === 0;
|
|
2456
2487
|
},
|
|
2457
2488
|
get checked_() {
|
|
2458
|
-
var _value$is_checked_$,
|
|
2459
|
-
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;
|
|
2460
2491
|
},
|
|
2461
2492
|
input_ref_: input => {
|
|
2462
2493
|
input.addEventListener("change", $b8hua$catchify(() => $b8hua$untrack(() => {
|
|
2463
|
-
var
|
|
2494
|
+
var _value9;
|
|
2464
2495
|
const {
|
|
2465
2496
|
checked: checked
|
|
2466
2497
|
} = input;
|
|
2467
2498
|
if (checked) {
|
|
2468
|
-
var
|
|
2469
|
-
(
|
|
2499
|
+
var _value8;
|
|
2500
|
+
(_value8 = value()) === null || _value8 === void 0 || _value8.is_expanded_.set_user_expanded_(true);
|
|
2470
2501
|
}
|
|
2471
|
-
(
|
|
2502
|
+
(_value9 = value()) === null || _value9 === void 0 || _value9.is_checked_[1](checked);
|
|
2472
2503
|
})));
|
|
2473
2504
|
const any_kids_checked = $b8hua$createMemo(() => {
|
|
2474
|
-
var
|
|
2505
|
+
var _value10;
|
|
2475
2506
|
let are_checked = false;
|
|
2476
|
-
const to_check = Object.values(((
|
|
2507
|
+
const to_check = Object.values(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.children_) || {});
|
|
2477
2508
|
while (to_check.length) {
|
|
2478
2509
|
const kid_to_check = to_check.pop();
|
|
2479
2510
|
to_check.push(...Object.values(kid_to_check.children_));
|
|
@@ -2510,13 +2541,13 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2510
2541
|
return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$3, $b8hua$ssrHydrationKey());
|
|
2511
2542
|
},
|
|
2512
2543
|
get summary_() {
|
|
2513
|
-
var
|
|
2514
|
-
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), {
|
|
2515
2546
|
i18n_: i18n_,
|
|
2516
2547
|
get expanded_() {
|
|
2517
2548
|
return $b8hua$createMemo(() => {
|
|
2518
|
-
var _value$is_expanded_$u,
|
|
2519
|
-
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;
|
|
2520
2551
|
});
|
|
2521
2552
|
}
|
|
2522
2553
|
})));
|
|
@@ -2526,8 +2557,8 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2526
2557
|
},
|
|
2527
2558
|
get children() {
|
|
2528
2559
|
return $0ae614c5c7babb43$var$render_stuff($b8hua$createMemo(() => {
|
|
2529
|
-
var
|
|
2530
|
-
return ((
|
|
2560
|
+
var _value14;
|
|
2561
|
+
return ((_value14 = value()) === null || _value14 === void 0 ? void 0 : _value14.children_) || {};
|
|
2531
2562
|
}), existing_filter, i18n_, filter_query_);
|
|
2532
2563
|
}
|
|
2533
2564
|
});
|
|
@@ -2794,9 +2825,10 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
2794
2825
|
});
|
|
2795
2826
|
const MakeButton = attributes => {
|
|
2796
2827
|
const label = $b8hua$createMemo(() => value().name_ || value().value_ + "");
|
|
2828
|
+
const count_zero = $b8hua$createMemo(() => value().count_ === 0);
|
|
2797
2829
|
return $b8hua$ssrElement("button", $b8hua$mergeProps1(attributes, {
|
|
2798
2830
|
get disabled() {
|
|
2799
|
-
return
|
|
2831
|
+
return count_zero() && !is_selected();
|
|
2800
2832
|
},
|
|
2801
2833
|
get classList() {
|
|
2802
2834
|
return {
|
|
@@ -2805,9 +2837,19 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
2805
2837
|
"major-minor-transition": true
|
|
2806
2838
|
};
|
|
2807
2839
|
}
|
|
2808
|
-
}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $
|
|
2809
|
-
|
|
2810
|
-
|
|
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
|
+
}
|
|
2811
2853
|
})), "<!--/-->", "<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
2812
2854
|
get when() {
|
|
2813
2855
|
return value().count_ != undefined;
|
|
@@ -2954,18 +2996,29 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2954
2996
|
});
|
|
2955
2997
|
const value = $b8hua$createMemo(() => checkbox().value_);
|
|
2956
2998
|
const label_text = $b8hua$createMemo(() => checkbox().name_ || value() + "");
|
|
2999
|
+
const count = $b8hua$createMemo(() => checkbox().count_);
|
|
2957
3000
|
const input_row = $b8hua$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
|
|
2958
3001
|
get value_() {
|
|
2959
3002
|
return value();
|
|
2960
3003
|
},
|
|
2961
3004
|
get label_() {
|
|
2962
|
-
return $b8hua$createComponent((0, $
|
|
2963
|
-
|
|
2964
|
-
|
|
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
|
+
}
|
|
2965
3018
|
});
|
|
2966
3019
|
},
|
|
2967
3020
|
get count_() {
|
|
2968
|
-
return
|
|
3021
|
+
return count();
|
|
2969
3022
|
},
|
|
2970
3023
|
get checked_() {
|
|
2971
3024
|
return is_checked();
|
|
@@ -3232,7 +3285,7 @@ function $ef0f18a578b32578$export$82eafebb825fc23f() {
|
|
|
3232
3285
|
}, props), () => $b8hua$ssr($ef0f18a578b32578$var$_tmpl$), true);
|
|
3233
3286
|
}
|
|
3234
3287
|
const $e354b2f9ce33cb75$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
|
|
3235
|
-
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
|
|
3236
3289
|
function $e354b2f9ce33cb75$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
|
|
3237
3290
|
const [filter_query_, set_filter_query_] = $b8hua$createSignal();
|
|
3238
3291
|
// Check if we have enough items to enable searching
|
package/server/latest/index.cjs
CHANGED
|
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
70
70
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
71
71
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
72
72
|
/*! Depict.ai search and product listing SDK */
|
|
73
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.
|
|
73
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.16";
|
|
74
74
|
const $1ab22f2cd39b3061$var$fallback_operator = "in";
|
|
75
75
|
const $1ab22f2cd39b3061$var$fallback_token = "";
|
|
76
76
|
const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
|
|
@@ -1607,16 +1607,26 @@ function $d94869c80e337a3d$export$dd948f91abc3a1c4({
|
|
|
1607
1607
|
return !!data?.some(item => $daa394359b026187$export$325f75597868c4f0(item) === value);
|
|
1608
1608
|
});
|
|
1609
1609
|
const value = $5vyXB$solidjs.createMemo(() => checkbox().value_);
|
|
1610
|
+
const is_count_zero = $5vyXB$solidjs.createMemo(() => checkbox().count_ === 0);
|
|
1611
|
+
const display_text = $5vyXB$solidjs.createMemo(() => checkbox().name_ || value());
|
|
1610
1612
|
return $5vyXB$solidjsweb.createComponent((0, $1c63082b2da848ad$export$48513f6b9f8ce62d), {
|
|
1611
1613
|
get value_() {
|
|
1612
1614
|
return value();
|
|
1613
1615
|
},
|
|
1614
1616
|
get label_() {
|
|
1615
|
-
return $5vyXB$solidjsweb.createComponent((0, $
|
|
1616
|
-
get
|
|
1617
|
-
return
|
|
1617
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1618
|
+
get when() {
|
|
1619
|
+
return is_count_zero();
|
|
1618
1620
|
},
|
|
1619
|
-
|
|
1621
|
+
get fallback() {
|
|
1622
|
+
return $5vyXB$solidjsweb.createComponent((0, $d023ed916c84e75d$export$ba17c5b7e6dda39f), {
|
|
1623
|
+
whole_text_to_display_: display_text,
|
|
1624
|
+
searching_for_value_: () => filter_query_?.()
|
|
1625
|
+
});
|
|
1626
|
+
},
|
|
1627
|
+
get children() {
|
|
1628
|
+
return display_text();
|
|
1629
|
+
}
|
|
1620
1630
|
});
|
|
1621
1631
|
},
|
|
1622
1632
|
get count_() {
|
|
@@ -1712,9 +1722,19 @@ function $c1dc1554c1b94233$export$430444115f70a734({
|
|
|
1712
1722
|
const data = existing_filter()?.data;
|
|
1713
1723
|
if ($daa394359b026187$export$325f75597868c4f0(data) === $daa394359b026187$export$325f75597868c4f0(v)) return true;
|
|
1714
1724
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1715
|
-
})(), true), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $
|
|
1716
|
-
|
|
1717
|
-
|
|
1725
|
+
})(), true), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1726
|
+
get when() {
|
|
1727
|
+
return count() !== 0;
|
|
1728
|
+
},
|
|
1729
|
+
get fallback() {
|
|
1730
|
+
return label();
|
|
1731
|
+
},
|
|
1732
|
+
get children() {
|
|
1733
|
+
return $5vyXB$solidjsweb.createComponent((0, $d023ed916c84e75d$export$ba17c5b7e6dda39f), {
|
|
1734
|
+
whole_text_to_display_: label,
|
|
1735
|
+
searching_for_value_: () => filter_query_?.()
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1718
1738
|
})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
1719
1739
|
get when() {
|
|
1720
1740
|
return count() != undefined;
|
|
@@ -2367,12 +2387,22 @@ function $3bdc00a1353c1150$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2367
2387
|
return value_as_string();
|
|
2368
2388
|
},
|
|
2369
2389
|
get label_() {
|
|
2370
|
-
return $5vyXB$solidjsweb.createComponent((0, $
|
|
2371
|
-
get
|
|
2372
|
-
return
|
|
2390
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2391
|
+
get when() {
|
|
2392
|
+
return value()?.count_ === 0;
|
|
2393
|
+
},
|
|
2394
|
+
get fallback() {
|
|
2395
|
+
return $5vyXB$solidjsweb.createComponent((0, $f6efb1605fcb9f39$export$8e79c28529dbfa90), {
|
|
2396
|
+
get text_() {
|
|
2397
|
+
return label_text();
|
|
2398
|
+
},
|
|
2399
|
+
get to_highlight_() {
|
|
2400
|
+
return filter_query_?.();
|
|
2401
|
+
}
|
|
2402
|
+
});
|
|
2373
2403
|
},
|
|
2374
|
-
get
|
|
2375
|
-
return
|
|
2404
|
+
get children() {
|
|
2405
|
+
return label_text();
|
|
2376
2406
|
}
|
|
2377
2407
|
});
|
|
2378
2408
|
},
|
|
@@ -2686,9 +2716,10 @@ const $0ef1681699140f1a$export$414f6a19d38e655c = ({
|
|
|
2686
2716
|
});
|
|
2687
2717
|
const MakeButton = attributes => {
|
|
2688
2718
|
const label = $5vyXB$solidjs.createMemo(() => value().name_ || value().value_ + "");
|
|
2719
|
+
const count_zero = $5vyXB$solidjs.createMemo(() => value().count_ === 0);
|
|
2689
2720
|
return $5vyXB$solidjsweb.ssrElement("button", $5vyXB$solidjsweb.mergeProps(attributes, {
|
|
2690
2721
|
get disabled() {
|
|
2691
|
-
return
|
|
2722
|
+
return count_zero() && !is_selected();
|
|
2692
2723
|
},
|
|
2693
2724
|
get classList() {
|
|
2694
2725
|
return {
|
|
@@ -2697,9 +2728,19 @@ const $0ef1681699140f1a$export$414f6a19d38e655c = ({
|
|
|
2697
2728
|
"major-minor-transition": true
|
|
2698
2729
|
};
|
|
2699
2730
|
}
|
|
2700
|
-
}), () => ["<!--$-->", $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $
|
|
2701
|
-
|
|
2702
|
-
|
|
2731
|
+
}), () => ["<!--$-->", $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2732
|
+
get when() {
|
|
2733
|
+
return count_zero();
|
|
2734
|
+
},
|
|
2735
|
+
get fallback() {
|
|
2736
|
+
return $5vyXB$solidjsweb.createComponent((0, $d023ed916c84e75d$export$ba17c5b7e6dda39f), {
|
|
2737
|
+
whole_text_to_display_: label,
|
|
2738
|
+
searching_for_value_: () => filter_query_?.()
|
|
2739
|
+
});
|
|
2740
|
+
},
|
|
2741
|
+
get children() {
|
|
2742
|
+
return label();
|
|
2743
|
+
}
|
|
2703
2744
|
})), "<!--/-->", "<!--$-->", $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2704
2745
|
get when() {
|
|
2705
2746
|
return value().count_ != undefined;
|
|
@@ -2833,18 +2874,29 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
|
|
|
2833
2874
|
});
|
|
2834
2875
|
const value = $5vyXB$solidjs.createMemo(() => checkbox().value_);
|
|
2835
2876
|
const label_text = $5vyXB$solidjs.createMemo(() => checkbox().name_ || value() + "");
|
|
2877
|
+
const count = $5vyXB$solidjs.createMemo(() => checkbox().count_);
|
|
2836
2878
|
const input_row = $5vyXB$solidjsweb.createComponent((0, $1c63082b2da848ad$export$48513f6b9f8ce62d), {
|
|
2837
2879
|
get value_() {
|
|
2838
2880
|
return value();
|
|
2839
2881
|
},
|
|
2840
2882
|
get label_() {
|
|
2841
|
-
return $5vyXB$solidjsweb.createComponent((0, $
|
|
2842
|
-
|
|
2843
|
-
|
|
2883
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2884
|
+
get when() {
|
|
2885
|
+
return count() !== 0;
|
|
2886
|
+
},
|
|
2887
|
+
get fallback() {
|
|
2888
|
+
return label_text();
|
|
2889
|
+
},
|
|
2890
|
+
get children() {
|
|
2891
|
+
return $5vyXB$solidjsweb.createComponent((0, $d023ed916c84e75d$export$ba17c5b7e6dda39f), {
|
|
2892
|
+
whole_text_to_display_: label_text,
|
|
2893
|
+
searching_for_value_: () => filter_query_?.()
|
|
2894
|
+
});
|
|
2895
|
+
}
|
|
2844
2896
|
});
|
|
2845
2897
|
},
|
|
2846
2898
|
get count_() {
|
|
2847
|
-
return
|
|
2899
|
+
return count();
|
|
2848
2900
|
},
|
|
2849
2901
|
get checked_() {
|
|
2850
2902
|
return is_checked();
|
|
@@ -3103,7 +3155,7 @@ function $87d7574e1d89d69b$export$82eafebb825fc23f(props = {}) {
|
|
|
3103
3155
|
}, props), () => $5vyXB$solidjsweb.ssr($87d7574e1d89d69b$var$_tmpl$), true);
|
|
3104
3156
|
}
|
|
3105
3157
|
const $47d8681015b71901$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
|
|
3106
|
-
const $47d8681015b71901$var$min_items_to_enable_filter_searching =
|
|
3158
|
+
const $47d8681015b71901$var$min_items_to_enable_filter_searching = 15; // For checkbox color and checkbox grid we 3x this
|
|
3107
3159
|
function $47d8681015b71901$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
|
|
3108
3160
|
const [filter_query_, set_filter_query_] = $5vyXB$solidjs.createSignal();
|
|
3109
3161
|
// Check if we have enough items to enable searching
|
package/server/latest/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/latest/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
6
6
|
/*! Depict.ai search and product listing SDK */
|
|
7
7
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
8
8
|
register_es_version("ui", "latest");
|
|
9
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.
|
|
9
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.16";
|
|
10
10
|
const $4147651646da990a$var$fallback_operator = "in";
|
|
11
11
|
const $4147651646da990a$var$fallback_token = "";
|
|
12
12
|
const $4147651646da990a$var$legacy_filter_prefix = "filter_";
|
|
@@ -1543,16 +1543,26 @@ function $a4601e6bea3ed1e6$export$dd948f91abc3a1c4({
|
|
|
1543
1543
|
return !!data?.some(item => $91aa8ee9f431800d$export$325f75597868c4f0(item) === value);
|
|
1544
1544
|
});
|
|
1545
1545
|
const value = $i7OB2$createMemo(() => checkbox().value_);
|
|
1546
|
+
const is_count_zero = $i7OB2$createMemo(() => checkbox().count_ === 0);
|
|
1547
|
+
const display_text = $i7OB2$createMemo(() => checkbox().name_ || value());
|
|
1546
1548
|
return $i7OB2$createComponent((0, $49b79728e7d9e2a1$export$48513f6b9f8ce62d), {
|
|
1547
1549
|
get value_() {
|
|
1548
1550
|
return value();
|
|
1549
1551
|
},
|
|
1550
1552
|
get label_() {
|
|
1551
|
-
return $i7OB2$createComponent((0, $
|
|
1552
|
-
get
|
|
1553
|
-
return
|
|
1553
|
+
return $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1554
|
+
get when() {
|
|
1555
|
+
return is_count_zero();
|
|
1554
1556
|
},
|
|
1555
|
-
|
|
1557
|
+
get fallback() {
|
|
1558
|
+
return $i7OB2$createComponent((0, $f3213c0640246d58$export$ba17c5b7e6dda39f), {
|
|
1559
|
+
whole_text_to_display_: display_text,
|
|
1560
|
+
searching_for_value_: () => filter_query_?.()
|
|
1561
|
+
});
|
|
1562
|
+
},
|
|
1563
|
+
get children() {
|
|
1564
|
+
return display_text();
|
|
1565
|
+
}
|
|
1556
1566
|
});
|
|
1557
1567
|
},
|
|
1558
1568
|
get count_() {
|
|
@@ -1648,9 +1658,19 @@ function $eb8d9bf3b5700c26$export$430444115f70a734({
|
|
|
1648
1658
|
const data = existing_filter()?.data;
|
|
1649
1659
|
if ($91aa8ee9f431800d$export$325f75597868c4f0(data) === $91aa8ee9f431800d$export$325f75597868c4f0(v)) return true;
|
|
1650
1660
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1651
|
-
})(), true), $i7OB2$escape($i7OB2$createComponent((0, $
|
|
1652
|
-
|
|
1653
|
-
|
|
1661
|
+
})(), true), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1662
|
+
get when() {
|
|
1663
|
+
return count() !== 0;
|
|
1664
|
+
},
|
|
1665
|
+
get fallback() {
|
|
1666
|
+
return label();
|
|
1667
|
+
},
|
|
1668
|
+
get children() {
|
|
1669
|
+
return $i7OB2$createComponent((0, $f3213c0640246d58$export$ba17c5b7e6dda39f), {
|
|
1670
|
+
whole_text_to_display_: label,
|
|
1671
|
+
searching_for_value_: () => filter_query_?.()
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1654
1674
|
})), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
1655
1675
|
get when() {
|
|
1656
1676
|
return count() != undefined;
|
|
@@ -2303,12 +2323,22 @@ function $1c8cac76cb67e9af$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
2303
2323
|
return value_as_string();
|
|
2304
2324
|
},
|
|
2305
2325
|
get label_() {
|
|
2306
|
-
return $i7OB2$createComponent((0, $
|
|
2307
|
-
get
|
|
2308
|
-
return
|
|
2326
|
+
return $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
2327
|
+
get when() {
|
|
2328
|
+
return value()?.count_ === 0;
|
|
2329
|
+
},
|
|
2330
|
+
get fallback() {
|
|
2331
|
+
return $i7OB2$createComponent((0, $3ec2b9489931358d$export$8e79c28529dbfa90), {
|
|
2332
|
+
get text_() {
|
|
2333
|
+
return label_text();
|
|
2334
|
+
},
|
|
2335
|
+
get to_highlight_() {
|
|
2336
|
+
return filter_query_?.();
|
|
2337
|
+
}
|
|
2338
|
+
});
|
|
2309
2339
|
},
|
|
2310
|
-
get
|
|
2311
|
-
return
|
|
2340
|
+
get children() {
|
|
2341
|
+
return label_text();
|
|
2312
2342
|
}
|
|
2313
2343
|
});
|
|
2314
2344
|
},
|
|
@@ -2622,9 +2652,10 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
2622
2652
|
});
|
|
2623
2653
|
const MakeButton = attributes => {
|
|
2624
2654
|
const label = $i7OB2$createMemo(() => value().name_ || value().value_ + "");
|
|
2655
|
+
const count_zero = $i7OB2$createMemo(() => value().count_ === 0);
|
|
2625
2656
|
return $i7OB2$ssrElement("button", $i7OB2$mergeProps1(attributes, {
|
|
2626
2657
|
get disabled() {
|
|
2627
|
-
return
|
|
2658
|
+
return count_zero() && !is_selected();
|
|
2628
2659
|
},
|
|
2629
2660
|
get classList() {
|
|
2630
2661
|
return {
|
|
@@ -2633,9 +2664,19 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
2633
2664
|
"major-minor-transition": true
|
|
2634
2665
|
};
|
|
2635
2666
|
}
|
|
2636
|
-
}), () => ["<!--$-->", $i7OB2$escape($i7OB2$createComponent((0, $
|
|
2637
|
-
|
|
2638
|
-
|
|
2667
|
+
}), () => ["<!--$-->", $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
2668
|
+
get when() {
|
|
2669
|
+
return count_zero();
|
|
2670
|
+
},
|
|
2671
|
+
get fallback() {
|
|
2672
|
+
return $i7OB2$createComponent((0, $f3213c0640246d58$export$ba17c5b7e6dda39f), {
|
|
2673
|
+
whole_text_to_display_: label,
|
|
2674
|
+
searching_for_value_: () => filter_query_?.()
|
|
2675
|
+
});
|
|
2676
|
+
},
|
|
2677
|
+
get children() {
|
|
2678
|
+
return label();
|
|
2679
|
+
}
|
|
2639
2680
|
})), "<!--/-->", "<!--$-->", $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
2640
2681
|
get when() {
|
|
2641
2682
|
return value().count_ != undefined;
|
|
@@ -2769,18 +2810,29 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
2769
2810
|
});
|
|
2770
2811
|
const value = $i7OB2$createMemo(() => checkbox().value_);
|
|
2771
2812
|
const label_text = $i7OB2$createMemo(() => checkbox().name_ || value() + "");
|
|
2813
|
+
const count = $i7OB2$createMemo(() => checkbox().count_);
|
|
2772
2814
|
const input_row = $i7OB2$createComponent((0, $49b79728e7d9e2a1$export$48513f6b9f8ce62d), {
|
|
2773
2815
|
get value_() {
|
|
2774
2816
|
return value();
|
|
2775
2817
|
},
|
|
2776
2818
|
get label_() {
|
|
2777
|
-
return $i7OB2$createComponent((0, $
|
|
2778
|
-
|
|
2779
|
-
|
|
2819
|
+
return $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
2820
|
+
get when() {
|
|
2821
|
+
return count() !== 0;
|
|
2822
|
+
},
|
|
2823
|
+
get fallback() {
|
|
2824
|
+
return label_text();
|
|
2825
|
+
},
|
|
2826
|
+
get children() {
|
|
2827
|
+
return $i7OB2$createComponent((0, $f3213c0640246d58$export$ba17c5b7e6dda39f), {
|
|
2828
|
+
whole_text_to_display_: label_text,
|
|
2829
|
+
searching_for_value_: () => filter_query_?.()
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2780
2832
|
});
|
|
2781
2833
|
},
|
|
2782
2834
|
get count_() {
|
|
2783
|
-
return
|
|
2835
|
+
return count();
|
|
2784
2836
|
},
|
|
2785
2837
|
get checked_() {
|
|
2786
2838
|
return is_checked();
|
|
@@ -3039,7 +3091,7 @@ function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
|
|
|
3039
3091
|
}, props), () => $i7OB2$ssr($16f0ed5ea30d8d9c$var$_tmpl$), true);
|
|
3040
3092
|
}
|
|
3041
3093
|
const $e01b34f289b61435$var$_tmpl$ = ["<div", ' class="search-in-filters"><input type="text" class="query"', "><!--$-->", '<!--/--><button style="', '" class="clear-filter-search">', "</button></div>"];
|
|
3042
|
-
const $e01b34f289b61435$var$min_items_to_enable_filter_searching =
|
|
3094
|
+
const $e01b34f289b61435$var$min_items_to_enable_filter_searching = 15; // For checkbox color and checkbox grid we 3x this
|
|
3043
3095
|
function $e01b34f289b61435$export$4b2c5292ffe0c5dd(filter_array_, section, i18n_) {
|
|
3044
3096
|
const [filter_query_, set_filter_query_] = $i7OB2$createSignal();
|
|
3045
3097
|
// Check if we have enough items to enable searching
|