@depict-ai/ui 4.0.24 → 4.0.26
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 +81 -72
- package/ES10/index.d.ts +11 -1
- package/ES10/index.js +80 -74
- package/latest/index.cjs +75 -57
- package/latest/index.d.ts +11 -1
- package/latest/index.js +74 -59
- package/package.json +4 -4
- package/server/ES10/index.cjs +76 -67
- package/server/ES10/index.d.ts +11 -1
- package/server/ES10/index.js +75 -69
- package/server/latest/index.cjs +70 -52
- package/server/latest/index.d.ts +11 -1
- package/server/latest/index.js +69 -54
package/server/ES10/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info, deparallelize_no_drop as $b8hua$deparallelize_no_drop, catchify as $b8hua$catchify, make_random_classname as $b8hua$make_random_classname, ContainedImage as $b8hua$ContainedImage, standard_price_format as $b8hua$standard_price_format, javascript_media_query as $b8hua$javascript_media_query, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, observer as $b8hua$observer,
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, report as $b8hua$report, deparallelize_no_drop as $b8hua$deparallelize_no_drop, catchify as $b8hua$catchify, make_random_classname as $b8hua$make_random_classname, ContainedImage as $b8hua$ContainedImage, standard_price_format as $b8hua$standard_price_format, javascript_media_query as $b8hua$javascript_media_query, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, observer as $b8hua$observer, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, dwarn as $b8hua$dwarn, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, 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, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, base_url as $b8hua$base_url, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, slider_fractional_factory as $b8hua$slider_fractional_factory, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, fetch_retry as $b8hua$fetch_retry, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { createSignal as $b8hua$createSignal, createResource as $b8hua$createResource, createEffect as $b8hua$createEffect, untrack as $b8hua$untrack, createMemo as $b8hua$createMemo, onCleanup as $b8hua$onCleanup, Show as $b8hua$Show, createComputed as $b8hua$createComputed, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createContext as $b8hua$createContext, useContext as $b8hua$useContext, on as $b8hua$on, Index as $b8hua$Index, batch as $b8hua$batch, ErrorBoundary as $b8hua$ErrorBoundary, splitProps as $b8hua$splitProps, mergeProps as $b8hua$mergeProps1, createUniqueId as $b8hua$createUniqueId, createRenderEffect as $b8hua$createRenderEffect, createSelector as $b8hua$createSelector, children as $b8hua$children, createRoot as $b8hua$createRoot, Suspense as $b8hua$Suspense, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
3
3
|
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, createComponent as $b8hua$createComponent, ssrAttribute as $b8hua$ssrAttribute, ssrClassList as $b8hua$ssrClassList, ssrStyle as $b8hua$ssrStyle, ssrElement as $b8hua$ssrElement, mergeProps as $b8hua$mergeProps, insert as $b8hua$insert, spread as $b8hua$spread, isServer as $b8hua$isServer, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
4
4
|
import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
@@ -10,7 +10,56 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.26";
|
|
14
|
+
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
15
|
+
let $68e6625c8d51f847$var$has_ran = false;
|
|
16
|
+
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
17
|
+
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
18
|
+
$68e6625c8d51f847$var$has_ran = true;
|
|
19
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
20
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
21
|
+
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
25
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
26
|
+
apply(target, this_arg, arg_list) {
|
|
27
|
+
try {
|
|
28
|
+
const old_state = history.state;
|
|
29
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
30
|
+
var _arg_list$;
|
|
31
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
32
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
33
|
+
const cloned_object = {
|
|
34
|
+
...intended_new_value_as_obj
|
|
35
|
+
};
|
|
36
|
+
for (const key in old_state) {
|
|
37
|
+
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
38
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
39
|
+
}
|
|
40
|
+
arg_list[0] = cloned_object;
|
|
41
|
+
}
|
|
42
|
+
} catch (e) {
|
|
43
|
+
$b8hua$report([e, "Failed to preserve items in history.state"], "error");
|
|
44
|
+
}
|
|
45
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
50
|
+
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
51
|
+
if (key.startsWith(prefix)) return true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
57
|
+
* @param clickEvent The click event that triggered the navigation
|
|
58
|
+
*/
|
|
59
|
+
function $9b35d1384e31813a$export$29d28dadc2d6b631(clickEvent) {
|
|
60
|
+
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
61
|
+
);
|
|
62
|
+
}
|
|
14
63
|
|
|
15
64
|
/**
|
|
16
65
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -924,8 +973,8 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
924
973
|
}
|
|
925
974
|
var $76b6e14a50da4597$var$_tmpl$ = ["<a", ' target="_blank"></a>'];
|
|
926
975
|
function $76b6e14a50da4597$export$1efe1013da60d0e4(e, href) {
|
|
927
|
-
if (e.metaKey || e.ctrlKey) {
|
|
928
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
976
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
977
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
929
978
|
const link = $b8hua$ssr($76b6e14a50da4597$var$_tmpl$, $b8hua$ssrHydrationKey() + $b8hua$ssrAttribute("href", $b8hua$escape(href, true), false));
|
|
930
979
|
document.body.append(link);
|
|
931
980
|
link.click();
|
|
@@ -3344,46 +3393,6 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
3344
3393
|
}
|
|
3345
3394
|
});
|
|
3346
3395
|
}
|
|
3347
|
-
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
3348
|
-
let $68e6625c8d51f847$var$has_ran = false;
|
|
3349
|
-
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
3350
|
-
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
3351
|
-
$68e6625c8d51f847$var$has_ran = true;
|
|
3352
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
3353
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
3354
|
-
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
3355
|
-
}
|
|
3356
|
-
}
|
|
3357
|
-
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
3358
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
3359
|
-
apply(target, this_arg, arg_list) {
|
|
3360
|
-
try {
|
|
3361
|
-
const old_state = history.state;
|
|
3362
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
3363
|
-
var _arg_list$;
|
|
3364
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3365
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
3366
|
-
const cloned_object = {
|
|
3367
|
-
...intended_new_value_as_obj
|
|
3368
|
-
};
|
|
3369
|
-
for (const key in old_state) {
|
|
3370
|
-
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
3371
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3372
|
-
}
|
|
3373
|
-
arg_list[0] = cloned_object;
|
|
3374
|
-
}
|
|
3375
|
-
} catch (e) {
|
|
3376
|
-
$b8hua$report([e, "Failed to preserve items in history.state"], "error");
|
|
3377
|
-
}
|
|
3378
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
3379
|
-
}
|
|
3380
|
-
});
|
|
3381
|
-
}
|
|
3382
|
-
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
3383
|
-
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
3384
|
-
if (key.startsWith(prefix)) return true;
|
|
3385
|
-
}
|
|
3386
|
-
}
|
|
3387
3396
|
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
3388
3397
|
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
3389
3398
|
privateSet.add(obj);
|
|
@@ -3396,7 +3405,6 @@ function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn)
|
|
|
3396
3405
|
return fn;
|
|
3397
3406
|
}
|
|
3398
3407
|
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
3399
|
-
var $ac571292d606f30b$var$_dont_attempt_navigation = /*#__PURE__*/new WeakSet();
|
|
3400
3408
|
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
3401
3409
|
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
3402
3410
|
/**
|
|
@@ -3404,14 +3412,11 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
3404
3412
|
*/ /**
|
|
3405
3413
|
* We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
|
|
3406
3414
|
*/ /**
|
|
3407
|
-
*
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
* This standardises waiting for all kinds of routers
|
|
3411
|
-
*/
|
|
3415
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
3416
|
+
* This standardises waiting for all kinds of routers
|
|
3417
|
+
*/
|
|
3412
3418
|
constructor(on_navigation, listing_query_state_key) {
|
|
3413
3419
|
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
3414
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_dont_attempt_navigation);
|
|
3415
3420
|
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
3416
3421
|
$b8hua$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
3417
3422
|
$b8hua$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
@@ -3443,7 +3448,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
3443
3448
|
} = _ref;
|
|
3444
3449
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
3445
3450
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
3446
|
-
if ($
|
|
3451
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
3447
3452
|
const different_origin = new_url_.origin !== location.origin;
|
|
3448
3453
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
3449
3454
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -3491,9 +3496,6 @@ function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
|
3491
3496
|
});
|
|
3492
3497
|
}
|
|
3493
3498
|
}
|
|
3494
|
-
function $ac571292d606f30b$var$_dont_attempt_navigation2(ev) {
|
|
3495
|
-
return (ev === null || ev === void 0 ? void 0 : ev.button) || (ev === null || ev === void 0 ? void 0 : ev.metaKey) || (ev === null || ev === void 0 ? void 0 : ev.ctrlKey);
|
|
3496
|
-
}
|
|
3497
3499
|
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
3498
3500
|
return new Promise(resolve => {
|
|
3499
3501
|
const handler = what_happened => {
|
|
@@ -7832,7 +7834,7 @@ function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
|
7832
7834
|
}) : when_filters_closed_cols;
|
|
7833
7835
|
});
|
|
7834
7836
|
}
|
|
7835
|
-
function $
|
|
7837
|
+
function $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_) {
|
|
7836
7838
|
const size_active = $b8hua$createMemo(() => cols_at_size_().map(_ref => {
|
|
7837
7839
|
let [n_cols, min_width, max_width] = _ref;
|
|
7838
7840
|
const media_query = $b8hua$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
@@ -7862,7 +7864,7 @@ function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
|
|
|
7862
7864
|
} = _ref;
|
|
7863
7865
|
// these are by row
|
|
7864
7866
|
const [content_blocks, set_content_blocks] = $b8hua$createStore([]);
|
|
7865
|
-
const n_cols_currently_showing_ = $
|
|
7867
|
+
const n_cols_currently_showing_ = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
7866
7868
|
$b8hua$createEffect(() => {
|
|
7867
7869
|
const incoming_value = incoming_content_blocks();
|
|
7868
7870
|
if (!incoming_value) {
|
|
@@ -8572,9 +8574,13 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
8572
8574
|
});
|
|
8573
8575
|
const meta_of_currently_selected_sorting_ = $b8hua$createMemo(() => {
|
|
8574
8576
|
var _available_sortings_, _available_sortings_$, _available_sortings_$2;
|
|
8575
|
-
return (_available_sortings_ = available_sortings_()) === null || _available_sortings_ === void 0 ? void 0 : (_available_sortings_$ = _available_sortings_.find) === null || _available_sortings_$ === void 0 ? void 0 : (_available_sortings_$2 = _available_sortings_$.call(_available_sortings_,
|
|
8576
|
-
|
|
8577
|
-
|
|
8577
|
+
return (_available_sortings_ = available_sortings_()) === null || _available_sortings_ === void 0 ? void 0 : (_available_sortings_$ = _available_sortings_.find) === null || _available_sortings_$ === void 0 ? void 0 : (_available_sortings_$2 = _available_sortings_$.call(_available_sortings_, _ref2 => {
|
|
8578
|
+
let {
|
|
8579
|
+
field: field,
|
|
8580
|
+
order: order
|
|
8581
|
+
} = _ref2;
|
|
8582
|
+
const current = get_current_sorting_();
|
|
8583
|
+
return (current === null || current === void 0 ? void 0 : current.field) === field && (current === null || current === void 0 ? void 0 : current.order) === order;
|
|
8578
8584
|
})) === null || _available_sortings_$2 === void 0 ? void 0 : _available_sortings_$2.meta;
|
|
8579
8585
|
});
|
|
8580
8586
|
const filter_options = {
|
|
@@ -8678,10 +8684,10 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
8678
8684
|
}));
|
|
8679
8685
|
const {
|
|
8680
8686
|
remove: remove
|
|
8681
|
-
} = $b8hua$javascript_media_query("(max-width:651px)",
|
|
8687
|
+
} = $b8hua$javascript_media_query("(max-width:651px)", _ref3 => {
|
|
8682
8688
|
let {
|
|
8683
8689
|
matches: matches
|
|
8684
|
-
} =
|
|
8690
|
+
} = _ref3;
|
|
8685
8691
|
return set_is_small(matches);
|
|
8686
8692
|
});
|
|
8687
8693
|
cleanup_promise.then(remove);
|
|
@@ -8712,7 +8718,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
8712
8718
|
}
|
|
8713
8719
|
});
|
|
8714
8720
|
}
|
|
8715
|
-
function $7396052a1484264f$var$OpenFiltersButton(
|
|
8721
|
+
function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
8716
8722
|
let {
|
|
8717
8723
|
i18n_: i18n_,
|
|
8718
8724
|
search_filters_open_: search_filters_open_,
|
|
@@ -8721,7 +8727,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
8721
8727
|
tabindex_: tabindex_,
|
|
8722
8728
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
8723
8729
|
hide_button_: hide_button_
|
|
8724
|
-
} =
|
|
8730
|
+
} = _ref4;
|
|
8725
8731
|
const filters_closed = $b8hua$createMemo(() => !search_filters_open_[0]());
|
|
8726
8732
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
8727
8733
|
return $b8hua$ssr($7396052a1484264f$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle(hide_button_() ? {
|
|
@@ -8747,7 +8753,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
8747
8753
|
}
|
|
8748
8754
|
})), $b8hua$escape(i18n_.filter_text_()));
|
|
8749
8755
|
}
|
|
8750
|
-
function $7396052a1484264f$var$OpenSortingButton(
|
|
8756
|
+
function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
8751
8757
|
var _meta_of_currently_se;
|
|
8752
8758
|
let {
|
|
8753
8759
|
i18n_: i18n_,
|
|
@@ -8758,7 +8764,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
8758
8764
|
sort_button_width_: sort_button_width_,
|
|
8759
8765
|
tabindex_: tabindex_,
|
|
8760
8766
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
8761
|
-
} =
|
|
8767
|
+
} = _ref5;
|
|
8762
8768
|
const sorting_closed = $b8hua$createMemo(() => !search_sorting_open_[0]());
|
|
8763
8769
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
8764
8770
|
return $b8hua$ssr($7396052a1484264f$var$_tmpl$6, $b8hua$ssrHydrationKey(), "".concat(!sorting_closed() ? "major" : "", " ").concat(sorting_closed() ? "minor" : "", " toggle-button for-sorting major-minor-transition"), $b8hua$ssrAttribute("tabindex", $b8hua$escape(tabindex_, true), false) + $b8hua$ssrAttribute("aria-label", $b8hua$escape((sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(), true), false), $b8hua$ssrStyle(sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
@@ -8775,8 +8781,8 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
8775
8781
|
return $b8hua$createComponent((0, $bce10e104a1dd893$export$cb808a3c41736d8e), {});
|
|
8776
8782
|
},
|
|
8777
8783
|
get children() {
|
|
8778
|
-
var
|
|
8779
|
-
return ((
|
|
8784
|
+
var _get_current_sorting_;
|
|
8785
|
+
return ((_get_current_sorting_ = get_current_sorting_()) === null || _get_current_sorting_ === void 0 ? void 0 : _get_current_sorting_.order) === "asc" ? $b8hua$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $b8hua$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
8780
8786
|
}
|
|
8781
8787
|
})));
|
|
8782
8788
|
}
|
|
@@ -12715,4 +12721,4 @@ function $a3026fb727bc7550$var$align_field_modal(alignmentSignals, input, modalV
|
|
|
12715
12721
|
});
|
|
12716
12722
|
}
|
|
12717
12723
|
$b8hua$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
12718
|
-
export { $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField };
|
|
12724
|
+
export { $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField };
|
package/server/latest/index.cjs
CHANGED
|
@@ -12,6 +12,9 @@ function $parcel$export(e, n, v, s) {
|
|
|
12
12
|
configurable: true
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
+
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $d84fe647b84b5dc5$export$5162a71f252e6122);
|
|
16
|
+
$parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $d84fe647b84b5dc5$export$3064e1e8c6513da3);
|
|
17
|
+
$parcel$export(module.exports, "allowNativeNavigation", () => $747421cd28dec5b5$export$29d28dadc2d6b631);
|
|
15
18
|
$parcel$export(module.exports, "modalVersionSymbol", () => $ad1fa088e5509cca$export$1ea76ea778b880dd);
|
|
16
19
|
$parcel$export(module.exports, "createDeparallelizedNoDropResource", () => $53df95e470b2f8d2$export$e417c49320921907);
|
|
17
20
|
$parcel$export(module.exports, "throw_globally", () => $deaaf04362a1bc71$export$f50b88e2a00918b5);
|
|
@@ -89,7 +92,61 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
89
92
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
90
93
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
91
94
|
/*! Depict.ai search and product listing SDK */
|
|
92
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.
|
|
95
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.26";
|
|
96
|
+
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
97
|
+
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
98
|
+
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
99
|
+
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
100
|
+
$d84fe647b84b5dc5$var$has_ran = true;
|
|
101
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
102
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
103
|
+
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
107
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
108
|
+
apply(target, this_arg, arg_list) {
|
|
109
|
+
try {
|
|
110
|
+
const old_state = history.state;
|
|
111
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
112
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
113
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
114
|
+
const cloned_object = {
|
|
115
|
+
...intended_new_value_as_obj
|
|
116
|
+
};
|
|
117
|
+
for (const key in old_state) {
|
|
118
|
+
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
119
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
120
|
+
}
|
|
121
|
+
arg_list[0] = cloned_object;
|
|
122
|
+
}
|
|
123
|
+
} catch (e) {
|
|
124
|
+
$5vyXB$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
125
|
+
}
|
|
126
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
131
|
+
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
132
|
+
if (key.startsWith(prefix)) return true;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
138
|
+
* @param clickEvent The click event that triggered the navigation
|
|
139
|
+
*/
|
|
140
|
+
function $747421cd28dec5b5$export$29d28dadc2d6b631(clickEvent) {
|
|
141
|
+
return clickEvent?.button ||
|
|
142
|
+
// if not zero it's a wheel click which opens in new tab
|
|
143
|
+
clickEvent?.metaKey ||
|
|
144
|
+
// if true, cmd button on macOS which opens in new tab
|
|
145
|
+
clickEvent?.ctrlKey ||
|
|
146
|
+
// if true, ctrl button on windows or linux which opens in new tab
|
|
147
|
+
clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
148
|
+
;
|
|
149
|
+
}
|
|
93
150
|
|
|
94
151
|
/**
|
|
95
152
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -956,8 +1013,8 @@ function $1dbed937c406bdf0$export$e872e2339fb04a7f({
|
|
|
956
1013
|
}
|
|
957
1014
|
var $b8700779b3e745de$var$_tmpl$ = ["<a", ' target="_blank"></a>'];
|
|
958
1015
|
function $b8700779b3e745de$export$1efe1013da60d0e4(e, href) {
|
|
959
|
-
if (e.metaKey || e.ctrlKey) {
|
|
960
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1016
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1017
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
961
1018
|
const link = $5vyXB$solidjsweb.ssr($b8700779b3e745de$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey() + $5vyXB$solidjsweb.ssrAttribute("href", $5vyXB$solidjsweb.escape(href, true), false));
|
|
962
1019
|
document.body.append(link);
|
|
963
1020
|
link.click();
|
|
@@ -3272,45 +3329,6 @@ function $6e22b5314fb52f4c$var$history_state_change(signals, entries, state) {
|
|
|
3272
3329
|
}
|
|
3273
3330
|
});
|
|
3274
3331
|
}
|
|
3275
|
-
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
3276
|
-
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
3277
|
-
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
3278
|
-
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
3279
|
-
$d84fe647b84b5dc5$var$has_ran = true;
|
|
3280
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
3281
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
3282
|
-
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
3286
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
3287
|
-
apply(target, this_arg, arg_list) {
|
|
3288
|
-
try {
|
|
3289
|
-
const old_state = history.state;
|
|
3290
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
3291
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3292
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
3293
|
-
const cloned_object = {
|
|
3294
|
-
...intended_new_value_as_obj
|
|
3295
|
-
};
|
|
3296
|
-
for (const key in old_state) {
|
|
3297
|
-
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
3298
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3299
|
-
}
|
|
3300
|
-
arg_list[0] = cloned_object;
|
|
3301
|
-
}
|
|
3302
|
-
} catch (e) {
|
|
3303
|
-
$5vyXB$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
3304
|
-
}
|
|
3305
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
3306
|
-
}
|
|
3307
|
-
});
|
|
3308
|
-
}
|
|
3309
|
-
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
3310
|
-
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
3311
|
-
if (key.startsWith(prefix)) return true;
|
|
3312
|
-
}
|
|
3313
|
-
}
|
|
3314
3332
|
class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
3315
3333
|
/**
|
|
3316
3334
|
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
@@ -3332,12 +3350,6 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
3332
3350
|
}
|
|
3333
3351
|
}
|
|
3334
3352
|
/**
|
|
3335
|
-
* Checks if this tab shouldn't navigate because user wants to open in new tab
|
|
3336
|
-
*/
|
|
3337
|
-
#dont_attempt_navigation(ev) {
|
|
3338
|
-
return ev?.button || ev?.metaKey || ev?.ctrlKey;
|
|
3339
|
-
}
|
|
3340
|
-
/**
|
|
3341
3353
|
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
3342
3354
|
* This standardises waiting for all kinds of routers
|
|
3343
3355
|
*/
|
|
@@ -3378,7 +3390,7 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
3378
3390
|
}) => {
|
|
3379
3391
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
3380
3392
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
3381
|
-
if (
|
|
3393
|
+
if ($747421cd28dec5b5$export$29d28dadc2d6b631(event_)) return;
|
|
3382
3394
|
const different_origin = new_url_.origin !== location.origin;
|
|
3383
3395
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
3384
3396
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -7422,7 +7434,7 @@ function $738c3a81fc46a340$export$cb5808ba002cdeed({
|
|
|
7422
7434
|
}) : when_filters_closed_cols;
|
|
7423
7435
|
});
|
|
7424
7436
|
}
|
|
7425
|
-
function $
|
|
7437
|
+
function $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_) {
|
|
7426
7438
|
const size_active = $5vyXB$solidjs.createMemo(() => cols_at_size_().map(([n_cols, min_width, max_width]) => {
|
|
7427
7439
|
const media_query = $5vyXB$depictaiutilishared.layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
7428
7440
|
const matches = $b54e6192d0caa293$export$d9f36cf74e24d595(media_query);
|
|
@@ -7447,7 +7459,7 @@ function $d92f338ba8f9da9b$export$791ef57e62e21c3f({
|
|
|
7447
7459
|
}) {
|
|
7448
7460
|
// these are by row
|
|
7449
7461
|
const [content_blocks, set_content_blocks] = $5vyXB$solidjsstore.createStore([]);
|
|
7450
|
-
const n_cols_currently_showing_ = $
|
|
7462
|
+
const n_cols_currently_showing_ = $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_);
|
|
7451
7463
|
$5vyXB$solidjs.createEffect(() => {
|
|
7452
7464
|
const incoming_value = incoming_content_blocks();
|
|
7453
7465
|
if (!incoming_value) {
|
|
@@ -8120,7 +8132,13 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
8120
8132
|
set_filters_open(false);
|
|
8121
8133
|
set_sorting_open(false);
|
|
8122
8134
|
});
|
|
8123
|
-
const meta_of_currently_selected_sorting_ = $5vyXB$solidjs.createMemo(() => available_sortings_()?.find?.(
|
|
8135
|
+
const meta_of_currently_selected_sorting_ = $5vyXB$solidjs.createMemo(() => available_sortings_()?.find?.(({
|
|
8136
|
+
field: field,
|
|
8137
|
+
order: order
|
|
8138
|
+
}) => {
|
|
8139
|
+
const current = get_current_sorting_();
|
|
8140
|
+
return current?.field === field && current?.order === order;
|
|
8141
|
+
})?.meta);
|
|
8124
8142
|
const filter_options = {
|
|
8125
8143
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
8126
8144
|
local_filter_cache_: local_filter_cache_,
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,17 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.26";
|
|
14
|
+
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
|
17
|
+
*/
|
|
18
|
+
export function preserve_items_in_history_dot_state(): void;
|
|
19
|
+
/**
|
|
20
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
21
|
+
* @param clickEvent The click event that triggered the navigation
|
|
22
|
+
*/
|
|
23
|
+
export function allowNativeNavigation(clickEvent?: MouseEvent): number | boolean | undefined;
|
|
14
24
|
/**
|
|
15
25
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
16
26
|
*/
|