@depict-ai/ui 4.7.31 → 4.7.32
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 +110 -92
- package/ES10/index.d.ts +7 -6
- package/ES10/index.js +110 -92
- package/latest/index.cjs +100 -85
- package/latest/index.d.ts +7 -6
- package/latest/index.js +100 -85
- package/package.json +1 -1
- package/server/ES10/index.cjs +83 -34
- package/server/ES10/index.d.ts +7 -6
- package/server/ES10/index.js +83 -34
- package/server/latest/index.cjs +73 -27
- package/server/latest/index.d.ts +7 -6
- package/server/latest/index.js +73 -27
package/latest/index.cjs
CHANGED
|
@@ -105,7 +105,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
105
105
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
106
106
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
107
107
|
/*! Depict.ai search and product listing SDK */
|
|
108
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.
|
|
108
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.32";
|
|
109
109
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
110
110
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
111
111
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -454,19 +454,22 @@ function $d92f338ba8f9da9b$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
454
454
|
}
|
|
455
455
|
}));
|
|
456
456
|
$gVhhF$solidjsweb.effect(_p$ => {
|
|
457
|
-
var _v$ =
|
|
457
|
+
var _v$ = !!(final_span_columns() === max_span_columns()),
|
|
458
|
+
_v$2 = {
|
|
458
459
|
[(0, $75777da1687ba3f6$export$c500183c31c2b22e)]: final_span_columns()
|
|
459
460
|
},
|
|
460
|
-
_v$
|
|
461
|
-
_v$
|
|
462
|
-
_p$.e
|
|
463
|
-
|
|
464
|
-
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-
|
|
461
|
+
_v$3 = `span ${final_span_columns()}`,
|
|
462
|
+
_v$4 = `span ${final_span_rows()}`;
|
|
463
|
+
_v$ !== _p$.e && _el$.classList.toggle("spans-whole-row", _p$.e = _v$);
|
|
464
|
+
_p$.t = $gVhhF$solidjsweb.style(_el$, _v$2, _p$.t);
|
|
465
|
+
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-column", _v$3) : _el$.style.removeProperty("grid-column"));
|
|
466
|
+
_v$4 !== _p$.o && ((_p$.o = _v$4) != null ? _el$.style.setProperty("grid-row", _v$4) : _el$.style.removeProperty("grid-row"));
|
|
465
467
|
return _p$;
|
|
466
468
|
}, {
|
|
467
469
|
e: undefined,
|
|
468
470
|
t: undefined,
|
|
469
|
-
a: undefined
|
|
471
|
+
a: undefined,
|
|
472
|
+
o: undefined
|
|
470
473
|
});
|
|
471
474
|
return _el$;
|
|
472
475
|
}
|
|
@@ -10494,7 +10497,8 @@ class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
|
10494
10497
|
// Please make sure that the signal created by below line always updates AFTER selected_filters_ updates on a "popstate" event. If the filter cache is popped before the selected filters are the code in create_modified_filters() is going to re-calculate search_local_filter_cache without knowing the real value of search_selected_filters, and we'll end up with too few filters in search_local_filter_cache in some cases
|
|
10495
10498
|
local_filter_cache: [],
|
|
10496
10499
|
expanded_hierarchical_filters: [],
|
|
10497
|
-
scroll_restoration_data: []
|
|
10500
|
+
scroll_restoration_data: [],
|
|
10501
|
+
history_content_blocks: []
|
|
10498
10502
|
}),
|
|
10499
10503
|
router_: this.#router,
|
|
10500
10504
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
@@ -14887,70 +14891,94 @@ function $bb9760b7a8acdc18$export$7af06a63c5a976c9(el, listing_id, i18n_) {
|
|
|
14887
14891
|
$gVhhF$solidjs.onCleanup(disconnect);
|
|
14888
14892
|
}
|
|
14889
14893
|
$gVhhF$solidjsweb.delegateEvents(["click"]);
|
|
14890
|
-
var $32c662f618f5d80d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<a><
|
|
14891
|
-
$32c662f618f5d80d$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<a><video loop>`);
|
|
14894
|
+
var $32c662f618f5d80d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<a class=d-standard-content-wrapper><video loop class=d-standard-content>`);
|
|
14892
14895
|
function $32c662f618f5d80d$export$780a853d15174484({
|
|
14893
|
-
|
|
14896
|
+
contentBlock_: {
|
|
14897
|
+
content: {
|
|
14898
|
+
link: link,
|
|
14899
|
+
type: type,
|
|
14900
|
+
url: mediaUrl
|
|
14901
|
+
}
|
|
14902
|
+
},
|
|
14894
14903
|
router_: router_
|
|
14895
14904
|
}) {
|
|
14896
|
-
if (
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
_v$2 = contentBlock.content.url;
|
|
14912
|
-
_v$ !== _p$.e && $gVhhF$solidjsweb.setAttribute(_el$, "href", _p$.e = _v$);
|
|
14913
|
-
_v$2 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$2, "src", _p$.t = _v$2);
|
|
14914
|
-
return _p$;
|
|
14915
|
-
}, {
|
|
14916
|
-
e: undefined,
|
|
14917
|
-
t: undefined
|
|
14918
|
-
});
|
|
14919
|
-
$gVhhF$solidjsweb.runHydrationEvents();
|
|
14920
|
-
return _el$;
|
|
14921
|
-
})();
|
|
14922
|
-
if (contentBlock.content.type === "video") return () => (() => {
|
|
14923
|
-
var _el$3 = $gVhhF$solidjsweb.getNextElement($32c662f618f5d80d$var$_tmpl$2),
|
|
14924
|
-
_el$4 = _el$3.firstChild;
|
|
14925
|
-
$gVhhF$solidjsweb.addEventListener(_el$3, "click", $gVhhF$depictaiutilisharedlatest.catchify(ev => router_.navigate_.go_to_({
|
|
14926
|
-
new_url_: contentBlock.content.link,
|
|
14927
|
-
is_replace_: false,
|
|
14928
|
-
event_: ev
|
|
14929
|
-
})), true);
|
|
14930
|
-
$gVhhF$solidjsweb.setProperty(_el$4, "controls", false);
|
|
14931
|
-
$gVhhF$solidjsweb.setProperty(_el$4, "muted", true);
|
|
14932
|
-
$gVhhF$solidjsweb.setProperty(_el$4, "autoplay", true);
|
|
14933
|
-
$gVhhF$solidjsweb.setProperty(_el$4, "playsinline", true);
|
|
14934
|
-
_el$4.style.setProperty("width", "100%");
|
|
14935
|
-
_el$4.style.setProperty("height", "100%");
|
|
14936
|
-
_el$4.style.setProperty("object-fit", "cover");
|
|
14937
|
-
_el$4.style.setProperty("position", "absolute");
|
|
14938
|
-
_el$4.style.setProperty("inset", "0");
|
|
14939
|
-
$gVhhF$solidjsweb.effect(_p$ => {
|
|
14940
|
-
var _v$3 = contentBlock.content.link,
|
|
14941
|
-
_v$4 = contentBlock.content.url;
|
|
14942
|
-
_v$3 !== _p$.e && $gVhhF$solidjsweb.setAttribute(_el$3, "href", _p$.e = _v$3);
|
|
14943
|
-
_v$4 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$4, "src", _p$.t = _v$4);
|
|
14944
|
-
return _p$;
|
|
14905
|
+
if (type === "image") {
|
|
14906
|
+
const [wrapperSize, setWrapperSize] = $gVhhF$solidjs.createSignal();
|
|
14907
|
+
return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjsweb.Dynamic), $gVhhF$solidjsweb.mergeProps({
|
|
14908
|
+
component: link ? "a" : "div",
|
|
14909
|
+
"class": "d-standard-content-wrapper",
|
|
14910
|
+
ref: el => setWrapperSize(() => $19950faaac026e09$export$e6fffe67d4cdd848(el)),
|
|
14911
|
+
get onClick() {
|
|
14912
|
+
return $gVhhF$depictaiutilisharedlatest.catchify(ev => link && router_.navigate_.go_to_({
|
|
14913
|
+
new_url_: link,
|
|
14914
|
+
is_replace_: false,
|
|
14915
|
+
event_: ev
|
|
14916
|
+
}));
|
|
14917
|
+
}
|
|
14918
|
+
}, link && {
|
|
14919
|
+
href: link
|
|
14945
14920
|
}, {
|
|
14946
|
-
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14921
|
+
get children() {
|
|
14922
|
+
return $gVhhF$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
|
|
14923
|
+
get size() {
|
|
14924
|
+
return $gVhhF$solidjs.createMemo(() => wrapperSize()?.() || 0);
|
|
14925
|
+
},
|
|
14926
|
+
src: mediaUrl,
|
|
14927
|
+
"class": "d-standard-content"
|
|
14928
|
+
});
|
|
14929
|
+
}
|
|
14930
|
+
}));
|
|
14931
|
+
}
|
|
14932
|
+
if (type === "video") {
|
|
14933
|
+
const pageVisible = $55cbacb79d3e0cea$export$54299a3c81f5425();
|
|
14934
|
+
return (() => {
|
|
14935
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($32c662f618f5d80d$var$_tmpl$),
|
|
14936
|
+
_el$2 = _el$.firstChild;
|
|
14937
|
+
$gVhhF$solidjsweb.addEventListener(_el$, "click", $gVhhF$depictaiutilisharedlatest.catchify(ev => router_.navigate_.go_to_({
|
|
14938
|
+
new_url_: link,
|
|
14939
|
+
is_replace_: false,
|
|
14940
|
+
event_: ev
|
|
14941
|
+
})), true);
|
|
14942
|
+
$gVhhF$solidjsweb.setAttribute(_el$, "href", link);
|
|
14943
|
+
$gVhhF$solidjsweb.use(element => $gVhhF$solidjs.createEffect(() => {
|
|
14944
|
+
if (pageVisible()) element.play().catch(e => $gVhhF$depictaiutilishared.dlog("Failed to play", e));else element.pause();
|
|
14945
|
+
}), _el$2);
|
|
14946
|
+
$gVhhF$solidjsweb.setAttribute(_el$2, "src", mediaUrl);
|
|
14947
|
+
$gVhhF$solidjsweb.setProperty(_el$2, "controls", false);
|
|
14948
|
+
$gVhhF$solidjsweb.setProperty(_el$2, "muted", true);
|
|
14949
|
+
$gVhhF$solidjsweb.setProperty(_el$2, "autoplay", true);
|
|
14950
|
+
$gVhhF$solidjsweb.setProperty(_el$2, "playsinline", true);
|
|
14951
|
+
$gVhhF$solidjsweb.runHydrationEvents();
|
|
14952
|
+
return _el$;
|
|
14953
|
+
})();
|
|
14954
|
+
}
|
|
14952
14955
|
}
|
|
14953
14956
|
$gVhhF$solidjsweb.delegateEvents(["click"]);
|
|
14957
|
+
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
14958
|
+
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
14959
|
+
$gVhhF$solidjs.createEffect(() => {
|
|
14960
|
+
const serverContentBlock = plp_meta()?.content_blocks;
|
|
14961
|
+
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(historyContentBlocks())) setHistoryContentBlocks(serverContentBlock);
|
|
14962
|
+
});
|
|
14963
|
+
const contentBlocksByRow = $gVhhF$solidjs.createMemo(() => {
|
|
14964
|
+
if (content_blocks_by_row_()) return content_blocks_by_row_();
|
|
14965
|
+
const content = [];
|
|
14966
|
+
historyContentBlocks().forEach(row => {
|
|
14967
|
+
const contentBlock = {
|
|
14968
|
+
span_columns: row.span_columns,
|
|
14969
|
+
span_rows: row.span_rows,
|
|
14970
|
+
position: row.position,
|
|
14971
|
+
content: () => $gVhhF$solidjsweb.createComponent((0, $32c662f618f5d80d$export$780a853d15174484), {
|
|
14972
|
+
contentBlock_: row,
|
|
14973
|
+
router_: router_
|
|
14974
|
+
})
|
|
14975
|
+
};
|
|
14976
|
+
content[row.row] = contentBlock;
|
|
14977
|
+
});
|
|
14978
|
+
return content;
|
|
14979
|
+
});
|
|
14980
|
+
return contentBlocksByRow;
|
|
14981
|
+
}
|
|
14954
14982
|
var $840d88a04b2d22a7$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=product-count><!$><!/> <!$><!/>`),
|
|
14955
14983
|
$840d88a04b2d22a7$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div>`),
|
|
14956
14984
|
$840d88a04b2d22a7$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
@@ -14978,6 +15006,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
14978
15006
|
show_breadcrumbs_: show_breadcrumbs_,
|
|
14979
15007
|
layout_options_: layout_options_,
|
|
14980
15008
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15009
|
+
history_content_blocks_: history_content_blocks_,
|
|
14981
15010
|
product_card_template_: product_card_template_,
|
|
14982
15011
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
14983
15012
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -15046,23 +15075,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
15046
15075
|
}));
|
|
15047
15076
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
15048
15077
|
const [plp_meta] = $gVhhF$solidjs.createResource(meta_query_base, $gVhhF$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
|
|
15049
|
-
const contentBlocksByRow = $
|
|
15050
|
-
if (content_blocks_by_row_()) return content_blocks_by_row_();
|
|
15051
|
-
const content = [];
|
|
15052
|
-
plp_meta()?.content_blocks?.forEach(row => {
|
|
15053
|
-
const contentBlock = {
|
|
15054
|
-
span_columns: row.span_columns,
|
|
15055
|
-
span_rows: row.span_rows,
|
|
15056
|
-
position: row.position,
|
|
15057
|
-
content: $32c662f618f5d80d$export$780a853d15174484({
|
|
15058
|
-
contentBlock: row,
|
|
15059
|
-
router_: router_
|
|
15060
|
-
})
|
|
15061
|
-
};
|
|
15062
|
-
content[row.row] = contentBlock;
|
|
15063
|
-
});
|
|
15064
|
-
return content;
|
|
15065
|
-
});
|
|
15078
|
+
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
15066
15079
|
const available_sortings_ = $gVhhF$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
15067
15080
|
...sort,
|
|
15068
15081
|
order: sort.order ?? "desc"
|
|
@@ -15417,7 +15430,8 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
15417
15430
|
sorting_open: category_sorting_open_,
|
|
15418
15431
|
expanded_filters: expanded_filters_,
|
|
15419
15432
|
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
15420
|
-
scroll_restoration_data: scroll_restoration_data_
|
|
15433
|
+
scroll_restoration_data: scroll_restoration_data_,
|
|
15434
|
+
history_content_blocks: history_content_blocks_
|
|
15421
15435
|
} = depict_category.historyStateSignals_;
|
|
15422
15436
|
const {
|
|
15423
15437
|
current_sorting_: current_sorting_,
|
|
@@ -15463,6 +15477,7 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
15463
15477
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15464
15478
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
15465
15479
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15480
|
+
history_content_blocks_: history_content_blocks_,
|
|
15466
15481
|
layout_options_: $gVhhF$solidjs.createMemo(() => ({
|
|
15467
15482
|
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
15468
15483
|
...grid_spacing_override(),
|
package/latest/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { report, Amazing_Slider, Display, useExpandingContainer, ColsAtSize, Ele
|
|
|
3
3
|
import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
|
|
4
4
|
import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
|
|
5
5
|
import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
|
|
6
|
-
import { ProductListing, GetListingResponse } from "@depict-ai/types/api/GetListingResponse";
|
|
6
|
+
import { ProductListing, GetListingResponse, ContentBlock as _ContentBlock1 } from "@depict-ai/types/api/GetListingResponse";
|
|
7
7
|
import { ProductListingResponseV3, SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/ProductListingResponseV3";
|
|
8
8
|
import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestionsRequestV3";
|
|
9
9
|
import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
|
|
@@ -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.7.
|
|
14
|
+
export const version = "4.7.32";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -108,10 +108,10 @@ export function remap_blocks_to_index<T = () => JSX.Element | Promise<JSX.Elemen
|
|
|
108
108
|
})[];
|
|
109
109
|
n_cols_currently_showing_: number | null;
|
|
110
110
|
}): {
|
|
111
|
-
content_blocks_by_index_:
|
|
111
|
+
content_blocks_by_index_: (Awaited<T> | T[])[];
|
|
112
112
|
readonly displaced_products_?: undefined;
|
|
113
113
|
} | {
|
|
114
|
-
readonly content_blocks_by_index_:
|
|
114
|
+
readonly content_blocks_by_index_: (Awaited<T> | T[])[];
|
|
115
115
|
readonly displaced_products_: (number | (true | undefined)[])[];
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
@@ -1334,6 +1334,7 @@ export class DepictCategory<InputDisplay extends Display, OutputDisplay extends
|
|
|
1334
1334
|
expanded_: boolean;
|
|
1335
1335
|
}[]>;
|
|
1336
1336
|
scroll_restoration_data: Signal<ScrollRestorationData>;
|
|
1337
|
+
history_content_blocks: Signal<_ContentBlock1[]>;
|
|
1337
1338
|
};
|
|
1338
1339
|
/**
|
|
1339
1340
|
* Signal representing the currently selected filters. Will update to always reflect the state of the current URL. Calling the setter triggers a navigation (replaceState) to an updated URL.
|
|
@@ -1484,7 +1485,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1484
1485
|
* Open the modal with support for alignment.
|
|
1485
1486
|
* @returns {void}
|
|
1486
1487
|
*/
|
|
1487
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1488
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1488
1489
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1489
1490
|
export interface PageReplacer {
|
|
1490
1491
|
readonly render_: () => Node_Array;
|
|
@@ -1563,5 +1564,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1563
1564
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1564
1565
|
layout?: PossibleLayout;
|
|
1565
1566
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1566
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1567
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1567
1568
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { dlog as $9HbP8$dlog, catchify as $9HbP8$catchify, ListenableSet as $9Hb
|
|
|
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.7.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.32";
|
|
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, ({
|
|
@@ -356,19 +356,22 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
356
356
|
}
|
|
357
357
|
}));
|
|
358
358
|
$9HbP8$effect(_p$ => {
|
|
359
|
-
var _v$ =
|
|
359
|
+
var _v$ = !!(final_span_columns() === max_span_columns()),
|
|
360
|
+
_v$2 = {
|
|
360
361
|
[(0, $6dee9211e57ac31a$export$c500183c31c2b22e)]: final_span_columns()
|
|
361
362
|
},
|
|
362
|
-
_v$
|
|
363
|
-
_v$
|
|
364
|
-
_p$.e
|
|
365
|
-
|
|
366
|
-
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-
|
|
363
|
+
_v$3 = `span ${final_span_columns()}`,
|
|
364
|
+
_v$4 = `span ${final_span_rows()}`;
|
|
365
|
+
_v$ !== _p$.e && _el$.classList.toggle("spans-whole-row", _p$.e = _v$);
|
|
366
|
+
_p$.t = $9HbP8$style(_el$, _v$2, _p$.t);
|
|
367
|
+
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-column", _v$3) : _el$.style.removeProperty("grid-column"));
|
|
368
|
+
_v$4 !== _p$.o && ((_p$.o = _v$4) != null ? _el$.style.setProperty("grid-row", _v$4) : _el$.style.removeProperty("grid-row"));
|
|
367
369
|
return _p$;
|
|
368
370
|
}, {
|
|
369
371
|
e: undefined,
|
|
370
372
|
t: undefined,
|
|
371
|
-
a: undefined
|
|
373
|
+
a: undefined,
|
|
374
|
+
o: undefined
|
|
372
375
|
});
|
|
373
376
|
return _el$;
|
|
374
377
|
}
|
|
@@ -10396,7 +10399,8 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
10396
10399
|
// Please make sure that the signal created by below line always updates AFTER selected_filters_ updates on a "popstate" event. If the filter cache is popped before the selected filters are the code in create_modified_filters() is going to re-calculate search_local_filter_cache without knowing the real value of search_selected_filters, and we'll end up with too few filters in search_local_filter_cache in some cases
|
|
10397
10400
|
local_filter_cache: [],
|
|
10398
10401
|
expanded_hierarchical_filters: [],
|
|
10399
|
-
scroll_restoration_data: []
|
|
10402
|
+
scroll_restoration_data: [],
|
|
10403
|
+
history_content_blocks: []
|
|
10400
10404
|
}),
|
|
10401
10405
|
router_: this.#router,
|
|
10402
10406
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
@@ -14789,70 +14793,94 @@ function $cc6f5b69378cd164$export$7af06a63c5a976c9(el, listing_id, i18n_) {
|
|
|
14789
14793
|
$9HbP8$onCleanup(disconnect);
|
|
14790
14794
|
}
|
|
14791
14795
|
$9HbP8$delegateEvents(["click"]);
|
|
14792
|
-
var $f916989c4b1be9f7$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<a><
|
|
14793
|
-
$f916989c4b1be9f7$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<a><video loop>`);
|
|
14796
|
+
var $f916989c4b1be9f7$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<a class=d-standard-content-wrapper><video loop class=d-standard-content>`);
|
|
14794
14797
|
function $f916989c4b1be9f7$export$780a853d15174484({
|
|
14795
|
-
|
|
14798
|
+
contentBlock_: {
|
|
14799
|
+
content: {
|
|
14800
|
+
link: link,
|
|
14801
|
+
type: type,
|
|
14802
|
+
url: mediaUrl
|
|
14803
|
+
}
|
|
14804
|
+
},
|
|
14796
14805
|
router_: router_
|
|
14797
14806
|
}) {
|
|
14798
|
-
if (
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
_v$2 = contentBlock.content.url;
|
|
14814
|
-
_v$ !== _p$.e && $9HbP8$setAttribute(_el$, "href", _p$.e = _v$);
|
|
14815
|
-
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$2, "src", _p$.t = _v$2);
|
|
14816
|
-
return _p$;
|
|
14817
|
-
}, {
|
|
14818
|
-
e: undefined,
|
|
14819
|
-
t: undefined
|
|
14820
|
-
});
|
|
14821
|
-
$9HbP8$runHydrationEvents();
|
|
14822
|
-
return _el$;
|
|
14823
|
-
})();
|
|
14824
|
-
if (contentBlock.content.type === "video") return () => (() => {
|
|
14825
|
-
var _el$3 = $9HbP8$getNextElement($f916989c4b1be9f7$var$_tmpl$2),
|
|
14826
|
-
_el$4 = _el$3.firstChild;
|
|
14827
|
-
$9HbP8$addEventListener(_el$3, "click", $9HbP8$catchify(ev => router_.navigate_.go_to_({
|
|
14828
|
-
new_url_: contentBlock.content.link,
|
|
14829
|
-
is_replace_: false,
|
|
14830
|
-
event_: ev
|
|
14831
|
-
})), true);
|
|
14832
|
-
$9HbP8$setProperty(_el$4, "controls", false);
|
|
14833
|
-
$9HbP8$setProperty(_el$4, "muted", true);
|
|
14834
|
-
$9HbP8$setProperty(_el$4, "autoplay", true);
|
|
14835
|
-
$9HbP8$setProperty(_el$4, "playsinline", true);
|
|
14836
|
-
_el$4.style.setProperty("width", "100%");
|
|
14837
|
-
_el$4.style.setProperty("height", "100%");
|
|
14838
|
-
_el$4.style.setProperty("object-fit", "cover");
|
|
14839
|
-
_el$4.style.setProperty("position", "absolute");
|
|
14840
|
-
_el$4.style.setProperty("inset", "0");
|
|
14841
|
-
$9HbP8$effect(_p$ => {
|
|
14842
|
-
var _v$3 = contentBlock.content.link,
|
|
14843
|
-
_v$4 = contentBlock.content.url;
|
|
14844
|
-
_v$3 !== _p$.e && $9HbP8$setAttribute(_el$3, "href", _p$.e = _v$3);
|
|
14845
|
-
_v$4 !== _p$.t && $9HbP8$setAttribute(_el$4, "src", _p$.t = _v$4);
|
|
14846
|
-
return _p$;
|
|
14807
|
+
if (type === "image") {
|
|
14808
|
+
const [wrapperSize, setWrapperSize] = $9HbP8$createSignal();
|
|
14809
|
+
return $9HbP8$createComponent((0, $9HbP8$Dynamic), $9HbP8$mergeProps1({
|
|
14810
|
+
component: link ? "a" : "div",
|
|
14811
|
+
"class": "d-standard-content-wrapper",
|
|
14812
|
+
ref: el => setWrapperSize(() => $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(el)),
|
|
14813
|
+
get onClick() {
|
|
14814
|
+
return $9HbP8$catchify(ev => link && router_.navigate_.go_to_({
|
|
14815
|
+
new_url_: link,
|
|
14816
|
+
is_replace_: false,
|
|
14817
|
+
event_: ev
|
|
14818
|
+
}));
|
|
14819
|
+
}
|
|
14820
|
+
}, link && {
|
|
14821
|
+
href: link
|
|
14847
14822
|
}, {
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14823
|
+
get children() {
|
|
14824
|
+
return $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
|
|
14825
|
+
get size() {
|
|
14826
|
+
return $9HbP8$createMemo(() => wrapperSize()?.() || 0);
|
|
14827
|
+
},
|
|
14828
|
+
src: mediaUrl,
|
|
14829
|
+
"class": "d-standard-content"
|
|
14830
|
+
});
|
|
14831
|
+
}
|
|
14832
|
+
}));
|
|
14833
|
+
}
|
|
14834
|
+
if (type === "video") {
|
|
14835
|
+
const pageVisible = $5e3d278ef4c80cd7$export$54299a3c81f5425();
|
|
14836
|
+
return (() => {
|
|
14837
|
+
var _el$ = $9HbP8$getNextElement($f916989c4b1be9f7$var$_tmpl$),
|
|
14838
|
+
_el$2 = _el$.firstChild;
|
|
14839
|
+
$9HbP8$addEventListener(_el$, "click", $9HbP8$catchify(ev => router_.navigate_.go_to_({
|
|
14840
|
+
new_url_: link,
|
|
14841
|
+
is_replace_: false,
|
|
14842
|
+
event_: ev
|
|
14843
|
+
})), true);
|
|
14844
|
+
$9HbP8$setAttribute(_el$, "href", link);
|
|
14845
|
+
$9HbP8$use(element => $9HbP8$createEffect(() => {
|
|
14846
|
+
if (pageVisible()) element.play().catch(e => $9HbP8$dlog1("Failed to play", e));else element.pause();
|
|
14847
|
+
}), _el$2);
|
|
14848
|
+
$9HbP8$setAttribute(_el$2, "src", mediaUrl);
|
|
14849
|
+
$9HbP8$setProperty(_el$2, "controls", false);
|
|
14850
|
+
$9HbP8$setProperty(_el$2, "muted", true);
|
|
14851
|
+
$9HbP8$setProperty(_el$2, "autoplay", true);
|
|
14852
|
+
$9HbP8$setProperty(_el$2, "playsinline", true);
|
|
14853
|
+
$9HbP8$runHydrationEvents();
|
|
14854
|
+
return _el$;
|
|
14855
|
+
})();
|
|
14856
|
+
}
|
|
14854
14857
|
}
|
|
14855
14858
|
$9HbP8$delegateEvents(["click"]);
|
|
14859
|
+
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
14860
|
+
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
14861
|
+
$9HbP8$createEffect(() => {
|
|
14862
|
+
const serverContentBlock = plp_meta()?.content_blocks;
|
|
14863
|
+
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(historyContentBlocks())) setHistoryContentBlocks(serverContentBlock);
|
|
14864
|
+
});
|
|
14865
|
+
const contentBlocksByRow = $9HbP8$createMemo(() => {
|
|
14866
|
+
if (content_blocks_by_row_()) return content_blocks_by_row_();
|
|
14867
|
+
const content = [];
|
|
14868
|
+
historyContentBlocks().forEach(row => {
|
|
14869
|
+
const contentBlock = {
|
|
14870
|
+
span_columns: row.span_columns,
|
|
14871
|
+
span_rows: row.span_rows,
|
|
14872
|
+
position: row.position,
|
|
14873
|
+
content: () => $9HbP8$createComponent((0, $f916989c4b1be9f7$export$780a853d15174484), {
|
|
14874
|
+
contentBlock_: row,
|
|
14875
|
+
router_: router_
|
|
14876
|
+
})
|
|
14877
|
+
};
|
|
14878
|
+
content[row.row] = contentBlock;
|
|
14879
|
+
});
|
|
14880
|
+
return content;
|
|
14881
|
+
});
|
|
14882
|
+
return contentBlocksByRow;
|
|
14883
|
+
}
|
|
14856
14884
|
var $df5d81d0fe61ff21$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=product-count><!$><!/> <!$><!/>`),
|
|
14857
14885
|
$df5d81d0fe61ff21$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div>`),
|
|
14858
14886
|
$df5d81d0fe61ff21$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
|
|
@@ -14880,6 +14908,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
14880
14908
|
show_breadcrumbs_: show_breadcrumbs_,
|
|
14881
14909
|
layout_options_: layout_options_,
|
|
14882
14910
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
14911
|
+
history_content_blocks_: history_content_blocks_,
|
|
14883
14912
|
product_card_template_: product_card_template_,
|
|
14884
14913
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
14885
14914
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -14948,23 +14977,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
14948
14977
|
}));
|
|
14949
14978
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
14950
14979
|
const [plp_meta] = $9HbP8$createResource(meta_query_base, $9HbP8$catchify(query => depict_api_.get_listing(query)));
|
|
14951
|
-
const contentBlocksByRow = $
|
|
14952
|
-
if (content_blocks_by_row_()) return content_blocks_by_row_();
|
|
14953
|
-
const content = [];
|
|
14954
|
-
plp_meta()?.content_blocks?.forEach(row => {
|
|
14955
|
-
const contentBlock = {
|
|
14956
|
-
span_columns: row.span_columns,
|
|
14957
|
-
span_rows: row.span_rows,
|
|
14958
|
-
position: row.position,
|
|
14959
|
-
content: $f916989c4b1be9f7$export$780a853d15174484({
|
|
14960
|
-
contentBlock: row,
|
|
14961
|
-
router_: router_
|
|
14962
|
-
})
|
|
14963
|
-
};
|
|
14964
|
-
content[row.row] = contentBlock;
|
|
14965
|
-
});
|
|
14966
|
-
return content;
|
|
14967
|
-
});
|
|
14980
|
+
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
|
|
14968
14981
|
const available_sortings_ = $9HbP8$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
14969
14982
|
...sort,
|
|
14970
14983
|
order: sort.order ?? "desc"
|
|
@@ -15319,7 +15332,8 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
15319
15332
|
sorting_open: category_sorting_open_,
|
|
15320
15333
|
expanded_filters: expanded_filters_,
|
|
15321
15334
|
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
15322
|
-
scroll_restoration_data: scroll_restoration_data_
|
|
15335
|
+
scroll_restoration_data: scroll_restoration_data_,
|
|
15336
|
+
history_content_blocks: history_content_blocks_
|
|
15323
15337
|
} = depict_category.historyStateSignals_;
|
|
15324
15338
|
const {
|
|
15325
15339
|
current_sorting_: current_sorting_,
|
|
@@ -15365,6 +15379,7 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
15365
15379
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
15366
15380
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
15367
15381
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15382
|
+
history_content_blocks_: history_content_blocks_,
|
|
15368
15383
|
layout_options_: $9HbP8$createMemo(() => ({
|
|
15369
15384
|
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
15370
15385
|
...grid_spacing_override(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.32",
|
|
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",
|