@depict-ai/ui 3.0.15 → 3.0.17
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 +46 -26
- package/ES10/index.d.ts +8 -4
- package/ES10/index.js +46 -26
- package/latest/index.cjs +46 -26
- package/latest/index.d.ts +8 -4
- package/latest/index.js +46 -26
- package/package.json +1 -1
- package/server/ES10/index.cjs +32 -10
- package/server/ES10/index.d.ts +8 -4
- package/server/ES10/index.js +32 -10
- package/server/latest/index.cjs +32 -10
- package/server/latest/index.d.ts +8 -4
- package/server/latest/index.js +32 -10
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 = "3.0.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.17";
|
|
11
11
|
const $fbbadcb080ad1d4a$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
|
|
12
12
|
function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
|
|
13
13
|
return (() => {
|
|
@@ -6603,7 +6603,11 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
6603
6603
|
product_card_template_: product_card_template_,
|
|
6604
6604
|
num_placeholders_: num_placeholders_
|
|
6605
6605
|
}) : undefined);
|
|
6606
|
-
const layout = $9HbP8$createMemo(() =>
|
|
6606
|
+
const layout = $9HbP8$createMemo(() => {
|
|
6607
|
+
const incoming_layout = layout_options_().layout;
|
|
6608
|
+
if (incoming_layout === "slider-without-filters") return "slider";
|
|
6609
|
+
return incoming_layout || "grid";
|
|
6610
|
+
});
|
|
6607
6611
|
const [get_suspense_is_blocked, set_suspense_is_blocked] = $9HbP8$createSignal(false);
|
|
6608
6612
|
const block_suspense_if_needed = () => {
|
|
6609
6613
|
if (!is_just_after_plp_results_update) return;
|
|
@@ -6626,7 +6630,7 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
6626
6630
|
}, {
|
|
6627
6631
|
defer: true
|
|
6628
6632
|
}));
|
|
6629
|
-
$9HbP8$createEffect(() => layout()
|
|
6633
|
+
$9HbP8$createEffect(() => layout() !== "grid" && !doesnt_have_content_blocks() && $9HbP8$dwarn("Slider layout doesn't support content blocks"));
|
|
6630
6634
|
/*
|
|
6631
6635
|
This suspense ensures that if someone has async templates, we still show placeholders until the product cards actually have finished rendering (automagically since they're createResource's)
|
|
6632
6636
|
We're creating it outside the <Show> so that we can benefit from <For>'s optimisation between changing results
|
|
@@ -6715,9 +6719,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
6715
6719
|
} = slider;
|
|
6716
6720
|
const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
|
|
6717
6721
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
6718
|
-
$9HbP8$createComponent(Layout, $9HbP8$mergeProps({
|
|
6719
|
-
rows: "all"
|
|
6720
|
-
}, layout_options_, {
|
|
6722
|
+
$9HbP8$createComponent(Layout, $9HbP8$mergeProps(layout_options_, {
|
|
6723
|
+
rows: "all",
|
|
6721
6724
|
get cols_at_size() {
|
|
6722
6725
|
return modified_cols_at_size();
|
|
6723
6726
|
},
|
|
@@ -7265,6 +7268,7 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
7265
7268
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
7266
7269
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
7267
7270
|
set_sort_and_filter_element_: set_sort_and_filter_element_,
|
|
7271
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
7268
7272
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
7269
7273
|
filter_button_width_: filter_button_width_,
|
|
7270
7274
|
sort_button_width_: sort_button_width_,
|
|
@@ -7395,23 +7399,35 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
|
7395
7399
|
})();
|
|
7396
7400
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
7397
7401
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7402
|
+
$9HbP8$createEffect(() => {
|
|
7403
|
+
if (sort_and_filter_disabled_?.()) {
|
|
7404
|
+
// If someone changes the layout to slider-without-filters dynamically, close sorting and filters
|
|
7405
|
+
set_filters_open(false);
|
|
7406
|
+
set_sorting_open(false);
|
|
7407
|
+
}
|
|
7408
|
+
});
|
|
7409
|
+
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
7410
|
+
get when() {
|
|
7411
|
+
return !sort_and_filter_disabled_?.();
|
|
7412
|
+
},
|
|
7413
|
+
get children() {
|
|
7414
|
+
const _el$5 = $9HbP8$getNextElement($cdea4cf8c5c071ef$var$_tmpl$3),
|
|
7415
|
+
_el$6 = _el$5.firstChild,
|
|
7416
|
+
_el$7 = _el$6.firstChild,
|
|
7417
|
+
_el$8 = _el$7.firstChild,
|
|
7418
|
+
[_el$9, _co$] = $9HbP8$getNextMarker(_el$8.nextSibling),
|
|
7419
|
+
_el$10 = _el$9.nextSibling,
|
|
7420
|
+
[_el$11, _co$2] = $9HbP8$getNextMarker(_el$10.nextSibling),
|
|
7421
|
+
_el$12 = _el$11.nextSibling,
|
|
7422
|
+
[_el$13, _co$3] = $9HbP8$getNextMarker(_el$12.nextSibling);
|
|
7423
|
+
const _ref$ = set_sort_and_filter_element_;
|
|
7424
|
+
typeof _ref$ === "function" ? $9HbP8$use(_ref$, _el$5) : set_sort_and_filter_element_ = _el$5;
|
|
7425
|
+
$9HbP8$insert(_el$7, () => make_open_filters_button(true, true), _el$9, _co$);
|
|
7426
|
+
$9HbP8$insert(_el$7, () => middle_elements_?.(), _el$11, _co$2);
|
|
7427
|
+
$9HbP8$insert(_el$7, () => make_open_sorting_button(true, true), _el$13, _co$3);
|
|
7428
|
+
return _el$5;
|
|
7429
|
+
}
|
|
7430
|
+
});
|
|
7415
7431
|
};
|
|
7416
7432
|
return $9HbP8$createComponent((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
|
|
7417
7433
|
message_: "Sorting and filters failed",
|
|
@@ -8376,7 +8392,9 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
8376
8392
|
i18n_: i18n_
|
|
8377
8393
|
});
|
|
8378
8394
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
|
|
8395
|
+
// Sort and filter button
|
|
8379
8396
|
const [results_filters, set_results_filters] = $9HbP8$createSignal();
|
|
8397
|
+
// Cloned, invisible sort and filter button used for measuring the minimum size of the buttons if using embedded_num_products
|
|
8380
8398
|
const [observed_results_filters_elements, set_observed_results_filters_elements_] = $9HbP8$createSignal();
|
|
8381
8399
|
const is_slim_ = $dc9262ef6f786812$export$d9f36cf74e24d595("(max-width:600px)");
|
|
8382
8400
|
// @ts-ignore - there's no type error here when writing the code, but parcel can't generate types that include the symbol, so we need to suppress the error that creates in our pipelines
|
|
@@ -8455,6 +8473,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
8455
8473
|
$9HbP8$report1(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
|
|
8456
8474
|
results_for = $9HbP8$getNextElement($df5d81d0fe61ff21$var$_tmpl$2);
|
|
8457
8475
|
}
|
|
8476
|
+
const sort_and_filter_disabled_ = $9HbP8$createMemo(() => layout_options_().layout === "slider-without-filters");
|
|
8458
8477
|
const filters_opener = $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
|
|
8459
8478
|
set_sort_or_filter_open_: set_sort_or_filter_open_,
|
|
8460
8479
|
set_extra_els_in_results_container_: set_desktop_filter_elements,
|
|
@@ -8472,6 +8491,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
8472
8491
|
local_filter_cache_: local_filter_cache_,
|
|
8473
8492
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
8474
8493
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
8494
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
8475
8495
|
...extra_sort_and_filter_args_
|
|
8476
8496
|
});
|
|
8477
8497
|
$9HbP8$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
|
|
@@ -8961,7 +8981,7 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
8961
8981
|
return newId;
|
|
8962
8982
|
});
|
|
8963
8983
|
$9HbP8$onCleanup(() => $d8dbf52fea1773e2$export$f50b88e2a00918b5(props.on_listing_query_change)());
|
|
8964
|
-
const
|
|
8984
|
+
const is_grid = $9HbP8$createMemo(() => props.layout === "grid");
|
|
8965
8985
|
const grid_spacing_override = $9HbP8$createMemo(() => {
|
|
8966
8986
|
const {
|
|
8967
8987
|
grid_spacing: grid_spacing
|
|
@@ -9009,9 +9029,9 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
9009
9029
|
}),
|
|
9010
9030
|
i18n_: i18n_,
|
|
9011
9031
|
// default disable quicklinks and breadcrumbs for sliders
|
|
9012
|
-
show_quicklinks_: $9HbP8$createMemo(() => props.show_quicklinks ??
|
|
9032
|
+
show_quicklinks_: $9HbP8$createMemo(() => props.show_quicklinks ?? is_grid()),
|
|
9013
9033
|
category_title_: category_title,
|
|
9014
|
-
show_breadcrumbs_: $9HbP8$createMemo(() => props.show_breadcrumbs ??
|
|
9034
|
+
show_breadcrumbs_: $9HbP8$createMemo(() => props.show_breadcrumbs ?? is_grid()),
|
|
9015
9035
|
current_sorting_: current_sorting_,
|
|
9016
9036
|
router_: router_,
|
|
9017
9037
|
get_breadcrumb_accessor_: accessor => $9HbP8$createComputed(() => breadcrumb_signal_[1](accessor())),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.17",
|
|
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
|
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
83
83
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
84
84
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
85
85
|
/*! Depict.ai search and product listing SDK */
|
|
86
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.
|
|
86
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.17";
|
|
87
87
|
const $9d19451330d04c3c$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
88
88
|
function $9d19451330d04c3c$export$8be2714ec7f169ee() {
|
|
89
89
|
var _$escape2, _$escape3;
|
|
@@ -5960,7 +5960,11 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
5960
5960
|
product_card_template_: product_card_template_,
|
|
5961
5961
|
num_placeholders_: num_placeholders_
|
|
5962
5962
|
}) : undefined);
|
|
5963
|
-
const layout = $3hooq$solidjs.createMemo(() =>
|
|
5963
|
+
const layout = $3hooq$solidjs.createMemo(() => {
|
|
5964
|
+
const incoming_layout = layout_options_().layout;
|
|
5965
|
+
if (incoming_layout === "slider-without-filters") return "slider";
|
|
5966
|
+
return incoming_layout || "grid";
|
|
5967
|
+
});
|
|
5964
5968
|
const [get_suspense_is_blocked, set_suspense_is_blocked] = $3hooq$solidjs.createSignal(false);
|
|
5965
5969
|
const block_suspense_if_needed = () => {
|
|
5966
5970
|
if (!is_just_after_plp_results_update) return;
|
|
@@ -5983,7 +5987,7 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
5983
5987
|
}, {
|
|
5984
5988
|
defer: true
|
|
5985
5989
|
}));
|
|
5986
|
-
$3hooq$solidjs.createEffect(() => layout()
|
|
5990
|
+
$3hooq$solidjs.createEffect(() => layout() !== "grid" && !doesnt_have_content_blocks() && $3hooq$depictaiutilishared.dwarn("Slider layout doesn't support content blocks"));
|
|
5987
5991
|
/*
|
|
5988
5992
|
This suspense ensures that if someone has async templates, we still show placeholders until the product cards actually have finished rendering (automagically since they're createResource's)
|
|
5989
5993
|
We're creating it outside the <Show> so that we can benefit from <For>'s optimisation between changing results
|
|
@@ -6072,9 +6076,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
6072
6076
|
} = slider;
|
|
6073
6077
|
const Layout = props => $6c2c739b113a8ddf$export$445d8d3f5f706a40(props, insert_here, true);
|
|
6074
6078
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
6075
|
-
$3hooq$solidjsweb.createComponent(Layout, $3hooq$solidjsweb.mergeProps({
|
|
6076
|
-
rows: "all"
|
|
6077
|
-
}, layout_options_, {
|
|
6079
|
+
$3hooq$solidjsweb.createComponent(Layout, $3hooq$solidjsweb.mergeProps(layout_options_, {
|
|
6080
|
+
rows: "all",
|
|
6078
6081
|
get cols_at_size() {
|
|
6079
6082
|
return modified_cols_at_size();
|
|
6080
6083
|
},
|
|
@@ -6380,6 +6383,7 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6380
6383
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
6381
6384
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
6382
6385
|
set_sort_and_filter_element_: set_sort_and_filter_element_,
|
|
6386
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6383
6387
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
6384
6388
|
filter_button_width_: filter_button_width_,
|
|
6385
6389
|
sort_button_width_: sort_button_width_,
|
|
@@ -6522,7 +6526,21 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6522
6526
|
})();
|
|
6523
6527
|
get_extra_filters_button_ === null || get_extra_filters_button_ === void 0 || get_extra_filters_button_(make_open_filters_button());
|
|
6524
6528
|
get_extra_sorting_button_ === null || get_extra_sorting_button_ === void 0 || get_extra_sorting_button_(make_open_sorting_button());
|
|
6525
|
-
|
|
6529
|
+
$3hooq$solidjs.createEffect(() => {
|
|
6530
|
+
if (sort_and_filter_disabled_ !== null && sort_and_filter_disabled_ !== void 0 && sort_and_filter_disabled_()) {
|
|
6531
|
+
// If someone changes the layout to slider-without-filters dynamically, close sorting and filters
|
|
6532
|
+
set_filters_open(false);
|
|
6533
|
+
set_sorting_open(false);
|
|
6534
|
+
}
|
|
6535
|
+
});
|
|
6536
|
+
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
6537
|
+
get when() {
|
|
6538
|
+
return !(sort_and_filter_disabled_ !== null && sort_and_filter_disabled_ !== void 0 && sort_and_filter_disabled_());
|
|
6539
|
+
},
|
|
6540
|
+
get children() {
|
|
6541
|
+
return $3hooq$solidjsweb.ssr($f70cc6dfcadf0fd5$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(make_open_filters_button(true, true)), $3hooq$solidjsweb.escape(middle_elements_ === null || middle_elements_ === void 0 ? void 0 : middle_elements_()), $3hooq$solidjsweb.escape(make_open_sorting_button(true, true)));
|
|
6542
|
+
}
|
|
6543
|
+
});
|
|
6526
6544
|
};
|
|
6527
6545
|
return $3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
6528
6546
|
message_: "Sorting and filters failed",
|
|
@@ -7477,7 +7495,9 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
7477
7495
|
i18n_: i18n_
|
|
7478
7496
|
});
|
|
7479
7497
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
|
|
7498
|
+
// Sort and filter button
|
|
7480
7499
|
const [results_filters, set_results_filters] = $3hooq$solidjs.createSignal();
|
|
7500
|
+
// Cloned, invisible sort and filter button used for measuring the minimum size of the buttons if using embedded_num_products
|
|
7481
7501
|
const [observed_results_filters_elements, set_observed_results_filters_elements_] = $3hooq$solidjs.createSignal();
|
|
7482
7502
|
const is_slim_ = $3e17e871e9d0911d$export$d9f36cf74e24d595("(max-width:600px)");
|
|
7483
7503
|
// @ts-ignore - there's no type error here when writing the code, but parcel can't generate types that include the symbol, so we need to suppress the error that creates in our pipelines
|
|
@@ -7553,6 +7573,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
7553
7573
|
$3hooq$depictaiutilisharedlatest.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
|
|
7554
7574
|
results_for = $3hooq$solidjsweb.ssr($ede6c70ecdca46fe$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey());
|
|
7555
7575
|
}
|
|
7576
|
+
const sort_and_filter_disabled_ = $3hooq$solidjs.createMemo(() => layout_options_().layout === "slider-without-filters");
|
|
7556
7577
|
const filters_opener = $f70cc6dfcadf0fd5$export$d7841e452f2e59a8({
|
|
7557
7578
|
set_sort_or_filter_open_: set_sort_or_filter_open_,
|
|
7558
7579
|
set_extra_els_in_results_container_: set_desktop_filter_elements,
|
|
@@ -7570,6 +7591,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
7570
7591
|
local_filter_cache_: local_filter_cache_,
|
|
7571
7592
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
7572
7593
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
7594
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
7573
7595
|
...extra_sort_and_filter_args_
|
|
7574
7596
|
});
|
|
7575
7597
|
$3hooq$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
|
|
@@ -8089,7 +8111,7 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
8089
8111
|
return newId;
|
|
8090
8112
|
});
|
|
8091
8113
|
$3hooq$solidjs.onCleanup(() => $bdea39a75c454f4f$export$f50b88e2a00918b5(props.on_listing_query_change)());
|
|
8092
|
-
const
|
|
8114
|
+
const is_grid = $3hooq$solidjs.createMemo(() => props.layout === "grid");
|
|
8093
8115
|
const grid_spacing_override = $3hooq$solidjs.createMemo(() => {
|
|
8094
8116
|
const {
|
|
8095
8117
|
grid_spacing: grid_spacing
|
|
@@ -8139,12 +8161,12 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
8139
8161
|
// default disable quicklinks and breadcrumbs for sliders
|
|
8140
8162
|
show_quicklinks_: $3hooq$solidjs.createMemo(() => {
|
|
8141
8163
|
var _props$show_quicklink;
|
|
8142
|
-
return (_props$show_quicklink = props.show_quicklinks) !== null && _props$show_quicklink !== void 0 ? _props$show_quicklink :
|
|
8164
|
+
return (_props$show_quicklink = props.show_quicklinks) !== null && _props$show_quicklink !== void 0 ? _props$show_quicklink : is_grid();
|
|
8143
8165
|
}),
|
|
8144
8166
|
category_title_: category_title,
|
|
8145
8167
|
show_breadcrumbs_: $3hooq$solidjs.createMemo(() => {
|
|
8146
8168
|
var _props$show_breadcrum;
|
|
8147
|
-
return (_props$show_breadcrum = props.show_breadcrumbs) !== null && _props$show_breadcrum !== void 0 ? _props$show_breadcrum :
|
|
8169
|
+
return (_props$show_breadcrum = props.show_breadcrumbs) !== null && _props$show_breadcrum !== void 0 ? _props$show_breadcrum : is_grid();
|
|
8148
8170
|
}),
|
|
8149
8171
|
current_sorting_: current_sorting_,
|
|
8150
8172
|
router_: router_,
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "3.0.
|
|
13
|
+
export const version = "3.0.17";
|
|
14
14
|
export type SDKColsAtSize = [number, number?][];
|
|
15
15
|
/**
|
|
16
16
|
* Transform SDK ColsAtSize into valid Layout ColsAtSize
|
|
@@ -74,6 +74,7 @@ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, Ou
|
|
|
74
74
|
page_url_creator?: never;
|
|
75
75
|
display_transformers?: never;
|
|
76
76
|
};
|
|
77
|
+
type PossibleLayout = "grid" | "slider" | "slider-without-filters";
|
|
77
78
|
export type BaseProviderConfig<InputDisplay extends Display, PossibleTransformedDisplay extends ModernDisplay | never> = {
|
|
78
79
|
/**
|
|
79
80
|
* The merchant to use for the search.
|
|
@@ -183,10 +184,13 @@ export interface BaseCategoryPageConfig extends BaseProductListingConfig {
|
|
|
183
184
|
*/
|
|
184
185
|
showQuicklinks?: boolean;
|
|
185
186
|
/**
|
|
186
|
-
*
|
|
187
|
+
* The layout used for listing the products.
|
|
188
|
+
* 1. `"grid"` is the default and shows the products in a grid
|
|
189
|
+
* 2. `"slider"` shows the products in a slider and has default `false` for showBreadcrumbs and showQuicklinks
|
|
190
|
+
* 3. `"slider-without-filters"` is the same as `"slider"` but does also not render any sorting or filter buttons
|
|
187
191
|
* @default "grid"
|
|
188
192
|
*/
|
|
189
|
-
layout?:
|
|
193
|
+
layout?: PossibleLayout;
|
|
190
194
|
}
|
|
191
195
|
/**
|
|
192
196
|
* The listing to query Depict for. `type` can be `"listingId"` or `"externalId"` and `id` is the actual id.
|
|
@@ -970,7 +974,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
970
974
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
971
975
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
972
976
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
973
|
-
layout?:
|
|
977
|
+
layout?: PossibleLayout;
|
|
974
978
|
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
975
979
|
export function BreadCrumbs<T extends Display>({
|
|
976
980
|
depict_category
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.17";
|
|
14
14
|
const $ca6ab5f08bd28bca$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
15
15
|
function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
|
|
16
16
|
var _$escape2, _$escape3;
|
|
@@ -5887,7 +5887,11 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
5887
5887
|
product_card_template_: product_card_template_,
|
|
5888
5888
|
num_placeholders_: num_placeholders_
|
|
5889
5889
|
}) : undefined);
|
|
5890
|
-
const layout = $b8hua$createMemo(() =>
|
|
5890
|
+
const layout = $b8hua$createMemo(() => {
|
|
5891
|
+
const incoming_layout = layout_options_().layout;
|
|
5892
|
+
if (incoming_layout === "slider-without-filters") return "slider";
|
|
5893
|
+
return incoming_layout || "grid";
|
|
5894
|
+
});
|
|
5891
5895
|
const [get_suspense_is_blocked, set_suspense_is_blocked] = $b8hua$createSignal(false);
|
|
5892
5896
|
const block_suspense_if_needed = () => {
|
|
5893
5897
|
if (!is_just_after_plp_results_update) return;
|
|
@@ -5910,7 +5914,7 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
5910
5914
|
}, {
|
|
5911
5915
|
defer: true
|
|
5912
5916
|
}));
|
|
5913
|
-
$b8hua$createEffect(() => layout()
|
|
5917
|
+
$b8hua$createEffect(() => layout() !== "grid" && !doesnt_have_content_blocks() && $b8hua$dwarn("Slider layout doesn't support content blocks"));
|
|
5914
5918
|
/*
|
|
5915
5919
|
This suspense ensures that if someone has async templates, we still show placeholders until the product cards actually have finished rendering (automagically since they're createResource's)
|
|
5916
5920
|
We're creating it outside the <Show> so that we can benefit from <For>'s optimisation between changing results
|
|
@@ -5999,9 +6003,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
5999
6003
|
} = slider;
|
|
6000
6004
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
6001
6005
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
6002
|
-
$b8hua$createComponent(Layout, $b8hua$mergeProps({
|
|
6003
|
-
rows: "all"
|
|
6004
|
-
}, layout_options_, {
|
|
6006
|
+
$b8hua$createComponent(Layout, $b8hua$mergeProps(layout_options_, {
|
|
6007
|
+
rows: "all",
|
|
6005
6008
|
get cols_at_size() {
|
|
6006
6009
|
return modified_cols_at_size();
|
|
6007
6010
|
},
|
|
@@ -6307,6 +6310,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6307
6310
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
6308
6311
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
6309
6312
|
set_sort_and_filter_element_: set_sort_and_filter_element_,
|
|
6313
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
6310
6314
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
6311
6315
|
filter_button_width_: filter_button_width_,
|
|
6312
6316
|
sort_button_width_: sort_button_width_,
|
|
@@ -6449,7 +6453,21 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6449
6453
|
})();
|
|
6450
6454
|
get_extra_filters_button_ === null || get_extra_filters_button_ === void 0 || get_extra_filters_button_(make_open_filters_button());
|
|
6451
6455
|
get_extra_sorting_button_ === null || get_extra_sorting_button_ === void 0 || get_extra_sorting_button_(make_open_sorting_button());
|
|
6452
|
-
|
|
6456
|
+
$b8hua$createEffect(() => {
|
|
6457
|
+
if (sort_and_filter_disabled_ !== null && sort_and_filter_disabled_ !== void 0 && sort_and_filter_disabled_()) {
|
|
6458
|
+
// If someone changes the layout to slider-without-filters dynamically, close sorting and filters
|
|
6459
|
+
set_filters_open(false);
|
|
6460
|
+
set_sorting_open(false);
|
|
6461
|
+
}
|
|
6462
|
+
});
|
|
6463
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
6464
|
+
get when() {
|
|
6465
|
+
return !(sort_and_filter_disabled_ !== null && sort_and_filter_disabled_ !== void 0 && sort_and_filter_disabled_());
|
|
6466
|
+
},
|
|
6467
|
+
get children() {
|
|
6468
|
+
return $b8hua$ssr($7396052a1484264f$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$escape(make_open_filters_button(true, true)), $b8hua$escape(middle_elements_ === null || middle_elements_ === void 0 ? void 0 : middle_elements_()), $b8hua$escape(make_open_sorting_button(true, true)));
|
|
6469
|
+
}
|
|
6470
|
+
});
|
|
6453
6471
|
};
|
|
6454
6472
|
return $b8hua$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
6455
6473
|
message_: "Sorting and filters failed",
|
|
@@ -7404,7 +7422,9 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
7404
7422
|
i18n_: i18n_
|
|
7405
7423
|
});
|
|
7406
7424
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $b8hua$createSignal();
|
|
7425
|
+
// Sort and filter button
|
|
7407
7426
|
const [results_filters, set_results_filters] = $b8hua$createSignal();
|
|
7427
|
+
// Cloned, invisible sort and filter button used for measuring the minimum size of the buttons if using embedded_num_products
|
|
7408
7428
|
const [observed_results_filters_elements, set_observed_results_filters_elements_] = $b8hua$createSignal();
|
|
7409
7429
|
const is_slim_ = $00a5b94f0c11efbb$export$d9f36cf74e24d595("(max-width:600px)");
|
|
7410
7430
|
// @ts-ignore - there's no type error here when writing the code, but parcel can't generate types that include the symbol, so we need to suppress the error that creates in our pipelines
|
|
@@ -7480,6 +7500,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
7480
7500
|
$b8hua$report1(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
|
|
7481
7501
|
results_for = $b8hua$ssr($4b4b262708b516ee$var$_tmpl$2, $b8hua$ssrHydrationKey());
|
|
7482
7502
|
}
|
|
7503
|
+
const sort_and_filter_disabled_ = $b8hua$createMemo(() => layout_options_().layout === "slider-without-filters");
|
|
7483
7504
|
const filters_opener = $7396052a1484264f$export$d7841e452f2e59a8({
|
|
7484
7505
|
set_sort_or_filter_open_: set_sort_or_filter_open_,
|
|
7485
7506
|
set_extra_els_in_results_container_: set_desktop_filter_elements,
|
|
@@ -7497,6 +7518,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
7497
7518
|
local_filter_cache_: local_filter_cache_,
|
|
7498
7519
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
7499
7520
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
7521
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
7500
7522
|
...extra_sort_and_filter_args_
|
|
7501
7523
|
});
|
|
7502
7524
|
$b8hua$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
@@ -8016,7 +8038,7 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
8016
8038
|
return newId;
|
|
8017
8039
|
});
|
|
8018
8040
|
$b8hua$onCleanup(() => $01c33966d9ddb108$export$f50b88e2a00918b5(props.on_listing_query_change)());
|
|
8019
|
-
const
|
|
8041
|
+
const is_grid = $b8hua$createMemo(() => props.layout === "grid");
|
|
8020
8042
|
const grid_spacing_override = $b8hua$createMemo(() => {
|
|
8021
8043
|
const {
|
|
8022
8044
|
grid_spacing: grid_spacing
|
|
@@ -8066,12 +8088,12 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
8066
8088
|
// default disable quicklinks and breadcrumbs for sliders
|
|
8067
8089
|
show_quicklinks_: $b8hua$createMemo(() => {
|
|
8068
8090
|
var _props$show_quicklink;
|
|
8069
|
-
return (_props$show_quicklink = props.show_quicklinks) !== null && _props$show_quicklink !== void 0 ? _props$show_quicklink :
|
|
8091
|
+
return (_props$show_quicklink = props.show_quicklinks) !== null && _props$show_quicklink !== void 0 ? _props$show_quicklink : is_grid();
|
|
8070
8092
|
}),
|
|
8071
8093
|
category_title_: category_title,
|
|
8072
8094
|
show_breadcrumbs_: $b8hua$createMemo(() => {
|
|
8073
8095
|
var _props$show_breadcrum;
|
|
8074
|
-
return (_props$show_breadcrum = props.show_breadcrumbs) !== null && _props$show_breadcrum !== void 0 ? _props$show_breadcrum :
|
|
8096
|
+
return (_props$show_breadcrum = props.show_breadcrumbs) !== null && _props$show_breadcrum !== void 0 ? _props$show_breadcrum : is_grid();
|
|
8075
8097
|
}),
|
|
8076
8098
|
current_sorting_: current_sorting_,
|
|
8077
8099
|
router_: router_,
|
package/server/latest/index.cjs
CHANGED
|
@@ -77,7 +77,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
77
77
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
78
78
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
79
79
|
/*! Depict.ai search and product listing SDK */
|
|
80
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.
|
|
80
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.17";
|
|
81
81
|
const $0f313083912e447a$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
82
82
|
function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
|
|
83
83
|
return $5vyXB$solidjsweb.ssr($0f313083912e447a$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("width", $5vyXB$solidjsweb.escape(props.width_, true) ?? 14, false) + $5vyXB$solidjsweb.ssrAttribute("height", $5vyXB$solidjsweb.escape(props.height_, true) ?? 26, false));
|
|
@@ -5559,7 +5559,11 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
5559
5559
|
product_card_template_: product_card_template_,
|
|
5560
5560
|
num_placeholders_: num_placeholders_
|
|
5561
5561
|
}) : undefined);
|
|
5562
|
-
const layout = $5vyXB$solidjs.createMemo(() =>
|
|
5562
|
+
const layout = $5vyXB$solidjs.createMemo(() => {
|
|
5563
|
+
const incoming_layout = layout_options_().layout;
|
|
5564
|
+
if (incoming_layout === "slider-without-filters") return "slider";
|
|
5565
|
+
return incoming_layout || "grid";
|
|
5566
|
+
});
|
|
5563
5567
|
const [get_suspense_is_blocked, set_suspense_is_blocked] = $5vyXB$solidjs.createSignal(false);
|
|
5564
5568
|
const block_suspense_if_needed = () => {
|
|
5565
5569
|
if (!is_just_after_plp_results_update) return;
|
|
@@ -5582,7 +5586,7 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
5582
5586
|
}, {
|
|
5583
5587
|
defer: true
|
|
5584
5588
|
}));
|
|
5585
|
-
$5vyXB$solidjs.createEffect(() => layout()
|
|
5589
|
+
$5vyXB$solidjs.createEffect(() => layout() !== "grid" && !doesnt_have_content_blocks() && $5vyXB$depictaiutilishared.dwarn("Slider layout doesn't support content blocks"));
|
|
5586
5590
|
/*
|
|
5587
5591
|
This suspense ensures that if someone has async templates, we still show placeholders until the product cards actually have finished rendering (automagically since they're createResource's)
|
|
5588
5592
|
We're creating it outside the <Show> so that we can benefit from <For>'s optimisation between changing results
|
|
@@ -5671,9 +5675,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
5671
5675
|
} = slider;
|
|
5672
5676
|
const Layout = props => $f48d0fbb00835aaa$export$445d8d3f5f706a40(props, insert_here, true);
|
|
5673
5677
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
5674
|
-
$5vyXB$solidjsweb.createComponent(Layout, $5vyXB$solidjsweb.mergeProps({
|
|
5675
|
-
rows: "all"
|
|
5676
|
-
}, layout_options_, {
|
|
5678
|
+
$5vyXB$solidjsweb.createComponent(Layout, $5vyXB$solidjsweb.mergeProps(layout_options_, {
|
|
5679
|
+
rows: "all",
|
|
5677
5680
|
get cols_at_size() {
|
|
5678
5681
|
return modified_cols_at_size();
|
|
5679
5682
|
},
|
|
@@ -5959,6 +5962,7 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
5959
5962
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
5960
5963
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
5961
5964
|
set_sort_and_filter_element_: set_sort_and_filter_element_,
|
|
5965
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
5962
5966
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
5963
5967
|
filter_button_width_: filter_button_width_,
|
|
5964
5968
|
sort_button_width_: sort_button_width_,
|
|
@@ -6081,7 +6085,21 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6081
6085
|
})();
|
|
6082
6086
|
get_extra_filters_button_?.(make_open_filters_button());
|
|
6083
6087
|
get_extra_sorting_button_?.(make_open_sorting_button());
|
|
6084
|
-
|
|
6088
|
+
$5vyXB$solidjs.createEffect(() => {
|
|
6089
|
+
if (sort_and_filter_disabled_?.()) {
|
|
6090
|
+
// If someone changes the layout to slider-without-filters dynamically, close sorting and filters
|
|
6091
|
+
set_filters_open(false);
|
|
6092
|
+
set_sorting_open(false);
|
|
6093
|
+
}
|
|
6094
|
+
});
|
|
6095
|
+
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
6096
|
+
get when() {
|
|
6097
|
+
return !sort_and_filter_disabled_?.();
|
|
6098
|
+
},
|
|
6099
|
+
get children() {
|
|
6100
|
+
return $5vyXB$solidjsweb.ssr($f8f64d05c525825b$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(make_open_filters_button(true, true)), $5vyXB$solidjsweb.escape(middle_elements_?.()), $5vyXB$solidjsweb.escape(make_open_sorting_button(true, true)));
|
|
6101
|
+
}
|
|
6102
|
+
});
|
|
6085
6103
|
};
|
|
6086
6104
|
return $5vyXB$solidjsweb.createComponent((0, $edafe91daf3091d7$export$b69d0d92862de18b), {
|
|
6087
6105
|
message_: "Sorting and filters failed",
|
|
@@ -6974,7 +6992,9 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6974
6992
|
i18n_: i18n_
|
|
6975
6993
|
});
|
|
6976
6994
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = $5vyXB$solidjs.createSignal();
|
|
6995
|
+
// Sort and filter button
|
|
6977
6996
|
const [results_filters, set_results_filters] = $5vyXB$solidjs.createSignal();
|
|
6997
|
+
// Cloned, invisible sort and filter button used for measuring the minimum size of the buttons if using embedded_num_products
|
|
6978
6998
|
const [observed_results_filters_elements, set_observed_results_filters_elements_] = $5vyXB$solidjs.createSignal();
|
|
6979
6999
|
const is_slim_ = $b54e6192d0caa293$export$d9f36cf74e24d595("(max-width:600px)");
|
|
6980
7000
|
// @ts-ignore - there's no type error here when writing the code, but parcel can't generate types that include the symbol, so we need to suppress the error that creates in our pipelines
|
|
@@ -7043,6 +7063,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
7043
7063
|
$5vyXB$depictaiutilisharedlatest.report(new Error("Unrecognised category_title_type, UI will look messed up"), "error");
|
|
7044
7064
|
results_for = $5vyXB$solidjsweb.ssr($840d88a04b2d22a7$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey());
|
|
7045
7065
|
}
|
|
7066
|
+
const sort_and_filter_disabled_ = $5vyXB$solidjs.createMemo(() => layout_options_().layout === "slider-without-filters");
|
|
7046
7067
|
const filters_opener = $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
7047
7068
|
set_sort_or_filter_open_: set_sort_or_filter_open_,
|
|
7048
7069
|
set_extra_els_in_results_container_: set_desktop_filter_elements,
|
|
@@ -7060,6 +7081,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
7060
7081
|
local_filter_cache_: local_filter_cache_,
|
|
7061
7082
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
7062
7083
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
7084
|
+
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
7063
7085
|
...extra_sort_and_filter_args_
|
|
7064
7086
|
});
|
|
7065
7087
|
$5vyXB$depictaiutilisharedlatest.catchify((0, $276380e4607fb9fb$export$6e49da55e449af7c))({
|
|
@@ -7505,7 +7527,7 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
7505
7527
|
return newId;
|
|
7506
7528
|
});
|
|
7507
7529
|
$5vyXB$solidjs.onCleanup(() => $deaaf04362a1bc71$export$f50b88e2a00918b5(props.on_listing_query_change)());
|
|
7508
|
-
const
|
|
7530
|
+
const is_grid = $5vyXB$solidjs.createMemo(() => props.layout === "grid");
|
|
7509
7531
|
const grid_spacing_override = $5vyXB$solidjs.createMemo(() => {
|
|
7510
7532
|
const {
|
|
7511
7533
|
grid_spacing: grid_spacing
|
|
@@ -7553,9 +7575,9 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
7553
7575
|
}),
|
|
7554
7576
|
i18n_: i18n_,
|
|
7555
7577
|
// default disable quicklinks and breadcrumbs for sliders
|
|
7556
|
-
show_quicklinks_: $5vyXB$solidjs.createMemo(() => props.show_quicklinks ??
|
|
7578
|
+
show_quicklinks_: $5vyXB$solidjs.createMemo(() => props.show_quicklinks ?? is_grid()),
|
|
7557
7579
|
category_title_: category_title,
|
|
7558
|
-
show_breadcrumbs_: $5vyXB$solidjs.createMemo(() => props.show_breadcrumbs ??
|
|
7580
|
+
show_breadcrumbs_: $5vyXB$solidjs.createMemo(() => props.show_breadcrumbs ?? is_grid()),
|
|
7559
7581
|
current_sorting_: current_sorting_,
|
|
7560
7582
|
router_: router_,
|
|
7561
7583
|
get_breadcrumb_accessor_: accessor => $5vyXB$solidjs.createComputed(() => breadcrumb_signal_[1](accessor())),
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "3.0.
|
|
13
|
+
export const version = "3.0.17";
|
|
14
14
|
export type SDKColsAtSize = [number, number?][];
|
|
15
15
|
/**
|
|
16
16
|
* Transform SDK ColsAtSize into valid Layout ColsAtSize
|
|
@@ -74,6 +74,7 @@ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, Ou
|
|
|
74
74
|
page_url_creator?: never;
|
|
75
75
|
display_transformers?: never;
|
|
76
76
|
};
|
|
77
|
+
type PossibleLayout = "grid" | "slider" | "slider-without-filters";
|
|
77
78
|
export type BaseProviderConfig<InputDisplay extends Display, PossibleTransformedDisplay extends ModernDisplay | never> = {
|
|
78
79
|
/**
|
|
79
80
|
* The merchant to use for the search.
|
|
@@ -183,10 +184,13 @@ export interface BaseCategoryPageConfig extends BaseProductListingConfig {
|
|
|
183
184
|
*/
|
|
184
185
|
showQuicklinks?: boolean;
|
|
185
186
|
/**
|
|
186
|
-
*
|
|
187
|
+
* The layout used for listing the products.
|
|
188
|
+
* 1. `"grid"` is the default and shows the products in a grid
|
|
189
|
+
* 2. `"slider"` shows the products in a slider and has default `false` for showBreadcrumbs and showQuicklinks
|
|
190
|
+
* 3. `"slider-without-filters"` is the same as `"slider"` but does also not render any sorting or filter buttons
|
|
187
191
|
* @default "grid"
|
|
188
192
|
*/
|
|
189
|
-
layout?:
|
|
193
|
+
layout?: PossibleLayout;
|
|
190
194
|
}
|
|
191
195
|
/**
|
|
192
196
|
* The listing to query Depict for. `type` can be `"listingId"` or `"externalId"` and `id` is the actual id.
|
|
@@ -970,7 +974,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
970
974
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
971
975
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
972
976
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
973
|
-
layout?:
|
|
977
|
+
layout?: PossibleLayout;
|
|
974
978
|
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
975
979
|
export function BreadCrumbs<T extends Display>({
|
|
976
980
|
depict_category
|