@depict-ai/ui 4.10.5 → 4.10.7
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 +28 -23
- package/ES10/index.d.ts +3 -1
- package/ES10/index.js +28 -23
- package/latest/index.cjs +21 -16
- package/latest/index.d.ts +3 -1
- package/latest/index.js +21 -16
- package/package.json +1 -1
- package/server/ES10/index.cjs +28 -23
- package/server/ES10/index.d.ts +3 -1
- package/server/ES10/index.js +28 -23
- package/server/latest/index.cjs +21 -16
- package/server/latest/index.d.ts +3 -1
- package/server/latest/index.js +21 -16
package/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.7";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -5738,6 +5738,11 @@ function $685149df41127abd$export$9bf11afa910f536e(_ref) {
|
|
|
5738
5738
|
return new Promise(r => setTimeout(r, 300));
|
|
5739
5739
|
});
|
|
5740
5740
|
$52FdA$solidjs.onCleanup(resolve_cleanup_promise);
|
|
5741
|
+
const handler = e => {
|
|
5742
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
5743
|
+
};
|
|
5744
|
+
addEventListener("keydown", handler);
|
|
5745
|
+
$52FdA$solidjs.onCleanup(() => removeEventListener("keydown", handler));
|
|
5741
5746
|
return [(() => {
|
|
5742
5747
|
var _el$ = $52FdA$solidjsweb.getNextElement($685149df41127abd$var$_tmpl$2),
|
|
5743
5748
|
_el$2 = _el$.firstChild,
|
|
@@ -6292,7 +6297,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6292
6297
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
6293
6298
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
6294
6299
|
filterModalParent_: filterModalParent_,
|
|
6295
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6300
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6301
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6296
6302
|
} = _ref;
|
|
6297
6303
|
const Self = () => {
|
|
6298
6304
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -6301,11 +6307,13 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6301
6307
|
selected_filters_: selected_filters_,
|
|
6302
6308
|
local_filter_cache_: local_filter_cache_
|
|
6303
6309
|
});
|
|
6304
|
-
const cleanup_promise = new Promise(r => $52FdA$solidjs.onCleanup(r));
|
|
6305
6310
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
6306
6311
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
6307
6312
|
const [get_current_sorting_] = current_sorting_;
|
|
6308
|
-
const
|
|
6313
|
+
const isSmall = $52FdA$solidjs.createMemo(() => {
|
|
6314
|
+
var _switchToFiltersDrawe;
|
|
6315
|
+
return $3e17e871e9d0911d$export$d9f36cf74e24d595("(max-width:".concat((_switchToFiltersDrawe = switchToFiltersDrawerBreakpoint_()) !== null && _switchToFiltersDrawe !== void 0 ? _switchToFiltersDrawe : 651, "px)"));
|
|
6316
|
+
});
|
|
6309
6317
|
const dismiss_modal_ = $52FdA$depictaiutilishared.catchify(() => {
|
|
6310
6318
|
set_filters_open(false);
|
|
6311
6319
|
set_sorting_open(false);
|
|
@@ -6369,7 +6377,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6369
6377
|
$52FdA$solidjs.createComputed(() => {
|
|
6370
6378
|
const fi_o = filters_open();
|
|
6371
6379
|
const so_o = sorting_open();
|
|
6372
|
-
const i_s =
|
|
6380
|
+
const i_s = isSmall()();
|
|
6373
6381
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
6374
6382
|
if ((fi_o || so_o) && !i_s) {
|
|
6375
6383
|
if (!grid_is_in_original_state) return;
|
|
@@ -6385,7 +6393,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6385
6393
|
var _close_modal_;
|
|
6386
6394
|
(_close_modal_ = close_modal_) === null || _close_modal_ === void 0 || _close_modal_();
|
|
6387
6395
|
set_extra_els_in_results_container_("");
|
|
6388
|
-
} else if (
|
|
6396
|
+
} else if (isSmall()()) {
|
|
6389
6397
|
var _open_modal_;
|
|
6390
6398
|
if ($52FdA$solidjs.untrack(() => input_modal_open_ === null || input_modal_open_ === void 0 ? void 0 : input_modal_open_())) {
|
|
6391
6399
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
@@ -6429,15 +6437,6 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6429
6437
|
dismiss_modal_: dismiss_modal_,
|
|
6430
6438
|
i18n_: i18n_
|
|
6431
6439
|
}, filterModalParent_));
|
|
6432
|
-
const {
|
|
6433
|
-
remove: remove
|
|
6434
|
-
} = $52FdA$depictaiutilishared.javascript_media_query("(max-width:651px)", _ref3 => {
|
|
6435
|
-
let {
|
|
6436
|
-
matches: matches
|
|
6437
|
-
} = _ref3;
|
|
6438
|
-
return set_is_small(matches);
|
|
6439
|
-
});
|
|
6440
|
-
cleanup_promise.then(remove);
|
|
6441
6440
|
})();
|
|
6442
6441
|
get_extra_filters_button_ === null || get_extra_filters_button_ === void 0 || get_extra_filters_button_(make_open_filters_button());
|
|
6443
6442
|
get_extra_sorting_button_ === null || get_extra_sorting_button_ === void 0 || get_extra_sorting_button_(make_open_sorting_button());
|
|
@@ -6479,7 +6478,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6479
6478
|
}
|
|
6480
6479
|
});
|
|
6481
6480
|
}
|
|
6482
|
-
function $f70cc6dfcadf0fd5$var$OpenFiltersButton(
|
|
6481
|
+
function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
6483
6482
|
let {
|
|
6484
6483
|
i18n_: i18n_,
|
|
6485
6484
|
search_filters_open_: search_filters_open_,
|
|
@@ -6488,7 +6487,7 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref4) {
|
|
|
6488
6487
|
tabindex_: tabindex_,
|
|
6489
6488
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
6490
6489
|
hide_button_: hide_button_
|
|
6491
|
-
} =
|
|
6490
|
+
} = _ref3;
|
|
6492
6491
|
const filters_closed = $52FdA$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
6493
6492
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
6494
6493
|
return (() => {
|
|
@@ -6559,7 +6558,7 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref4) {
|
|
|
6559
6558
|
return _el$14;
|
|
6560
6559
|
})();
|
|
6561
6560
|
}
|
|
6562
|
-
function $f70cc6dfcadf0fd5$var$OpenSortingButton(
|
|
6561
|
+
function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
6563
6562
|
let {
|
|
6564
6563
|
i18n_: i18n_,
|
|
6565
6564
|
get_current_sorting_: get_current_sorting_,
|
|
@@ -6569,7 +6568,7 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref5) {
|
|
|
6569
6568
|
sort_button_width_: sort_button_width_,
|
|
6570
6569
|
tabindex_: tabindex_,
|
|
6571
6570
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6572
|
-
} =
|
|
6571
|
+
} = _ref4;
|
|
6573
6572
|
const sorting_closed = $52FdA$solidjs.createMemo(() => !search_sorting_open_[0]());
|
|
6574
6573
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
6575
6574
|
return (() => {
|
|
@@ -8287,7 +8286,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
8287
8286
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
8288
8287
|
filterModalParent_: filterModalParent_,
|
|
8289
8288
|
showSliderArrow_: showSliderArrow_,
|
|
8290
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
8289
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8290
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
8291
8291
|
} = _ref;
|
|
8292
8292
|
let results_for;
|
|
8293
8293
|
let only_show_filters_opener_;
|
|
@@ -8520,6 +8520,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
8520
8520
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
8521
8521
|
filterModalParent_: filterModalParent_,
|
|
8522
8522
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8523
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
8523
8524
|
...extra_sort_and_filter_args_
|
|
8524
8525
|
});
|
|
8525
8526
|
$52FdA$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
|
|
@@ -15443,7 +15444,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
15443
15444
|
filterModalParent_: filterModalParent_,
|
|
15444
15445
|
class_: class_,
|
|
15445
15446
|
showSliderArrow_: showSliderArrow_,
|
|
15446
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15447
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
15448
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
15447
15449
|
} = _ref;
|
|
15448
15450
|
const [get_sorting] = current_sorting_;
|
|
15449
15451
|
const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
|
|
@@ -15564,7 +15566,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
15564
15566
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15565
15567
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
15566
15568
|
filterModalParent_: filterModalParent_,
|
|
15567
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15569
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
15570
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
15568
15571
|
});
|
|
15569
15572
|
const results_filters = $52FdA$solidjs.createSignal();
|
|
15570
15573
|
const shouldActuallyShowInputField = $52FdA$solidjs.createMemo(() => {
|
|
@@ -16319,6 +16322,7 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
16319
16322
|
search_sorting_open_: state_.sorting_open,
|
|
16320
16323
|
expanded_filters_: state_.expanded_filters,
|
|
16321
16324
|
content_results_rows_: state_.content_results_rows,
|
|
16325
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
16322
16326
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
16323
16327
|
router_: shared_properties.router_,
|
|
16324
16328
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -17026,7 +17030,8 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
|
|
|
17026
17030
|
})),
|
|
17027
17031
|
product_card_template_: product_card_template,
|
|
17028
17032
|
sorting_query_param_: sorting_query_param_,
|
|
17029
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
17033
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
17034
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
17030
17035
|
});
|
|
17031
17036
|
}, "Entire CategoryPage failed");
|
|
17032
17037
|
}
|
package/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.7";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1501,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1501
1501
|
class?: string;
|
|
1502
1502
|
showSliderArrow_?: boolean;
|
|
1503
1503
|
hideCount0FilterOptions_?: boolean;
|
|
1504
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1504
1505
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1505
1506
|
/**
|
|
1506
1507
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1612,6 +1613,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1612
1613
|
grid_spacing: SDKGridSpacing;
|
|
1613
1614
|
cols_at_size: SDKColsAtSize;
|
|
1614
1615
|
product_card_template: ProductCardTemplate<[OutputDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<OutputDisplay>>;
|
|
1616
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1615
1617
|
show_quicklinks?: boolean;
|
|
1616
1618
|
show_breadcrumbs?: boolean;
|
|
1617
1619
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
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.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.7";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -5633,6 +5633,11 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
5633
5633
|
return new Promise(r => setTimeout(r, 300));
|
|
5634
5634
|
});
|
|
5635
5635
|
$8tj43$onCleanup(resolve_cleanup_promise);
|
|
5636
|
+
const handler = e => {
|
|
5637
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
5638
|
+
};
|
|
5639
|
+
addEventListener("keydown", handler);
|
|
5640
|
+
$8tj43$onCleanup(() => removeEventListener("keydown", handler));
|
|
5636
5641
|
return [(() => {
|
|
5637
5642
|
var _el$ = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$2),
|
|
5638
5643
|
_el$2 = _el$.firstChild,
|
|
@@ -6187,7 +6192,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6187
6192
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
6188
6193
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
6189
6194
|
filterModalParent_: filterModalParent_,
|
|
6190
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6195
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6196
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6191
6197
|
} = _ref;
|
|
6192
6198
|
const Self = () => {
|
|
6193
6199
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -6196,11 +6202,13 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6196
6202
|
selected_filters_: selected_filters_,
|
|
6197
6203
|
local_filter_cache_: local_filter_cache_
|
|
6198
6204
|
});
|
|
6199
|
-
const cleanup_promise = new Promise(r => $8tj43$onCleanup(r));
|
|
6200
6205
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
6201
6206
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
6202
6207
|
const [get_current_sorting_] = current_sorting_;
|
|
6203
|
-
const
|
|
6208
|
+
const isSmall = $8tj43$createMemo(() => {
|
|
6209
|
+
var _switchToFiltersDrawe;
|
|
6210
|
+
return $00a5b94f0c11efbb$export$d9f36cf74e24d595("(max-width:".concat((_switchToFiltersDrawe = switchToFiltersDrawerBreakpoint_()) !== null && _switchToFiltersDrawe !== void 0 ? _switchToFiltersDrawe : 651, "px)"));
|
|
6211
|
+
});
|
|
6204
6212
|
const dismiss_modal_ = $8tj43$catchify1(() => {
|
|
6205
6213
|
set_filters_open(false);
|
|
6206
6214
|
set_sorting_open(false);
|
|
@@ -6264,7 +6272,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6264
6272
|
$8tj43$createComputed(() => {
|
|
6265
6273
|
const fi_o = filters_open();
|
|
6266
6274
|
const so_o = sorting_open();
|
|
6267
|
-
const i_s =
|
|
6275
|
+
const i_s = isSmall()();
|
|
6268
6276
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
6269
6277
|
if ((fi_o || so_o) && !i_s) {
|
|
6270
6278
|
if (!grid_is_in_original_state) return;
|
|
@@ -6280,7 +6288,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6280
6288
|
var _close_modal_;
|
|
6281
6289
|
(_close_modal_ = close_modal_) === null || _close_modal_ === void 0 || _close_modal_();
|
|
6282
6290
|
set_extra_els_in_results_container_("");
|
|
6283
|
-
} else if (
|
|
6291
|
+
} else if (isSmall()()) {
|
|
6284
6292
|
var _open_modal_;
|
|
6285
6293
|
if ($8tj43$untrack(() => input_modal_open_ === null || input_modal_open_ === void 0 ? void 0 : input_modal_open_())) {
|
|
6286
6294
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
@@ -6324,15 +6332,6 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6324
6332
|
dismiss_modal_: dismiss_modal_,
|
|
6325
6333
|
i18n_: i18n_
|
|
6326
6334
|
}, filterModalParent_));
|
|
6327
|
-
const {
|
|
6328
|
-
remove: remove
|
|
6329
|
-
} = $8tj43$javascript_media_query("(max-width:651px)", _ref3 => {
|
|
6330
|
-
let {
|
|
6331
|
-
matches: matches
|
|
6332
|
-
} = _ref3;
|
|
6333
|
-
return set_is_small(matches);
|
|
6334
|
-
});
|
|
6335
|
-
cleanup_promise.then(remove);
|
|
6336
6335
|
})();
|
|
6337
6336
|
get_extra_filters_button_ === null || get_extra_filters_button_ === void 0 || get_extra_filters_button_(make_open_filters_button());
|
|
6338
6337
|
get_extra_sorting_button_ === null || get_extra_sorting_button_ === void 0 || get_extra_sorting_button_(make_open_sorting_button());
|
|
@@ -6374,7 +6373,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6374
6373
|
}
|
|
6375
6374
|
});
|
|
6376
6375
|
}
|
|
6377
|
-
function $7396052a1484264f$var$OpenFiltersButton(
|
|
6376
|
+
function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
6378
6377
|
let {
|
|
6379
6378
|
i18n_: i18n_,
|
|
6380
6379
|
search_filters_open_: search_filters_open_,
|
|
@@ -6383,7 +6382,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
6383
6382
|
tabindex_: tabindex_,
|
|
6384
6383
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
6385
6384
|
hide_button_: hide_button_
|
|
6386
|
-
} =
|
|
6385
|
+
} = _ref3;
|
|
6387
6386
|
const filters_closed = $8tj43$createMemo(() => !search_filters_open_[0]());
|
|
6388
6387
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
6389
6388
|
return (() => {
|
|
@@ -6454,7 +6453,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
6454
6453
|
return _el$14;
|
|
6455
6454
|
})();
|
|
6456
6455
|
}
|
|
6457
|
-
function $7396052a1484264f$var$OpenSortingButton(
|
|
6456
|
+
function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
6458
6457
|
let {
|
|
6459
6458
|
i18n_: i18n_,
|
|
6460
6459
|
get_current_sorting_: get_current_sorting_,
|
|
@@ -6464,7 +6463,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
|
6464
6463
|
sort_button_width_: sort_button_width_,
|
|
6465
6464
|
tabindex_: tabindex_,
|
|
6466
6465
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6467
|
-
} =
|
|
6466
|
+
} = _ref4;
|
|
6468
6467
|
const sorting_closed = $8tj43$createMemo(() => !search_sorting_open_[0]());
|
|
6469
6468
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
6470
6469
|
return (() => {
|
|
@@ -8182,7 +8181,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8182
8181
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
8183
8182
|
filterModalParent_: filterModalParent_,
|
|
8184
8183
|
showSliderArrow_: showSliderArrow_,
|
|
8185
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
8184
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8185
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
8186
8186
|
} = _ref;
|
|
8187
8187
|
let results_for;
|
|
8188
8188
|
let only_show_filters_opener_;
|
|
@@ -8415,6 +8415,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8415
8415
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
8416
8416
|
filterModalParent_: filterModalParent_,
|
|
8417
8417
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8418
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
8418
8419
|
...extra_sort_and_filter_args_
|
|
8419
8420
|
});
|
|
8420
8421
|
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
@@ -15338,7 +15339,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
15338
15339
|
filterModalParent_: filterModalParent_,
|
|
15339
15340
|
class_: class_,
|
|
15340
15341
|
showSliderArrow_: showSliderArrow_,
|
|
15341
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15342
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
15343
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
15342
15344
|
} = _ref;
|
|
15343
15345
|
const [get_sorting] = current_sorting_;
|
|
15344
15346
|
const all_products_loaded_ = $8tj43$createSignal(false);
|
|
@@ -15459,7 +15461,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
15459
15461
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15460
15462
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
15461
15463
|
filterModalParent_: filterModalParent_,
|
|
15462
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15464
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
15465
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
15463
15466
|
});
|
|
15464
15467
|
const results_filters = $8tj43$createSignal();
|
|
15465
15468
|
const shouldActuallyShowInputField = $8tj43$createMemo(() => {
|
|
@@ -16214,6 +16217,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
16214
16217
|
search_sorting_open_: state_.sorting_open,
|
|
16215
16218
|
expanded_filters_: state_.expanded_filters,
|
|
16216
16219
|
content_results_rows_: state_.content_results_rows,
|
|
16220
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
16217
16221
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
16218
16222
|
router_: shared_properties.router_,
|
|
16219
16223
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -16921,7 +16925,8 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16921
16925
|
})),
|
|
16922
16926
|
product_card_template_: product_card_template,
|
|
16923
16927
|
sorting_query_param_: sorting_query_param_,
|
|
16924
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
16928
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
16929
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
16925
16930
|
});
|
|
16926
16931
|
}, "Entire CategoryPage failed");
|
|
16927
16932
|
}
|
package/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.7";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -5430,6 +5430,11 @@ function $1872ceb56ede7a52$export$9bf11afa910f536e({
|
|
|
5430
5430
|
return new Promise(r => setTimeout(r, 300));
|
|
5431
5431
|
});
|
|
5432
5432
|
$gVhhF$solidjs.onCleanup(resolve_cleanup_promise);
|
|
5433
|
+
const handler = e => {
|
|
5434
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
5435
|
+
};
|
|
5436
|
+
addEventListener("keydown", handler);
|
|
5437
|
+
$gVhhF$solidjs.onCleanup(() => removeEventListener("keydown", handler));
|
|
5433
5438
|
return [(() => {
|
|
5434
5439
|
var _el$ = $gVhhF$solidjsweb.getNextElement($1872ceb56ede7a52$var$_tmpl$2),
|
|
5435
5440
|
_el$2 = _el$.firstChild,
|
|
@@ -5946,7 +5951,8 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
5946
5951
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
5947
5952
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
5948
5953
|
filterModalParent_: filterModalParent_,
|
|
5949
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
5954
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
5955
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
5950
5956
|
}) {
|
|
5951
5957
|
const Self = () => {
|
|
5952
5958
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -5955,11 +5961,10 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
5955
5961
|
selected_filters_: selected_filters_,
|
|
5956
5962
|
local_filter_cache_: local_filter_cache_
|
|
5957
5963
|
});
|
|
5958
|
-
const cleanup_promise = new Promise(r => $gVhhF$solidjs.onCleanup(r));
|
|
5959
5964
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
5960
5965
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
5961
5966
|
const [get_current_sorting_] = current_sorting_;
|
|
5962
|
-
const
|
|
5967
|
+
const isSmall = $gVhhF$solidjs.createMemo(() => $b54e6192d0caa293$export$d9f36cf74e24d595(`(max-width:${switchToFiltersDrawerBreakpoint_() ?? 651}px)`));
|
|
5963
5968
|
const dismiss_modal_ = $gVhhF$depictaiutilishared.catchify(() => {
|
|
5964
5969
|
set_filters_open(false);
|
|
5965
5970
|
set_sorting_open(false);
|
|
@@ -6011,7 +6016,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6011
6016
|
$gVhhF$solidjs.createComputed(() => {
|
|
6012
6017
|
const fi_o = filters_open();
|
|
6013
6018
|
const so_o = sorting_open();
|
|
6014
|
-
const i_s =
|
|
6019
|
+
const i_s = isSmall()();
|
|
6015
6020
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
6016
6021
|
if ((fi_o || so_o) && !i_s) {
|
|
6017
6022
|
if (!grid_is_in_original_state) return;
|
|
@@ -6026,7 +6031,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6026
6031
|
if (!filters_open() && !sorting_open()) {
|
|
6027
6032
|
close_modal_?.();
|
|
6028
6033
|
set_extra_els_in_results_container_("");
|
|
6029
|
-
} else if (
|
|
6034
|
+
} else if (isSmall()()) {
|
|
6030
6035
|
if ($gVhhF$solidjs.untrack(() => input_modal_open_?.())) {
|
|
6031
6036
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
6032
6037
|
set_filters_open(false);
|
|
@@ -6068,12 +6073,6 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6068
6073
|
dismiss_modal_: dismiss_modal_,
|
|
6069
6074
|
i18n_: i18n_
|
|
6070
6075
|
}, filterModalParent_));
|
|
6071
|
-
const {
|
|
6072
|
-
remove: remove
|
|
6073
|
-
} = $gVhhF$depictaiutilishared.javascript_media_query("(max-width:651px)", ({
|
|
6074
|
-
matches: matches
|
|
6075
|
-
}) => set_is_small(matches));
|
|
6076
|
-
cleanup_promise.then(remove);
|
|
6077
6076
|
})();
|
|
6078
6077
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
6079
6078
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
@@ -7845,7 +7844,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
7845
7844
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
7846
7845
|
filterModalParent_: filterModalParent_,
|
|
7847
7846
|
showSliderArrow_: showSliderArrow_,
|
|
7848
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
7847
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
7848
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
7849
7849
|
}) {
|
|
7850
7850
|
let results_for;
|
|
7851
7851
|
let only_show_filters_opener_;
|
|
@@ -8060,6 +8060,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
8060
8060
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
8061
8061
|
filterModalParent_: filterModalParent_,
|
|
8062
8062
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8063
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
8063
8064
|
...extra_sort_and_filter_args_
|
|
8064
8065
|
});
|
|
8065
8066
|
$gVhhF$depictaiutilisharedlatest.catchify((0, $276380e4607fb9fb$export$6e49da55e449af7c))({
|
|
@@ -14567,7 +14568,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
14567
14568
|
filterModalParent_: filterModalParent_,
|
|
14568
14569
|
class_: class_,
|
|
14569
14570
|
showSliderArrow_: showSliderArrow_,
|
|
14570
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
14571
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
14572
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
14571
14573
|
}) {
|
|
14572
14574
|
const [get_sorting] = current_sorting_;
|
|
14573
14575
|
const all_products_loaded_ = $gVhhF$solidjs.createSignal(false);
|
|
@@ -14676,7 +14678,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
14676
14678
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14677
14679
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
14678
14680
|
filterModalParent_: filterModalParent_,
|
|
14679
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
14681
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
14682
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
14680
14683
|
});
|
|
14681
14684
|
const results_filters = $gVhhF$solidjs.createSignal();
|
|
14682
14685
|
const shouldActuallyShowInputField = $gVhhF$solidjs.createMemo(() => include_input_field_?.() ?? true); // default to showing input field
|
|
@@ -15337,6 +15340,7 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
15337
15340
|
search_sorting_open_: state_.sorting_open,
|
|
15338
15341
|
expanded_filters_: state_.expanded_filters,
|
|
15339
15342
|
content_results_rows_: state_.content_results_rows,
|
|
15343
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
15340
15344
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
15341
15345
|
router_: shared_properties.router_,
|
|
15342
15346
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -15934,7 +15938,8 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
15934
15938
|
})),
|
|
15935
15939
|
product_card_template_: product_card_template,
|
|
15936
15940
|
sorting_query_param_: sorting_query_param_,
|
|
15937
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
15941
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
15942
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
15938
15943
|
});
|
|
15939
15944
|
}, "Entire CategoryPage failed");
|
|
15940
15945
|
}
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.7";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1501,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1501
1501
|
class?: string;
|
|
1502
1502
|
showSliderArrow_?: boolean;
|
|
1503
1503
|
hideCount0FilterOptions_?: boolean;
|
|
1504
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1504
1505
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1505
1506
|
/**
|
|
1506
1507
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1612,6 +1613,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1612
1613
|
grid_spacing: SDKGridSpacing;
|
|
1613
1614
|
cols_at_size: SDKColsAtSize;
|
|
1614
1615
|
product_card_template: ProductCardTemplate<[OutputDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<OutputDisplay>>;
|
|
1616
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1615
1617
|
show_quicklinks?: boolean;
|
|
1616
1618
|
show_breadcrumbs?: boolean;
|
|
1617
1619
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ 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.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.7";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $9HbP8$createSignal(false);
|
|
13
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -5328,6 +5328,11 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
5328
5328
|
return new Promise(r => setTimeout(r, 300));
|
|
5329
5329
|
});
|
|
5330
5330
|
$9HbP8$onCleanup(resolve_cleanup_promise);
|
|
5331
|
+
const handler = e => {
|
|
5332
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
5333
|
+
};
|
|
5334
|
+
addEventListener("keydown", handler);
|
|
5335
|
+
$9HbP8$onCleanup(() => removeEventListener("keydown", handler));
|
|
5331
5336
|
return [(() => {
|
|
5332
5337
|
var _el$ = $9HbP8$getNextElement($757dac7f7c6c5241$var$_tmpl$2),
|
|
5333
5338
|
_el$2 = _el$.firstChild,
|
|
@@ -5844,7 +5849,8 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5844
5849
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
5845
5850
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
5846
5851
|
filterModalParent_: filterModalParent_,
|
|
5847
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
5852
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
5853
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
5848
5854
|
}) {
|
|
5849
5855
|
const Self = () => {
|
|
5850
5856
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -5853,11 +5859,10 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5853
5859
|
selected_filters_: selected_filters_,
|
|
5854
5860
|
local_filter_cache_: local_filter_cache_
|
|
5855
5861
|
});
|
|
5856
|
-
const cleanup_promise = new Promise(r => $9HbP8$onCleanup(r));
|
|
5857
5862
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
5858
5863
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
5859
5864
|
const [get_current_sorting_] = current_sorting_;
|
|
5860
|
-
const
|
|
5865
|
+
const isSmall = $9HbP8$createMemo(() => $dc9262ef6f786812$export$d9f36cf74e24d595(`(max-width:${switchToFiltersDrawerBreakpoint_() ?? 651}px)`));
|
|
5861
5866
|
const dismiss_modal_ = $9HbP8$catchify1(() => {
|
|
5862
5867
|
set_filters_open(false);
|
|
5863
5868
|
set_sorting_open(false);
|
|
@@ -5909,7 +5914,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5909
5914
|
$9HbP8$createComputed(() => {
|
|
5910
5915
|
const fi_o = filters_open();
|
|
5911
5916
|
const so_o = sorting_open();
|
|
5912
|
-
const i_s =
|
|
5917
|
+
const i_s = isSmall()();
|
|
5913
5918
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
5914
5919
|
if ((fi_o || so_o) && !i_s) {
|
|
5915
5920
|
if (!grid_is_in_original_state) return;
|
|
@@ -5924,7 +5929,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5924
5929
|
if (!filters_open() && !sorting_open()) {
|
|
5925
5930
|
close_modal_?.();
|
|
5926
5931
|
set_extra_els_in_results_container_("");
|
|
5927
|
-
} else if (
|
|
5932
|
+
} else if (isSmall()()) {
|
|
5928
5933
|
if ($9HbP8$untrack(() => input_modal_open_?.())) {
|
|
5929
5934
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
5930
5935
|
set_filters_open(false);
|
|
@@ -5966,12 +5971,6 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
5966
5971
|
dismiss_modal_: dismiss_modal_,
|
|
5967
5972
|
i18n_: i18n_
|
|
5968
5973
|
}, filterModalParent_));
|
|
5969
|
-
const {
|
|
5970
|
-
remove: remove
|
|
5971
|
-
} = $9HbP8$javascript_media_query("(max-width:651px)", ({
|
|
5972
|
-
matches: matches
|
|
5973
|
-
}) => set_is_small(matches));
|
|
5974
|
-
cleanup_promise.then(remove);
|
|
5975
5974
|
})();
|
|
5976
5975
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
5977
5976
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
@@ -7743,7 +7742,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
7743
7742
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
7744
7743
|
filterModalParent_: filterModalParent_,
|
|
7745
7744
|
showSliderArrow_: showSliderArrow_,
|
|
7746
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
7745
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
7746
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
7747
7747
|
}) {
|
|
7748
7748
|
let results_for;
|
|
7749
7749
|
let only_show_filters_opener_;
|
|
@@ -7958,6 +7958,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
7958
7958
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
7959
7959
|
filterModalParent_: filterModalParent_,
|
|
7960
7960
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
7961
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
7961
7962
|
...extra_sort_and_filter_args_
|
|
7962
7963
|
});
|
|
7963
7964
|
$9HbP8$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
@@ -14465,7 +14466,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
14465
14466
|
filterModalParent_: filterModalParent_,
|
|
14466
14467
|
class_: class_,
|
|
14467
14468
|
showSliderArrow_: showSliderArrow_,
|
|
14468
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
14469
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
14470
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
14469
14471
|
}) {
|
|
14470
14472
|
const [get_sorting] = current_sorting_;
|
|
14471
14473
|
const all_products_loaded_ = $9HbP8$createSignal(false);
|
|
@@ -14574,7 +14576,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
14574
14576
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
14575
14577
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
14576
14578
|
filterModalParent_: filterModalParent_,
|
|
14577
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
14579
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
14580
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
14578
14581
|
});
|
|
14579
14582
|
const results_filters = $9HbP8$createSignal();
|
|
14580
14583
|
const shouldActuallyShowInputField = $9HbP8$createMemo(() => include_input_field_?.() ?? true); // default to showing input field
|
|
@@ -15235,6 +15238,7 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
15235
15238
|
search_sorting_open_: state_.sorting_open,
|
|
15236
15239
|
expanded_filters_: state_.expanded_filters,
|
|
15237
15240
|
content_results_rows_: state_.content_results_rows,
|
|
15241
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
15238
15242
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
15239
15243
|
router_: shared_properties.router_,
|
|
15240
15244
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -15832,7 +15836,8 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
15832
15836
|
})),
|
|
15833
15837
|
product_card_template_: product_card_template,
|
|
15834
15838
|
sorting_query_param_: sorting_query_param_,
|
|
15835
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
15839
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
15840
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
15836
15841
|
});
|
|
15837
15842
|
}, "Entire CategoryPage failed");
|
|
15838
15843
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.7",
|
|
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",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.7";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
121
121
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -4669,6 +4669,11 @@ function $685149df41127abd$export$9bf11afa910f536e(_ref) {
|
|
|
4669
4669
|
return new Promise(r => setTimeout(r, 300));
|
|
4670
4670
|
});
|
|
4671
4671
|
$3hooq$solidjs.onCleanup(resolve_cleanup_promise);
|
|
4672
|
+
const handler = e => {
|
|
4673
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
4674
|
+
};
|
|
4675
|
+
addEventListener("keydown", handler);
|
|
4676
|
+
$3hooq$solidjs.onCleanup(() => removeEventListener("keydown", handler));
|
|
4672
4677
|
return [$3hooq$solidjsweb.ssr($685149df41127abd$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.close_(), true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), $3hooq$solidjsweb.ssrStyle(modal_scrolling_prevented[0]() ? "overflow:hidden" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
|
|
4673
4678
|
is_open_: [sorting_expanded, set_sorting_expanded],
|
|
4674
4679
|
get details_() {
|
|
@@ -5007,7 +5012,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5007
5012
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
5008
5013
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
5009
5014
|
filterModalParent_: filterModalParent_,
|
|
5010
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
5015
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
5016
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
5011
5017
|
} = _ref;
|
|
5012
5018
|
const Self = () => {
|
|
5013
5019
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -5016,11 +5022,13 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5016
5022
|
selected_filters_: selected_filters_,
|
|
5017
5023
|
local_filter_cache_: local_filter_cache_
|
|
5018
5024
|
});
|
|
5019
|
-
const cleanup_promise = new Promise(r => $3hooq$solidjs.onCleanup(r));
|
|
5020
5025
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
5021
5026
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
5022
5027
|
const [get_current_sorting_] = current_sorting_;
|
|
5023
|
-
const
|
|
5028
|
+
const isSmall = $3hooq$solidjs.createMemo(() => {
|
|
5029
|
+
var _switchToFiltersDrawe;
|
|
5030
|
+
return $3e17e871e9d0911d$export$d9f36cf74e24d595("(max-width:".concat((_switchToFiltersDrawe = switchToFiltersDrawerBreakpoint_()) !== null && _switchToFiltersDrawe !== void 0 ? _switchToFiltersDrawe : 651, "px)"));
|
|
5031
|
+
});
|
|
5024
5032
|
const dismiss_modal_ = $3hooq$depictaiutilishared.catchify(() => {
|
|
5025
5033
|
set_filters_open(false);
|
|
5026
5034
|
set_sorting_open(false);
|
|
@@ -5084,7 +5092,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5084
5092
|
$3hooq$solidjs.createComputed(() => {
|
|
5085
5093
|
const fi_o = filters_open();
|
|
5086
5094
|
const so_o = sorting_open();
|
|
5087
|
-
const i_s =
|
|
5095
|
+
const i_s = isSmall()();
|
|
5088
5096
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
5089
5097
|
if ((fi_o || so_o) && !i_s) {
|
|
5090
5098
|
if (!grid_is_in_original_state) return;
|
|
@@ -5100,7 +5108,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5100
5108
|
var _close_modal_;
|
|
5101
5109
|
(_close_modal_ = close_modal_) === null || _close_modal_ === void 0 || _close_modal_();
|
|
5102
5110
|
set_extra_els_in_results_container_("");
|
|
5103
|
-
} else if (
|
|
5111
|
+
} else if (isSmall()()) {
|
|
5104
5112
|
var _open_modal_;
|
|
5105
5113
|
if ($3hooq$solidjs.untrack(() => input_modal_open_ === null || input_modal_open_ === void 0 ? void 0 : input_modal_open_())) {
|
|
5106
5114
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
@@ -5136,15 +5144,6 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5136
5144
|
dismiss_modal_: dismiss_modal_,
|
|
5137
5145
|
i18n_: i18n_
|
|
5138
5146
|
}, filterModalParent_));
|
|
5139
|
-
const {
|
|
5140
|
-
remove: remove
|
|
5141
|
-
} = $3hooq$depictaiutilishared.javascript_media_query("(max-width:651px)", _ref3 => {
|
|
5142
|
-
let {
|
|
5143
|
-
matches: matches
|
|
5144
|
-
} = _ref3;
|
|
5145
|
-
return set_is_small(matches);
|
|
5146
|
-
});
|
|
5147
|
-
cleanup_promise.then(remove);
|
|
5148
5147
|
})();
|
|
5149
5148
|
get_extra_filters_button_ === null || get_extra_filters_button_ === void 0 || get_extra_filters_button_(make_open_filters_button());
|
|
5150
5149
|
get_extra_sorting_button_ === null || get_extra_sorting_button_ === void 0 || get_extra_sorting_button_(make_open_sorting_button());
|
|
@@ -5172,7 +5171,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
5172
5171
|
}
|
|
5173
5172
|
});
|
|
5174
5173
|
}
|
|
5175
|
-
function $f70cc6dfcadf0fd5$var$OpenFiltersButton(
|
|
5174
|
+
function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
5176
5175
|
let {
|
|
5177
5176
|
i18n_: i18n_,
|
|
5178
5177
|
search_filters_open_: search_filters_open_,
|
|
@@ -5181,7 +5180,7 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref4) {
|
|
|
5181
5180
|
tabindex_: tabindex_,
|
|
5182
5181
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
5183
5182
|
hide_button_: hide_button_
|
|
5184
|
-
} =
|
|
5183
|
+
} = _ref3;
|
|
5185
5184
|
const filters_closed = $3hooq$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
5186
5185
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
5187
5186
|
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(hide_button_() ? {
|
|
@@ -5207,7 +5206,7 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref4) {
|
|
|
5207
5206
|
}
|
|
5208
5207
|
})), $3hooq$solidjsweb.escape(i18n_.filter_text_()));
|
|
5209
5208
|
}
|
|
5210
|
-
function $f70cc6dfcadf0fd5$var$OpenSortingButton(
|
|
5209
|
+
function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
5211
5210
|
var _meta_of_currently_se;
|
|
5212
5211
|
let {
|
|
5213
5212
|
i18n_: i18n_,
|
|
@@ -5218,7 +5217,7 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref5) {
|
|
|
5218
5217
|
sort_button_width_: sort_button_width_,
|
|
5219
5218
|
tabindex_: tabindex_,
|
|
5220
5219
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
5221
|
-
} =
|
|
5220
|
+
} = _ref4;
|
|
5222
5221
|
const sorting_closed = $3hooq$solidjs.createMemo(() => !search_sorting_open_[0]());
|
|
5223
5222
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
5224
5223
|
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_() ? {
|
|
@@ -6807,7 +6806,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6807
6806
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
6808
6807
|
filterModalParent_: filterModalParent_,
|
|
6809
6808
|
showSliderArrow_: showSliderArrow_,
|
|
6810
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6809
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6810
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6811
6811
|
} = _ref;
|
|
6812
6812
|
let results_for;
|
|
6813
6813
|
let only_show_filters_opener_;
|
|
@@ -7030,6 +7030,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
7030
7030
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
7031
7031
|
filterModalParent_: filterModalParent_,
|
|
7032
7032
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
7033
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
7033
7034
|
...extra_sort_and_filter_args_
|
|
7034
7035
|
});
|
|
7035
7036
|
$3hooq$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
|
|
@@ -12765,7 +12766,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
12765
12766
|
filterModalParent_: filterModalParent_,
|
|
12766
12767
|
class_: class_,
|
|
12767
12768
|
showSliderArrow_: showSliderArrow_,
|
|
12768
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
12769
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
12770
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
12769
12771
|
} = _ref;
|
|
12770
12772
|
const [get_sorting] = current_sorting_;
|
|
12771
12773
|
const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
|
|
@@ -12886,7 +12888,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
12886
12888
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
12887
12889
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
12888
12890
|
filterModalParent_: filterModalParent_,
|
|
12889
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
12891
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
12892
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
12890
12893
|
});
|
|
12891
12894
|
const results_filters = $3hooq$solidjs.createSignal();
|
|
12892
12895
|
const shouldActuallyShowInputField = $3hooq$solidjs.createMemo(() => {
|
|
@@ -13591,6 +13594,7 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
13591
13594
|
search_sorting_open_: state_.sorting_open,
|
|
13592
13595
|
expanded_filters_: state_.expanded_filters,
|
|
13593
13596
|
content_results_rows_: state_.content_results_rows,
|
|
13597
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
13594
13598
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
13595
13599
|
router_: shared_properties.router_,
|
|
13596
13600
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -14289,7 +14293,8 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
|
|
|
14289
14293
|
})),
|
|
14290
14294
|
product_card_template_: product_card_template,
|
|
14291
14295
|
sorting_query_param_: sorting_query_param_,
|
|
14292
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
14296
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
14297
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
14293
14298
|
});
|
|
14294
14299
|
}, "Entire CategoryPage failed");
|
|
14295
14300
|
}
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.7";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1501,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1501
1501
|
class?: string;
|
|
1502
1502
|
showSliderArrow_?: boolean;
|
|
1503
1503
|
hideCount0FilterOptions_?: boolean;
|
|
1504
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1504
1505
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1505
1506
|
/**
|
|
1506
1507
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1612,6 +1613,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1612
1613
|
grid_spacing: SDKGridSpacing;
|
|
1613
1614
|
cols_at_size: SDKColsAtSize;
|
|
1614
1615
|
product_card_template: ProductCardTemplate<[OutputDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<OutputDisplay>>;
|
|
1616
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1615
1617
|
show_quicklinks?: boolean;
|
|
1616
1618
|
show_breadcrumbs?: boolean;
|
|
1617
1619
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
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.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.7";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $b8hua$createSignal(false);
|
|
16
16
|
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
@@ -4564,6 +4564,11 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4564
4564
|
return new Promise(r => setTimeout(r, 300));
|
|
4565
4565
|
});
|
|
4566
4566
|
$b8hua$onCleanup(resolve_cleanup_promise);
|
|
4567
|
+
const handler = e => {
|
|
4568
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
4569
|
+
};
|
|
4570
|
+
addEventListener("keydown", handler);
|
|
4571
|
+
$b8hua$onCleanup(() => removeEventListener("keydown", handler));
|
|
4567
4572
|
return [$b8hua$ssr($082c4ed3e22f8d71$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.close_(), true), false), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$ssrStyle(modal_scrolling_prevented[0]() ? "overflow:hidden" : ""), $b8hua$escape($b8hua$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
|
|
4568
4573
|
is_open_: [sorting_expanded, set_sorting_expanded],
|
|
4569
4574
|
get details_() {
|
|
@@ -4902,7 +4907,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4902
4907
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
4903
4908
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
4904
4909
|
filterModalParent_: filterModalParent_,
|
|
4905
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
4910
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
4911
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
4906
4912
|
} = _ref;
|
|
4907
4913
|
const Self = () => {
|
|
4908
4914
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -4911,11 +4917,13 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4911
4917
|
selected_filters_: selected_filters_,
|
|
4912
4918
|
local_filter_cache_: local_filter_cache_
|
|
4913
4919
|
});
|
|
4914
|
-
const cleanup_promise = new Promise(r => $b8hua$onCleanup(r));
|
|
4915
4920
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
4916
4921
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4917
4922
|
const [get_current_sorting_] = current_sorting_;
|
|
4918
|
-
const
|
|
4923
|
+
const isSmall = $b8hua$createMemo(() => {
|
|
4924
|
+
var _switchToFiltersDrawe;
|
|
4925
|
+
return $00a5b94f0c11efbb$export$d9f36cf74e24d595("(max-width:".concat((_switchToFiltersDrawe = switchToFiltersDrawerBreakpoint_()) !== null && _switchToFiltersDrawe !== void 0 ? _switchToFiltersDrawe : 651, "px)"));
|
|
4926
|
+
});
|
|
4919
4927
|
const dismiss_modal_ = $b8hua$catchify1(() => {
|
|
4920
4928
|
set_filters_open(false);
|
|
4921
4929
|
set_sorting_open(false);
|
|
@@ -4979,7 +4987,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4979
4987
|
$b8hua$createComputed(() => {
|
|
4980
4988
|
const fi_o = filters_open();
|
|
4981
4989
|
const so_o = sorting_open();
|
|
4982
|
-
const i_s =
|
|
4990
|
+
const i_s = isSmall()();
|
|
4983
4991
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4984
4992
|
if ((fi_o || so_o) && !i_s) {
|
|
4985
4993
|
if (!grid_is_in_original_state) return;
|
|
@@ -4995,7 +5003,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4995
5003
|
var _close_modal_;
|
|
4996
5004
|
(_close_modal_ = close_modal_) === null || _close_modal_ === void 0 || _close_modal_();
|
|
4997
5005
|
set_extra_els_in_results_container_("");
|
|
4998
|
-
} else if (
|
|
5006
|
+
} else if (isSmall()()) {
|
|
4999
5007
|
var _open_modal_;
|
|
5000
5008
|
if ($b8hua$untrack(() => input_modal_open_ === null || input_modal_open_ === void 0 ? void 0 : input_modal_open_())) {
|
|
5001
5009
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
@@ -5031,15 +5039,6 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
5031
5039
|
dismiss_modal_: dismiss_modal_,
|
|
5032
5040
|
i18n_: i18n_
|
|
5033
5041
|
}, filterModalParent_));
|
|
5034
|
-
const {
|
|
5035
|
-
remove: remove
|
|
5036
|
-
} = $b8hua$javascript_media_query("(max-width:651px)", _ref3 => {
|
|
5037
|
-
let {
|
|
5038
|
-
matches: matches
|
|
5039
|
-
} = _ref3;
|
|
5040
|
-
return set_is_small(matches);
|
|
5041
|
-
});
|
|
5042
|
-
cleanup_promise.then(remove);
|
|
5043
5042
|
})();
|
|
5044
5043
|
get_extra_filters_button_ === null || get_extra_filters_button_ === void 0 || get_extra_filters_button_(make_open_filters_button());
|
|
5045
5044
|
get_extra_sorting_button_ === null || get_extra_sorting_button_ === void 0 || get_extra_sorting_button_(make_open_sorting_button());
|
|
@@ -5067,7 +5066,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
5067
5066
|
}
|
|
5068
5067
|
});
|
|
5069
5068
|
}
|
|
5070
|
-
function $7396052a1484264f$var$OpenFiltersButton(
|
|
5069
|
+
function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
5071
5070
|
let {
|
|
5072
5071
|
i18n_: i18n_,
|
|
5073
5072
|
search_filters_open_: search_filters_open_,
|
|
@@ -5076,7 +5075,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
5076
5075
|
tabindex_: tabindex_,
|
|
5077
5076
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
5078
5077
|
hide_button_: hide_button_
|
|
5079
|
-
} =
|
|
5078
|
+
} = _ref3;
|
|
5080
5079
|
const filters_closed = $b8hua$createMemo(() => !search_filters_open_[0]());
|
|
5081
5080
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
5082
5081
|
return $b8hua$ssr($7396052a1484264f$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle(hide_button_() ? {
|
|
@@ -5102,7 +5101,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
5102
5101
|
}
|
|
5103
5102
|
})), $b8hua$escape(i18n_.filter_text_()));
|
|
5104
5103
|
}
|
|
5105
|
-
function $7396052a1484264f$var$OpenSortingButton(
|
|
5104
|
+
function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
5106
5105
|
var _meta_of_currently_se;
|
|
5107
5106
|
let {
|
|
5108
5107
|
i18n_: i18n_,
|
|
@@ -5113,7 +5112,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
|
5113
5112
|
sort_button_width_: sort_button_width_,
|
|
5114
5113
|
tabindex_: tabindex_,
|
|
5115
5114
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
5116
|
-
} =
|
|
5115
|
+
} = _ref4;
|
|
5117
5116
|
const sorting_closed = $b8hua$createMemo(() => !search_sorting_open_[0]());
|
|
5118
5117
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
5119
5118
|
return $b8hua$ssr($7396052a1484264f$var$_tmpl$6, $b8hua$ssrHydrationKey(), "".concat(!sorting_closed() ? "major" : "", " ").concat(sorting_closed() ? "minor" : "", " toggle-button for-sorting major-minor-transition"), $b8hua$ssrAttribute("tabindex", $b8hua$escape(tabindex_, true), false) + $b8hua$ssrAttribute("aria-label", $b8hua$escape((sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(), true), false), $b8hua$ssrStyle(sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
@@ -6702,7 +6701,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6702
6701
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
6703
6702
|
filterModalParent_: filterModalParent_,
|
|
6704
6703
|
showSliderArrow_: showSliderArrow_,
|
|
6705
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6704
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6705
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6706
6706
|
} = _ref;
|
|
6707
6707
|
let results_for;
|
|
6708
6708
|
let only_show_filters_opener_;
|
|
@@ -6925,6 +6925,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6925
6925
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6926
6926
|
filterModalParent_: filterModalParent_,
|
|
6927
6927
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6928
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6928
6929
|
...extra_sort_and_filter_args_
|
|
6929
6930
|
});
|
|
6930
6931
|
$b8hua$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
@@ -12660,7 +12661,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
12660
12661
|
filterModalParent_: filterModalParent_,
|
|
12661
12662
|
class_: class_,
|
|
12662
12663
|
showSliderArrow_: showSliderArrow_,
|
|
12663
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
12664
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
12665
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
12664
12666
|
} = _ref;
|
|
12665
12667
|
const [get_sorting] = current_sorting_;
|
|
12666
12668
|
const all_products_loaded_ = $b8hua$createSignal(false);
|
|
@@ -12781,7 +12783,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
12781
12783
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
12782
12784
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
12783
12785
|
filterModalParent_: filterModalParent_,
|
|
12784
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
12786
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
12787
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
12785
12788
|
});
|
|
12786
12789
|
const results_filters = $b8hua$createSignal();
|
|
12787
12790
|
const shouldActuallyShowInputField = $b8hua$createMemo(() => {
|
|
@@ -13486,6 +13489,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
13486
13489
|
search_sorting_open_: state_.sorting_open,
|
|
13487
13490
|
expanded_filters_: state_.expanded_filters,
|
|
13488
13491
|
content_results_rows_: state_.content_results_rows,
|
|
13492
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
13489
13493
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
13490
13494
|
router_: shared_properties.router_,
|
|
13491
13495
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -14184,7 +14188,8 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
14184
14188
|
})),
|
|
14185
14189
|
product_card_template_: product_card_template,
|
|
14186
14190
|
sorting_query_param_: sorting_query_param_,
|
|
14187
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
14191
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
14192
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
14188
14193
|
});
|
|
14189
14194
|
}, "Entire CategoryPage failed");
|
|
14190
14195
|
}
|
package/server/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.7";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $5vyXB$solidjs.createSignal(false);
|
|
115
115
|
$5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -4407,6 +4407,11 @@ function $1872ceb56ede7a52$export$9bf11afa910f536e({
|
|
|
4407
4407
|
return new Promise(r => setTimeout(r, 300));
|
|
4408
4408
|
});
|
|
4409
4409
|
$5vyXB$solidjs.onCleanup(resolve_cleanup_promise);
|
|
4410
|
+
const handler = e => {
|
|
4411
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
4412
|
+
};
|
|
4413
|
+
addEventListener("keydown", handler);
|
|
4414
|
+
$5vyXB$solidjs.onCleanup(() => removeEventListener("keydown", handler));
|
|
4410
4415
|
return [$5vyXB$solidjsweb.ssr($1872ceb56ede7a52$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.close_(), true), false), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $c77c68e559a1506c$export$3b621d86b1566b2), {})), $5vyXB$solidjsweb.ssrStyle(modal_scrolling_prevented[0]() ? "overflow:hidden" : ""), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $a69e505a12a77874$export$6c6d7a51fa9aa15d), {
|
|
4411
4416
|
is_open_: [sorting_expanded, set_sorting_expanded],
|
|
4412
4417
|
get details_() {
|
|
@@ -4710,7 +4715,8 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4710
4715
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
4711
4716
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
4712
4717
|
filterModalParent_: filterModalParent_,
|
|
4713
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
4718
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
4719
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
4714
4720
|
}) {
|
|
4715
4721
|
const Self = () => {
|
|
4716
4722
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -4719,11 +4725,10 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4719
4725
|
selected_filters_: selected_filters_,
|
|
4720
4726
|
local_filter_cache_: local_filter_cache_
|
|
4721
4727
|
});
|
|
4722
|
-
const cleanup_promise = new Promise(r => $5vyXB$solidjs.onCleanup(r));
|
|
4723
4728
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
4724
4729
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4725
4730
|
const [get_current_sorting_] = current_sorting_;
|
|
4726
|
-
const
|
|
4731
|
+
const isSmall = $5vyXB$solidjs.createMemo(() => $b54e6192d0caa293$export$d9f36cf74e24d595(`(max-width:${switchToFiltersDrawerBreakpoint_() ?? 651}px)`));
|
|
4727
4732
|
const dismiss_modal_ = $5vyXB$depictaiutilishared.catchify(() => {
|
|
4728
4733
|
set_filters_open(false);
|
|
4729
4734
|
set_sorting_open(false);
|
|
@@ -4775,7 +4780,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4775
4780
|
$5vyXB$solidjs.createComputed(() => {
|
|
4776
4781
|
const fi_o = filters_open();
|
|
4777
4782
|
const so_o = sorting_open();
|
|
4778
|
-
const i_s =
|
|
4783
|
+
const i_s = isSmall()();
|
|
4779
4784
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4780
4785
|
if ((fi_o || so_o) && !i_s) {
|
|
4781
4786
|
if (!grid_is_in_original_state) return;
|
|
@@ -4790,7 +4795,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4790
4795
|
if (!filters_open() && !sorting_open()) {
|
|
4791
4796
|
close_modal_?.();
|
|
4792
4797
|
set_extra_els_in_results_container_("");
|
|
4793
|
-
} else if (
|
|
4798
|
+
} else if (isSmall()()) {
|
|
4794
4799
|
if ($5vyXB$solidjs.untrack(() => input_modal_open_?.())) {
|
|
4795
4800
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
4796
4801
|
set_filters_open(false);
|
|
@@ -4824,12 +4829,6 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
4824
4829
|
dismiss_modal_: dismiss_modal_,
|
|
4825
4830
|
i18n_: i18n_
|
|
4826
4831
|
}, filterModalParent_));
|
|
4827
|
-
const {
|
|
4828
|
-
remove: remove
|
|
4829
|
-
} = $5vyXB$depictaiutilishared.javascript_media_query("(max-width:651px)", ({
|
|
4830
|
-
matches: matches
|
|
4831
|
-
}) => set_is_small(matches));
|
|
4832
|
-
cleanup_promise.then(remove);
|
|
4833
4832
|
})();
|
|
4834
4833
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
4835
4834
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
@@ -6418,7 +6417,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6418
6417
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
6419
6418
|
filterModalParent_: filterModalParent_,
|
|
6420
6419
|
showSliderArrow_: showSliderArrow_,
|
|
6421
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6420
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6421
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6422
6422
|
}) {
|
|
6423
6423
|
let results_for;
|
|
6424
6424
|
let only_show_filters_opener_;
|
|
@@ -6623,6 +6623,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6623
6623
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6624
6624
|
filterModalParent_: filterModalParent_,
|
|
6625
6625
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6626
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6626
6627
|
...extra_sort_and_filter_args_
|
|
6627
6628
|
});
|
|
6628
6629
|
$5vyXB$depictaiutilisharedlatest.catchify((0, $276380e4607fb9fb$export$6e49da55e449af7c))({
|
|
@@ -11970,7 +11971,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
11970
11971
|
filterModalParent_: filterModalParent_,
|
|
11971
11972
|
class_: class_,
|
|
11972
11973
|
showSliderArrow_: showSliderArrow_,
|
|
11973
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
11974
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
11975
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
11974
11976
|
}) {
|
|
11975
11977
|
const [get_sorting] = current_sorting_;
|
|
11976
11978
|
const all_products_loaded_ = $5vyXB$solidjs.createSignal(false);
|
|
@@ -12079,7 +12081,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
|
|
|
12079
12081
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
12080
12082
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
12081
12083
|
filterModalParent_: filterModalParent_,
|
|
12082
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
12084
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
12085
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
12083
12086
|
});
|
|
12084
12087
|
const results_filters = $5vyXB$solidjs.createSignal();
|
|
12085
12088
|
const shouldActuallyShowInputField = $5vyXB$solidjs.createMemo(() => include_input_field_?.() ?? true); // default to showing input field
|
|
@@ -12690,6 +12693,7 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
12690
12693
|
search_sorting_open_: state_.sorting_open,
|
|
12691
12694
|
expanded_filters_: state_.expanded_filters,
|
|
12692
12695
|
content_results_rows_: state_.content_results_rows,
|
|
12696
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
12693
12697
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
12694
12698
|
router_: shared_properties.router_,
|
|
12695
12699
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -13278,7 +13282,8 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
13278
13282
|
})),
|
|
13279
13283
|
product_card_template_: product_card_template,
|
|
13280
13284
|
sorting_query_param_: sorting_query_param_,
|
|
13281
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
13285
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
13286
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
13282
13287
|
});
|
|
13283
13288
|
}, "Entire CategoryPage failed");
|
|
13284
13289
|
}
|
package/server/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.7";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1501,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1501
1501
|
class?: string;
|
|
1502
1502
|
showSliderArrow_?: boolean;
|
|
1503
1503
|
hideCount0FilterOptions_?: boolean;
|
|
1504
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1504
1505
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1505
1506
|
/**
|
|
1506
1507
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1612,6 +1613,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1612
1613
|
grid_spacing: SDKGridSpacing;
|
|
1613
1614
|
cols_at_size: SDKColsAtSize;
|
|
1614
1615
|
product_card_template: ProductCardTemplate<[OutputDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<OutputDisplay>>;
|
|
1616
|
+
switchToFiltersDrawerBreakpoint_?: number | undefined;
|
|
1615
1617
|
show_quicklinks?: boolean;
|
|
1616
1618
|
show_breadcrumbs?: boolean;
|
|
1617
1619
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$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.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.7";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $i7OB2$createSignal(false);
|
|
13
13
|
$i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
|
|
@@ -4305,6 +4305,11 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
|
|
|
4305
4305
|
return new Promise(r => setTimeout(r, 300));
|
|
4306
4306
|
});
|
|
4307
4307
|
$i7OB2$onCleanup(resolve_cleanup_promise);
|
|
4308
|
+
const handler = e => {
|
|
4309
|
+
if (e.key === "Escape") dismiss_modal_();
|
|
4310
|
+
};
|
|
4311
|
+
addEventListener("keydown", handler);
|
|
4312
|
+
$i7OB2$onCleanup(() => removeEventListener("keydown", handler));
|
|
4308
4313
|
return [$i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("aria-label", $i7OB2$escape(i18n_.close_(), true), false), $i7OB2$escape($i7OB2$createComponent((0, $19976a74d273070d$export$3b621d86b1566b2), {})), $i7OB2$ssrStyle(modal_scrolling_prevented[0]() ? "overflow:hidden" : ""), $i7OB2$escape($i7OB2$createComponent((0, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d), {
|
|
4309
4314
|
is_open_: [sorting_expanded, set_sorting_expanded],
|
|
4310
4315
|
get details_() {
|
|
@@ -4608,7 +4613,8 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4608
4613
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
4609
4614
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
4610
4615
|
filterModalParent_: filterModalParent_,
|
|
4611
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
4616
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
4617
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
4612
4618
|
}) {
|
|
4613
4619
|
const Self = () => {
|
|
4614
4620
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -4617,11 +4623,10 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4617
4623
|
selected_filters_: selected_filters_,
|
|
4618
4624
|
local_filter_cache_: local_filter_cache_
|
|
4619
4625
|
});
|
|
4620
|
-
const cleanup_promise = new Promise(r => $i7OB2$onCleanup(r));
|
|
4621
4626
|
const [filters_open, set_filters_open] = search_filters_open_;
|
|
4622
4627
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4623
4628
|
const [get_current_sorting_] = current_sorting_;
|
|
4624
|
-
const
|
|
4629
|
+
const isSmall = $i7OB2$createMemo(() => $dc9262ef6f786812$export$d9f36cf74e24d595(`(max-width:${switchToFiltersDrawerBreakpoint_() ?? 651}px)`));
|
|
4625
4630
|
const dismiss_modal_ = $i7OB2$catchify1(() => {
|
|
4626
4631
|
set_filters_open(false);
|
|
4627
4632
|
set_sorting_open(false);
|
|
@@ -4673,7 +4678,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4673
4678
|
$i7OB2$createComputed(() => {
|
|
4674
4679
|
const fi_o = filters_open();
|
|
4675
4680
|
const so_o = sorting_open();
|
|
4676
|
-
const i_s =
|
|
4681
|
+
const i_s = isSmall()();
|
|
4677
4682
|
// we need to always read all the signal if we have them in the if-statement the value of it changes when the computation runs
|
|
4678
4683
|
if ((fi_o || so_o) && !i_s) {
|
|
4679
4684
|
if (!grid_is_in_original_state) return;
|
|
@@ -4688,7 +4693,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4688
4693
|
if (!filters_open() && !sorting_open()) {
|
|
4689
4694
|
close_modal_?.();
|
|
4690
4695
|
set_extra_els_in_results_container_("");
|
|
4691
|
-
} else if (
|
|
4696
|
+
} else if (isSmall()()) {
|
|
4692
4697
|
if ($i7OB2$untrack(() => input_modal_open_?.())) {
|
|
4693
4698
|
// we don't want to shove another modal into the users face, silently close the filters for them
|
|
4694
4699
|
set_filters_open(false);
|
|
@@ -4722,12 +4727,6 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
4722
4727
|
dismiss_modal_: dismiss_modal_,
|
|
4723
4728
|
i18n_: i18n_
|
|
4724
4729
|
}, filterModalParent_));
|
|
4725
|
-
const {
|
|
4726
|
-
remove: remove
|
|
4727
|
-
} = $i7OB2$javascript_media_query("(max-width:651px)", ({
|
|
4728
|
-
matches: matches
|
|
4729
|
-
}) => set_is_small(matches));
|
|
4730
|
-
cleanup_promise.then(remove);
|
|
4731
4730
|
})();
|
|
4732
4731
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
4733
4732
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
@@ -6316,7 +6315,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6316
6315
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
6317
6316
|
filterModalParent_: filterModalParent_,
|
|
6318
6317
|
showSliderArrow_: showSliderArrow_,
|
|
6319
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6318
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6319
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6320
6320
|
}) {
|
|
6321
6321
|
let results_for;
|
|
6322
6322
|
let only_show_filters_opener_;
|
|
@@ -6521,6 +6521,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6521
6521
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6522
6522
|
filterModalParent_: filterModalParent_,
|
|
6523
6523
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6524
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6524
6525
|
...extra_sort_and_filter_args_
|
|
6525
6526
|
});
|
|
6526
6527
|
$i7OB2$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
@@ -11868,7 +11869,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
11868
11869
|
filterModalParent_: filterModalParent_,
|
|
11869
11870
|
class_: class_,
|
|
11870
11871
|
showSliderArrow_: showSliderArrow_,
|
|
11871
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
11872
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
11873
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
11872
11874
|
}) {
|
|
11873
11875
|
const [get_sorting] = current_sorting_;
|
|
11874
11876
|
const all_products_loaded_ = $i7OB2$createSignal(false);
|
|
@@ -11977,7 +11979,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
11977
11979
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
11978
11980
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
11979
11981
|
filterModalParent_: filterModalParent_,
|
|
11980
|
-
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
11982
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
11983
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
11981
11984
|
});
|
|
11982
11985
|
const results_filters = $i7OB2$createSignal();
|
|
11983
11986
|
const shouldActuallyShowInputField = $i7OB2$createMemo(() => include_input_field_?.() ?? true); // default to showing input field
|
|
@@ -12588,6 +12591,7 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
12588
12591
|
search_sorting_open_: state_.sorting_open,
|
|
12589
12592
|
expanded_filters_: state_.expanded_filters,
|
|
12590
12593
|
content_results_rows_: state_.content_results_rows,
|
|
12594
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
12591
12595
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
12592
12596
|
router_: shared_properties.router_,
|
|
12593
12597
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
@@ -13176,7 +13180,8 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
13176
13180
|
})),
|
|
13177
13181
|
product_card_template_: product_card_template,
|
|
13178
13182
|
sorting_query_param_: sorting_query_param_,
|
|
13179
|
-
filter_query_param_prefix_: filter_query_param_prefix_
|
|
13183
|
+
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
13184
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
13180
13185
|
});
|
|
13181
13186
|
}, "Entire CategoryPage failed");
|
|
13182
13187
|
}
|