@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/latest/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, catchify as $9HbP8$catchify, make_random_classname as $9HbP8$make_random_classname, ContainedImage as $9HbP8$ContainedImage, standard_price_format as $9HbP8$standard_price_format, javascript_media_query as $9HbP8$javascript_media_query, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, observer as $9HbP8$observer,
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, report as $9HbP8$report, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, catchify as $9HbP8$catchify, make_random_classname as $9HbP8$make_random_classname, ContainedImage as $9HbP8$ContainedImage, standard_price_format as $9HbP8$standard_price_format, javascript_media_query as $9HbP8$javascript_media_query, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, observer as $9HbP8$observer, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, findMostFrequentItem as $9HbP8$findMostFrequentItem, dwarn as $9HbP8$dwarn, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, use_href_accessor as $9HbP8$use_href_accessor, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, base_url as $9HbP8$base_url, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, slider_fractional_factory as $9HbP8$slider_fractional_factory, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, fetch_retry as $9HbP8$fetch_retry, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, is_debug as $9HbP8$is_debug, ListenableSet as $9HbP8$ListenableSet1, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
2
|
import { createSignal as $9HbP8$createSignal, createResource as $9HbP8$createResource, createEffect as $9HbP8$createEffect, untrack as $9HbP8$untrack, createMemo as $9HbP8$createMemo, onCleanup as $9HbP8$onCleanup, Show as $9HbP8$Show, createComputed as $9HbP8$createComputed, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, on as $9HbP8$on, Index as $9HbP8$Index, batch as $9HbP8$batch, ErrorBoundary as $9HbP8$ErrorBoundary, splitProps as $9HbP8$splitProps, mergeProps as $9HbP8$mergeProps1, createUniqueId as $9HbP8$createUniqueId, createRenderEffect as $9HbP8$createRenderEffect, createSelector as $9HbP8$createSelector, children as $9HbP8$children, createRoot as $9HbP8$createRoot, Suspense as $9HbP8$Suspense, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
|
|
3
3
|
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, addEventListener as $9HbP8$addEventListener, insert as $9HbP8$insert, memo as $9HbP8$memo, runHydrationEvents as $9HbP8$runHydrationEvents, createComponent as $9HbP8$createComponent, getNextMarker as $9HbP8$getNextMarker, use as $9HbP8$use, effect as $9HbP8$effect, classList as $9HbP8$classList, setAttribute as $9HbP8$setAttribute, delegateEvents as $9HbP8$delegateEvents, style as $9HbP8$style, className as $9HbP8$className, spread as $9HbP8$spread, mergeProps as $9HbP8$mergeProps, setProperty as $9HbP8$setProperty, isServer as $9HbP8$isServer, Dynamic as $9HbP8$Dynamic } from "solid-js/web";
|
|
4
4
|
import { ListenableSet as $9HbP8$ListenableSet, catchify as $9HbP8$catchify1, use_href_accessor as $9HbP8$use_href_accessor1, report as $9HbP8$report1 } from "@depict-ai/utilishared/latest";
|
|
@@ -7,7 +7,61 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.26";
|
|
11
|
+
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
12
|
+
let $90980bd87c9960f9$var$has_ran = false;
|
|
13
|
+
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
14
|
+
if ($90980bd87c9960f9$var$has_ran || typeof history !== "object") return;
|
|
15
|
+
$90980bd87c9960f9$var$has_ran = true;
|
|
16
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
17
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $90980bd87c9960f9$var$proxy_push_state(function_name, history);
|
|
18
|
+
$90980bd87c9960f9$var$proxy_push_state(function_name, History.prototype);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
22
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
23
|
+
apply(target, this_arg, arg_list) {
|
|
24
|
+
try {
|
|
25
|
+
const old_state = history.state;
|
|
26
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
27
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
28
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
29
|
+
const cloned_object = {
|
|
30
|
+
...intended_new_value_as_obj
|
|
31
|
+
};
|
|
32
|
+
for (const key in old_state) {
|
|
33
|
+
if (!$90980bd87c9960f9$var$starts_with_any_prefix(key)) continue;
|
|
34
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
35
|
+
}
|
|
36
|
+
arg_list[0] = cloned_object;
|
|
37
|
+
}
|
|
38
|
+
} catch (e) {
|
|
39
|
+
$9HbP8$report([e, "Failed to preserve items in history.state"], "error");
|
|
40
|
+
}
|
|
41
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function $90980bd87c9960f9$var$starts_with_any_prefix(key) {
|
|
46
|
+
for (const prefix of $90980bd87c9960f9$export$3064e1e8c6513da3) {
|
|
47
|
+
if (key.startsWith(prefix)) return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 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
|
|
53
|
+
* @param clickEvent The click event that triggered the navigation
|
|
54
|
+
*/
|
|
55
|
+
function $a281666e5c15c2ec$export$29d28dadc2d6b631(clickEvent) {
|
|
56
|
+
return clickEvent?.button ||
|
|
57
|
+
// if not zero it's a wheel click which opens in new tab
|
|
58
|
+
clickEvent?.metaKey ||
|
|
59
|
+
// if true, cmd button on macOS which opens in new tab
|
|
60
|
+
clickEvent?.ctrlKey ||
|
|
61
|
+
// if true, ctrl button on windows or linux which opens in new tab
|
|
62
|
+
clickEvent?.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
63
|
+
;
|
|
64
|
+
}
|
|
11
65
|
|
|
12
66
|
/**
|
|
13
67
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -773,7 +827,7 @@ function $980239e081e89b62$export$a146ac6fa8346a25({
|
|
|
773
827
|
$9HbP8$use(element => element.addEventListener(
|
|
774
828
|
// 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.
|
|
775
829
|
"click", $9HbP8$catchify(ev => {
|
|
776
|
-
if (ev
|
|
830
|
+
if ($a281666e5c15c2ec$export$29d28dadc2d6b631(ev))
|
|
777
831
|
// not button 0 or cmd/ctrl click
|
|
778
832
|
return;
|
|
779
833
|
ev.preventDefault();
|
|
@@ -967,7 +1021,7 @@ function $ab4b0679fa8bd1dc$export$e872e2339fb04a7f({
|
|
|
967
1021
|
$9HbP8$use(element => element.addEventListener("click", $9HbP8$catchify(ev => {
|
|
968
1022
|
// 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.
|
|
969
1023
|
if (is_query()) {
|
|
970
|
-
if (ev
|
|
1024
|
+
if ($a281666e5c15c2ec$export$29d28dadc2d6b631(ev))
|
|
971
1025
|
// not button 0 or cmd/ctrl click
|
|
972
1026
|
return;
|
|
973
1027
|
const input = input_obj();
|
|
@@ -1180,8 +1234,8 @@ function $ab4b0679fa8bd1dc$export$e872e2339fb04a7f({
|
|
|
1180
1234
|
}
|
|
1181
1235
|
var $92a48aea6a9364d8$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<a target=_blank>`);
|
|
1182
1236
|
function $92a48aea6a9364d8$export$1efe1013da60d0e4(e, href) {
|
|
1183
|
-
if (e.metaKey || e.ctrlKey) {
|
|
1184
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1237
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1238
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
1185
1239
|
const link = (() => {
|
|
1186
1240
|
var _el$ = $9HbP8$getNextElement($92a48aea6a9364d8$var$_tmpl$);
|
|
1187
1241
|
$9HbP8$setAttribute(_el$, "href", href);
|
|
@@ -3151,7 +3205,7 @@ function $903297121898e5ff$export$d4994a86c6235f72({
|
|
|
3151
3205
|
});
|
|
3152
3206
|
return;
|
|
3153
3207
|
}
|
|
3154
|
-
if (ev
|
|
3208
|
+
if ($a281666e5c15c2ec$export$29d28dadc2d6b631(ev)) return; // not button 0 or cmd/ctrl click
|
|
3155
3209
|
ev.preventDefault();
|
|
3156
3210
|
submit_query_(itemContents.title_);
|
|
3157
3211
|
}));
|
|
@@ -4059,45 +4113,6 @@ function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
|
|
|
4059
4113
|
}
|
|
4060
4114
|
});
|
|
4061
4115
|
}
|
|
4062
|
-
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
4063
|
-
let $90980bd87c9960f9$var$has_ran = false;
|
|
4064
|
-
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
4065
|
-
if ($90980bd87c9960f9$var$has_ran || typeof history !== "object") return;
|
|
4066
|
-
$90980bd87c9960f9$var$has_ran = true;
|
|
4067
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
4068
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $90980bd87c9960f9$var$proxy_push_state(function_name, history);
|
|
4069
|
-
$90980bd87c9960f9$var$proxy_push_state(function_name, History.prototype);
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
4073
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
4074
|
-
apply(target, this_arg, arg_list) {
|
|
4075
|
-
try {
|
|
4076
|
-
const old_state = history.state;
|
|
4077
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
4078
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
4079
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? arg_list[0] ?? {} : {};
|
|
4080
|
-
const cloned_object = {
|
|
4081
|
-
...intended_new_value_as_obj
|
|
4082
|
-
};
|
|
4083
|
-
for (const key in old_state) {
|
|
4084
|
-
if (!$90980bd87c9960f9$var$starts_with_any_prefix(key)) continue;
|
|
4085
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
4086
|
-
}
|
|
4087
|
-
arg_list[0] = cloned_object;
|
|
4088
|
-
}
|
|
4089
|
-
} catch (e) {
|
|
4090
|
-
$9HbP8$report([e, "Failed to preserve items in history.state"], "error");
|
|
4091
|
-
}
|
|
4092
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
4093
|
-
}
|
|
4094
|
-
});
|
|
4095
|
-
}
|
|
4096
|
-
function $90980bd87c9960f9$var$starts_with_any_prefix(key) {
|
|
4097
|
-
for (const prefix of $90980bd87c9960f9$export$3064e1e8c6513da3) {
|
|
4098
|
-
if (key.startsWith(prefix)) return true;
|
|
4099
|
-
}
|
|
4100
|
-
}
|
|
4101
4116
|
class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
4102
4117
|
/**
|
|
4103
4118
|
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
@@ -4119,12 +4134,6 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
4119
4134
|
}
|
|
4120
4135
|
}
|
|
4121
4136
|
/**
|
|
4122
|
-
* Checks if this tab shouldn't navigate because user wants to open in new tab
|
|
4123
|
-
*/
|
|
4124
|
-
#dont_attempt_navigation(ev) {
|
|
4125
|
-
return ev?.button || ev?.metaKey || ev?.ctrlKey;
|
|
4126
|
-
}
|
|
4127
|
-
/**
|
|
4128
4137
|
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
4129
4138
|
* This standardises waiting for all kinds of routers
|
|
4130
4139
|
*/
|
|
@@ -4165,7 +4174,7 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
4165
4174
|
}) => {
|
|
4166
4175
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
4167
4176
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
4168
|
-
if (
|
|
4177
|
+
if ($a281666e5c15c2ec$export$29d28dadc2d6b631(event_)) return;
|
|
4169
4178
|
const different_origin = new_url_.origin !== location.origin;
|
|
4170
4179
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
4171
4180
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -9167,7 +9176,7 @@ function $15aa76e6da02e5c2$export$cb5808ba002cdeed({
|
|
|
9167
9176
|
}) : when_filters_closed_cols;
|
|
9168
9177
|
});
|
|
9169
9178
|
}
|
|
9170
|
-
function $
|
|
9179
|
+
function $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_) {
|
|
9171
9180
|
const size_active = $9HbP8$createMemo(() => cols_at_size_().map(([n_cols, min_width, max_width]) => {
|
|
9172
9181
|
const media_query = $9HbP8$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
9173
9182
|
const matches = $dc9262ef6f786812$export$d9f36cf74e24d595(media_query);
|
|
@@ -9192,7 +9201,7 @@ function $e7a7eb102ddc0c79$export$791ef57e62e21c3f({
|
|
|
9192
9201
|
}) {
|
|
9193
9202
|
// these are by row
|
|
9194
9203
|
const [content_blocks, set_content_blocks] = $9HbP8$createStore([]);
|
|
9195
|
-
const n_cols_currently_showing_ = $
|
|
9204
|
+
const n_cols_currently_showing_ = $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_);
|
|
9196
9205
|
$9HbP8$createEffect(() => {
|
|
9197
9206
|
const incoming_value = incoming_content_blocks();
|
|
9198
9207
|
if (!incoming_value) {
|
|
@@ -10151,7 +10160,13 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
10151
10160
|
set_filters_open(false);
|
|
10152
10161
|
set_sorting_open(false);
|
|
10153
10162
|
});
|
|
10154
|
-
const meta_of_currently_selected_sorting_ = $9HbP8$createMemo(() => available_sortings_()?.find?.(
|
|
10163
|
+
const meta_of_currently_selected_sorting_ = $9HbP8$createMemo(() => available_sortings_()?.find?.(({
|
|
10164
|
+
field: field,
|
|
10165
|
+
order: order
|
|
10166
|
+
}) => {
|
|
10167
|
+
const current = get_current_sorting_();
|
|
10168
|
+
return current?.field === field && current?.order === order;
|
|
10169
|
+
})?.meta);
|
|
10155
10170
|
const filter_options = {
|
|
10156
10171
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10157
10172
|
local_filter_cache_: local_filter_cache_,
|
|
@@ -10748,9 +10763,9 @@ function $06edf3aec9073663$export$466cdc317043f6cb({
|
|
|
10748
10763
|
var _el$3 = $9HbP8$getNextElement($06edf3aec9073663$var$_tmpl$3);
|
|
10749
10764
|
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(ev => {
|
|
10750
10765
|
const url = href();
|
|
10751
|
-
if (is_selected() &&
|
|
10766
|
+
if (is_selected() && !$a281666e5c15c2ec$export$29d28dadc2d6b631(ev) || !url)
|
|
10752
10767
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
10753
|
-
ev.preventDefault();else if (
|
|
10768
|
+
ev.preventDefault();else if (url) router_.navigate_.go_to_({
|
|
10754
10769
|
new_url_: url,
|
|
10755
10770
|
is_replace_: false,
|
|
10756
10771
|
event_: ev,
|
|
@@ -14156,4 +14171,4 @@ function $58b3487626e85ece$var$align_field_modal(alignmentSignals, input, modalV
|
|
|
14156
14171
|
});
|
|
14157
14172
|
}
|
|
14158
14173
|
$9HbP8$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
14159
|
-
export { $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $4f16612bea257571$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField };
|
|
14174
|
+
export { $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $4f16612bea257571$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.26",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^3.0.
|
|
240
|
-
"@depict-ai/types": "^5.0.
|
|
241
|
-
"@depict-ai/utilishared": "^2.0.
|
|
239
|
+
"@depict-ai/plp-styling": "^3.0.13",
|
|
240
|
+
"@depict-ai/types": "^5.0.6",
|
|
241
|
+
"@depict-ai/utilishared": "^2.0.16",
|
|
242
242
|
"solid-js": "^1.8.12"
|
|
243
243
|
},
|
|
244
244
|
"type": "module",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -18,6 +18,9 @@ function $parcel$export(e, n, v, s) {
|
|
|
18
18
|
function $parcel$interopDefault(a) {
|
|
19
19
|
return a && a.__esModule ? a.default : a;
|
|
20
20
|
}
|
|
21
|
+
$parcel$export(module.exports, "preserve_items_in_history_dot_state", () => $cfcd56242923775d$export$5162a71f252e6122);
|
|
22
|
+
$parcel$export(module.exports, "prefixes_to_preserve_in_history_dot_state", () => $cfcd56242923775d$export$3064e1e8c6513da3);
|
|
23
|
+
$parcel$export(module.exports, "allowNativeNavigation", () => $9ca08bcacbc598ce$export$29d28dadc2d6b631);
|
|
21
24
|
$parcel$export(module.exports, "modalVersionSymbol", () => $072ab198d82c3eb7$export$1ea76ea778b880dd);
|
|
22
25
|
$parcel$export(module.exports, "createDeparallelizedNoDropResource", () => $a28000bc10de28ad$export$e417c49320921907);
|
|
23
26
|
$parcel$export(module.exports, "throw_globally", () => $bdea39a75c454f4f$export$f50b88e2a00918b5);
|
|
@@ -95,7 +98,56 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
95
98
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
96
99
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
97
100
|
/*! Depict.ai search and product listing SDK */
|
|
98
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.
|
|
101
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.26";
|
|
102
|
+
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
103
|
+
let $cfcd56242923775d$var$has_ran = false;
|
|
104
|
+
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
105
|
+
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
106
|
+
$cfcd56242923775d$var$has_ran = true;
|
|
107
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
108
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
109
|
+
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
113
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
114
|
+
apply(target, this_arg, arg_list) {
|
|
115
|
+
try {
|
|
116
|
+
const old_state = history.state;
|
|
117
|
+
if (typeof old_state == "object" && old_state !== null) {
|
|
118
|
+
var _arg_list$;
|
|
119
|
+
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
120
|
+
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
121
|
+
const cloned_object = {
|
|
122
|
+
...intended_new_value_as_obj
|
|
123
|
+
};
|
|
124
|
+
for (const key in old_state) {
|
|
125
|
+
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
126
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
127
|
+
}
|
|
128
|
+
arg_list[0] = cloned_object;
|
|
129
|
+
}
|
|
130
|
+
} catch (e) {
|
|
131
|
+
$3hooq$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
132
|
+
}
|
|
133
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
138
|
+
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
139
|
+
if (key.startsWith(prefix)) return true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 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
|
|
145
|
+
* @param clickEvent The click event that triggered the navigation
|
|
146
|
+
*/
|
|
147
|
+
function $9ca08bcacbc598ce$export$29d28dadc2d6b631(clickEvent) {
|
|
148
|
+
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
|
|
149
|
+
);
|
|
150
|
+
}
|
|
99
151
|
|
|
100
152
|
/**
|
|
101
153
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -1009,8 +1061,8 @@ function $210882b9ebe2b1d8$export$e872e2339fb04a7f(_ref) {
|
|
|
1009
1061
|
}
|
|
1010
1062
|
var $1730e5b4d47679a3$var$_tmpl$ = ["<a", ' target="_blank"></a>'];
|
|
1011
1063
|
function $1730e5b4d47679a3$export$1efe1013da60d0e4(e, href) {
|
|
1012
|
-
if (e.metaKey || e.ctrlKey) {
|
|
1013
|
-
// Open link in a new tab with cmd/ctrl + enter.
|
|
1064
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey) {
|
|
1065
|
+
// Open link in a new tab/window with cmd/ctrl + enter.
|
|
1014
1066
|
const link = $3hooq$solidjsweb.ssr($1730e5b4d47679a3$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey() + $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(href, true), false));
|
|
1015
1067
|
document.body.append(link);
|
|
1016
1068
|
link.click();
|
|
@@ -3429,46 +3481,6 @@ function $367b536a2a94d24e$var$history_state_change(signals, entries, state) {
|
|
|
3429
3481
|
}
|
|
3430
3482
|
});
|
|
3431
3483
|
}
|
|
3432
|
-
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
3433
|
-
let $cfcd56242923775d$var$has_ran = false;
|
|
3434
|
-
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
3435
|
-
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
3436
|
-
$cfcd56242923775d$var$has_ran = true;
|
|
3437
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
3438
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
3439
|
-
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
3440
|
-
}
|
|
3441
|
-
}
|
|
3442
|
-
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
3443
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
3444
|
-
apply(target, this_arg, arg_list) {
|
|
3445
|
-
try {
|
|
3446
|
-
const old_state = history.state;
|
|
3447
|
-
if (typeof old_state == "object" && old_state !== null) {
|
|
3448
|
-
var _arg_list$;
|
|
3449
|
-
// This effectively disallows the user from passing in a string, number, null or undefined
|
|
3450
|
-
const intended_new_value_as_obj = typeof arg_list[0] === "object" ? (_arg_list$ = arg_list[0]) !== null && _arg_list$ !== void 0 ? _arg_list$ : {} : {};
|
|
3451
|
-
const cloned_object = {
|
|
3452
|
-
...intended_new_value_as_obj
|
|
3453
|
-
};
|
|
3454
|
-
for (const key in old_state) {
|
|
3455
|
-
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
3456
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3457
|
-
}
|
|
3458
|
-
arg_list[0] = cloned_object;
|
|
3459
|
-
}
|
|
3460
|
-
} catch (e) {
|
|
3461
|
-
$3hooq$depictaiutilishared.report([e, "Failed to preserve items in history.state"], "error");
|
|
3462
|
-
}
|
|
3463
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
3464
|
-
}
|
|
3465
|
-
});
|
|
3466
|
-
}
|
|
3467
|
-
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
3468
|
-
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
3469
|
-
if (key.startsWith(prefix)) return true;
|
|
3470
|
-
}
|
|
3471
|
-
}
|
|
3472
3484
|
function $73014ff36186a4dd$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
3473
3485
|
$73014ff36186a4dd$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
3474
3486
|
privateSet.add(obj);
|
|
@@ -3481,7 +3493,6 @@ function $73014ff36186a4dd$var$_classPrivateMethodGet(receiver, privateSet, fn)
|
|
|
3481
3493
|
return fn;
|
|
3482
3494
|
}
|
|
3483
3495
|
var $73014ff36186a4dd$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
3484
|
-
var $73014ff36186a4dd$var$_dont_attempt_navigation = /*#__PURE__*/new WeakSet();
|
|
3485
3496
|
var $73014ff36186a4dd$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
3486
3497
|
class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
|
|
3487
3498
|
/**
|
|
@@ -3489,14 +3500,11 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
|
|
|
3489
3500
|
*/ /**
|
|
3490
3501
|
* 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
|
|
3491
3502
|
*/ /**
|
|
3492
|
-
*
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
* This standardises waiting for all kinds of routers
|
|
3496
|
-
*/
|
|
3503
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
3504
|
+
* This standardises waiting for all kinds of routers
|
|
3505
|
+
*/
|
|
3497
3506
|
constructor(on_navigation, listing_query_state_key) {
|
|
3498
3507
|
$73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_get_navigation_happened_promise);
|
|
3499
|
-
$73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_dont_attempt_navigation);
|
|
3500
3508
|
$73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_throwing_on_navigation);
|
|
3501
3509
|
$parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "on_navigation_", void 0);
|
|
3502
3510
|
$parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "listing_query_state_key", void 0);
|
|
@@ -3528,7 +3536,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
|
|
|
3528
3536
|
} = _ref;
|
|
3529
3537
|
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
3530
3538
|
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
3531
|
-
if ($
|
|
3539
|
+
if ($9ca08bcacbc598ce$export$29d28dadc2d6b631(event_)) return;
|
|
3532
3540
|
const different_origin = new_url_.origin !== location.origin;
|
|
3533
3541
|
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
3534
3542
|
if (force_spa_navigation_ && different_origin)
|
|
@@ -3576,9 +3584,6 @@ function $73014ff36186a4dd$var$_throwing_on_navigation2() {
|
|
|
3576
3584
|
});
|
|
3577
3585
|
}
|
|
3578
3586
|
}
|
|
3579
|
-
function $73014ff36186a4dd$var$_dont_attempt_navigation2(ev) {
|
|
3580
|
-
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);
|
|
3581
|
-
}
|
|
3582
3587
|
function $73014ff36186a4dd$var$_get_navigation_happened_promise2(is_replace) {
|
|
3583
3588
|
return new Promise(resolve => {
|
|
3584
3589
|
const handler = what_happened => {
|
|
@@ -7917,7 +7922,7 @@ function $c749e60bca5000cb$export$cb5808ba002cdeed(_ref) {
|
|
|
7917
7922
|
}) : when_filters_closed_cols;
|
|
7918
7923
|
});
|
|
7919
7924
|
}
|
|
7920
|
-
function $
|
|
7925
|
+
function $478e5a09664da64c$export$a79e666719b3647c(cols_at_size_) {
|
|
7921
7926
|
const size_active = $3hooq$solidjs.createMemo(() => cols_at_size_().map(_ref => {
|
|
7922
7927
|
let [n_cols, min_width, max_width] = _ref;
|
|
7923
7928
|
const media_query = $3hooq$depictaiutilishared.layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
@@ -7947,7 +7952,7 @@ function $f8f375d6245ffff2$export$791ef57e62e21c3f(_ref) {
|
|
|
7947
7952
|
} = _ref;
|
|
7948
7953
|
// these are by row
|
|
7949
7954
|
const [content_blocks, set_content_blocks] = $3hooq$solidjsstore.createStore([]);
|
|
7950
|
-
const n_cols_currently_showing_ = $
|
|
7955
|
+
const n_cols_currently_showing_ = $478e5a09664da64c$export$a79e666719b3647c(cols_at_size_);
|
|
7951
7956
|
$3hooq$solidjs.createEffect(() => {
|
|
7952
7957
|
const incoming_value = incoming_content_blocks();
|
|
7953
7958
|
if (!incoming_value) {
|
|
@@ -8657,9 +8662,13 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
8657
8662
|
});
|
|
8658
8663
|
const meta_of_currently_selected_sorting_ = $3hooq$solidjs.createMemo(() => {
|
|
8659
8664
|
var _available_sortings_, _available_sortings_$, _available_sortings_$2;
|
|
8660
|
-
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_,
|
|
8661
|
-
|
|
8662
|
-
|
|
8665
|
+
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 => {
|
|
8666
|
+
let {
|
|
8667
|
+
field: field,
|
|
8668
|
+
order: order
|
|
8669
|
+
} = _ref2;
|
|
8670
|
+
const current = get_current_sorting_();
|
|
8671
|
+
return (current === null || current === void 0 ? void 0 : current.field) === field && (current === null || current === void 0 ? void 0 : current.order) === order;
|
|
8663
8672
|
})) === null || _available_sortings_$2 === void 0 ? void 0 : _available_sortings_$2.meta;
|
|
8664
8673
|
});
|
|
8665
8674
|
const filter_options = {
|
|
@@ -8763,10 +8772,10 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
8763
8772
|
}));
|
|
8764
8773
|
const {
|
|
8765
8774
|
remove: remove
|
|
8766
|
-
} = $3hooq$depictaiutilishared.javascript_media_query("(max-width:651px)",
|
|
8775
|
+
} = $3hooq$depictaiutilishared.javascript_media_query("(max-width:651px)", _ref3 => {
|
|
8767
8776
|
let {
|
|
8768
8777
|
matches: matches
|
|
8769
|
-
} =
|
|
8778
|
+
} = _ref3;
|
|
8770
8779
|
return set_is_small(matches);
|
|
8771
8780
|
});
|
|
8772
8781
|
cleanup_promise.then(remove);
|
|
@@ -8797,7 +8806,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
8797
8806
|
}
|
|
8798
8807
|
});
|
|
8799
8808
|
}
|
|
8800
|
-
function $f70cc6dfcadf0fd5$var$OpenFiltersButton(
|
|
8809
|
+
function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref4) {
|
|
8801
8810
|
let {
|
|
8802
8811
|
i18n_: i18n_,
|
|
8803
8812
|
search_filters_open_: search_filters_open_,
|
|
@@ -8806,7 +8815,7 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
8806
8815
|
tabindex_: tabindex_,
|
|
8807
8816
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
8808
8817
|
hide_button_: hide_button_
|
|
8809
|
-
} =
|
|
8818
|
+
} = _ref4;
|
|
8810
8819
|
const filters_closed = $3hooq$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
8811
8820
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
8812
8821
|
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(hide_button_() ? {
|
|
@@ -8832,7 +8841,7 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
8832
8841
|
}
|
|
8833
8842
|
})), $3hooq$solidjsweb.escape(i18n_.filter_text_()));
|
|
8834
8843
|
}
|
|
8835
|
-
function $f70cc6dfcadf0fd5$var$OpenSortingButton(
|
|
8844
|
+
function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref5) {
|
|
8836
8845
|
var _meta_of_currently_se;
|
|
8837
8846
|
let {
|
|
8838
8847
|
i18n_: i18n_,
|
|
@@ -8843,7 +8852,7 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
8843
8852
|
sort_button_width_: sort_button_width_,
|
|
8844
8853
|
tabindex_: tabindex_,
|
|
8845
8854
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
8846
|
-
} =
|
|
8855
|
+
} = _ref5;
|
|
8847
8856
|
const sorting_closed = $3hooq$solidjs.createMemo(() => !search_sorting_open_[0]());
|
|
8848
8857
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
8849
8858
|
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey(), "".concat(!sorting_closed() ? "major" : "", " ").concat(sorting_closed() ? "minor" : "", " toggle-button for-sorting major-minor-transition"), $3hooq$solidjsweb.ssrAttribute("tabindex", $3hooq$solidjsweb.escape(tabindex_, true), false) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape((sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(), true), false), $3hooq$solidjsweb.ssrStyle(sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
@@ -8860,8 +8869,8 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
8860
8869
|
return $3hooq$solidjsweb.createComponent((0, $ae261a5687fe84f4$export$cb808a3c41736d8e), {});
|
|
8861
8870
|
},
|
|
8862
8871
|
get children() {
|
|
8863
|
-
var
|
|
8864
|
-
return ((
|
|
8872
|
+
var _get_current_sorting_;
|
|
8873
|
+
return ((_get_current_sorting_ = get_current_sorting_()) === null || _get_current_sorting_ === void 0 ? void 0 : _get_current_sorting_.order) === "asc" ? $3hooq$solidjsweb.createComponent((0, $0b45ba458cbff67a$export$da32f7add8a22e86), {}) : $3hooq$solidjsweb.createComponent((0, $549632402b57d811$export$d10e63059ddb9fd4), {});
|
|
8865
8874
|
}
|
|
8866
8875
|
})));
|
|
8867
8876
|
}
|
package/server/ES10/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
|
*/
|