@depict-ai/ui 4.3.11 → 4.3.12
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 +45 -56
- package/ES10/index.d.ts +4 -3
- package/ES10/index.js +46 -57
- package/latest/index.cjs +47 -55
- package/latest/index.d.ts +4 -3
- package/latest/index.js +48 -56
- package/package.json +2 -2
- package/server/ES10/index.cjs +35 -49
- package/server/ES10/index.d.ts +4 -3
- package/server/ES10/index.js +36 -50
- package/server/latest/index.cjs +37 -48
- package/server/latest/index.d.ts +4 -3
- package/server/latest/index.js +38 -49
package/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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.3.
|
|
13
|
+
export const version = "4.3.12";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -877,6 +877,7 @@ export function LooksSliderOrGrid(props: {
|
|
|
877
877
|
FavoriteButton_?: (props: {
|
|
878
878
|
display_: Accessor<ModernDisplay | null | undefined>;
|
|
879
879
|
}) => JSX.Element;
|
|
880
|
+
NoResultsFallback_?: () => JSX.Element;
|
|
880
881
|
displayTransformers_?: DisplayTransformers<ModernDisplay, ModernDisplayWithPageUrl<ModernDisplay>>;
|
|
881
882
|
/**
|
|
882
883
|
* If provided, will render as grid instead of slider
|
|
@@ -1398,7 +1399,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1398
1399
|
* Open the modal with support for alignment.
|
|
1399
1400
|
* @returns {void}
|
|
1400
1401
|
*/
|
|
1401
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1402
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1402
1403
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1403
1404
|
export interface PageReplacer {
|
|
1404
1405
|
readonly render_: () => Node_Array;
|
|
@@ -1476,5 +1477,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1476
1477
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1477
1478
|
layout?: PossibleLayout;
|
|
1478
1479
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1479
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1480
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1480
1481
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, dwarn as $9HbP8$dwarn, slider_fractional_factory as $9HbP8$slider_fractional_factory, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, catchify as $9HbP8$catchify, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, observer as $9HbP8$observer, javascript_media_query as $9HbP8$javascript_media_query, queueMacroTask as $9HbP8$queueMacroTask, findMostFrequentItem as $9HbP8$findMostFrequentItem, standard_price_format as $9HbP8$standard_price_format, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, use_href_accessor as $9HbP8$use_href_accessor, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params,
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, dwarn as $9HbP8$dwarn, slider_fractional_factory as $9HbP8$slider_fractional_factory, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, catchify as $9HbP8$catchify, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, observer as $9HbP8$observer, javascript_media_query as $9HbP8$javascript_media_query, queueMacroTask as $9HbP8$queueMacroTask, findMostFrequentItem as $9HbP8$findMostFrequentItem, standard_price_format as $9HbP8$standard_price_format, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, use_href_accessor as $9HbP8$use_href_accessor, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, insert_surfaces as $9HbP8$insert_surfaces, is_debug as $9HbP8$is_debug } from "@depict-ai/utilishared/latest";
|
|
2
2
|
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps, effect as $9HbP8$effect, className as $9HbP8$className, isServer as $9HbP8$isServer, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, getNextMarker as $9HbP8$getNextMarker, classList as $9HbP8$classList, setAttribute as $9HbP8$setAttribute, style as $9HbP8$style, use as $9HbP8$use, setProperty as $9HbP8$setProperty, Dynamic as $9HbP8$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $9HbP8$createSignal, createMemo as $9HbP8$createMemo, createResource as $9HbP8$createResource, createEffect as $9HbP8$createEffect, Show as $9HbP8$Show, mergeProps as $9HbP8$mergeProps1, Suspense as $9HbP8$Suspense, untrack as $9HbP8$untrack, createRenderEffect as $9HbP8$createRenderEffect, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, onCleanup as $9HbP8$onCleanup, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, splitProps as $9HbP8$splitProps, on as $9HbP8$on, batch as $9HbP8$batch, createSelector as $9HbP8$createSelector, children as $9HbP8$children, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
|
|
4
4
|
import { ListenableSet as $9HbP8$ListenableSet, catchify as $9HbP8$catchify1, use_href_accessor as $9HbP8$use_href_accessor1, report as $9HbP8$report1 } from "@depict-ai/utilishared/latest";
|
|
@@ -7,7 +7,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.3.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.3.12";
|
|
11
11
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
12
12
|
const cols_at_size = [];
|
|
13
13
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -644,7 +644,8 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
|
644
644
|
recommendations_resource_: recommendations_resource_,
|
|
645
645
|
product_card_template_: product_card_template_,
|
|
646
646
|
layout_options_: layout_options_,
|
|
647
|
-
title_: title_
|
|
647
|
+
title_: title_,
|
|
648
|
+
NoResultsFallback_: NoResultsFallback_
|
|
648
649
|
}) {
|
|
649
650
|
const is_showing_something = $9HbP8$createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
650
651
|
const title = $9HbP8$createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
@@ -702,6 +703,9 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
|
702
703
|
get when() {
|
|
703
704
|
return is_showing_something();
|
|
704
705
|
},
|
|
706
|
+
get fallback() {
|
|
707
|
+
return NoResultsFallback_?.();
|
|
708
|
+
},
|
|
705
709
|
children: slider
|
|
706
710
|
});
|
|
707
711
|
}
|
|
@@ -1783,7 +1787,8 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
|
1783
1787
|
layout_options_: layout_options_,
|
|
1784
1788
|
title_: title_,
|
|
1785
1789
|
max_rows_: max_rows_,
|
|
1786
|
-
view_more_button_: view_more_button_
|
|
1790
|
+
view_more_button_: view_more_button_,
|
|
1791
|
+
NoResultsFallback_: NoResultsFallback_
|
|
1787
1792
|
}) {
|
|
1788
1793
|
const rows_object_ = $9HbP8$createMemo(() => {
|
|
1789
1794
|
const view_more_button = view_more_button_?.();
|
|
@@ -1860,6 +1865,9 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
|
1860
1865
|
get when() {
|
|
1861
1866
|
return is_showing_something();
|
|
1862
1867
|
},
|
|
1868
|
+
get fallback() {
|
|
1869
|
+
return NoResultsFallback_?.();
|
|
1870
|
+
},
|
|
1863
1871
|
children: elements
|
|
1864
1872
|
});
|
|
1865
1873
|
}
|
|
@@ -1927,7 +1935,8 @@ function $07ef910e8ef6b783$export$2c9f9bf2092486aa(props) {
|
|
|
1927
1935
|
layout_options_: $9HbP8$createMemo(() => ({
|
|
1928
1936
|
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1929
1937
|
...grid_spacing_override()
|
|
1930
|
-
}))
|
|
1938
|
+
})),
|
|
1939
|
+
NoResultsFallback_: () => props.NoResultsFallback_
|
|
1931
1940
|
};
|
|
1932
1941
|
$9HbP8$createEffect(() => {
|
|
1933
1942
|
const {
|
|
@@ -7066,44 +7075,20 @@ function $0b6bc2f8309efa8a$export$e5c2828934226505({
|
|
|
7066
7075
|
expanded_: expanded_,
|
|
7067
7076
|
i18n_: i18n_
|
|
7068
7077
|
}) {
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
var _ref$2 = second_span;
|
|
7082
|
-
typeof _ref$2 === "function" ? $9HbP8$use(_ref$2, _el$3) : second_span = _el$3;
|
|
7083
|
-
$9HbP8$effect(() => $9HbP8$setAttribute(_el$, "aria-label", expanded_() ? i18n_.morphing_sign_expanded_aria_label_() : i18n_.morphing_sign_collapsed_aria_label_()));
|
|
7078
|
+
return (() => {
|
|
7079
|
+
var _el$ = $9HbP8$getNextElement($0b6bc2f8309efa8a$var$_tmpl$);
|
|
7080
|
+
$9HbP8$effect(_p$ => {
|
|
7081
|
+
var _v$ = !!expanded_(),
|
|
7082
|
+
_v$2 = expanded_() ? i18n_.morphing_sign_expanded_aria_label_() : i18n_.morphing_sign_collapsed_aria_label_();
|
|
7083
|
+
_v$ !== _p$.e && _el$.classList.toggle("expanded", _p$.e = _v$);
|
|
7084
|
+
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$, "aria-label", _p$.t = _v$2);
|
|
7085
|
+
return _p$;
|
|
7086
|
+
}, {
|
|
7087
|
+
e: undefined,
|
|
7088
|
+
t: undefined
|
|
7089
|
+
});
|
|
7084
7090
|
return _el$;
|
|
7085
7091
|
})();
|
|
7086
|
-
const [is_in_dom, set_is_in_dom] = $9HbP8$createSignal(false);
|
|
7087
|
-
(0, $9HbP8$observer).wait_for_element(outer_div).then($9HbP8$catchify(() => set_is_in_dom(true)));
|
|
7088
|
-
$9HbP8$createEffect(() => {
|
|
7089
|
-
if (!is_in_dom())
|
|
7090
|
-
// wait for us to being in DOM as animations don't work otherwise
|
|
7091
|
-
return;
|
|
7092
|
-
try {
|
|
7093
|
-
const expanded = expanded_();
|
|
7094
|
-
for (const span of [first_span, second_span]) span.animate([{
|
|
7095
|
-
transform: `rotate(${expanded ? 90 : "0"}deg)`
|
|
7096
|
-
}], animation_options);
|
|
7097
|
-
const percentage_value = `${expanded ? 50 : 25}%`;
|
|
7098
|
-
second_span.animate([{
|
|
7099
|
-
left: percentage_value,
|
|
7100
|
-
right: percentage_value
|
|
7101
|
-
}], animation_options);
|
|
7102
|
-
} catch (e) {
|
|
7103
|
-
$9HbP8$dlog("partial keyframes probably not supported", e);
|
|
7104
|
-
}
|
|
7105
|
-
});
|
|
7106
|
-
return outer_div;
|
|
7107
7092
|
}
|
|
7108
7093
|
var $522a690e0e2bd46d$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<span class=highlighted-part>`);
|
|
7109
7094
|
const $522a690e0e2bd46d$var$dont_cut_in_between_less_than_characters = 30;
|
|
@@ -12444,7 +12429,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
|
|
|
12444
12429
|
function $b26bdbd081f63e3f$export$9ff751cd77687edc({
|
|
12445
12430
|
search_results_: search_results_,
|
|
12446
12431
|
router_: router_,
|
|
12447
|
-
|
|
12432
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
12448
12433
|
get_search_query_: get_search_query_
|
|
12449
12434
|
}) {
|
|
12450
12435
|
const content_results = $9HbP8$createMemo(() => search_results_()?.content_search_links);
|
|
@@ -12460,7 +12445,11 @@ function $b26bdbd081f63e3f$export$9ff751cd77687edc({
|
|
|
12460
12445
|
});
|
|
12461
12446
|
$9HbP8$createEffect(() => {
|
|
12462
12447
|
const results = content_results();
|
|
12463
|
-
|
|
12448
|
+
const numberResults = Array.isArray(results) ? results.length : 0;
|
|
12449
|
+
setNumberContentResultsPerQuery_(prev => {
|
|
12450
|
+
prev.set($9HbP8$untrack(get_search_query_), numberResults);
|
|
12451
|
+
return prev;
|
|
12452
|
+
});
|
|
12464
12453
|
});
|
|
12465
12454
|
return $9HbP8$createComponent((0, $9HbP8$For), {
|
|
12466
12455
|
get each() {
|
|
@@ -12477,7 +12466,8 @@ function $b26bdbd081f63e3f$export$9ff751cd77687edc({
|
|
|
12477
12466
|
}
|
|
12478
12467
|
function $9d5b3ed1fc91c672$export$4405d077f0a20494({
|
|
12479
12468
|
content_results_rows_: [get_history_state_content_results_rows],
|
|
12480
|
-
cols_at_size_: cols_at_size_
|
|
12469
|
+
cols_at_size_: cols_at_size_,
|
|
12470
|
+
overrideAmount_: overrideAmount_
|
|
12481
12471
|
}) {
|
|
12482
12472
|
const colsShowingNow = $77348875ac090fcd$export$a79e666719b3647c(cols_at_size_);
|
|
12483
12473
|
const largest_column = $9HbP8$createMemo(() => {
|
|
@@ -12485,9 +12475,12 @@ function $9d5b3ed1fc91c672$export$4405d077f0a20494({
|
|
|
12485
12475
|
if (isNaN(largest_in_cols_at_size) || Math.abs(largest_in_cols_at_size) === Infinity) return 4; // fallback to something big so we always have the right amount of placeholders
|
|
12486
12476
|
return largest_in_cols_at_size;
|
|
12487
12477
|
});
|
|
12488
|
-
const num_placeholders = $9HbP8$createMemo(() =>
|
|
12489
|
-
|
|
12490
|
-
|
|
12478
|
+
const num_placeholders = $9HbP8$createMemo(() => {
|
|
12479
|
+
const override = overrideAmount_();
|
|
12480
|
+
if (override !== undefined) return override;
|
|
12481
|
+
// Use how many columns we're actually showing, if available, so that we're showing exactly as many placeholders as we'd show content, so that the view more button doesn't appear/disappear and makes the layout shift
|
|
12482
|
+
return (get_history_state_content_results_rows() ?? (0, $49de9d31aeea1b5e$export$70ceae36059a1036)) * (colsShowingNow() || largest_column());
|
|
12483
|
+
});
|
|
12491
12484
|
return $9HbP8$createComponent((0, $9HbP8$Index), {
|
|
12492
12485
|
get each() {
|
|
12493
12486
|
return Array.from({
|
|
@@ -12517,15 +12510,13 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
|
|
|
12517
12510
|
number_: num_results,
|
|
12518
12511
|
i18n_: i18n_
|
|
12519
12512
|
});
|
|
12520
|
-
const
|
|
12521
|
-
|
|
12522
|
-
const placeholders_enabled = $9HbP8$createMemo(() => {
|
|
12523
|
-
// don't show placeholders when the user toggles filters
|
|
12524
|
-
check_query();
|
|
12525
|
-
return !queries_without_content_results_.has(get_search_query_());
|
|
12513
|
+
const [numberContentResultsPerQuery, setNumberContentResultsPerQuery_] = $9HbP8$createSignal(new Map(), {
|
|
12514
|
+
equals: false
|
|
12526
12515
|
});
|
|
12516
|
+
const contentResultsForCurrentQuery = $9HbP8$createMemo(() => numberContentResultsPerQuery().get(get_search_query_()));
|
|
12517
|
+
// Don't show placeholder if we know there will not be any content results and someone is just toggling filters
|
|
12518
|
+
const placeholders_enabled = $9HbP8$createMemo(() => contentResultsForCurrentQuery() !== 0);
|
|
12527
12519
|
const rows_object = $49de9d31aeea1b5e$var$make_state_saved_rows(content_results_rows_, i18n_);
|
|
12528
|
-
for (const ev of ["add", "delete"]) queries_without_content_results_.addEventListener(ev, () => set_check_query(prev => !prev));
|
|
12529
12520
|
return (() => {
|
|
12530
12521
|
var _el$ = $9HbP8$getNextElement($49de9d31aeea1b5e$var$_tmpl$),
|
|
12531
12522
|
_el$2 = _el$.firstChild,
|
|
@@ -12555,14 +12546,15 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
|
|
|
12555
12546
|
content_results_rows_: content_results_rows_,
|
|
12556
12547
|
get cols_at_size_() {
|
|
12557
12548
|
return $9HbP8$createMemo(() => layout_options_().cols_at_size);
|
|
12558
|
-
}
|
|
12549
|
+
},
|
|
12550
|
+
overrideAmount_: contentResultsForCurrentQuery
|
|
12559
12551
|
});
|
|
12560
12552
|
},
|
|
12561
12553
|
get children() {
|
|
12562
12554
|
return $9HbP8$createComponent((0, $b26bdbd081f63e3f$export$9ff751cd77687edc), {
|
|
12563
12555
|
router_: router_,
|
|
12564
12556
|
search_results_: search_results_,
|
|
12565
|
-
|
|
12557
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
12566
12558
|
get_search_query_: get_search_query_
|
|
12567
12559
|
});
|
|
12568
12560
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.12",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^4.0.
|
|
239
|
+
"@depict-ai/plp-styling": "^4.0.4",
|
|
240
240
|
"@depict-ai/types": "^5.1.2",
|
|
241
241
|
"@depict-ai/utilishared": "^2.1.2",
|
|
242
242
|
"solid-js": "^1.8.12"
|
package/server/ES10/index.cjs
CHANGED
|
@@ -100,7 +100,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
100
100
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
101
101
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
102
102
|
/*! Depict.ai search and product listing SDK */
|
|
103
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.3.
|
|
103
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.3.12";
|
|
104
104
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
105
105
|
const cols_at_size = [];
|
|
106
106
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -704,7 +704,8 @@ function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
|
704
704
|
recommendations_resource_: recommendations_resource_,
|
|
705
705
|
product_card_template_: product_card_template_,
|
|
706
706
|
layout_options_: layout_options_,
|
|
707
|
-
title_: title_
|
|
707
|
+
title_: title_,
|
|
708
|
+
NoResultsFallback_: NoResultsFallback_
|
|
708
709
|
} = _ref;
|
|
709
710
|
const is_showing_something = $3hooq$solidjs.createMemo(() => {
|
|
710
711
|
var _recommendations_reso;
|
|
@@ -763,6 +764,9 @@ function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
|
763
764
|
get when() {
|
|
764
765
|
return is_showing_something();
|
|
765
766
|
},
|
|
767
|
+
get fallback() {
|
|
768
|
+
return NoResultsFallback_ === null || NoResultsFallback_ === void 0 ? void 0 : NoResultsFallback_();
|
|
769
|
+
},
|
|
766
770
|
children: slider
|
|
767
771
|
});
|
|
768
772
|
}
|
|
@@ -1744,7 +1748,8 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
1744
1748
|
layout_options_: layout_options_,
|
|
1745
1749
|
title_: title_,
|
|
1746
1750
|
max_rows_: max_rows_,
|
|
1747
|
-
view_more_button_: view_more_button_
|
|
1751
|
+
view_more_button_: view_more_button_,
|
|
1752
|
+
NoResultsFallback_: NoResultsFallback_
|
|
1748
1753
|
} = _ref;
|
|
1749
1754
|
const rows_object_ = $3hooq$solidjs.createMemo(() => {
|
|
1750
1755
|
var _view_more_button$row;
|
|
@@ -1810,6 +1815,9 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
1810
1815
|
get when() {
|
|
1811
1816
|
return is_showing_something();
|
|
1812
1817
|
},
|
|
1818
|
+
get fallback() {
|
|
1819
|
+
return NoResultsFallback_ === null || NoResultsFallback_ === void 0 ? void 0 : NoResultsFallback_();
|
|
1820
|
+
},
|
|
1813
1821
|
children: elements
|
|
1814
1822
|
});
|
|
1815
1823
|
}
|
|
@@ -1879,7 +1887,8 @@ function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
|
1879
1887
|
layout_options_: $3hooq$solidjs.createMemo(() => ({
|
|
1880
1888
|
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
1881
1889
|
...grid_spacing_override()
|
|
1882
|
-
}))
|
|
1890
|
+
})),
|
|
1891
|
+
NoResultsFallback_: () => props.NoResultsFallback_
|
|
1883
1892
|
};
|
|
1884
1893
|
$3hooq$solidjs.createEffect(() => {
|
|
1885
1894
|
const {
|
|
@@ -5773,40 +5782,13 @@ function $0257c760a99bfacb$var$set_range_with_sanitation(min_, max_, current_ran
|
|
|
5773
5782
|
new_value[index] = value_as_number;
|
|
5774
5783
|
current_range_signal[1](new_value);
|
|
5775
5784
|
}
|
|
5776
|
-
var $ac040bdfeed58ee4$var$_tmpl$ = ["<div", ' class="
|
|
5785
|
+
var $ac040bdfeed58ee4$var$_tmpl$ = ["<div", ' class="', '" role="img"', "><span></span><span></span></div>"];
|
|
5777
5786
|
function $ac040bdfeed58ee4$export$e5c2828934226505(_ref) {
|
|
5778
5787
|
let {
|
|
5779
5788
|
expanded_: expanded_,
|
|
5780
5789
|
i18n_: i18n_
|
|
5781
5790
|
} = _ref;
|
|
5782
|
-
|
|
5783
|
-
let second_span;
|
|
5784
|
-
const animation_options = {
|
|
5785
|
-
fill: "forwards",
|
|
5786
|
-
duration: 200
|
|
5787
|
-
};
|
|
5788
|
-
const outer_div = $3hooq$solidjsweb.ssr($ac040bdfeed58ee4$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", expanded_() ? $3hooq$solidjsweb.escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $3hooq$solidjsweb.escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5789
|
-
const [is_in_dom, set_is_in_dom] = $3hooq$solidjs.createSignal(false);
|
|
5790
|
-
(0, $3hooq$depictaiutilishared.observer).wait_for_element(outer_div).then($3hooq$depictaiutilishared.catchify(() => set_is_in_dom(true)));
|
|
5791
|
-
$3hooq$solidjs.createEffect(() => {
|
|
5792
|
-
if (!is_in_dom())
|
|
5793
|
-
// wait for us to being in DOM as animations don't work otherwise
|
|
5794
|
-
return;
|
|
5795
|
-
try {
|
|
5796
|
-
const expanded = expanded_();
|
|
5797
|
-
for (const span of [first_span, second_span]) span.animate([{
|
|
5798
|
-
transform: "rotate(".concat(expanded ? 90 : "0", "deg)")
|
|
5799
|
-
}], animation_options);
|
|
5800
|
-
const percentage_value = "".concat(expanded ? 50 : 25, "%");
|
|
5801
|
-
second_span.animate([{
|
|
5802
|
-
left: percentage_value,
|
|
5803
|
-
right: percentage_value
|
|
5804
|
-
}], animation_options);
|
|
5805
|
-
} catch (e) {
|
|
5806
|
-
$3hooq$depictaiutilishared.dlog("partial keyframes probably not supported", e);
|
|
5807
|
-
}
|
|
5808
|
-
});
|
|
5809
|
-
return outer_div;
|
|
5791
|
+
return $3hooq$solidjsweb.ssr($ac040bdfeed58ee4$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "morphing-sign ".concat(expanded_() ? "expanded" : ""), $3hooq$solidjsweb.ssrAttribute("aria-label", expanded_() ? $3hooq$solidjsweb.escape(i18n_.morphing_sign_expanded_aria_label_(), true) : $3hooq$solidjsweb.escape(i18n_.morphing_sign_collapsed_aria_label_(), true), false));
|
|
5810
5792
|
}
|
|
5811
5793
|
var $99472afa7112c427$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"];
|
|
5812
5794
|
const $99472afa7112c427$var$dont_cut_in_between_less_than_characters = 30;
|
|
@@ -10885,7 +10867,7 @@ function $bf4a8d57aa8dd1c8$export$9ff751cd77687edc(_ref) {
|
|
|
10885
10867
|
let {
|
|
10886
10868
|
search_results_: search_results_,
|
|
10887
10869
|
router_: router_,
|
|
10888
|
-
|
|
10870
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
10889
10871
|
get_search_query_: get_search_query_
|
|
10890
10872
|
} = _ref;
|
|
10891
10873
|
const content_results = $3hooq$solidjs.createMemo(() => {
|
|
@@ -10904,7 +10886,11 @@ function $bf4a8d57aa8dd1c8$export$9ff751cd77687edc(_ref) {
|
|
|
10904
10886
|
});
|
|
10905
10887
|
$3hooq$solidjs.createEffect(() => {
|
|
10906
10888
|
const results = content_results();
|
|
10907
|
-
|
|
10889
|
+
const numberResults = Array.isArray(results) ? results.length : 0;
|
|
10890
|
+
setNumberContentResultsPerQuery_(prev => {
|
|
10891
|
+
prev.set($3hooq$solidjs.untrack(get_search_query_), numberResults);
|
|
10892
|
+
return prev;
|
|
10893
|
+
});
|
|
10908
10894
|
});
|
|
10909
10895
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.For), {
|
|
10910
10896
|
get each() {
|
|
@@ -10922,7 +10908,8 @@ function $bf4a8d57aa8dd1c8$export$9ff751cd77687edc(_ref) {
|
|
|
10922
10908
|
function $05f255c0a94b9ca1$export$4405d077f0a20494(_ref) {
|
|
10923
10909
|
let {
|
|
10924
10910
|
content_results_rows_: [get_history_state_content_results_rows],
|
|
10925
|
-
cols_at_size_: cols_at_size_
|
|
10911
|
+
cols_at_size_: cols_at_size_,
|
|
10912
|
+
overrideAmount_: overrideAmount_
|
|
10926
10913
|
} = _ref;
|
|
10927
10914
|
const colsShowingNow = $478e5a09664da64c$export$a79e666719b3647c(cols_at_size_);
|
|
10928
10915
|
const largest_column = $3hooq$solidjs.createMemo(() => {
|
|
@@ -10935,10 +10922,10 @@ function $05f255c0a94b9ca1$export$4405d077f0a20494(_ref) {
|
|
|
10935
10922
|
});
|
|
10936
10923
|
const num_placeholders = $3hooq$solidjs.createMemo(() => {
|
|
10937
10924
|
var _get_history_state_co;
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
);
|
|
10925
|
+
const override = overrideAmount_();
|
|
10926
|
+
if (override !== undefined) return override;
|
|
10927
|
+
// Use how many columns we're actually showing, if available, so that we're showing exactly as many placeholders as we'd show content, so that the view more button doesn't appear/disappear and makes the layout shift
|
|
10928
|
+
return ((_get_history_state_co = get_history_state_content_results_rows()) !== null && _get_history_state_co !== void 0 ? _get_history_state_co : (0, $eab939d0b95b75ee$export$70ceae36059a1036)) * (colsShowingNow() || largest_column());
|
|
10942
10929
|
});
|
|
10943
10930
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Index), {
|
|
10944
10931
|
get each() {
|
|
@@ -10977,15 +10964,13 @@ function $eab939d0b95b75ee$export$6d0c9c22f6652669(_ref) {
|
|
|
10977
10964
|
number_: num_results,
|
|
10978
10965
|
i18n_: i18n_
|
|
10979
10966
|
});
|
|
10980
|
-
const
|
|
10981
|
-
|
|
10982
|
-
const placeholders_enabled = $3hooq$solidjs.createMemo(() => {
|
|
10983
|
-
// don't show placeholders when the user toggles filters
|
|
10984
|
-
check_query();
|
|
10985
|
-
return !queries_without_content_results_.has(get_search_query_());
|
|
10967
|
+
const [numberContentResultsPerQuery, setNumberContentResultsPerQuery_] = $3hooq$solidjs.createSignal(new Map(), {
|
|
10968
|
+
equals: false
|
|
10986
10969
|
});
|
|
10970
|
+
const contentResultsForCurrentQuery = $3hooq$solidjs.createMemo(() => numberContentResultsPerQuery().get(get_search_query_()));
|
|
10971
|
+
// Don't show placeholder if we know there will not be any content results and someone is just toggling filters
|
|
10972
|
+
const placeholders_enabled = $3hooq$solidjs.createMemo(() => contentResultsForCurrentQuery() !== 0);
|
|
10987
10973
|
const rows_object = $eab939d0b95b75ee$var$make_state_saved_rows(content_results_rows_, i18n_);
|
|
10988
|
-
for (const ev of ["add", "delete"]) queries_without_content_results_.addEventListener(ev, () => set_check_query(prev => !prev));
|
|
10989
10974
|
return $3hooq$solidjsweb.ssr($eab939d0b95b75ee$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "display:" + (is_loading_() && placeholders_enabled() || ((_content_results2 = content_results()) === null || _content_results2 === void 0 ? void 0 : _content_results2.length) > 0 ? "" : "none"), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), {
|
|
10990
10975
|
get_search_query_: get_search_query_,
|
|
10991
10976
|
i18n_: i18n_,
|
|
@@ -11008,14 +10993,15 @@ function $eab939d0b95b75ee$export$6d0c9c22f6652669(_ref) {
|
|
|
11008
10993
|
content_results_rows_: content_results_rows_,
|
|
11009
10994
|
get cols_at_size_() {
|
|
11010
10995
|
return $3hooq$solidjs.createMemo(() => layout_options_().cols_at_size);
|
|
11011
|
-
}
|
|
10996
|
+
},
|
|
10997
|
+
overrideAmount_: contentResultsForCurrentQuery
|
|
11012
10998
|
});
|
|
11013
10999
|
},
|
|
11014
11000
|
get children() {
|
|
11015
11001
|
return $3hooq$solidjsweb.createComponent((0, $bf4a8d57aa8dd1c8$export$9ff751cd77687edc), {
|
|
11016
11002
|
router_: router_,
|
|
11017
11003
|
search_results_: search_results_,
|
|
11018
|
-
|
|
11004
|
+
setNumberContentResultsPerQuery_: setNumberContentResultsPerQuery_,
|
|
11019
11005
|
get_search_query_: get_search_query_
|
|
11020
11006
|
});
|
|
11021
11007
|
}
|
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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.3.
|
|
13
|
+
export const version = "4.3.12";
|
|
14
14
|
declare const LISTING_ID = "listingId";
|
|
15
15
|
declare const EXTERNAL_ID = "externalId";
|
|
16
16
|
type ScrollRestorationData = {
|
|
@@ -877,6 +877,7 @@ export function LooksSliderOrGrid(props: {
|
|
|
877
877
|
FavoriteButton_?: (props: {
|
|
878
878
|
display_: Accessor<ModernDisplay | null | undefined>;
|
|
879
879
|
}) => JSX.Element;
|
|
880
|
+
NoResultsFallback_?: () => JSX.Element;
|
|
880
881
|
displayTransformers_?: DisplayTransformers<ModernDisplay, ModernDisplayWithPageUrl<ModernDisplay>>;
|
|
881
882
|
/**
|
|
882
883
|
* If provided, will render as grid instead of slider
|
|
@@ -1398,7 +1399,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1398
1399
|
* Open the modal with support for alignment.
|
|
1399
1400
|
* @returns {void}
|
|
1400
1401
|
*/
|
|
1401
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1402
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1402
1403
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1403
1404
|
export interface PageReplacer {
|
|
1404
1405
|
readonly render_: () => Node_Array;
|
|
@@ -1476,5 +1477,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1476
1477
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1477
1478
|
layout?: PossibleLayout;
|
|
1478
1479
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1479
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1480
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1480
1481
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|