@depict-ai/ui 1.0.1 → 1.0.2
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/dist/index.d.ts +1 -1
- package/dist/main.js +228 -219
- package/dist/module.js +230 -221
- package/package.json +4 -5
package/dist/main.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
var $46MJV$depictaiutilishared = require("@depict-ai/utilishared");
|
|
2
2
|
var $46MJV$solidjsweb = require("solid-js/web");
|
|
3
3
|
var $46MJV$solidjs = require("solid-js");
|
|
4
|
-
var $46MJV$lzstring = require("lz-string");
|
|
5
4
|
|
|
6
5
|
function $parcel$export(e, n, v, s) {
|
|
7
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
@@ -35,7 +34,7 @@ $parcel$export(module.exports, "SolidFormatPrice", () => $5fc9fc23df1591db$expor
|
|
|
35
34
|
$parcel$export(module.exports, "connect_search_field_height_to_aligner_height", () => $246e3e89a097f014$export$828dcdd425fd3231);
|
|
36
35
|
$parcel$export(module.exports, "PageReplacer", () => $37e96a5ebc768cc7$export$3ccaa27d81dd8556);
|
|
37
36
|
$parcel$export(module.exports, "version", () => $ae93561d5649a847$export$83d89fbfd8236492);
|
|
38
|
-
/*! Depict.ai search and product listing SDK */ const $ae93561d5649a847$export$83d89fbfd8236492 = "1.0.
|
|
37
|
+
/*! Depict.ai search and product listing SDK */ const $ae93561d5649a847$export$83d89fbfd8236492 = "1.0.2";
|
|
39
38
|
|
|
40
39
|
|
|
41
40
|
|
|
@@ -4431,7 +4430,7 @@ function $c6a04c153e9853a7$var$encode_filter_data(op, data) {
|
|
|
4431
4430
|
return encoded_data;
|
|
4432
4431
|
}
|
|
4433
4432
|
// Fallback encoding
|
|
4434
|
-
return (0, $46MJV$
|
|
4433
|
+
return (0, $46MJV$depictaiutilishared.base64_encode_unicode)(JSON.stringify(data));
|
|
4435
4434
|
}
|
|
4436
4435
|
function $c6a04c153e9853a7$var$decode_filter_data(op, encoded_data) {
|
|
4437
4436
|
if (encoded_data === "1") return "true";
|
|
@@ -4439,7 +4438,7 @@ function $c6a04c153e9853a7$var$decode_filter_data(op, encoded_data) {
|
|
|
4439
4438
|
if (op === "inrange" && encoded_data.includes($c6a04c153e9853a7$var$range_delimiter)) return encoded_data.split($c6a04c153e9853a7$var$range_delimiter).map((x)=>parseFloat(x));
|
|
4440
4439
|
if (encoded_data.includes($c6a04c153e9853a7$var$string_item_delimiter) || encoded_data.includes($c6a04c153e9853a7$var$array_item_delimiter)) return $c6a04c153e9853a7$var$decode_array(encoded_data);
|
|
4441
4440
|
try {
|
|
4442
|
-
return JSON.parse((0, $46MJV$
|
|
4441
|
+
return JSON.parse((0, $46MJV$depictaiutilishared.base64_decode_unicode)(encoded_data));
|
|
4443
4442
|
} catch (e) {
|
|
4444
4443
|
(0, $46MJV$depictaiutilishared.dlog)("Failed to fallback parse filter data", op, encoded_data, e);
|
|
4445
4444
|
}
|
|
@@ -4500,13 +4499,13 @@ function $c6a04c153e9853a7$export$af4a870a0ee262c4(search_params) {
|
|
|
4500
4499
|
];
|
|
4501
4500
|
for (const key of keys)if (key.startsWith($c6a04c153e9853a7$var$filter_query_param_prefix) || key === $c6a04c153e9853a7$var$sorting_query_param) search_params.delete(key);
|
|
4502
4501
|
}
|
|
4503
|
-
const $c6a04c153e9853a7$export$
|
|
4502
|
+
const $c6a04c153e9853a7$export$cf5feb2102aec7f2 = "went_sideways_clear_filters";
|
|
4504
4503
|
function $c6a04c153e9853a7$export$43cd1e747fecd42e(to_url, set_clearing_flag, from_search_params = new URLSearchParams(location.search)) {
|
|
4505
4504
|
if (!to_url) return to_url;
|
|
4506
4505
|
const was_url_object = to_url instanceof URL;
|
|
4507
4506
|
const url_object = was_url_object ? to_url : new URL(to_url, location.origin);
|
|
4508
4507
|
const { searchParams: searchParams } = url_object;
|
|
4509
|
-
if (set_clearing_flag) searchParams.set($c6a04c153e9853a7$export$
|
|
4508
|
+
if (set_clearing_flag) searchParams.set($c6a04c153e9853a7$export$cf5feb2102aec7f2, "true");
|
|
4510
4509
|
if (from_search_params.has($c6a04c153e9853a7$var$sorting_query_param)) searchParams.set($c6a04c153e9853a7$var$sorting_query_param, from_search_params.get($c6a04c153e9853a7$var$sorting_query_param));
|
|
4511
4510
|
for (const key of from_search_params.keys())if (key.startsWith($c6a04c153e9853a7$var$filter_query_param_prefix)) searchParams.set(key, from_search_params.get(key));
|
|
4512
4511
|
if (was_url_object) return url_object;
|
|
@@ -4680,6 +4679,7 @@ function $cdc2c00c0a7da86e$export$466cdc317043f6cb({ quicklinks_data_: quicklink
|
|
|
4680
4679
|
const quicklinks_data = quicklinks_data_(); // this signal should have updated by now since this is a createEffect
|
|
4681
4680
|
const current_id = current_query_id_();
|
|
4682
4681
|
if (!new_data || !quicklinks_data || !current_id) return;
|
|
4682
|
+
const owner = (0, $46MJV$solidjs.getOwner)();
|
|
4683
4683
|
queueMicrotask(()=>{
|
|
4684
4684
|
// has to be in microtask so that elements have rendered and are scroll-to-able
|
|
4685
4685
|
scrolling_logic_ran_for_query_id = true;
|
|
@@ -4692,17 +4692,17 @@ function $cdc2c00c0a7da86e$export$466cdc317043f6cb({ quicklinks_data_: quicklink
|
|
|
4692
4692
|
} else if (!(intersecting_items_object[selected_index()]?.intersectionRatio >= 0.95)) {
|
|
4693
4693
|
// negated larger than to handle left side of comparison being undefined
|
|
4694
4694
|
let done_work = false;
|
|
4695
|
-
(0, $46MJV$solidjs.createComputed)((0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4695
|
+
(0, $46MJV$solidjs.runWithOwner)(owner, ()=>(0, $46MJV$solidjs.createComputed)((0, $46MJV$depictaiutilishared.catchify)(()=>{
|
|
4696
|
+
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
4697
|
+
const sel_index = selected_index();
|
|
4698
|
+
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
4699
|
+
if (document.documentElement.contains(insert_here)) {
|
|
4700
|
+
slider.scroll_to_abs(target_element, true); // if nothing selected and no selected scroll position, go to left
|
|
4701
|
+
last_scroll_position = insert_here.scrollLeft; // update this because it might get removed from the DOM before intersection observers triggered (actually happened for me)
|
|
4702
|
+
} else // can't scroll if not in the DOM, scroll when we're back instead
|
|
4703
|
+
scroll_to_element_on_dom_insertion = target_element;
|
|
4704
|
+
done_work = true;
|
|
4705
|
+
})));
|
|
4706
4706
|
}
|
|
4707
4707
|
});
|
|
4708
4708
|
}, {
|
|
@@ -4889,8 +4889,7 @@ let $29b757e2ae26852c$export$44dad306455dddf;
|
|
|
4889
4889
|
|
|
4890
4890
|
|
|
4891
4891
|
|
|
4892
|
-
|
|
4893
|
-
function $207f7b30db90d048$export$3945d6db2dfd3d12({ crumb_data_: crumb_data_ , query_id_: query_id_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , plp_results_: plp_results_ , router_: router_ }) {
|
|
4892
|
+
function $207f7b30db90d048$export$3945d6db2dfd3d12({ crumb_data_: crumb_data_ , query_id_: query_id_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , plp_results_: plp_results_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ }) {
|
|
4894
4893
|
// If we just got opened in a new tab, clear filters instantly and remove the flag
|
|
4895
4894
|
$207f7b30db90d048$var$clear_if_opened_new_tab_with_sideways_url_params_flag({
|
|
4896
4895
|
plp_results_: plp_results_,
|
|
@@ -4898,7 +4897,7 @@ function $207f7b30db90d048$export$3945d6db2dfd3d12({ crumb_data_: crumb_data_ ,
|
|
|
4898
4897
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
4899
4898
|
selected_filters_: selected_filters_,
|
|
4900
4899
|
i18n_: i18n_,
|
|
4901
|
-
|
|
4900
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
4902
4901
|
});
|
|
4903
4902
|
// Code below is for when we're already open and the user navigates to a new category
|
|
4904
4903
|
let previous_crumb_data = (0, $46MJV$solidjs.untrack)(crumb_data_);
|
|
@@ -4928,7 +4927,7 @@ function $207f7b30db90d048$export$3945d6db2dfd3d12({ crumb_data_: crumb_data_ ,
|
|
|
4928
4927
|
local_filter_cache_: local_filter_cache_
|
|
4929
4928
|
});
|
|
4930
4929
|
// Also ensure we don't have `sideways_url_params_flag` set anymore
|
|
4931
|
-
|
|
4930
|
+
sideways_filter_clearing_flag_[1](false);
|
|
4932
4931
|
}
|
|
4933
4932
|
}
|
|
4934
4933
|
query_id_when_we_got_previous_data = query_id_of_new_data;
|
|
@@ -4936,11 +4935,11 @@ function $207f7b30db90d048$export$3945d6db2dfd3d12({ crumb_data_: crumb_data_ ,
|
|
|
4936
4935
|
if (!allow_filter_clearing) allow_filter_clearing = true;
|
|
4937
4936
|
})));
|
|
4938
4937
|
}
|
|
4939
|
-
function $207f7b30db90d048$var$clear_if_opened_new_tab_with_sideways_url_params_flag({ plp_results_: plp_results_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ ,
|
|
4938
|
+
function $207f7b30db90d048$var$clear_if_opened_new_tab_with_sideways_url_params_flag({ plp_results_: plp_results_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , i18n_: i18n_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ , sideways_filter_clearing_flag_: [get_sideways_filter_clearing_flag_, set_sideways_filter_clearing_flag_] }) {
|
|
4940
4939
|
const tracking_function_for_plp_results = (0, $46MJV$solidjs.createReaction)(()=>{
|
|
4941
4940
|
// On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
|
|
4942
|
-
|
|
4943
|
-
|
|
4941
|
+
if (!(0, $46MJV$solidjs.untrack)(get_sideways_filter_clearing_flag_)) return;
|
|
4942
|
+
set_sideways_filter_clearing_flag_(false);
|
|
4944
4943
|
(0, $46MJV$depictaiutilishared.dlog)("Flag to clear filters was set, clearing filters");
|
|
4945
4944
|
(0, $46MJV$depictaiutilishared.queueMacroTask)(()=>{
|
|
4946
4945
|
// Do it next task so that all the filters have time to populate
|
|
@@ -4956,22 +4955,10 @@ function $207f7b30db90d048$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
4956
4955
|
});
|
|
4957
4956
|
tracking_function_for_plp_results(plp_results_);
|
|
4958
4957
|
}
|
|
4959
|
-
function $207f7b30db90d048$var$delete_sideways_param_flag(router) {
|
|
4960
|
-
const url_object = new URL(location.href);
|
|
4961
|
-
const { searchParams: searchParams } = url_object;
|
|
4962
|
-
if (searchParams.get((0, $c6a04c153e9853a7$export$e2cf3f19dd3f8aac)) !== "true") return false;
|
|
4963
|
-
searchParams.delete((0, $c6a04c153e9853a7$export$e2cf3f19dd3f8aac));
|
|
4964
|
-
router.navigate_.go_to_({
|
|
4965
|
-
new_url_: url_object,
|
|
4966
|
-
is_replace_: true,
|
|
4967
|
-
force_spa_navigation_: true
|
|
4968
|
-
});
|
|
4969
|
-
return true;
|
|
4970
|
-
}
|
|
4971
4958
|
|
|
4972
4959
|
|
|
4973
4960
|
const $671632478f2a7ce7$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="product-count"> </div>`, 2), $671632478f2a7ce7$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div></div>`, 2), $671632478f2a7ce7$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="filter-results-for-one-row"></div>`, 2), $671632478f2a7ce7$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$46MJV$solidjsweb.template)(`<div class="depict plp category"><div class="listing-page"></div></div>`, 4);
|
|
4974
|
-
function $671632478f2a7ce7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , category_filters_open_: category_filters_open_ , category_sorting_open_: category_sorting_open_ , expanded_filters_: expanded_filters_ , selected_filters_: selected_filters_ , get_quicklinks_accessor_: get_quicklinks_accessor_ , i18n_: incoming_i18n , get_breadcrumb_accessor_: get_breadcrumb_accessor_ , slider_arrow_button_: slider_arrow_button_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , local_filter_cache_: local_filter_cache_ , tenant_: tenant_ , market_: market_ , router_: router_ , show_quicklinks_: show_quicklinks_ , category_title_: category_title_ , show_breadcrumbs_: show_breadcrumbs_ , layout_options_: layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ }) {
|
|
4961
|
+
function $671632478f2a7ce7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ , query_id_: query_id_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , category_filters_open_: category_filters_open_ , category_sorting_open_: category_sorting_open_ , expanded_filters_: expanded_filters_ , selected_filters_: selected_filters_ , get_quicklinks_accessor_: get_quicklinks_accessor_ , i18n_: incoming_i18n , get_breadcrumb_accessor_: get_breadcrumb_accessor_ , slider_arrow_button_: slider_arrow_button_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , local_filter_cache_: local_filter_cache_ , tenant_: tenant_ , market_: market_ , router_: router_ , show_quicklinks_: show_quicklinks_ , category_title_: category_title_ , show_breadcrumbs_: show_breadcrumbs_ , layout_options_: layout_options_ , scroll_restoration_data_: scroll_restoration_data_ , product_card_template_: product_card_template_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ }) {
|
|
4975
4962
|
let results_for;
|
|
4976
4963
|
let only_show_filters_opener_;
|
|
4977
4964
|
let middle_elements_;
|
|
@@ -5147,7 +5134,7 @@ function $671632478f2a7ce7$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
|
|
|
5147
5134
|
local_filter_cache_: local_filter_cache_,
|
|
5148
5135
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
5149
5136
|
plp_results_: plp_results_,
|
|
5150
|
-
|
|
5137
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
5151
5138
|
});
|
|
5152
5139
|
get_breadcrumb_accessor_?.(crumb_data_);
|
|
5153
5140
|
get_quicklinks_accessor_?.(quicklinks_data_);
|
|
@@ -5339,7 +5326,9 @@ const $7958d3dbd96a4f87$export$6daf8749b65a1b77 = (cols_at_size)=>{
|
|
|
5339
5326
|
];
|
|
5340
5327
|
}
|
|
5341
5328
|
// Sort widths in ascending order
|
|
5342
|
-
const sorted_cols_at_size =
|
|
5329
|
+
const sorted_cols_at_size = [
|
|
5330
|
+
...cols_at_size
|
|
5331
|
+
].sort((a, b)=>{
|
|
5343
5332
|
const [_b, width_A] = a;
|
|
5344
5333
|
const [_a, width_b] = b;
|
|
5345
5334
|
if (width_A === undefined) return -1;
|
|
@@ -5397,14 +5386,18 @@ function $f27b0b326e0a87e2$export$23fca46f3143581f(component, error_message) {
|
|
|
5397
5386
|
|
|
5398
5387
|
|
|
5399
5388
|
|
|
5400
|
-
function $cb699e435fadd254$export$477caf01aecaeb2a(
|
|
5389
|
+
function $cb699e435fadd254$export$477caf01aecaeb2a(options) {
|
|
5390
|
+
const router_ = options.router_;
|
|
5391
|
+
const search_query_url_param_name_ = "search_query_url_param_name_" in options ? options.search_query_url_param_name_ : undefined;
|
|
5401
5392
|
const search_query_ = search_query_url_param_name_ ? (0, $46MJV$solidjs.createSignal)("") : undefined;
|
|
5402
5393
|
const get_search_query_ = search_query_?.[0];
|
|
5403
5394
|
const set_search_query = search_query_?.[1];
|
|
5404
5395
|
const current_sorting_ = (0, $46MJV$solidjs.createSignal)();
|
|
5405
5396
|
const selected_filters_ = (0, $46MJV$solidjs.createSignal)([]);
|
|
5397
|
+
const sideways_filter_clearing_flag_ = (0, $46MJV$solidjs.createSignal)(false);
|
|
5406
5398
|
const [get_sorting_, set_sorting] = current_sorting_;
|
|
5407
5399
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
5400
|
+
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
5408
5401
|
const [get_current_href, set_current_href] = (0, $46MJV$solidjs.createSignal)(location.href);
|
|
5409
5402
|
const history_change_handler = (0, $46MJV$depictaiutilishared.catchify)(()=>set_current_href(location.href));
|
|
5410
5403
|
const owner = (0, $46MJV$solidjs.getOwner)() || (0, $46MJV$solidjs.createRoot)(()=>(0, $46MJV$solidjs.getOwner)());
|
|
@@ -5438,12 +5431,14 @@ function $cb699e435fadd254$export$477caf01aecaeb2a({ search_query_url_param_name
|
|
|
5438
5431
|
const found_query = searchParams.get(search_query_url_param_name_);
|
|
5439
5432
|
set_search_query(found_query || "");
|
|
5440
5433
|
}
|
|
5434
|
+
if (searchParams.get((0, $c6a04c153e9853a7$export$cf5feb2102aec7f2)) === "true") set_has_sideways_filter_clearing_flag(true);
|
|
5441
5435
|
if (!writer_started) {
|
|
5442
5436
|
// The owner here is the createComputed which gets disposed the next time the computation runs - but we actually just want to delay the start of the href_writer until our signals contain the current value of the URL, therefore the runWithOwner
|
|
5443
5437
|
(0, $46MJV$solidjs.runWithOwner)(owner, ()=>$cb699e435fadd254$var$start_href_writer({
|
|
5444
5438
|
get_sorting_: get_sorting_,
|
|
5445
5439
|
get_selected_filters_: get_selected_filters_,
|
|
5446
|
-
router_: router_
|
|
5440
|
+
router_: router_,
|
|
5441
|
+
get_has_sideways_filter_clearing_flag_: get_has_sideways_filter_clearing_flag_
|
|
5447
5442
|
}));
|
|
5448
5443
|
writer_started = true;
|
|
5449
5444
|
}
|
|
@@ -5455,22 +5450,26 @@ function $cb699e435fadd254$export$477caf01aecaeb2a({ search_query_url_param_name
|
|
|
5455
5450
|
selected_filters_: selected_filters_,
|
|
5456
5451
|
...typeof search_query_url_param_name_ === "string" ? {
|
|
5457
5452
|
search_query_accessor_: get_search_query_
|
|
5458
|
-
} : {
|
|
5453
|
+
} : {
|
|
5454
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_
|
|
5455
|
+
}
|
|
5459
5456
|
};
|
|
5460
5457
|
}
|
|
5461
5458
|
/**
|
|
5462
5459
|
* Writes the sorting and filters to the URL query parameters when they change.
|
|
5463
|
-
*/ function $cb699e435fadd254$var$start_href_writer({ get_sorting_: get_sorting_ , get_selected_filters_: get_selected_filters_ , router_: router_ }) {
|
|
5460
|
+
*/ function $cb699e435fadd254$var$start_href_writer({ get_sorting_: get_sorting_ , get_selected_filters_: get_selected_filters_ , router_: router_ , get_has_sideways_filter_clearing_flag_: get_has_sideways_filter_clearing_flag_ }) {
|
|
5464
5461
|
(0, $46MJV$solidjs.createEffect)((0, $46MJV$solidjs.on)([
|
|
5465
5462
|
get_sorting_,
|
|
5466
|
-
get_selected_filters_
|
|
5467
|
-
|
|
5463
|
+
get_selected_filters_,
|
|
5464
|
+
get_has_sideways_filter_clearing_flag_
|
|
5465
|
+
], ([sorting, filters, has_sideways_filter_clearing_flag])=>{
|
|
5468
5466
|
const current_href = location.href;
|
|
5469
5467
|
const url_object = new URL(current_href);
|
|
5470
5468
|
const { searchParams: searchParams } = url_object;
|
|
5471
5469
|
(0, $c6a04c153e9853a7$export$af4a870a0ee262c4)(searchParams);
|
|
5472
5470
|
(0, $c6a04c153e9853a7$export$62acb285a7579555)(sorting, searchParams);
|
|
5473
5471
|
(0, $c6a04c153e9853a7$export$58aa3f171519b6d7)(filters, searchParams);
|
|
5472
|
+
if (!has_sideways_filter_clearing_flag) $cb699e435fadd254$var$delete_sideways_param_flag(searchParams);
|
|
5474
5473
|
// We can't just check if the URL is equal since sometimes the order of the parameters in the URL changes (randomly?) so we need to compare them one by one
|
|
5475
5474
|
const unmodified_search_params = [
|
|
5476
5475
|
...new URL(current_href).searchParams
|
|
@@ -5490,6 +5489,9 @@ function $cb699e435fadd254$export$477caf01aecaeb2a({ search_query_url_param_name
|
|
|
5490
5489
|
defer: true
|
|
5491
5490
|
}));
|
|
5492
5491
|
}
|
|
5492
|
+
function $cb699e435fadd254$var$delete_sideways_param_flag(searchParams) {
|
|
5493
|
+
if (searchParams.get((0, $c6a04c153e9853a7$export$cf5feb2102aec7f2)) === "true") searchParams.delete((0, $c6a04c153e9853a7$export$cf5feb2102aec7f2));
|
|
5494
|
+
}
|
|
5493
5495
|
|
|
5494
5496
|
|
|
5495
5497
|
|
|
@@ -5623,38 +5625,42 @@ class $068a627cc18f7bb6$export$f34314aa9505732e {
|
|
|
5623
5625
|
this.#router.on_navigation_ = new_function;
|
|
5624
5626
|
}
|
|
5625
5627
|
constructor({ api: api , on_navigation: on_navigation , ...props_on_class }){
|
|
5626
|
-
|
|
5627
|
-
$
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5628
|
+
const owner = (0, $46MJV$solidjs.getOwner)() || (0, $46MJV$solidjs.createRoot)(()=>(0, $46MJV$solidjs.getOwner)()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
|
|
5629
|
+
(0, $46MJV$solidjs.runWithOwner)(owner, ()=>{
|
|
5630
|
+
if ($068a627cc18f7bb6$export$f34314aa9505732e.#has_been_constructed) throw new Error("You can only have one instance of DepictCategory due to state limitations");
|
|
5631
|
+
$068a627cc18f7bb6$export$f34314aa9505732e.#has_been_constructed = true;
|
|
5632
|
+
Object.assign(this, props_on_class); // set initial signal values
|
|
5633
|
+
(0, $33815c5a406b6cc0$export$5162a71f252e6122)();
|
|
5634
|
+
if (on_navigation) this.#router.on_navigation_ = on_navigation;
|
|
5635
|
+
const { selected_filters_: selected_filters_ , current_sorting_: current_sorting_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ } = (0, $cb699e435fadd254$export$477caf01aecaeb2a)({
|
|
5636
|
+
router_: this.#router
|
|
5637
|
+
});
|
|
5638
|
+
const [reset_history_state_, state_] = (0, $0de081f67b6d15b5$export$9862539c89138352)(()=>({
|
|
5639
|
+
category_filters_open: false,
|
|
5640
|
+
category_sorting_open: false,
|
|
5641
|
+
category_expanded_filters: [],
|
|
5642
|
+
// Please make sure that the signal created by below line always updates AFTER selected_filters_ updates on a "popstate" event. If the filter cache is popped before the selected filters are the code in create_modified_filters() is going to re-calculate search_local_filter_cache without knowing the real value of search_selected_filters, and we'll end up with too few filters in search_local_filter_cache in some cases
|
|
5643
|
+
category_local_filter_cache: [],
|
|
5644
|
+
category_expanded_hierarchical_filters: [],
|
|
5645
|
+
category_scroll_restoration_data: []
|
|
5646
|
+
}), this.#router);
|
|
5647
|
+
const i18n_ = (0, $623202ae203e9e59$export$f091cbac892643a4)(this.#locale_signal[0]);
|
|
5648
|
+
$068a627cc18f7bb6$var$privately_shared_properties.set(this, {
|
|
5649
|
+
state_: state_,
|
|
5650
|
+
breadcrumb_signal_: (0, $46MJV$solidjs.createSignal)(),
|
|
5651
|
+
quicklinks_signal_: (0, $46MJV$solidjs.createSignal)(),
|
|
5652
|
+
i18n_: i18n_,
|
|
5653
|
+
reset_history_state_: reset_history_state_,
|
|
5654
|
+
depict_api_: api ?? new (0, $9ce64f69303c371e$export$e015ed2f2950f2e3)(),
|
|
5655
|
+
router_: this.#router,
|
|
5656
|
+
selected_filters_: selected_filters_,
|
|
5657
|
+
current_sorting_: current_sorting_,
|
|
5658
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
5659
|
+
slider_arrow_button_: (0, $46MJV$depictaiutilishared.GenericSliderArrowButton)({
|
|
5660
|
+
height_: 12,
|
|
5661
|
+
width_: 6.46
|
|
5662
|
+
})
|
|
5663
|
+
});
|
|
5658
5664
|
});
|
|
5659
5665
|
}
|
|
5660
5666
|
}
|
|
@@ -5667,7 +5673,7 @@ function $068a627cc18f7bb6$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5667
5673
|
grid_spacing: grid_spacing.horizontal
|
|
5668
5674
|
};
|
|
5669
5675
|
return (0, $f27b0b326e0a87e2$export$23fca46f3143581f)(()=>{
|
|
5670
|
-
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , slider_arrow_button_: slider_arrow_button_ } = shared_properties;
|
|
5676
|
+
const { state_: { category_local_filter_cache: local_filter_cache_ , category_filters_open: category_filters_open_ , category_sorting_open: category_sorting_open_ , category_expanded_filters: expanded_filters_ , category_expanded_hierarchical_filters: expanded_hierarchical_filters_ , category_scroll_restoration_data: scroll_restoration_data_ } , current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , reset_history_state_: reset_history_state_ , depict_api_: depict_api_ , i18n_: i18n_ , router_: router_ , breadcrumb_signal_: breadcrumb_signal_ , quicklinks_signal_: quicklinks_signal_ , slider_arrow_button_: slider_arrow_button_ , sideways_filter_clearing_flag_: sideways_filter_clearing_flag_ } = shared_properties;
|
|
5671
5677
|
(0, $46MJV$solidjs.onCleanup)(reset_history_state_);
|
|
5672
5678
|
return (0, $671632478f2a7ce7$export$f7d2f673fc2f091d)({
|
|
5673
5679
|
tenant_: ()=>depict_category.merchant,
|
|
@@ -5690,6 +5696,7 @@ function $068a627cc18f7bb6$export$e2bf8ce7779e827e({ depict_category: depict_cat
|
|
|
5690
5696
|
expanded_filters_: expanded_filters_,
|
|
5691
5697
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
5692
5698
|
selected_filters_: selected_filters_,
|
|
5699
|
+
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
5693
5700
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
5694
5701
|
layout_options_: {
|
|
5695
5702
|
cols_at_size: (0, $7958d3dbd96a4f87$export$6daf8749b65a1b77)(cols_at_size),
|
|
@@ -7898,159 +7905,161 @@ class $79fbf145b15af988$export$ac6237957a15b3f0 {
|
|
|
7898
7905
|
#router = new (0, $43940d5ca403c293$export$7e1297a3a19f10d8)("hard_navigation");
|
|
7899
7906
|
constructor({ search_query_url_param_name: search_query_url_param_name_ = "query" , url_transformer: url_transformer , on_navigation: on_navigation , enable_category_suggestions: enable_category_suggestions = true , disable_scrolling_during_modal: // Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
7900
7907
|
disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal: bottom_distance_under_modal , render_instant_card: render_instant_card , ...props_on_class }){
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
const [reset_history_state_, state_] = (0, $0de081f67b6d15b5$export$9862539c89138352)(()=>({
|
|
7909
|
-
search_field_value: new URLSearchParams(location.search).get(search_query_url_param_name_) ?? "",
|
|
7910
|
-
search_filters_open: false,
|
|
7911
|
-
search_sorting_open: false,
|
|
7912
|
-
search_expanded_filters: [],
|
|
7913
|
-
// Please make sure that the signal created by below line always updates AFTER selected_filters_ updates on a "popstate" event. If the filter cache is popped before the selected filters are the code in create_modified_filters() is going to re-calculate search_local_filter_cache without knowing the real value of search_selected_filters, and we'll end up with too few filters in search_local_filter_cache in some cases
|
|
7914
|
-
search_local_filter_cache: [],
|
|
7915
|
-
search_expanded_hierarchical_filters: [],
|
|
7916
|
-
search_showing_recommendation_rows: (0, $9f81b7ced87aabf2$export$1c8c715550dc689d),
|
|
7917
|
-
search_scroll_restoration_data: []
|
|
7918
|
-
}), this.#router);
|
|
7919
|
-
const search_query_updating_blocked_ = (0, $46MJV$solidjs.createSignal)(false);
|
|
7920
|
-
const [get_search_query_updating_blocked] = search_query_updating_blocked_;
|
|
7921
|
-
const get_search_query_ = (0, $46MJV$solidjs.createMemo)((previous_value)=>{
|
|
7922
|
-
if (get_search_query_updating_blocked()) return previous_value;
|
|
7923
|
-
else return raw_search_query_accessor();
|
|
7924
|
-
});
|
|
7925
|
-
const depict_api_ = api ?? new (0, $9ce64f69303c371e$export$e015ed2f2950f2e3)();
|
|
7926
|
-
const previous_searches = (0, $ad118c2ba257d9b7$export$84bba84a7b837187)(get_search_query_);
|
|
7927
|
-
const [, set_search_showing_recommendation_rows] = state_.search_showing_recommendation_rows;
|
|
7928
|
-
const after_submit_ = ()=>set_search_showing_recommendation_rows((0, $9f81b7ced87aabf2$export$1c8c715550dc689d)); // do this every time after we have submitted a new query - otherwise there might already be a saved number of rows in the state
|
|
7929
|
-
const on_submit_with_unchanged_value_ = ()=>this.modal_open = false;
|
|
7930
|
-
const [get_search_field_value_, set_search_field_value_] = state_.search_field_value;
|
|
7931
|
-
const configured_submit_query_ = (new_query)=>(0, $1c323edfb89c9dca$export$e16630ecb9644a1c)({
|
|
7932
|
-
on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
|
|
7933
|
-
set_search_field_value_: set_search_field_value_,
|
|
7934
|
-
get_search_query_: get_search_query_,
|
|
7935
|
-
search_param_name_: search_query_url_param_name_,
|
|
7936
|
-
after_submit_: after_submit_,
|
|
7937
|
-
get_new_query: ()=>new_query || (0, $46MJV$solidjs.untrack)(get_search_field_value_),
|
|
7938
|
-
url_transformer_: url_transformer,
|
|
7908
|
+
const owner = (0, $46MJV$solidjs.getOwner)() || (0, $46MJV$solidjs.createRoot)(()=>(0, $46MJV$solidjs.getOwner)()); // we might have an owner, if so, pass it on. Otherwise, create one so solid doesn't print warnings to the console
|
|
7909
|
+
(0, $46MJV$solidjs.runWithOwner)(owner, ()=>{
|
|
7910
|
+
if ($79fbf145b15af988$export$ac6237957a15b3f0.#has_been_constructed) throw new Error("You can only have one instance of DepictSearch");
|
|
7911
|
+
Object.assign(this, props_on_class);
|
|
7912
|
+
if (on_navigation) this.#router.on_navigation_ = on_navigation;
|
|
7913
|
+
const { current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , search_query_accessor_: raw_search_query_accessor } = (0, $cb699e435fadd254$export$477caf01aecaeb2a)({
|
|
7914
|
+
search_query_url_param_name_: search_query_url_param_name_,
|
|
7939
7915
|
router_: this.#router
|
|
7940
7916
|
});
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7917
|
+
const [reset_history_state_, state_] = (0, $0de081f67b6d15b5$export$9862539c89138352)(()=>({
|
|
7918
|
+
search_field_value: new URLSearchParams(location.search).get(search_query_url_param_name_) ?? "",
|
|
7919
|
+
search_filters_open: false,
|
|
7920
|
+
search_sorting_open: false,
|
|
7921
|
+
search_expanded_filters: [],
|
|
7922
|
+
// Please make sure that the signal created by below line always updates AFTER selected_filters_ updates on a "popstate" event. If the filter cache is popped before the selected filters are the code in create_modified_filters() is going to re-calculate search_local_filter_cache without knowing the real value of search_selected_filters, and we'll end up with too few filters in search_local_filter_cache in some cases
|
|
7923
|
+
search_local_filter_cache: [],
|
|
7924
|
+
search_expanded_hierarchical_filters: [],
|
|
7925
|
+
search_showing_recommendation_rows: (0, $9f81b7ced87aabf2$export$1c8c715550dc689d),
|
|
7926
|
+
search_scroll_restoration_data: []
|
|
7927
|
+
}), this.#router);
|
|
7928
|
+
const search_query_updating_blocked_ = (0, $46MJV$solidjs.createSignal)(false);
|
|
7929
|
+
const [get_search_query_updating_blocked] = search_query_updating_blocked_;
|
|
7930
|
+
const get_search_query_ = (0, $46MJV$solidjs.createMemo)((previous_value)=>{
|
|
7931
|
+
if (get_search_query_updating_blocked()) return previous_value;
|
|
7932
|
+
else return raw_search_query_accessor();
|
|
7933
|
+
});
|
|
7934
|
+
const depict_api_ = api ?? new (0, $9ce64f69303c371e$export$e015ed2f2950f2e3)();
|
|
7935
|
+
const previous_searches = (0, $ad118c2ba257d9b7$export$84bba84a7b837187)(get_search_query_);
|
|
7936
|
+
const [, set_search_showing_recommendation_rows] = state_.search_showing_recommendation_rows;
|
|
7937
|
+
const after_submit_ = ()=>set_search_showing_recommendation_rows((0, $9f81b7ced87aabf2$export$1c8c715550dc689d)); // do this every time after we have submitted a new query - otherwise there might already be a saved number of rows in the state
|
|
7938
|
+
const on_submit_with_unchanged_value_ = ()=>this.modal_open = false;
|
|
7939
|
+
const [get_search_field_value_, set_search_field_value_] = state_.search_field_value;
|
|
7940
|
+
const configured_submit_query_ = (new_query)=>(0, $1c323edfb89c9dca$export$e16630ecb9644a1c)({
|
|
7941
|
+
on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
|
|
7942
|
+
set_search_field_value_: set_search_field_value_,
|
|
7943
|
+
get_search_query_: get_search_query_,
|
|
7944
|
+
search_param_name_: search_query_url_param_name_,
|
|
7945
|
+
after_submit_: after_submit_,
|
|
7946
|
+
get_new_query: ()=>new_query || (0, $46MJV$solidjs.untrack)(get_search_field_value_),
|
|
7947
|
+
url_transformer_: url_transformer,
|
|
7948
|
+
router_: this.#router
|
|
7949
|
+
});
|
|
7950
|
+
const i18n_ = (0, $623202ae203e9e59$export$f091cbac892643a4)(this.#locale_signal[0]);
|
|
7951
|
+
const clear_filters_on_next_submit_ = (0, $8b282f736ce4f3b8$export$e026af0c7b64ea5f)({
|
|
7952
|
+
selected_filters_: selected_filters_,
|
|
7974
7953
|
get_search_query_: get_search_query_,
|
|
7954
|
+
current_sorting_: current_sorting_,
|
|
7955
|
+
expanded_hierarchical_filters_: state_.search_expanded_hierarchical_filters,
|
|
7956
|
+
i18n_: i18n_,
|
|
7957
|
+
local_filter_cache_: state_.search_local_filter_cache
|
|
7958
|
+
});
|
|
7959
|
+
$79fbf145b15af988$var$privately_shared_properties.set(this, {
|
|
7975
7960
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
tenant_: this.#merchant_signal[0],
|
|
7979
|
-
clear_filters_: clear_filters_on_next_submit_,
|
|
7980
|
-
market_: this.#market_signal[0],
|
|
7981
|
-
submit_query_: configured_submit_query_,
|
|
7982
|
-
url_transformer_: url_transformer,
|
|
7961
|
+
reset_history_state_: reset_history_state_,
|
|
7962
|
+
state_: state_,
|
|
7983
7963
|
router_: this.#router,
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
render_instant_card_: render_instant_card,
|
|
7987
|
-
render_instant_card_placeholder_: (0, $17c49340edfdbb31$export$ee1733d9a8495996),
|
|
7988
|
-
has_sort_or_filters_: (0, $46MJV$solidjs.createMemo)(()=>!!(Object.keys(selected_filters_[0]())?.length || current_sorting_[0]()))
|
|
7989
|
-
},
|
|
7990
|
-
i18n_: i18n_,
|
|
7964
|
+
url_transformer_: url_transformer,
|
|
7965
|
+
depict_api_: depict_api_,
|
|
7991
7966
|
enable_category_suggestions_: enable_category_suggestions,
|
|
7992
|
-
|
|
7993
|
-
|
|
7967
|
+
clear_filters_on_next_submit_: clear_filters_on_next_submit_,
|
|
7968
|
+
configured_submit_query_: configured_submit_query_,
|
|
7969
|
+
get_search_query_: get_search_query_,
|
|
7970
|
+
i18n_: i18n_,
|
|
7971
|
+
search_query_updating_blocked_: search_query_updating_blocked_,
|
|
7972
|
+
current_sorting_: current_sorting_,
|
|
7973
|
+
selected_filters_: selected_filters_
|
|
7994
7974
|
});
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
7975
|
+
(0, $33815c5a406b6cc0$export$5162a71f252e6122)();
|
|
7976
|
+
(0, $46MJV$depictaiutilishared.catchify)(async ()=>{
|
|
7977
|
+
const { open_modal_: open_modal_ , close_modal_: close_modal_ } = await (0, $089c01924e13fae5$export$79b1565500412d9b)((...args)=>{
|
|
7978
|
+
(0, $46MJV$solidjs.onCleanup)(()=>this.modal_open = false);
|
|
7979
|
+
return (0, $121d25ca6af2898f$export$1c593cbd6f1e10bc)(...args);
|
|
7980
|
+
}, {
|
|
7981
|
+
search_field_value_: state_.search_field_value,
|
|
7982
|
+
get_search_query_: get_search_query_,
|
|
7983
|
+
search_query_url_param_name_: search_query_url_param_name_,
|
|
7984
|
+
previous_searches_: previous_searches,
|
|
7985
|
+
depict_api_: depict_api_,
|
|
7986
|
+
tenant_: this.#merchant_signal[0],
|
|
7987
|
+
clear_filters_: clear_filters_on_next_submit_,
|
|
7988
|
+
market_: this.#market_signal[0],
|
|
7989
|
+
submit_query_: configured_submit_query_,
|
|
7990
|
+
url_transformer_: url_transformer,
|
|
7991
|
+
router_: this.#router,
|
|
7992
|
+
instant_results_options_: {
|
|
7993
|
+
min_products_to_fetch_: $79fbf145b15af988$var$min_products_to_fetch_,
|
|
7994
|
+
render_instant_card_: render_instant_card,
|
|
7995
|
+
render_instant_card_placeholder_: (0, $17c49340edfdbb31$export$ee1733d9a8495996),
|
|
7996
|
+
has_sort_or_filters_: (0, $46MJV$solidjs.createMemo)(()=>!!(Object.keys(selected_filters_[0]())?.length || current_sorting_[0]()))
|
|
7997
|
+
},
|
|
7998
|
+
i18n_: i18n_,
|
|
7999
|
+
enable_category_suggestions_: enable_category_suggestions,
|
|
8000
|
+
disable_scrolling_: disable_scrolling_during_modal,
|
|
8001
|
+
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
8002
|
+
});
|
|
8003
|
+
// This will add some default behaviour to open_modal_ if no style_props_ are supplied
|
|
8004
|
+
// The default behaviour is to align the modal with the input field if possible
|
|
8005
|
+
const modal_opening_effect = ()=>{
|
|
8006
|
+
const open_signal_value = this.modal_open;
|
|
8007
|
+
const signal_value_is_options = Array.isArray(open_signal_value);
|
|
8008
|
+
// Close modal if signal is false
|
|
8009
|
+
if (!open_signal_value) {
|
|
8010
|
+
close_modal_();
|
|
8011
|
+
return;
|
|
8012
|
+
}
|
|
8013
|
+
const { search_page_aligned_modal_body_style_signal_: search_page_aligned_modal_body_style_signal_ } = $79fbf145b15af988$var$privately_shared_properties.get(this);
|
|
8014
|
+
if (signal_value_is_options && open_signal_value[0]?.style_props_) {
|
|
8015
|
+
// They know what they're doing, just call the modal with the provided options
|
|
8016
|
+
open_modal_(...open_signal_value);
|
|
8017
|
+
return;
|
|
8018
|
+
}
|
|
8019
|
+
if (!open_signal_value[0]?.style_props_ && search_page_aligned_modal_body_style_signal_) {
|
|
8020
|
+
// Open modal aligned with search page if no alignment specified and possible to align with search page
|
|
8021
|
+
if (!signal_value_is_options) {
|
|
8022
|
+
open_modal_({
|
|
8023
|
+
style_props_: search_page_aligned_modal_body_style_signal_
|
|
8024
|
+
});
|
|
8025
|
+
return;
|
|
8026
|
+
}
|
|
8027
|
+
const [options_arg, ...rest] = open_signal_value;
|
|
8014
8028
|
open_modal_({
|
|
8029
|
+
...options_arg,
|
|
8015
8030
|
style_props_: search_page_aligned_modal_body_style_signal_
|
|
8016
|
-
});
|
|
8031
|
+
}, ...rest);
|
|
8032
|
+
return;
|
|
8033
|
+
}
|
|
8034
|
+
// Open centered modal
|
|
8035
|
+
const supports_hover = (0, $beec9d22e42ed2cf$export$d9f36cf74e24d595)("(hover: hover) and (pointer: fine)");
|
|
8036
|
+
const desktop_short = (0, $beec9d22e42ed2cf$export$d9f36cf74e24d595)("(max-height: 790px)");
|
|
8037
|
+
const mobile_short = (0, $beec9d22e42ed2cf$export$d9f36cf74e24d595)("(max-height: 1000px)");
|
|
8038
|
+
const transform_y = (0, $46MJV$solidjs.createMemo)(()=>supports_hover() ? !desktop_short() : !mobile_short());
|
|
8039
|
+
const style_props_ = (0, $46MJV$solidjs.createSignal)({
|
|
8040
|
+
position: "fixed",
|
|
8041
|
+
top: "50%"
|
|
8042
|
+
});
|
|
8043
|
+
(0, $46MJV$solidjs.createComputed)(()=>style_props_[1]((old_value)=>({
|
|
8044
|
+
...old_value,
|
|
8045
|
+
transform: transform_y() ? "translateY(-50%)" : "unset"
|
|
8046
|
+
})));
|
|
8047
|
+
if (signal_value_is_options) {
|
|
8048
|
+
const [options_arg, ...rest] = open_signal_value;
|
|
8049
|
+
open_modal_({
|
|
8050
|
+
...options_arg,
|
|
8051
|
+
style_props_: search_page_aligned_modal_body_style_signal_ || style_props_
|
|
8052
|
+
}, ...rest);
|
|
8017
8053
|
return;
|
|
8018
8054
|
}
|
|
8019
|
-
const [options_arg, ...rest] = open_signal_value;
|
|
8020
|
-
open_modal_({
|
|
8021
|
-
...options_arg,
|
|
8022
|
-
style_props_: search_page_aligned_modal_body_style_signal_
|
|
8023
|
-
}, ...rest);
|
|
8024
|
-
return;
|
|
8025
|
-
}
|
|
8026
|
-
// Open centered modal
|
|
8027
|
-
const supports_hover = (0, $beec9d22e42ed2cf$export$d9f36cf74e24d595)("(hover: hover) and (pointer: fine)");
|
|
8028
|
-
const desktop_short = (0, $beec9d22e42ed2cf$export$d9f36cf74e24d595)("(max-height: 790px)");
|
|
8029
|
-
const mobile_short = (0, $beec9d22e42ed2cf$export$d9f36cf74e24d595)("(max-height: 1000px)");
|
|
8030
|
-
const transform_y = (0, $46MJV$solidjs.createMemo)(()=>supports_hover() ? !desktop_short() : !mobile_short());
|
|
8031
|
-
const style_props_ = (0, $46MJV$solidjs.createSignal)({
|
|
8032
|
-
position: "fixed",
|
|
8033
|
-
top: "50%"
|
|
8034
|
-
});
|
|
8035
|
-
(0, $46MJV$solidjs.createComputed)(()=>style_props_[1]((old_value)=>({
|
|
8036
|
-
...old_value,
|
|
8037
|
-
transform: transform_y() ? "translateY(-50%)" : "unset"
|
|
8038
|
-
})));
|
|
8039
|
-
if (signal_value_is_options) {
|
|
8040
|
-
const [options_arg, ...rest] = open_signal_value;
|
|
8041
8055
|
open_modal_({
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
});
|
|
8050
|
-
};
|
|
8051
|
-
(0, $46MJV$solidjs.runWithOwner)(owner, ()=>(0, $46MJV$solidjs.createEffect)(modal_opening_effect));
|
|
8052
|
-
})();
|
|
8053
|
-
$79fbf145b15af988$export$ac6237957a15b3f0.#has_been_constructed = true;
|
|
8056
|
+
style_props_: style_props_
|
|
8057
|
+
});
|
|
8058
|
+
};
|
|
8059
|
+
(0, $46MJV$solidjs.runWithOwner)(owner, ()=>(0, $46MJV$solidjs.createEffect)(modal_opening_effect));
|
|
8060
|
+
})();
|
|
8061
|
+
$79fbf145b15af988$export$ac6237957a15b3f0.#has_been_constructed = true;
|
|
8062
|
+
});
|
|
8054
8063
|
}
|
|
8055
8064
|
get on_navigation() {
|
|
8056
8065
|
// The only non-reactive public property on the class (I don't see it making sense to have it reactive)
|