@depict-ai/ui 2.0.20 → 2.0.22
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 +59 -32
- package/ES10/index.d.ts +5 -5
- package/ES10/index.js +60 -33
- package/latest/index.cjs +55 -26
- package/latest/index.d.ts +5 -5
- package/latest/index.js +56 -27
- package/package.json +2 -2
- package/server/ES10/index.cjs +50 -30
- package/server/ES10/index.d.ts +5 -5
- package/server/ES10/index.js +51 -31
- package/server/latest/index.cjs +46 -24
- package/server/latest/index.d.ts +5 -5
- package/server/latest/index.js +47 -25
- package/locales/require.js +0 -1152
package/server/ES10/index.cjs
CHANGED
|
@@ -72,7 +72,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
72
72
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
73
73
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
74
74
|
/*! Depict.ai search and product listing SDK */
|
|
75
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
75
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.22";
|
|
76
76
|
const $d067f3a30f047b41$var$ListingContext = /*@__PURE__*/$3hooq$solidjs.createContext();
|
|
77
77
|
function $d067f3a30f047b41$export$e68cff63f76bd15b(props) {
|
|
78
78
|
const our_object = {};
|
|
@@ -1043,6 +1043,14 @@ function $083b2336093176cf$export$3b621d86b1566b2() {
|
|
|
1043
1043
|
"viewBox": "0 0 21.064 21.064"
|
|
1044
1044
|
}), () => $3hooq$solidjsweb.ssr($083b2336093176cf$var$_tmpl$), true);
|
|
1045
1045
|
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* Lower cases a string if possible. Mostly used to make the filter url values case-insensitive.
|
|
1049
|
+
*/
|
|
1050
|
+
function $e2d74bb03cc5252e$export$325f75597868c4f0(stuff) {
|
|
1051
|
+
if (typeof stuff !== "string") return stuff;
|
|
1052
|
+
return stuff.toLowerCase();
|
|
1053
|
+
}
|
|
1046
1054
|
const $c5842bdb10e57229$var$_tmpl$ = ["<button", ' class="clear-all-filters minor">', "</button>"],
|
|
1047
1055
|
$c5842bdb10e57229$var$_tmpl$2 = ["<div", ' class="inner"><span class="title"><!--#-->', "<!--/-->: </span><!--#-->", "<!--/--></div>"],
|
|
1048
1056
|
$c5842bdb10e57229$var$_tmpl$3 = ["<button", ' class="clear-filter major"><!--#-->', "<!--/--><span><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--> – <!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></button>"],
|
|
@@ -1110,7 +1118,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
1110
1118
|
let created_an_object = false;
|
|
1111
1119
|
for (let j = 0; j < value.length; j++) {
|
|
1112
1120
|
var _pointer;
|
|
1113
|
-
const this_categories_name = value[j];
|
|
1121
|
+
const this_categories_name = $e2d74bb03cc5252e$export$325f75597868c4f0(value[j]);
|
|
1114
1122
|
const obj = (_pointer = pointer)[this_categories_name] || (_pointer[this_categories_name] = (() => {
|
|
1115
1123
|
const value_as_string = value.map(v => typeof v === "number" ? v + "" : v); // don't think backend will ever send numbers but technically it's allowed;
|
|
1116
1124
|
const created_obj = {
|
|
@@ -1184,7 +1192,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
1184
1192
|
var _meta, _meta$values;
|
|
1185
1193
|
const sel_d = selected_data();
|
|
1186
1194
|
return (_meta = meta()) === null || _meta === void 0 ? void 0 : (_meta$values = _meta.values) === null || _meta$values === void 0 ? void 0 : _meta$values.findIndex(value => {
|
|
1187
|
-
return value === sel_d || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => sel_d[index] === item);
|
|
1195
|
+
return $e2d74bb03cc5252e$export$325f75597868c4f0(value) === $e2d74bb03cc5252e$export$325f75597868c4f0(sel_d) || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(sel_d[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(item));
|
|
1188
1196
|
});
|
|
1189
1197
|
});
|
|
1190
1198
|
const name = $3hooq$solidjs.createMemo(() => {
|
|
@@ -1200,7 +1208,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
1200
1208
|
let pointer = structure;
|
|
1201
1209
|
for (const step of selected_data()) {
|
|
1202
1210
|
var _pointer2, _we_in_structure;
|
|
1203
|
-
we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[step];
|
|
1211
|
+
we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[$e2d74bb03cc5252e$export$325f75597868c4f0(step)];
|
|
1204
1212
|
pointer = (_we_in_structure = we_in_structure) === null || _we_in_structure === void 0 ? void 0 : _we_in_structure.children_;
|
|
1205
1213
|
}
|
|
1206
1214
|
return we_in_structure;
|
|
@@ -1215,7 +1223,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
1215
1223
|
let {
|
|
1216
1224
|
value_: value_
|
|
1217
1225
|
} = _ref2;
|
|
1218
|
-
return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => v[index] === val));
|
|
1226
|
+
return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(v[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(val)));
|
|
1219
1227
|
});
|
|
1220
1228
|
return false;
|
|
1221
1229
|
});
|
|
@@ -1334,6 +1342,12 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
|
|
|
1334
1342
|
});
|
|
1335
1343
|
const render_checkbox = checkbox => {
|
|
1336
1344
|
// Checkbox always calls the getters in props, so we don't wrap these values into memos
|
|
1345
|
+
const is_checked = $3hooq$solidjs.createMemo(() => {
|
|
1346
|
+
var _existing_filter;
|
|
1347
|
+
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1348
|
+
const value = $e2d74bb03cc5252e$export$325f75597868c4f0(checkbox().value_);
|
|
1349
|
+
return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === value));
|
|
1350
|
+
});
|
|
1337
1351
|
return $3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
1338
1352
|
get value_() {
|
|
1339
1353
|
return checkbox().value_;
|
|
@@ -1345,8 +1359,7 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
|
|
|
1345
1359
|
return checkbox().count_;
|
|
1346
1360
|
},
|
|
1347
1361
|
get checked_() {
|
|
1348
|
-
|
|
1349
|
-
return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
|
|
1362
|
+
return is_checked();
|
|
1350
1363
|
}
|
|
1351
1364
|
});
|
|
1352
1365
|
};
|
|
@@ -1433,7 +1446,7 @@ function $d9239dad9a9d899b$export$430444115f70a734(_ref) {
|
|
|
1433
1446
|
var _existing_filter;
|
|
1434
1447
|
const v = value();
|
|
1435
1448
|
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1436
|
-
if (data === v) return true;
|
|
1449
|
+
if ($e2d74bb03cc5252e$export$325f75597868c4f0(data) === $e2d74bb03cc5252e$export$325f75597868c4f0(v)) return true;
|
|
1437
1450
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1438
1451
|
})(), true), $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
|
|
1439
1452
|
var _filter_$meta, _filter_$meta$names;
|
|
@@ -2012,7 +2025,7 @@ function $9c1d49181fb3002a$var$create_updating_signal(_ref3) {
|
|
|
2012
2025
|
var _existing_filter_$dat, _existing_filter_$dat2;
|
|
2013
2026
|
// wait for the children to have populated and us to have received the correct value_ and name_ values
|
|
2014
2027
|
let updating_blocked = false;
|
|
2015
|
-
const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => self_.value_[index] === sub_el));
|
|
2028
|
+
const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(self_.value_[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(sub_el)));
|
|
2016
2029
|
signal_.push(...$3hooq$solidjs.createSignal(index_of_us_in_selected_filter >= 0));
|
|
2017
2030
|
const [read_checked, write_checked] = signal_;
|
|
2018
2031
|
const child_objects = Object.values(self_.children_);
|
|
@@ -2199,8 +2212,10 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
|
|
|
2199
2212
|
},
|
|
2200
2213
|
children: value => {
|
|
2201
2214
|
const is_selected = $3hooq$solidjs.createMemo(() => {
|
|
2202
|
-
var _existing_filter
|
|
2203
|
-
|
|
2215
|
+
var _existing_filter;
|
|
2216
|
+
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
2217
|
+
const current_value = $e2d74bb03cc5252e$export$325f75597868c4f0(value().value_);
|
|
2218
|
+
return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === current_value));
|
|
2204
2219
|
});
|
|
2205
2220
|
const MakeButton = attributes => $3hooq$solidjsweb.ssrElement("button", () => ({
|
|
2206
2221
|
...attributes,
|
|
@@ -2299,16 +2314,6 @@ function $cd0e5524f9476f9b$var$adjust_sizes(container_width, sizes, set_cols_at_
|
|
|
2299
2314
|
overrides: column_to_row_result
|
|
2300
2315
|
}]]);
|
|
2301
2316
|
}
|
|
2302
|
-
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
2303
|
-
const signal = $3hooq$solidjs.createSignal(false);
|
|
2304
|
-
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
2305
|
-
let {
|
|
2306
|
-
matches: matches
|
|
2307
|
-
} = _ref;
|
|
2308
|
-
return signal[1](matches);
|
|
2309
|
-
}).remove);
|
|
2310
|
-
return signal[0];
|
|
2311
|
-
}
|
|
2312
2317
|
const $476a3dc36afc1938$var$_tmpl$ = ["<form", ' class="checkbox-color"><!--#-->', "<!--/--><!--#-->", "<!--/--></form>"];
|
|
2313
2318
|
const $476a3dc36afc1938$var$max_visible_without_collapsing = 30;
|
|
2314
2319
|
const $476a3dc36afc1938$var$show_non_collapsible_when_collapsed = 8;
|
|
@@ -2319,7 +2324,6 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
2319
2324
|
i18n_: i18n_,
|
|
2320
2325
|
view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_]
|
|
2321
2326
|
} = _ref;
|
|
2322
|
-
const supports_hover = $3e17e871e9d0911d$export$d9f36cf74e24d595("not all and (hover: none)");
|
|
2323
2327
|
// same as in CheckboxFilter, maybe we should make this DRY at some point
|
|
2324
2328
|
const existing_filter = $3hooq$solidjs.createMemo(() => {
|
|
2325
2329
|
const {
|
|
@@ -2357,6 +2361,12 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
2357
2361
|
});
|
|
2358
2362
|
const rgb_color = $3hooq$solidjs.createMemo(() => $3hooq$depictaiutilishared.hex_to_rgb(hex_color()));
|
|
2359
2363
|
const black_contrast_better = $3hooq$solidjs.createMemo(() => rgb_color() ? $476a3dc36afc1938$var$does_black_contrast_better(rgb_color()) : false);
|
|
2364
|
+
const is_checked = $3hooq$solidjs.createMemo(() => {
|
|
2365
|
+
var _existing_filter;
|
|
2366
|
+
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
2367
|
+
const value = $e2d74bb03cc5252e$export$325f75597868c4f0(checkbox().value_);
|
|
2368
|
+
return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === value));
|
|
2369
|
+
});
|
|
2360
2370
|
const input_row = $3hooq$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
|
|
2361
2371
|
get value_() {
|
|
2362
2372
|
return checkbox().value_;
|
|
@@ -2368,8 +2378,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
2368
2378
|
return checkbox().count_;
|
|
2369
2379
|
},
|
|
2370
2380
|
get checked_() {
|
|
2371
|
-
|
|
2372
|
-
return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
|
|
2381
|
+
return is_checked();
|
|
2373
2382
|
},
|
|
2374
2383
|
custom_indicator_ref: span => {
|
|
2375
2384
|
const {
|
|
@@ -2525,7 +2534,7 @@ function $958981128e559776$export$53c59af873b303c9(_ref) {
|
|
|
2525
2534
|
break try_specific;
|
|
2526
2535
|
}
|
|
2527
2536
|
const needle = data_is_array ? data[0] : data;
|
|
2528
|
-
const index_in_meta = meta.values.findIndex(value => needle === value || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => needle[index] === item));
|
|
2537
|
+
const index_in_meta = meta.values.findIndex(value => $e2d74bb03cc5252e$export$325f75597868c4f0(needle) === $e2d74bb03cc5252e$export$325f75597868c4f0(value) || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(needle[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(item)));
|
|
2529
2538
|
return ((_names = meta.names) === null || _names === void 0 ? void 0 : _names[index_in_meta]) || ((_values = meta.values) === null || _values === void 0 ? void 0 : _values[index_in_meta]);
|
|
2530
2539
|
}
|
|
2531
2540
|
}
|
|
@@ -2626,7 +2635,7 @@ const $164d474fea221d77$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "<
|
|
|
2626
2635
|
$164d474fea221d77$var$_tmpl$2 = ["<button", ' class="clear-group"><!--#-->', "<!--/--><span>", "</span></button>"],
|
|
2627
2636
|
$164d474fea221d77$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
|
|
2628
2637
|
$164d474fea221d77$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><div class="filter-part">', "</div><!--#-->", "<!--/--></div>"],
|
|
2629
|
-
$164d474fea221d77$var$_tmpl$5 = ["<details", ' class="filter-collapsible"></details>
|
|
2638
|
+
$164d474fea221d77$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
|
|
2630
2639
|
$164d474fea221d77$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span>', '</span><div class="selected-w-sign"><!--#-->', "<!--/--><!--#-->", "<!--/--></div></div></summary>"],
|
|
2631
2640
|
$164d474fea221d77$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
|
|
2632
2641
|
$164d474fea221d77$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
|
|
@@ -2701,7 +2710,7 @@ function $164d474fea221d77$var$ActualFilterBody(props) {
|
|
|
2701
2710
|
return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
|
|
2702
2711
|
is_open_: is_open,
|
|
2703
2712
|
get details_() {
|
|
2704
|
-
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey());
|
|
2713
|
+
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("data-group-title", $3hooq$solidjsweb.escape(section_, true), false));
|
|
2705
2714
|
},
|
|
2706
2715
|
get summary_() {
|
|
2707
2716
|
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(section_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
@@ -3041,7 +3050,8 @@ function $367b536a2a94d24e$export$e183a13865960371(params_to_default_value, rout
|
|
|
3041
3050
|
const signals = {};
|
|
3042
3051
|
const entries = Object.entries(params_to_default_value);
|
|
3043
3052
|
const event_handler = $3hooq$depictaiutilishared.catchify((what_happened, args) => {
|
|
3044
|
-
|
|
3053
|
+
// Intentionally always update our signals to the history state to allow external control of SDK state for doing things like https://linear.app/depictai/issue/X-1432/is-this-possible-with-the-depict-sdk
|
|
3054
|
+
$367b536a2a94d24e$var$history_state_change(signals, entries, what_happened === "popstate" ? args.state : history.state);
|
|
3045
3055
|
});
|
|
3046
3056
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
3047
3057
|
$3hooq$solidjs.createRenderEffect(() => {
|
|
@@ -3475,6 +3485,16 @@ async function $e270e9f953fcbc58$var$_cached_post_request2(endpoint, input_req,
|
|
|
3475
3485
|
delete cache_obj.in_progress_[body];
|
|
3476
3486
|
}
|
|
3477
3487
|
}
|
|
3488
|
+
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
3489
|
+
const signal = $3hooq$solidjs.createSignal(false);
|
|
3490
|
+
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
3491
|
+
let {
|
|
3492
|
+
matches: matches
|
|
3493
|
+
} = _ref;
|
|
3494
|
+
return signal[1](matches);
|
|
3495
|
+
}).remove);
|
|
3496
|
+
return signal[0];
|
|
3497
|
+
}
|
|
3478
3498
|
const $55f06aa93e360e7f$var$get_available_range = (available_filters_, search_for_field) => {
|
|
3479
3499
|
var _untrack, _untrack$find;
|
|
3480
3500
|
const maybe_meta = (_untrack = $3hooq$solidjs.untrack(available_filters_)) === null || _untrack === void 0 ? void 0 : (_untrack$find = _untrack.find(_ref => {
|
|
@@ -9856,7 +9876,7 @@ function $33e797e57f1b6354$var$_get_rendered_recs2() {
|
|
|
9856
9876
|
}
|
|
9857
9877
|
function $33e797e57f1b6354$var$_empty_page_bugfix2() {
|
|
9858
9878
|
// Called when a "page" is "opened" using PageReplacer
|
|
9859
|
-
const on_maybe_popstate = what_happened => {
|
|
9879
|
+
const on_maybe_popstate = $3hooq$depictaiutilishared.catchify(what_happened => {
|
|
9860
9880
|
if (what_happened !== "popstate") return;
|
|
9861
9881
|
const cleaned_current_url = $33e797e57f1b6354$var$clean_url(location.href);
|
|
9862
9882
|
if (!$33e797e57f1b6354$var$_classStaticPrivateFieldSpecGet($33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$var$_visited_urls).has(cleaned_current_url)) {
|
|
@@ -9885,7 +9905,7 @@ function $33e797e57f1b6354$var$_empty_page_bugfix2() {
|
|
|
9885
9905
|
$33e797e57f1b6354$var$_classStaticPrivateFieldSpecSet($33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$var$_reverting_permitted, false); // Disallow any reverting since we can't - it would flash a white page until the reload has finished.
|
|
9886
9906
|
$parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $33e797e57f1b6354$var$_unload).call(this); // Call unload to "kill" the solid-js stuff quicker so that it stops updating - the user is expecting the next thing that happens to be a navigation to the actual page the URL says they're on.
|
|
9887
9907
|
}
|
|
9888
|
-
};
|
|
9908
|
+
});
|
|
9889
9909
|
|
|
9890
9910
|
(0, $3hooq$depictaiutilishared.instant_exec_on_suspect_history_change).add(on_maybe_popstate);
|
|
9891
9911
|
$parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $33e797e57f1b6354$var$_revert_fns).push(() => (0, $3hooq$depictaiutilishared.instant_exec_on_suspect_history_change).delete(on_maybe_popstate)); // Don't run the bugfixer if there isn't a PageReplacer page open since I assume the bug only happens when going back from a PageReplace'd page
|
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 { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "2.0.
|
|
10
|
+
export const version = "2.0.22";
|
|
11
11
|
/**
|
|
12
12
|
* Provider to wrap every listing (group of products) in
|
|
13
13
|
* Used for example for deduplicating ResizeObservers for responsive images
|
|
@@ -342,10 +342,6 @@ export function SelectedFilters({
|
|
|
342
342
|
selected_filters_: Signal<FilterWithData[]>;
|
|
343
343
|
local_filter_cache_: Signal<SearchFilter[]>;
|
|
344
344
|
}): HTMLDivElement;
|
|
345
|
-
/**
|
|
346
|
-
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
347
|
-
*/
|
|
348
|
-
export function media_query_to_accessor(media_query: string): import("solid-js").Accessor<boolean>;
|
|
349
345
|
/**
|
|
350
346
|
* Base placeholder component used by ImagePlaceholder and TextPlaceholder
|
|
351
347
|
*/
|
|
@@ -614,6 +610,10 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
614
610
|
failed?: true | undefined;
|
|
615
611
|
}>;
|
|
616
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
615
|
+
*/
|
|
616
|
+
export function media_query_to_accessor(media_query: string): import("solid-js").Accessor<boolean>;
|
|
617
617
|
/**
|
|
618
618
|
* Disables scrolling until the solidjs reactive scoped is disposed (onCleanup)
|
|
619
619
|
* @returns A cleanup function to manually re-enable scrolling.
|
package/server/ES10/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info, queueMacroTask as $b8hua$queueMacroTask, catchify as $b8hua$catchify, is_safari as $b8hua$is_safari, observer as $b8hua$observer, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb,
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, queueMacroTask as $b8hua$queueMacroTask, catchify as $b8hua$catchify, is_safari as $b8hua$is_safari, observer as $b8hua$observer, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, fetch_recs as $b8hua$fetch_recs, snakeCasifyObject as $b8hua$snakeCasifyObject, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, base_url as $b8hua$base_url, get_depict_id as $b8hua$get_depict_id, get_user_id as $b8hua$get_user_id, get_session_id as $b8hua$get_session_id, make_url_with_query_params as $b8hua$make_url_with_query_params, fetch_retry as $b8hua$fetch_retry, add_version_query_params as $b8hua$add_version_query_params, dwarn as $b8hua$dwarn, sort_obj as $b8hua$sort_obj, edit_current_page_meta_tags as $b8hua$edit_current_page_meta_tags, javascript_media_query as $b8hua$javascript_media_query, use_href_accessor as $b8hua$use_href_accessor, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, ContainedImage as $b8hua$ContainedImage, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { createComponent as $b8hua$createComponent, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, ssrElement as $b8hua$ssrElement, escape as $b8hua$escape, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, mergeProps as $b8hua$mergeProps, isServer as $b8hua$isServer, ssrClassList as $b8hua$ssrClassList, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createMemo as $b8hua$createMemo, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, Show as $b8hua$Show, createRenderEffect as $b8hua$createRenderEffect, createRoot as $b8hua$createRoot, For as $b8hua$For, createUniqueId as $b8hua$createUniqueId, untrack as $b8hua$untrack, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, Index as $b8hua$Index, on as $b8hua$on, batch as $b8hua$batch, createReaction as $b8hua$createReaction } from "solid-js";
|
|
4
4
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.22";
|
|
12
12
|
const $5441862cd2f5e111$var$ListingContext = /*@__PURE__*/$b8hua$createContext();
|
|
13
13
|
function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
14
14
|
const our_object = {};
|
|
@@ -979,6 +979,14 @@ function $9783d437ad61594c$export$3b621d86b1566b2() {
|
|
|
979
979
|
"viewBox": "0 0 21.064 21.064"
|
|
980
980
|
}), () => $b8hua$ssr($9783d437ad61594c$var$_tmpl$), true);
|
|
981
981
|
}
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Lower cases a string if possible. Mostly used to make the filter url values case-insensitive.
|
|
985
|
+
*/
|
|
986
|
+
function $af5d8e0b7d97a7f6$export$325f75597868c4f0(stuff) {
|
|
987
|
+
if (typeof stuff !== "string") return stuff;
|
|
988
|
+
return stuff.toLowerCase();
|
|
989
|
+
}
|
|
982
990
|
const $4711a82d08d2021b$var$_tmpl$ = ["<button", ' class="clear-all-filters minor">', "</button>"],
|
|
983
991
|
$4711a82d08d2021b$var$_tmpl$2 = ["<div", ' class="inner"><span class="title"><!--#-->', "<!--/-->: </span><!--#-->", "<!--/--></div>"],
|
|
984
992
|
$4711a82d08d2021b$var$_tmpl$3 = ["<button", ' class="clear-filter major"><!--#-->', "<!--/--><span><!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--> – <!--#-->", "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></button>"],
|
|
@@ -1046,7 +1054,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
1046
1054
|
let created_an_object = false;
|
|
1047
1055
|
for (let j = 0; j < value.length; j++) {
|
|
1048
1056
|
var _pointer;
|
|
1049
|
-
const this_categories_name = value[j];
|
|
1057
|
+
const this_categories_name = $af5d8e0b7d97a7f6$export$325f75597868c4f0(value[j]);
|
|
1050
1058
|
const obj = (_pointer = pointer)[this_categories_name] || (_pointer[this_categories_name] = (() => {
|
|
1051
1059
|
const value_as_string = value.map(v => typeof v === "number" ? v + "" : v); // don't think backend will ever send numbers but technically it's allowed;
|
|
1052
1060
|
const created_obj = {
|
|
@@ -1120,7 +1128,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
1120
1128
|
var _meta, _meta$values;
|
|
1121
1129
|
const sel_d = selected_data();
|
|
1122
1130
|
return (_meta = meta()) === null || _meta === void 0 ? void 0 : (_meta$values = _meta.values) === null || _meta$values === void 0 ? void 0 : _meta$values.findIndex(value => {
|
|
1123
|
-
return value === sel_d || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => sel_d[index] === item);
|
|
1131
|
+
return $af5d8e0b7d97a7f6$export$325f75597868c4f0(value) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(sel_d) || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(sel_d[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(item));
|
|
1124
1132
|
});
|
|
1125
1133
|
});
|
|
1126
1134
|
const name = $b8hua$createMemo(() => {
|
|
@@ -1136,7 +1144,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
1136
1144
|
let pointer = structure;
|
|
1137
1145
|
for (const step of selected_data()) {
|
|
1138
1146
|
var _pointer2, _we_in_structure;
|
|
1139
|
-
we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[step];
|
|
1147
|
+
we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[$af5d8e0b7d97a7f6$export$325f75597868c4f0(step)];
|
|
1140
1148
|
pointer = (_we_in_structure = we_in_structure) === null || _we_in_structure === void 0 ? void 0 : _we_in_structure.children_;
|
|
1141
1149
|
}
|
|
1142
1150
|
return we_in_structure;
|
|
@@ -1151,7 +1159,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
1151
1159
|
let {
|
|
1152
1160
|
value_: value_
|
|
1153
1161
|
} = _ref2;
|
|
1154
|
-
return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => v[index] === val));
|
|
1162
|
+
return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(v[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(val)));
|
|
1155
1163
|
});
|
|
1156
1164
|
return false;
|
|
1157
1165
|
});
|
|
@@ -1270,6 +1278,12 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
1270
1278
|
});
|
|
1271
1279
|
const render_checkbox = checkbox => {
|
|
1272
1280
|
// Checkbox always calls the getters in props, so we don't wrap these values into memos
|
|
1281
|
+
const is_checked = $b8hua$createMemo(() => {
|
|
1282
|
+
var _existing_filter;
|
|
1283
|
+
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1284
|
+
const value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(checkbox().value_);
|
|
1285
|
+
return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === value));
|
|
1286
|
+
});
|
|
1273
1287
|
return $b8hua$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
|
|
1274
1288
|
get value_() {
|
|
1275
1289
|
return checkbox().value_;
|
|
@@ -1281,8 +1295,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
1281
1295
|
return checkbox().count_;
|
|
1282
1296
|
},
|
|
1283
1297
|
get checked_() {
|
|
1284
|
-
|
|
1285
|
-
return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
|
|
1298
|
+
return is_checked();
|
|
1286
1299
|
}
|
|
1287
1300
|
});
|
|
1288
1301
|
};
|
|
@@ -1369,7 +1382,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
1369
1382
|
var _existing_filter;
|
|
1370
1383
|
const v = value();
|
|
1371
1384
|
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
1372
|
-
if (data === v) return true;
|
|
1385
|
+
if ($af5d8e0b7d97a7f6$export$325f75597868c4f0(data) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(v)) return true;
|
|
1373
1386
|
return Array.isArray(data) && data.every((item, index) => item === v[index]);
|
|
1374
1387
|
})(), true), $b8hua$escape($b8hua$createMemo(() => {
|
|
1375
1388
|
var _filter_$meta, _filter_$meta$names;
|
|
@@ -1948,7 +1961,7 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
1948
1961
|
var _existing_filter_$dat, _existing_filter_$dat2;
|
|
1949
1962
|
// wait for the children to have populated and us to have received the correct value_ and name_ values
|
|
1950
1963
|
let updating_blocked = false;
|
|
1951
|
-
const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => self_.value_[index] === sub_el));
|
|
1964
|
+
const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(self_.value_[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(sub_el)));
|
|
1952
1965
|
signal_.push(...$b8hua$createSignal(index_of_us_in_selected_filter >= 0));
|
|
1953
1966
|
const [read_checked, write_checked] = signal_;
|
|
1954
1967
|
const child_objects = Object.values(self_.children_);
|
|
@@ -2135,8 +2148,10 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
2135
2148
|
},
|
|
2136
2149
|
children: value => {
|
|
2137
2150
|
const is_selected = $b8hua$createMemo(() => {
|
|
2138
|
-
var _existing_filter
|
|
2139
|
-
|
|
2151
|
+
var _existing_filter;
|
|
2152
|
+
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
2153
|
+
const current_value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(value().value_);
|
|
2154
|
+
return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === current_value));
|
|
2140
2155
|
});
|
|
2141
2156
|
const MakeButton = attributes => $b8hua$ssrElement("button", () => ({
|
|
2142
2157
|
...attributes,
|
|
@@ -2235,16 +2250,6 @@ function $830ea8efda59884e$var$adjust_sizes(container_width, sizes, set_cols_at_
|
|
|
2235
2250
|
overrides: column_to_row_result
|
|
2236
2251
|
}]]);
|
|
2237
2252
|
}
|
|
2238
|
-
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
2239
|
-
const signal = $b8hua$createSignal(false);
|
|
2240
|
-
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
2241
|
-
let {
|
|
2242
|
-
matches: matches
|
|
2243
|
-
} = _ref;
|
|
2244
|
-
return signal[1](matches);
|
|
2245
|
-
}).remove);
|
|
2246
|
-
return signal[0];
|
|
2247
|
-
}
|
|
2248
2253
|
const $2cb856c297c53e6c$var$_tmpl$ = ["<form", ' class="checkbox-color"><!--#-->', "<!--/--><!--#-->", "<!--/--></form>"];
|
|
2249
2254
|
const $2cb856c297c53e6c$var$max_visible_without_collapsing = 30;
|
|
2250
2255
|
const $2cb856c297c53e6c$var$show_non_collapsible_when_collapsed = 8;
|
|
@@ -2255,7 +2260,6 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2255
2260
|
i18n_: i18n_,
|
|
2256
2261
|
view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_]
|
|
2257
2262
|
} = _ref;
|
|
2258
|
-
const supports_hover = $00a5b94f0c11efbb$export$d9f36cf74e24d595("not all and (hover: none)");
|
|
2259
2263
|
// same as in CheckboxFilter, maybe we should make this DRY at some point
|
|
2260
2264
|
const existing_filter = $b8hua$createMemo(() => {
|
|
2261
2265
|
const {
|
|
@@ -2293,6 +2297,12 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2293
2297
|
});
|
|
2294
2298
|
const rgb_color = $b8hua$createMemo(() => $b8hua$hex_to_rgb(hex_color()));
|
|
2295
2299
|
const black_contrast_better = $b8hua$createMemo(() => rgb_color() ? $2cb856c297c53e6c$var$does_black_contrast_better(rgb_color()) : false);
|
|
2300
|
+
const is_checked = $b8hua$createMemo(() => {
|
|
2301
|
+
var _existing_filter;
|
|
2302
|
+
const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
|
|
2303
|
+
const value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(checkbox().value_);
|
|
2304
|
+
return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === value));
|
|
2305
|
+
});
|
|
2296
2306
|
const input_row = $b8hua$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
|
|
2297
2307
|
get value_() {
|
|
2298
2308
|
return checkbox().value_;
|
|
@@ -2304,8 +2314,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2304
2314
|
return checkbox().count_;
|
|
2305
2315
|
},
|
|
2306
2316
|
get checked_() {
|
|
2307
|
-
|
|
2308
|
-
return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
|
|
2317
|
+
return is_checked();
|
|
2309
2318
|
},
|
|
2310
2319
|
custom_indicator_ref: span => {
|
|
2311
2320
|
const {
|
|
@@ -2461,7 +2470,7 @@ function $d0ff304c14f50521$export$53c59af873b303c9(_ref) {
|
|
|
2461
2470
|
break try_specific;
|
|
2462
2471
|
}
|
|
2463
2472
|
const needle = data_is_array ? data[0] : data;
|
|
2464
|
-
const index_in_meta = meta.values.findIndex(value => needle === value || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => needle[index] === item));
|
|
2473
|
+
const index_in_meta = meta.values.findIndex(value => $af5d8e0b7d97a7f6$export$325f75597868c4f0(needle) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(value) || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(needle[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(item)));
|
|
2465
2474
|
return ((_names = meta.names) === null || _names === void 0 ? void 0 : _names[index_in_meta]) || ((_values = meta.values) === null || _values === void 0 ? void 0 : _values[index_in_meta]);
|
|
2466
2475
|
}
|
|
2467
2476
|
}
|
|
@@ -2562,7 +2571,7 @@ const $f6b0500577e1b210$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "<
|
|
|
2562
2571
|
$f6b0500577e1b210$var$_tmpl$2 = ["<button", ' class="clear-group"><!--#-->', "<!--/--><span>", "</span></button>"],
|
|
2563
2572
|
$f6b0500577e1b210$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--#-->', "<!--/--><!--#-->", "<!--/--></div>"],
|
|
2564
2573
|
$f6b0500577e1b210$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><div class="filter-part">', "</div><!--#-->", "<!--/--></div>"],
|
|
2565
|
-
$f6b0500577e1b210$var$_tmpl$5 = ["<details", ' class="filter-collapsible"></details>
|
|
2574
|
+
$f6b0500577e1b210$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
|
|
2566
2575
|
$f6b0500577e1b210$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span>', '</span><div class="selected-w-sign"><!--#-->', "<!--/--><!--#-->", "<!--/--></div></div></summary>"],
|
|
2567
2576
|
$f6b0500577e1b210$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
|
|
2568
2577
|
$f6b0500577e1b210$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
|
|
@@ -2637,7 +2646,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
2637
2646
|
return $b8hua$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
|
|
2638
2647
|
is_open_: is_open,
|
|
2639
2648
|
get details_() {
|
|
2640
|
-
return $b8hua$ssr($f6b0500577e1b210$var$_tmpl$5, $b8hua$ssrHydrationKey());
|
|
2649
|
+
return $b8hua$ssr($f6b0500577e1b210$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("data-group-title", $b8hua$escape(section_, true), false));
|
|
2641
2650
|
},
|
|
2642
2651
|
get summary_() {
|
|
2643
2652
|
return $b8hua$ssr($f6b0500577e1b210$var$_tmpl$6, $b8hua$ssrHydrationKey(), $b8hua$escape(section_), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
@@ -2977,7 +2986,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
2977
2986
|
const signals = {};
|
|
2978
2987
|
const entries = Object.entries(params_to_default_value);
|
|
2979
2988
|
const event_handler = $b8hua$catchify((what_happened, args) => {
|
|
2980
|
-
|
|
2989
|
+
// Intentionally always update our signals to the history state to allow external control of SDK state for doing things like https://linear.app/depictai/issue/X-1432/is-this-possible-with-the-depict-sdk
|
|
2990
|
+
$972f6bce0f9d61be$var$history_state_change(signals, entries, what_happened === "popstate" ? args.state : history.state);
|
|
2981
2991
|
});
|
|
2982
2992
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
2983
2993
|
$b8hua$createRenderEffect(() => {
|
|
@@ -3411,6 +3421,16 @@ async function $284849364a6ef73a$var$_cached_post_request2(endpoint, input_req,
|
|
|
3411
3421
|
delete cache_obj.in_progress_[body];
|
|
3412
3422
|
}
|
|
3413
3423
|
}
|
|
3424
|
+
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
3425
|
+
const signal = $b8hua$createSignal(false);
|
|
3426
|
+
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
3427
|
+
let {
|
|
3428
|
+
matches: matches
|
|
3429
|
+
} = _ref;
|
|
3430
|
+
return signal[1](matches);
|
|
3431
|
+
}).remove);
|
|
3432
|
+
return signal[0];
|
|
3433
|
+
}
|
|
3414
3434
|
const $9b5022ae72f56399$var$get_available_range = (available_filters_, search_for_field) => {
|
|
3415
3435
|
var _untrack, _untrack$find;
|
|
3416
3436
|
const maybe_meta = (_untrack = $b8hua$untrack(available_filters_)) === null || _untrack === void 0 ? void 0 : (_untrack$find = _untrack.find(_ref => {
|
|
@@ -9792,7 +9812,7 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
9792
9812
|
}
|
|
9793
9813
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
9794
9814
|
// Called when a "page" is "opened" using PageReplacer
|
|
9795
|
-
const on_maybe_popstate = what_happened => {
|
|
9815
|
+
const on_maybe_popstate = $b8hua$catchify(what_happened => {
|
|
9796
9816
|
if (what_happened !== "popstate") return;
|
|
9797
9817
|
const cleaned_current_url = $f9fd3017c20b774a$var$clean_url(location.href);
|
|
9798
9818
|
if (!$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecGet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_visited_urls).has(cleaned_current_url)) {
|
|
@@ -9821,7 +9841,7 @@ function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
|
9821
9841
|
$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecSet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_reverting_permitted, false); // Disallow any reverting since we can't - it would flash a white page until the reload has finished.
|
|
9822
9842
|
$b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_unload).call(this); // Call unload to "kill" the solid-js stuff quicker so that it stops updating - the user is expecting the next thing that happens to be a navigation to the actual page the URL says they're on.
|
|
9823
9843
|
}
|
|
9824
|
-
};
|
|
9844
|
+
});
|
|
9825
9845
|
|
|
9826
9846
|
(0, $b8hua$instant_exec_on_suspect_history_change).add(on_maybe_popstate);
|
|
9827
9847
|
$b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_revert_fns).push(() => (0, $b8hua$instant_exec_on_suspect_history_change).delete(on_maybe_popstate)); // Don't run the bugfixer if there isn't a PageReplacer page open since I assume the bug only happens when going back from a PageReplace'd page
|