@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/ES10/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info, deparallelize_no_drop as $8tj43$deparallelize_no_drop, catchify as $8tj43$catchify, make_random_classname as $8tj43$make_random_classname, ContainedImage as $8tj43$ContainedImage, standard_price_format as $8tj43$standard_price_format, javascript_media_query as $8tj43$javascript_media_query, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, observer as $8tj43$observer,
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, report as $8tj43$report, deparallelize_no_drop as $8tj43$deparallelize_no_drop, catchify as $8tj43$catchify, make_random_classname as $8tj43$make_random_classname, ContainedImage as $8tj43$ContainedImage, standard_price_format as $8tj43$standard_price_format, javascript_media_query as $8tj43$javascript_media_query, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, observer as $8tj43$observer, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, findMostFrequentItem as $8tj43$findMostFrequentItem, dwarn as $8tj43$dwarn, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, use_href_accessor as $8tj43$use_href_accessor, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, base_url as $8tj43$base_url, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, slider_fractional_factory as $8tj43$slider_fractional_factory, useExpandingContainer as $8tj43$useExpandingContainer, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, fetch_retry as $8tj43$fetch_retry, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, is_debug as $8tj43$is_debug, ListenableSet as $8tj43$ListenableSet1, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { createSignal as $8tj43$createSignal, createResource as $8tj43$createResource, createEffect as $8tj43$createEffect, untrack as $8tj43$untrack, createMemo as $8tj43$createMemo, onCleanup as $8tj43$onCleanup, Show as $8tj43$Show, createComputed as $8tj43$createComputed, For as $8tj43$For, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, createContext as $8tj43$createContext, useContext as $8tj43$useContext, on as $8tj43$on, Index as $8tj43$Index, batch as $8tj43$batch, ErrorBoundary as $8tj43$ErrorBoundary, splitProps as $8tj43$splitProps, mergeProps as $8tj43$mergeProps1, createUniqueId as $8tj43$createUniqueId, createRenderEffect as $8tj43$createRenderEffect, createSelector as $8tj43$createSelector, children as $8tj43$children, createRoot as $8tj43$createRoot, Suspense as $8tj43$Suspense, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
|
|
3
3
|
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, addEventListener as $8tj43$addEventListener, insert as $8tj43$insert, memo as $8tj43$memo, runHydrationEvents as $8tj43$runHydrationEvents, createComponent as $8tj43$createComponent, getNextMarker as $8tj43$getNextMarker, use as $8tj43$use, effect as $8tj43$effect, classList as $8tj43$classList, setAttribute as $8tj43$setAttribute, delegateEvents as $8tj43$delegateEvents, style as $8tj43$style, className as $8tj43$className, spread as $8tj43$spread, mergeProps as $8tj43$mergeProps, setProperty as $8tj43$setProperty, isServer as $8tj43$isServer, Dynamic as $8tj43$Dynamic } from "solid-js/web";
|
|
4
4
|
import { ListenableSet as $8tj43$ListenableSet, catchify as $8tj43$catchify1, use_href_accessor as $8tj43$use_href_accessor1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
|
|
@@ -10,7 +10,56 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$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
|
+
$8tj43$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
|
|
@@ -813,7 +862,7 @@ function $01dd2bfbbae020bc$export$a146ac6fa8346a25(_ref) {
|
|
|
813
862
|
$8tj43$use(element => element.addEventListener(
|
|
814
863
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
815
864
|
"click", $8tj43$catchify(ev => {
|
|
816
|
-
if (ev
|
|
865
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
817
866
|
// not button 0 or cmd/ctrl click
|
|
818
867
|
return;
|
|
819
868
|
ev.preventDefault();
|
|
@@ -1019,7 +1068,7 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
1019
1068
|
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify(ev => {
|
|
1020
1069
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
1021
1070
|
if (is_query()) {
|
|
1022
|
-
if (ev
|
|
1071
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
1023
1072
|
// not button 0 or cmd/ctrl click
|
|
1024
1073
|
return;
|
|
1025
1074
|
const input = input_obj();
|
|
@@ -1235,8 +1284,8 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
1235
1284
|
}
|
|
1236
1285
|
var $76b6e14a50da4597$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<a target=_blank>`);
|
|
1237
1286
|
function $76b6e14a50da4597$export$1efe1013da60d0e4(e, href) {
|
|
1238
|
-
if (e.metaKey || e.ctrlKey) {
|
|
1239
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1287
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1288
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
1240
1289
|
const link = (() => {
|
|
1241
1290
|
var _el$ = $8tj43$getNextElement($76b6e14a50da4597$var$_tmpl$);
|
|
1242
1291
|
$8tj43$setAttribute(_el$, "href", href);
|
|
@@ -3301,7 +3350,7 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
3301
3350
|
});
|
|
3302
3351
|
return;
|
|
3303
3352
|
}
|
|
3304
|
-
if (ev
|
|
3353
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev)) return; // not button 0 or cmd/ctrl click
|
|
3305
3354
|
ev.preventDefault();
|
|
3306
3355
|
submit_query_(itemContents.title_);
|
|
3307
3356
|
}));
|
|
@@ -4236,46 +4285,6 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
4236
4285
|
}
|
|
4237
4286
|
});
|
|
4238
4287
|
}
|
|
4239
|
-
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
4240
|
-
let $68e6625c8d51f847$var$has_ran = false;
|
|
4241
|
-
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
4242
|
-
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
4243
|
-
$68e6625c8d51f847$var$has_ran = true;
|
|
4244
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
4245
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
4246
|
-
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
4247
|
-
}
|
|
4248
|
-
}
|
|
4249
|
-
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
4250
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
4251
|
-
apply(target, this_arg, arg_list) {
|
|
4252
|
-
try {
|
|
4253
|
-
const old_state = history.state;
|
|
4254
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
4255
|
-
var _arg_list$;
|
|
4256
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
4257
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
4258
|
-
const cloned_object = {
|
|
4259
|
-
...intended_new_value_as_obj
|
|
4260
|
-
};
|
|
4261
|
-
for (const key in old_state) {
|
|
4262
|
-
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
4263
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
4264
|
-
}
|
|
4265
|
-
arg_list[0] = cloned_object;
|
|
4266
|
-
}
|
|
4267
|
-
} catch (e) {
|
|
4268
|
-
$8tj43$report([e, "Failed to preserve items in history.state"], "error");
|
|
4269
|
-
}
|
|
4270
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
4271
|
-
}
|
|
4272
|
-
});
|
|
4273
|
-
}
|
|
4274
|
-
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
4275
|
-
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
4276
|
-
if (key.startsWith(prefix)) return true;
|
|
4277
|
-
}
|
|
4278
|
-
}
|
|
4279
4288
|
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
4280
4289
|
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
4281
4290
|
privateSet.add(obj);
|
|
@@ -4288,7 +4297,6 @@ function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn)
|
|
|
4288
4297
|
return fn;
|
|
4289
4298
|
}
|
|
4290
4299
|
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
4291
|
-
var $ac571292d606f30b$var$_dont_attempt_navigation = /*#__PURE__*/new WeakSet();
|
|
4292
4300
|
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
4293
4301
|
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
4294
4302
|
/**
|
|
@@ -4296,14 +4304,11 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
4296
4304
|
*/ /**
|
|
4297
4305
|
* 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
|
|
4298
4306
|
*/ /**
|
|
4299
|
-
*
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
* This standardises waiting for all kinds of routers
|
|
4303
|
-
*/
|
|
4307
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
4308
|
+
* This standardises waiting for all kinds of routers
|
|
4309
|
+
*/
|
|
4304
4310
|
constructor(on_navigation, listing_query_state_key) {
|
|
4305
4311
|
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
4306
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_dont_attempt_navigation);
|
|
4307
4312
|
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
4308
4313
|
$8tj43$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
4309
4314
|
$8tj43$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
@@ -4335,7 +4340,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
4335
4340
|
} = _ref;
|
|
4336
4341
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
4337
4342
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
4338
|
-
if ($
|
|
4343
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
4339
4344
|
const different_origin = new_url_.origin !== location.origin;
|
|
4340
4345
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
4341
4346
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -4383,9 +4388,6 @@ function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
|
4383
4388
|
});
|
|
4384
4389
|
}
|
|
4385
4390
|
}
|
|
4386
|
-
function $ac571292d606f30b$var$_dont_attempt_navigation2(ev) {
|
|
4387
|
-
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);
|
|
4388
|
-
}
|
|
4389
4391
|
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
4390
4392
|
return new Promise(resolve => {
|
|
4391
4393
|
const handler = what_happened => {
|
|
@@ -9714,7 +9716,7 @@ function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
|
9714
9716
|
}) : when_filters_closed_cols;
|
|
9715
9717
|
});
|
|
9716
9718
|
}
|
|
9717
|
-
function $
|
|
9719
|
+
function $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_) {
|
|
9718
9720
|
const size_active = $8tj43$createMemo(() => cols_at_size_().map(_ref => {
|
|
9719
9721
|
let [n_cols, min_width, max_width] = _ref;
|
|
9720
9722
|
const media_query = $8tj43$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
@@ -9744,7 +9746,7 @@ function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
|
|
|
9744
9746
|
} = _ref;
|
|
9745
9747
|
// these are by row
|
|
9746
9748
|
const [content_blocks, set_content_blocks] = $8tj43$createStore([]);
|
|
9747
|
-
const n_cols_currently_showing_ = $
|
|
9749
|
+
const n_cols_currently_showing_ = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
9748
9750
|
$8tj43$createEffect(() => {
|
|
9749
9751
|
const incoming_value = incoming_content_blocks();
|
|
9750
9752
|
if (!incoming_value) {
|
|
@@ -10745,9 +10747,13 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
10745
10747
|
});
|
|
10746
10748
|
const meta_of_currently_selected_sorting_ = $8tj43$createMemo(() => {
|
|
10747
10749
|
var _available_sortings_, _available_sortings_$, _available_sortings_$2;
|
|
10748
|
-
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_,
|
|
10749
|
-
|
|
10750
|
-
|
|
10750
|
+
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 => {
|
|
10751
|
+
let {
|
|
10752
|
+
field: field,
|
|
10753
|
+
order: order
|
|
10754
|
+
} = _ref2;
|
|
10755
|
+
const current = get_current_sorting_();
|
|
10756
|
+
return (current === null || current === void 0 ? void 0 : current.field) === field && (current === null || current === void 0 ? void 0 : current.order) === order;
|
|
10751
10757
|
})) === null || _available_sortings_$2 === void 0 ? void 0 : _available_sortings_$2.meta;
|
|
10752
10758
|
});
|
|
10753
10759
|
const filter_options = {
|
|
@@ -10859,10 +10865,10 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
10859
10865
|
}));
|
|
10860
10866
|
const {
|
|
10861
10867
|
remove: remove
|
|
10862
|
-
} = $8tj43$javascript_media_query("(max-width:651px)",
|
|
10868
|
+
} = $8tj43$javascript_media_query("(max-width:651px)", _ref3 => {
|
|
10863
10869
|
let {
|
|
10864
10870
|
matches: matches
|
|
10865
|
-
} =
|
|
10871
|
+
} = _ref3;
|
|
10866
10872
|
return set_is_small(matches);
|
|
10867
10873
|
});
|
|
10868
10874
|
cleanup_promise.then(remove);
|
|
@@ -10907,7 +10913,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
10907
10913
|
}
|
|
10908
10914
|
});
|
|
10909
10915
|
}
|
|
10910
|
-
function $7396052a1484264f$var$OpenFiltersButton(
|
|
10916
|
+
function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
10911
10917
|
let {
|
|
10912
10918
|
i18n_: i18n_,
|
|
10913
10919
|
search_filters_open_: search_filters_open_,
|
|
@@ -10916,7 +10922,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
10916
10922
|
tabindex_: tabindex_,
|
|
10917
10923
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
10918
10924
|
hide_button_: hide_button_
|
|
10919
|
-
} =
|
|
10925
|
+
} = _ref4;
|
|
10920
10926
|
const filters_closed = $8tj43$createMemo(() => !search_filters_open_[0]());
|
|
10921
10927
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
10922
10928
|
return (() => {
|
|
@@ -10987,7 +10993,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
10987
10993
|
return _el$14;
|
|
10988
10994
|
})();
|
|
10989
10995
|
}
|
|
10990
|
-
function $7396052a1484264f$var$OpenSortingButton(
|
|
10996
|
+
function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
10991
10997
|
let {
|
|
10992
10998
|
i18n_: i18n_,
|
|
10993
10999
|
get_current_sorting_: get_current_sorting_,
|
|
@@ -10997,7 +11003,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
10997
11003
|
sort_button_width_: sort_button_width_,
|
|
10998
11004
|
tabindex_: tabindex_,
|
|
10999
11005
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
11000
|
-
} =
|
|
11006
|
+
} = _ref5;
|
|
11001
11007
|
const sorting_closed = $8tj43$createMemo(() => !search_sorting_open_[0]());
|
|
11002
11008
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
11003
11009
|
return (() => {
|
|
@@ -11035,8 +11041,8 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
11035
11041
|
},
|
|
11036
11042
|
get children() {
|
|
11037
11043
|
return $8tj43$memo(() => {
|
|
11038
|
-
var
|
|
11039
|
-
return ((
|
|
11044
|
+
var _get_current_sorting_;
|
|
11045
|
+
return ((_get_current_sorting_ = get_current_sorting_()) === null || _get_current_sorting_ === void 0 ? void 0 : _get_current_sorting_.order) === "asc";
|
|
11040
11046
|
})() ? $8tj43$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $8tj43$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
11041
11047
|
}
|
|
11042
11048
|
}), _el$25, _co$6);
|
|
@@ -11389,9 +11395,9 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
11389
11395
|
var _el$3 = $8tj43$getNextElement($43fbb365ed0ac99e$var$_tmpl$3);
|
|
11390
11396
|
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(ev => {
|
|
11391
11397
|
const url = href();
|
|
11392
|
-
if (is_selected() &&
|
|
11398
|
+
if (is_selected() && !$9b35d1384e31813a$export$29d28dadc2d6b631(ev) || !url)
|
|
11393
11399
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
11394
|
-
ev.preventDefault();else if (
|
|
11400
|
+
ev.preventDefault();else if (url) router_.navigate_.go_to_({
|
|
11395
11401
|
new_url_: url,
|
|
11396
11402
|
is_replace_: false,
|
|
11397
11403
|
event_: ev,
|
|
@@ -15187,4 +15193,4 @@ function $a3026fb727bc7550$var$align_field_modal(alignmentSignals, input, modalV
|
|
|
15187
15193
|
});
|
|
15188
15194
|
}
|
|
15189
15195
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
15190
|
-
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 };
|
|
15196
|
+
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/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
|
+
$gVhhF$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
|
|
@@ -855,7 +912,7 @@ function $ce4b5b99c8b2b34e$export$a146ac6fa8346a25({
|
|
|
855
912
|
$gVhhF$solidjsweb.use(element => element.addEventListener(
|
|
856
913
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
857
914
|
"click", $gVhhF$depictaiutilishared.catchify(ev => {
|
|
858
|
-
if (ev
|
|
915
|
+
if ($747421cd28dec5b5$export$29d28dadc2d6b631(ev))
|
|
859
916
|
// not button 0 or cmd/ctrl click
|
|
860
917
|
return;
|
|
861
918
|
ev.preventDefault();
|
|
@@ -1049,7 +1106,7 @@ function $1dbed937c406bdf0$export$e872e2339fb04a7f({
|
|
|
1049
1106
|
$gVhhF$solidjsweb.use(element => element.addEventListener("click", $gVhhF$depictaiutilishared.catchify(ev => {
|
|
1050
1107
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
1051
1108
|
if (is_query()) {
|
|
1052
|
-
if (ev
|
|
1109
|
+
if ($747421cd28dec5b5$export$29d28dadc2d6b631(ev))
|
|
1053
1110
|
// not button 0 or cmd/ctrl click
|
|
1054
1111
|
return;
|
|
1055
1112
|
const input = input_obj();
|
|
@@ -1262,8 +1319,8 @@ function $1dbed937c406bdf0$export$e872e2339fb04a7f({
|
|
|
1262
1319
|
}
|
|
1263
1320
|
var $b8700779b3e745de$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<a target=_blank>`);
|
|
1264
1321
|
function $b8700779b3e745de$export$1efe1013da60d0e4(e, href) {
|
|
1265
|
-
if (e.metaKey || e.ctrlKey) {
|
|
1266
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1322
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1323
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
1267
1324
|
const link = (() => {
|
|
1268
1325
|
var _el$ = $gVhhF$solidjsweb.getNextElement($b8700779b3e745de$var$_tmpl$);
|
|
1269
1326
|
$gVhhF$solidjsweb.setAttribute(_el$, "href", href);
|
|
@@ -3233,7 +3290,7 @@ function $a13dbcf80d79229c$export$d4994a86c6235f72({
|
|
|
3233
3290
|
});
|
|
3234
3291
|
return;
|
|
3235
3292
|
}
|
|
3236
|
-
if (ev
|
|
3293
|
+
if ($747421cd28dec5b5$export$29d28dadc2d6b631(ev)) return; // not button 0 or cmd/ctrl click
|
|
3237
3294
|
ev.preventDefault();
|
|
3238
3295
|
submit_query_(itemContents.title_);
|
|
3239
3296
|
}));
|
|
@@ -4141,45 +4198,6 @@ function $6e22b5314fb52f4c$var$history_state_change(signals, entries, state) {
|
|
|
4141
4198
|
}
|
|
4142
4199
|
});
|
|
4143
4200
|
}
|
|
4144
|
-
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
4145
|
-
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
4146
|
-
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
4147
|
-
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
4148
|
-
$d84fe647b84b5dc5$var$has_ran = true;
|
|
4149
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
4150
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
4151
|
-
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
|
-
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
4155
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
4156
|
-
apply(target, this_arg, arg_list) {
|
|
4157
|
-
try {
|
|
4158
|
-
const old_state = history.state;
|
|
4159
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
4160
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
4161
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
4162
|
-
const cloned_object = {
|
|
4163
|
-
...intended_new_value_as_obj
|
|
4164
|
-
};
|
|
4165
|
-
for (const key in old_state) {
|
|
4166
|
-
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
4167
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
4168
|
-
}
|
|
4169
|
-
arg_list[0] = cloned_object;
|
|
4170
|
-
}
|
|
4171
|
-
} catch (e) {
|
|
4172
|
-
$gVhhF$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
4173
|
-
}
|
|
4174
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
4175
|
-
}
|
|
4176
|
-
});
|
|
4177
|
-
}
|
|
4178
|
-
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
4179
|
-
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
4180
|
-
if (key.startsWith(prefix)) return true;
|
|
4181
|
-
}
|
|
4182
|
-
}
|
|
4183
4201
|
class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
4184
4202
|
/**
|
|
4185
4203
|
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
@@ -4201,12 +4219,6 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
4201
4219
|
}
|
|
4202
4220
|
}
|
|
4203
4221
|
/**
|
|
4204
|
-
* Checks if this tab shouldn't navigate because user wants to open in new tab
|
|
4205
|
-
*/
|
|
4206
|
-
#dont_attempt_navigation(ev) {
|
|
4207
|
-
return ev?.button || ev?.metaKey || ev?.ctrlKey;
|
|
4208
|
-
}
|
|
4209
|
-
/**
|
|
4210
4222
|
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
4211
4223
|
* This standardises waiting for all kinds of routers
|
|
4212
4224
|
*/
|
|
@@ -4247,7 +4259,7 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
4247
4259
|
}) => {
|
|
4248
4260
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
4249
4261
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
4250
|
-
if (
|
|
4262
|
+
if ($747421cd28dec5b5$export$29d28dadc2d6b631(event_)) return;
|
|
4251
4263
|
const different_origin = new_url_.origin !== location.origin;
|
|
4252
4264
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
4253
4265
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -9249,7 +9261,7 @@ function $738c3a81fc46a340$export$cb5808ba002cdeed({
|
|
|
9249
9261
|
}) : when_filters_closed_cols;
|
|
9250
9262
|
});
|
|
9251
9263
|
}
|
|
9252
|
-
function $
|
|
9264
|
+
function $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_) {
|
|
9253
9265
|
const size_active = $gVhhF$solidjs.createMemo(() => cols_at_size_().map(([n_cols, min_width, max_width]) => {
|
|
9254
9266
|
const media_query = $gVhhF$depictaiutilishared.layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
9255
9267
|
const matches = $b54e6192d0caa293$export$d9f36cf74e24d595(media_query);
|
|
@@ -9274,7 +9286,7 @@ function $d92f338ba8f9da9b$export$791ef57e62e21c3f({
|
|
|
9274
9286
|
}) {
|
|
9275
9287
|
// these are by row
|
|
9276
9288
|
const [content_blocks, set_content_blocks] = $gVhhF$solidjsstore.createStore([]);
|
|
9277
|
-
const n_cols_currently_showing_ = $
|
|
9289
|
+
const n_cols_currently_showing_ = $17d06b3bcb035500$export$a79e666719b3647c(cols_at_size_);
|
|
9278
9290
|
$gVhhF$solidjs.createEffect(() => {
|
|
9279
9291
|
const incoming_value = incoming_content_blocks();
|
|
9280
9292
|
if (!incoming_value) {
|
|
@@ -10233,7 +10245,13 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
10233
10245
|
set_filters_open(false);
|
|
10234
10246
|
set_sorting_open(false);
|
|
10235
10247
|
});
|
|
10236
|
-
const meta_of_currently_selected_sorting_ = $gVhhF$solidjs.createMemo(() => available_sortings_()?.find?.(
|
|
10248
|
+
const meta_of_currently_selected_sorting_ = $gVhhF$solidjs.createMemo(() => available_sortings_()?.find?.(({
|
|
10249
|
+
field: field,
|
|
10250
|
+
order: order
|
|
10251
|
+
}) => {
|
|
10252
|
+
const current = get_current_sorting_();
|
|
10253
|
+
return current?.field === field && current?.order === order;
|
|
10254
|
+
})?.meta);
|
|
10237
10255
|
const filter_options = {
|
|
10238
10256
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10239
10257
|
local_filter_cache_: local_filter_cache_,
|
|
@@ -10830,9 +10848,9 @@ function $8cceb1d3a967f369$export$466cdc317043f6cb({
|
|
|
10830
10848
|
var _el$3 = $gVhhF$solidjsweb.getNextElement($8cceb1d3a967f369$var$_tmpl$3);
|
|
10831
10849
|
$gVhhF$solidjsweb.addEventListener(_el$3, "click", $gVhhF$depictaiutilishared.catchify(ev => {
|
|
10832
10850
|
const url = href();
|
|
10833
|
-
if (is_selected() &&
|
|
10851
|
+
if (is_selected() && !$747421cd28dec5b5$export$29d28dadc2d6b631(ev) || !url)
|
|
10834
10852
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
10835
|
-
ev.preventDefault();else if (
|
|
10853
|
+
ev.preventDefault();else if (url) router_.navigate_.go_to_({
|
|
10836
10854
|
new_url_: url,
|
|
10837
10855
|
is_replace_: false,
|
|
10838
10856
|
event_: ev,
|
package/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
|
*/
|