@depict-ai/ui 4.9.8 → 4.10.0
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 +63 -22
- package/ES10/index.d.ts +6 -3
- package/ES10/index.js +64 -23
- package/latest/index.cjs +56 -21
- package/latest/index.d.ts +6 -3
- package/latest/index.js +57 -22
- package/package.json +6 -6
- package/server/ES10/index.cjs +43 -13
- package/server/ES10/index.d.ts +6 -3
- package/server/ES10/index.js +43 -13
- package/server/latest/index.cjs +37 -13
- package/server/latest/index.d.ts +6 -3
- package/server/latest/index.js +37 -13
package/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.0";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -5215,11 +5215,29 @@ function $164d474fea221d77$export$3f1a388cc0d8fed7(props) {
|
|
|
5215
5215
|
}
|
|
5216
5216
|
function $164d474fea221d77$var$ActualFilterBody(props) {
|
|
5217
5217
|
const [modified_available_filters_with_selected_unexisting_ones_injected_from_local_state] = props.local_filter_cache_;
|
|
5218
|
-
const
|
|
5218
|
+
const withMaybeCount0Removed = $52FdA$solidjs.createMemo(() => {
|
|
5219
|
+
const filters = modified_available_filters_with_selected_unexisting_ones_injected_from_local_state();
|
|
5220
|
+
if (!props.hideCount0FilterOptions_()) return filters;
|
|
5221
|
+
return filters.map(filter => {
|
|
5222
|
+
const oldMeta = filter.meta;
|
|
5223
|
+
if (!oldMeta) return filter;
|
|
5224
|
+
const modifiedMeta = {
|
|
5225
|
+
...oldMeta
|
|
5226
|
+
};
|
|
5227
|
+
if ("counts" in modifiedMeta)
|
|
5228
|
+
// Remove all count 0 filter options, important that counts is last option
|
|
5229
|
+
for (const key of ["names", "values", "swatches", "counts"]) modifiedMeta[key] && (modifiedMeta[key] = modifiedMeta[key].filter((_, index) => modifiedMeta.counts[index] !== 0));
|
|
5230
|
+
return {
|
|
5231
|
+
...filter,
|
|
5232
|
+
meta: modifiedMeta
|
|
5233
|
+
};
|
|
5234
|
+
});
|
|
5235
|
+
});
|
|
5236
|
+
const togglable_filters = $52FdA$solidjs.createMemo(() => withMaybeCount0Removed().filter(item => {
|
|
5219
5237
|
var _item$meta;
|
|
5220
5238
|
return item === null || item === void 0 ? void 0 : (_item$meta = item.meta) === null || _item$meta === void 0 ? void 0 : _item$meta.group_title;
|
|
5221
5239
|
}));
|
|
5222
|
-
const untogglable_filters = $52FdA$solidjs.createMemo(() =>
|
|
5240
|
+
const untogglable_filters = $52FdA$solidjs.createMemo(() => withMaybeCount0Removed().filter(item => {
|
|
5223
5241
|
var _item$meta2;
|
|
5224
5242
|
return !(item !== null && item !== void 0 && (_item$meta2 = item.meta) !== null && _item$meta2 !== void 0 && _item$meta2.group_title);
|
|
5225
5243
|
}));
|
|
@@ -5244,9 +5262,7 @@ function $164d474fea221d77$var$ActualFilterBody(props) {
|
|
|
5244
5262
|
},
|
|
5245
5263
|
get children() {
|
|
5246
5264
|
return (() => {
|
|
5247
|
-
const filter_array_ = $52FdA$solidjs.createMemo(() =>
|
|
5248
|
-
return Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()];
|
|
5249
|
-
});
|
|
5265
|
+
const filter_array_ = $52FdA$solidjs.createMemo(() => Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()]);
|
|
5250
5266
|
const {
|
|
5251
5267
|
SearchThisFilterGroup_: SearchThisFilterGroup_,
|
|
5252
5268
|
searched_filter_array_: searched_filter_array_,
|
|
@@ -6275,7 +6291,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6275
6291
|
local_filter_cache_: local_filter_cache_,
|
|
6276
6292
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
6277
6293
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
6278
|
-
filterModalParent_: filterModalParent_
|
|
6294
|
+
filterModalParent_: filterModalParent_,
|
|
6295
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6279
6296
|
} = _ref;
|
|
6280
6297
|
const Self = () => {
|
|
6281
6298
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -6310,7 +6327,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6310
6327
|
available_filters_: available_filters_,
|
|
6311
6328
|
expanded_filters_: expanded_filters_,
|
|
6312
6329
|
selected_filters_: selected_filters_,
|
|
6313
|
-
i18n_: i18n_
|
|
6330
|
+
i18n_: i18n_,
|
|
6331
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6314
6332
|
};
|
|
6315
6333
|
const hide_filters = $52FdA$solidjs.createMemo(() => $8b9c2fa4593b29df$export$50f68cc9882e36a4(filter_options));
|
|
6316
6334
|
const sorting_options = {
|
|
@@ -8034,7 +8052,7 @@ async function $8e8c89c02c16dc7b$export$5d2f6cd705125cd3() {
|
|
|
8034
8052
|
$8e8c89c02c16dc7b$var$cachedHlsModule = hlsModule;
|
|
8035
8053
|
return hlsModule;
|
|
8036
8054
|
}
|
|
8037
|
-
var $c19709057a32b2e7$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<video
|
|
8055
|
+
var $c19709057a32b2e7$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<video class=d-standard-content>`);
|
|
8038
8056
|
function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
8039
8057
|
let {
|
|
8040
8058
|
link_: link_,
|
|
@@ -8117,9 +8135,18 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8117
8135
|
hls.loadSource(mediaUrl_);
|
|
8118
8136
|
hls.attachMedia(element);
|
|
8119
8137
|
}
|
|
8138
|
+
const [retryPlayToggle, setRetryPlayToggle] = $52FdA$solidjs.createSignal(false);
|
|
8120
8139
|
// need runWithOwner for createEffect, because we potentially awaited above
|
|
8121
8140
|
$52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.createEffect(() => {
|
|
8122
|
-
|
|
8141
|
+
retryPlayToggle();
|
|
8142
|
+
if (pageVisible()) element.play().catch(async e => {
|
|
8143
|
+
$52FdA$depictaiutilishared.dlog("Failed to play", e);
|
|
8144
|
+
// If we're not in the DOM yet, wait until we are and then try again
|
|
8145
|
+
if (!document.documentElement.contains(element)) {
|
|
8146
|
+
await (0, $52FdA$depictaiutilisharedlatest.observer).wait_for_element(element);
|
|
8147
|
+
setRetryPlayToggle(prev => !prev);
|
|
8148
|
+
}
|
|
8149
|
+
});else element.pause();
|
|
8123
8150
|
}));
|
|
8124
8151
|
});
|
|
8125
8152
|
typeof _ref$ === "function" && $52FdA$solidjsweb.use(_ref$, _el$);
|
|
@@ -8129,6 +8156,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8129
8156
|
$52FdA$solidjsweb.setProperty(_el$, "muted", true);
|
|
8130
8157
|
$52FdA$solidjsweb.setProperty(_el$, "autoplay", true);
|
|
8131
8158
|
$52FdA$solidjsweb.setProperty(_el$, "playsinline", true);
|
|
8159
|
+
$52FdA$solidjsweb.setProperty(_el$, "loop", true);
|
|
8160
|
+
$52FdA$solidjsweb.setAttribute(_el$, "disablepictureinpicture", true);
|
|
8132
8161
|
return _el$;
|
|
8133
8162
|
}
|
|
8134
8163
|
})];
|
|
@@ -8252,7 +8281,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
8252
8281
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
8253
8282
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
8254
8283
|
filterModalParent_: filterModalParent_,
|
|
8255
|
-
showSliderArrow_: showSliderArrow_
|
|
8284
|
+
showSliderArrow_: showSliderArrow_,
|
|
8285
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
8256
8286
|
} = _ref;
|
|
8257
8287
|
let results_for;
|
|
8258
8288
|
let only_show_filters_opener_;
|
|
@@ -8484,6 +8514,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
8484
8514
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
8485
8515
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
8486
8516
|
filterModalParent_: filterModalParent_,
|
|
8517
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8487
8518
|
...extra_sort_and_filter_args_
|
|
8488
8519
|
});
|
|
8489
8520
|
$52FdA$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
|
|
@@ -10607,11 +10638,11 @@ function $210882b9ebe2b1d8$export$e872e2339fb04a7f(_ref) {
|
|
|
10607
10638
|
searching_for_value_: searching_for_value_
|
|
10608
10639
|
})), (() => {
|
|
10609
10640
|
var _el$3 = $52FdA$solidjsweb.getNextElement($210882b9ebe2b1d8$var$_tmpl$3);
|
|
10610
|
-
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjs.createMemo(() => {
|
|
10641
|
+
$52FdA$solidjsweb.insert(_el$3, () => $52FdA$solidjs.createMemo(() => {
|
|
10611
10642
|
if (input_obj().type === "content") return i18n_.content_();
|
|
10612
10643
|
if (input_obj().listing_type === "brand") return i18n_.brand_();
|
|
10613
10644
|
return i18n_.category_();
|
|
10614
|
-
}));
|
|
10645
|
+
})());
|
|
10615
10646
|
return _el$3;
|
|
10616
10647
|
})()];
|
|
10617
10648
|
})());
|
|
@@ -11249,7 +11280,7 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11249
11280
|
},
|
|
11250
11281
|
get children() {
|
|
11251
11282
|
var _el$4 = $52FdA$solidjsweb.getNextElement($29e5dbeb69da7a36$var$_tmpl$3);
|
|
11252
|
-
$52FdA$solidjsweb.effect(
|
|
11283
|
+
$52FdA$solidjsweb.effect(_$p => (_$p = getBackButtonWidth() + "px", _el$4.style.setProperty("width", _$p)));
|
|
11253
11284
|
return _el$4;
|
|
11254
11285
|
}
|
|
11255
11286
|
}), _el$13, _co$3);
|
|
@@ -11962,7 +11993,7 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
11962
11993
|
});
|
|
11963
11994
|
}
|
|
11964
11995
|
}), _el$4, _co$);
|
|
11965
|
-
$52FdA$solidjsweb.effect(
|
|
11996
|
+
$52FdA$solidjsweb.effect(_$p => (_$p = itemIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
|
|
11966
11997
|
return _el$;
|
|
11967
11998
|
}
|
|
11968
11999
|
});
|
|
@@ -12080,7 +12111,7 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
12080
12111
|
});
|
|
12081
12112
|
}
|
|
12082
12113
|
}));
|
|
12083
|
-
$52FdA$solidjsweb.effect(
|
|
12114
|
+
$52FdA$solidjsweb.effect(_$p => (_$p = itemIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
|
|
12084
12115
|
return _el$;
|
|
12085
12116
|
}
|
|
12086
12117
|
});
|
|
@@ -12521,7 +12552,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
12521
12552
|
}),
|
|
12522
12553
|
...instant_results_options_
|
|
12523
12554
|
}), _el$4, _co$);
|
|
12524
|
-
$52FdA$solidjsweb.effect(
|
|
12555
|
+
$52FdA$solidjsweb.effect(_$p => (_$p = itemIndexes.instantResultsIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
|
|
12525
12556
|
return _el$;
|
|
12526
12557
|
}
|
|
12527
12558
|
});
|
|
@@ -15111,9 +15142,9 @@ function $eab939d0b95b75ee$export$6d0c9c22f6652669(_ref) {
|
|
|
15111
15142
|
});
|
|
15112
15143
|
}
|
|
15113
15144
|
})), _el$5, _co$2);
|
|
15114
|
-
$52FdA$solidjsweb.effect(
|
|
15145
|
+
$52FdA$solidjsweb.effect(_$p => {
|
|
15115
15146
|
var _content_results2;
|
|
15116
|
-
return
|
|
15147
|
+
return _$p = is_loading_() && placeholders_enabled() || ((_content_results2 = content_results()) === null || _content_results2 === void 0 ? void 0 : _content_results2.length) > 0 ? "" : "none", _el$.style.setProperty("display", _$p);
|
|
15117
15148
|
});
|
|
15118
15149
|
return _el$;
|
|
15119
15150
|
})();
|
|
@@ -15406,7 +15437,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
15406
15437
|
BackIcon_: BackIcon_,
|
|
15407
15438
|
filterModalParent_: filterModalParent_,
|
|
15408
15439
|
class_: class_,
|
|
15409
|
-
showSliderArrow_: showSliderArrow_
|
|
15440
|
+
showSliderArrow_: showSliderArrow_,
|
|
15441
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15410
15442
|
} = _ref;
|
|
15411
15443
|
const [get_sorting] = current_sorting_;
|
|
15412
15444
|
const all_products_loaded_ = $52FdA$solidjs.createSignal(false);
|
|
@@ -15526,7 +15558,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
15526
15558
|
local_filter_cache_: local_filter_cache_,
|
|
15527
15559
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15528
15560
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
15529
|
-
filterModalParent_: filterModalParent_
|
|
15561
|
+
filterModalParent_: filterModalParent_,
|
|
15562
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15530
15563
|
});
|
|
15531
15564
|
const results_filters = $52FdA$solidjs.createSignal();
|
|
15532
15565
|
const shouldActuallyShowInputField = $52FdA$solidjs.createMemo(() => {
|
|
@@ -16304,7 +16337,11 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
16304
16337
|
})),
|
|
16305
16338
|
filterModalParent_: $52FdA$solidjs.untrack(() => props.filterModalParent_),
|
|
16306
16339
|
product_card_template_: product_card_template,
|
|
16307
|
-
class_: () => props.class
|
|
16340
|
+
class_: () => props.class,
|
|
16341
|
+
hideCount0FilterOptions_: () => {
|
|
16342
|
+
var _props$hideCount0Filt;
|
|
16343
|
+
return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
|
|
16344
|
+
}
|
|
16308
16345
|
});
|
|
16309
16346
|
}, "Entire SearchPage failed");
|
|
16310
16347
|
}
|
|
@@ -16971,6 +17008,10 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
|
|
|
16971
17008
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
16972
17009
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
16973
17010
|
showSliderArrow_: () => props.showSliderArrow_,
|
|
17011
|
+
hideCount0FilterOptions_: () => {
|
|
17012
|
+
var _props$hideCount0Filt;
|
|
17013
|
+
return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
|
|
17014
|
+
},
|
|
16974
17015
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
16975
17016
|
history_content_blocks_: history_content_blocks_,
|
|
16976
17017
|
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
package/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.
|
|
14
|
+
export const version = "4.10.0";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1046,6 +1046,7 @@ interface FilterBodyProps {
|
|
|
1046
1046
|
expanded_: boolean;
|
|
1047
1047
|
}[]>;
|
|
1048
1048
|
are_in_modal_?: boolean;
|
|
1049
|
+
hideCount0FilterOptions_: Accessor<boolean>;
|
|
1049
1050
|
}
|
|
1050
1051
|
export function FilterBody(props: FilterBodyProps): JSX.Element;
|
|
1051
1052
|
/**
|
|
@@ -1500,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
1500
1501
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1501
1502
|
class?: string;
|
|
1502
1503
|
showSliderArrow_?: boolean;
|
|
1504
|
+
hideCount0FilterOptions_?: boolean;
|
|
1503
1505
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
1504
1506
|
/**
|
|
1505
1507
|
* Connects the height of the search field to the height of the aligner.
|
|
@@ -1539,7 +1541,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1539
1541
|
* Open the modal with support for alignment.
|
|
1540
1542
|
* @returns {void}
|
|
1541
1543
|
*/
|
|
1542
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1544
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1543
1545
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1544
1546
|
export interface PageReplacer {
|
|
1545
1547
|
readonly render_: () => Node_Array;
|
|
@@ -1619,5 +1621,6 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1619
1621
|
layout?: PossibleLayout;
|
|
1620
1622
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1621
1623
|
showSliderArrow_?: boolean;
|
|
1622
|
-
|
|
1624
|
+
hideCount0FilterOptions_?: boolean;
|
|
1625
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1623
1626
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/ES10/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { add_to_version_info as $8tj43$add_to_version_info, javascript_media_query as $8tj43$javascript_media_query, standard_price_format as $8tj43$standard_price_format, catchify as $8tj43$catchify1, observer as $8tj43$observer, slider_fractional_factory as $8tj43$slider_fractional_factory, report as $8tj43$report1, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, dwarn as $8tj43$dwarn, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, useExpandingContainer as $8tj43$useExpandingContainer, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, findMostFrequentItem as $8tj43$findMostFrequentItem, is_available_in as $8tj43$is_available_in, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, use_href_accessor as $8tj43$use_href_accessor1, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { template as $8tj43$template, createComponent as $8tj43$createComponent, getNextElement as $8tj43$getNextElement, getNextMarker as $8tj43$getNextMarker, insert as $8tj43$insert, isServer as $8tj43$isServer, use as $8tj43$use, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, memo as $8tj43$memo, mergeProps as $8tj43$mergeProps1, addEventListener as $8tj43$addEventListener, runHydrationEvents as $8tj43$runHydrationEvents, delegateEvents as $8tj43$delegateEvents, spread as $8tj43$spread, classList as $8tj43$classList, className as $8tj43$className, style as $8tj43$style, Dynamic as $8tj43$Dynamic, setProperty as $8tj43$setProperty } from "solid-js/web";
|
|
3
3
|
import { createContext as $8tj43$createContext, createSignal as $8tj43$createSignal, getOwner as $8tj43$getOwner, createResource as $8tj43$createResource, untrack as $8tj43$untrack, createRoot as $8tj43$createRoot, createEffect as $8tj43$createEffect, runWithOwner as $8tj43$runWithOwner, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, Show as $8tj43$Show, createComputed as $8tj43$createComputed, createRenderEffect as $8tj43$createRenderEffect, mergeProps as $8tj43$mergeProps, useContext as $8tj43$useContext, createReaction as $8tj43$createReaction, on as $8tj43$on, Suspense as $8tj43$Suspense, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, For as $8tj43$For, createUniqueId as $8tj43$createUniqueId, mapArray as $8tj43$mapArray, batch as $8tj43$batch, Switch as $8tj43$Switch, Match as $8tj43$Match, splitProps as $8tj43$splitProps, createComponent as $8tj43$createComponent1, createSelector as $8tj43$createSelector, children as $8tj43$children } from "solid-js";
|
|
4
|
-
import { catchify as $8tj43$catchify, report as $8tj43$report, use_href_accessor as $8tj43$use_href_accessor, dlog as $8tj43$dlog1, ListenableSet as $8tj43$ListenableSet, queueMacroTask as $8tj43$queueMacroTask1 } from "@depict-ai/utilishared/ES10";
|
|
4
|
+
import { catchify as $8tj43$catchify, report as $8tj43$report, use_href_accessor as $8tj43$use_href_accessor, observer as $8tj43$observer1, dlog as $8tj43$dlog1, ListenableSet as $8tj43$ListenableSet, queueMacroTask as $8tj43$queueMacroTask1 } from "@depict-ai/utilishared/ES10";
|
|
5
5
|
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
6
6
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.0";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -5110,11 +5110,29 @@ function $f6b0500577e1b210$export$3f1a388cc0d8fed7(props) {
|
|
|
5110
5110
|
}
|
|
5111
5111
|
function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
5112
5112
|
const [modified_available_filters_with_selected_unexisting_ones_injected_from_local_state] = props.local_filter_cache_;
|
|
5113
|
-
const
|
|
5113
|
+
const withMaybeCount0Removed = $8tj43$createMemo(() => {
|
|
5114
|
+
const filters = modified_available_filters_with_selected_unexisting_ones_injected_from_local_state();
|
|
5115
|
+
if (!props.hideCount0FilterOptions_()) return filters;
|
|
5116
|
+
return filters.map(filter => {
|
|
5117
|
+
const oldMeta = filter.meta;
|
|
5118
|
+
if (!oldMeta) return filter;
|
|
5119
|
+
const modifiedMeta = {
|
|
5120
|
+
...oldMeta
|
|
5121
|
+
};
|
|
5122
|
+
if ("counts" in modifiedMeta)
|
|
5123
|
+
// Remove all count 0 filter options, important that counts is last option
|
|
5124
|
+
for (const key of ["names", "values", "swatches", "counts"]) modifiedMeta[key] && (modifiedMeta[key] = modifiedMeta[key].filter((_, index) => modifiedMeta.counts[index] !== 0));
|
|
5125
|
+
return {
|
|
5126
|
+
...filter,
|
|
5127
|
+
meta: modifiedMeta
|
|
5128
|
+
};
|
|
5129
|
+
});
|
|
5130
|
+
});
|
|
5131
|
+
const togglable_filters = $8tj43$createMemo(() => withMaybeCount0Removed().filter(item => {
|
|
5114
5132
|
var _item$meta;
|
|
5115
5133
|
return item === null || item === void 0 ? void 0 : (_item$meta = item.meta) === null || _item$meta === void 0 ? void 0 : _item$meta.group_title;
|
|
5116
5134
|
}));
|
|
5117
|
-
const untogglable_filters = $8tj43$createMemo(() =>
|
|
5135
|
+
const untogglable_filters = $8tj43$createMemo(() => withMaybeCount0Removed().filter(item => {
|
|
5118
5136
|
var _item$meta2;
|
|
5119
5137
|
return !(item !== null && item !== void 0 && (_item$meta2 = item.meta) !== null && _item$meta2 !== void 0 && _item$meta2.group_title);
|
|
5120
5138
|
}));
|
|
@@ -5139,9 +5157,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
5139
5157
|
},
|
|
5140
5158
|
get children() {
|
|
5141
5159
|
return (() => {
|
|
5142
|
-
const filter_array_ = $8tj43$createMemo(() =>
|
|
5143
|
-
return Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()];
|
|
5144
|
-
});
|
|
5160
|
+
const filter_array_ = $8tj43$createMemo(() => Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()]);
|
|
5145
5161
|
const {
|
|
5146
5162
|
SearchThisFilterGroup_: SearchThisFilterGroup_,
|
|
5147
5163
|
searched_filter_array_: searched_filter_array_,
|
|
@@ -6170,7 +6186,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6170
6186
|
local_filter_cache_: local_filter_cache_,
|
|
6171
6187
|
get_extra_filters_button_: get_extra_filters_button_,
|
|
6172
6188
|
get_extra_sorting_button_: get_extra_sorting_button_,
|
|
6173
|
-
filterModalParent_: filterModalParent_
|
|
6189
|
+
filterModalParent_: filterModalParent_,
|
|
6190
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6174
6191
|
} = _ref;
|
|
6175
6192
|
const Self = () => {
|
|
6176
6193
|
// This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
|
|
@@ -6205,7 +6222,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
6205
6222
|
available_filters_: available_filters_,
|
|
6206
6223
|
expanded_filters_: expanded_filters_,
|
|
6207
6224
|
selected_filters_: selected_filters_,
|
|
6208
|
-
i18n_: i18n_
|
|
6225
|
+
i18n_: i18n_,
|
|
6226
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
6209
6227
|
};
|
|
6210
6228
|
const hide_filters = $8tj43$createMemo(() => $6fcb97029a69ec44$export$50f68cc9882e36a4(filter_options));
|
|
6211
6229
|
const sorting_options = {
|
|
@@ -7929,7 +7947,7 @@ async function $e92c154db502596d$export$5d2f6cd705125cd3() {
|
|
|
7929
7947
|
$e92c154db502596d$var$cachedHlsModule = hlsModule;
|
|
7930
7948
|
return hlsModule;
|
|
7931
7949
|
}
|
|
7932
|
-
var $3b772ef9a35560fe$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<video
|
|
7950
|
+
var $3b772ef9a35560fe$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<video class=d-standard-content>`);
|
|
7933
7951
|
function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
7934
7952
|
let {
|
|
7935
7953
|
link_: link_,
|
|
@@ -8012,9 +8030,18 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8012
8030
|
hls.loadSource(mediaUrl_);
|
|
8013
8031
|
hls.attachMedia(element);
|
|
8014
8032
|
}
|
|
8033
|
+
const [retryPlayToggle, setRetryPlayToggle] = $8tj43$createSignal(false);
|
|
8015
8034
|
// need runWithOwner for createEffect, because we potentially awaited above
|
|
8016
8035
|
$8tj43$runWithOwner(owner, () => $8tj43$createEffect(() => {
|
|
8017
|
-
|
|
8036
|
+
retryPlayToggle();
|
|
8037
|
+
if (pageVisible()) element.play().catch(async e => {
|
|
8038
|
+
$8tj43$dlog("Failed to play", e);
|
|
8039
|
+
// If we're not in the DOM yet, wait until we are and then try again
|
|
8040
|
+
if (!document.documentElement.contains(element)) {
|
|
8041
|
+
await (0, $8tj43$observer1).wait_for_element(element);
|
|
8042
|
+
setRetryPlayToggle(prev => !prev);
|
|
8043
|
+
}
|
|
8044
|
+
});else element.pause();
|
|
8018
8045
|
}));
|
|
8019
8046
|
});
|
|
8020
8047
|
typeof _ref$ === "function" && $8tj43$use(_ref$, _el$);
|
|
@@ -8024,6 +8051,8 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8024
8051
|
$8tj43$setProperty(_el$, "muted", true);
|
|
8025
8052
|
$8tj43$setProperty(_el$, "autoplay", true);
|
|
8026
8053
|
$8tj43$setProperty(_el$, "playsinline", true);
|
|
8054
|
+
$8tj43$setProperty(_el$, "loop", true);
|
|
8055
|
+
$8tj43$setAttribute(_el$, "disablepictureinpicture", true);
|
|
8027
8056
|
return _el$;
|
|
8028
8057
|
}
|
|
8029
8058
|
})];
|
|
@@ -8147,7 +8176,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8147
8176
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
8148
8177
|
content_blocks_by_row_: content_blocks_by_row_,
|
|
8149
8178
|
filterModalParent_: filterModalParent_,
|
|
8150
|
-
showSliderArrow_: showSliderArrow_
|
|
8179
|
+
showSliderArrow_: showSliderArrow_,
|
|
8180
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
8151
8181
|
} = _ref;
|
|
8152
8182
|
let results_for;
|
|
8153
8183
|
let only_show_filters_opener_;
|
|
@@ -8379,6 +8409,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8379
8409
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
8380
8410
|
sort_and_filter_disabled_: sort_and_filter_disabled_,
|
|
8381
8411
|
filterModalParent_: filterModalParent_,
|
|
8412
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8382
8413
|
...extra_sort_and_filter_args_
|
|
8383
8414
|
});
|
|
8384
8415
|
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
@@ -10502,11 +10533,11 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
10502
10533
|
searching_for_value_: searching_for_value_
|
|
10503
10534
|
})), (() => {
|
|
10504
10535
|
var _el$3 = $8tj43$getNextElement($b055f9e9aeceeb48$var$_tmpl$3);
|
|
10505
|
-
$8tj43$insert(_el$3, $8tj43$createMemo(() => {
|
|
10536
|
+
$8tj43$insert(_el$3, () => $8tj43$createMemo(() => {
|
|
10506
10537
|
if (input_obj().type === "content") return i18n_.content_();
|
|
10507
10538
|
if (input_obj().listing_type === "brand") return i18n_.brand_();
|
|
10508
10539
|
return i18n_.category_();
|
|
10509
|
-
}));
|
|
10540
|
+
})());
|
|
10510
10541
|
return _el$3;
|
|
10511
10542
|
})()];
|
|
10512
10543
|
})());
|
|
@@ -11144,7 +11175,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
11144
11175
|
},
|
|
11145
11176
|
get children() {
|
|
11146
11177
|
var _el$4 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$3);
|
|
11147
|
-
$8tj43$effect(
|
|
11178
|
+
$8tj43$effect(_$p => (_$p = getBackButtonWidth() + "px", _el$4.style.setProperty("width", _$p)));
|
|
11148
11179
|
return _el$4;
|
|
11149
11180
|
}
|
|
11150
11181
|
}), _el$13, _co$3);
|
|
@@ -11857,7 +11888,7 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
11857
11888
|
});
|
|
11858
11889
|
}
|
|
11859
11890
|
}), _el$4, _co$);
|
|
11860
|
-
$8tj43$effect(
|
|
11891
|
+
$8tj43$effect(_$p => (_$p = itemIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
|
|
11861
11892
|
return _el$;
|
|
11862
11893
|
}
|
|
11863
11894
|
});
|
|
@@ -11975,7 +12006,7 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
11975
12006
|
});
|
|
11976
12007
|
}
|
|
11977
12008
|
}));
|
|
11978
|
-
$8tj43$effect(
|
|
12009
|
+
$8tj43$effect(_$p => (_$p = itemIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
|
|
11979
12010
|
return _el$;
|
|
11980
12011
|
}
|
|
11981
12012
|
});
|
|
@@ -12416,7 +12447,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12416
12447
|
}),
|
|
12417
12448
|
...instant_results_options_
|
|
12418
12449
|
}), _el$4, _co$);
|
|
12419
|
-
$8tj43$effect(
|
|
12450
|
+
$8tj43$effect(_$p => (_$p = itemIndexes.instantResultsIndex_()) != null ? _el$.style.setProperty("order", _$p) : _el$.style.removeProperty("order"));
|
|
12420
12451
|
return _el$;
|
|
12421
12452
|
}
|
|
12422
12453
|
});
|
|
@@ -15006,9 +15037,9 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
15006
15037
|
});
|
|
15007
15038
|
}
|
|
15008
15039
|
})), _el$5, _co$2);
|
|
15009
|
-
$8tj43$effect(
|
|
15040
|
+
$8tj43$effect(_$p => {
|
|
15010
15041
|
var _content_results2;
|
|
15011
|
-
return
|
|
15042
|
+
return _$p = is_loading_() && placeholders_enabled() || ((_content_results2 = content_results()) === null || _content_results2 === void 0 ? void 0 : _content_results2.length) > 0 ? "" : "none", _el$.style.setProperty("display", _$p);
|
|
15012
15043
|
});
|
|
15013
15044
|
return _el$;
|
|
15014
15045
|
})();
|
|
@@ -15301,7 +15332,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
15301
15332
|
BackIcon_: BackIcon_,
|
|
15302
15333
|
filterModalParent_: filterModalParent_,
|
|
15303
15334
|
class_: class_,
|
|
15304
|
-
showSliderArrow_: showSliderArrow_
|
|
15335
|
+
showSliderArrow_: showSliderArrow_,
|
|
15336
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15305
15337
|
} = _ref;
|
|
15306
15338
|
const [get_sorting] = current_sorting_;
|
|
15307
15339
|
const all_products_loaded_ = $8tj43$createSignal(false);
|
|
@@ -15421,7 +15453,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
15421
15453
|
local_filter_cache_: local_filter_cache_,
|
|
15422
15454
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
15423
15455
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
15424
|
-
filterModalParent_: filterModalParent_
|
|
15456
|
+
filterModalParent_: filterModalParent_,
|
|
15457
|
+
hideCount0FilterOptions_: hideCount0FilterOptions_
|
|
15425
15458
|
});
|
|
15426
15459
|
const results_filters = $8tj43$createSignal();
|
|
15427
15460
|
const shouldActuallyShowInputField = $8tj43$createMemo(() => {
|
|
@@ -16199,7 +16232,11 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
16199
16232
|
})),
|
|
16200
16233
|
filterModalParent_: $8tj43$untrack(() => props.filterModalParent_),
|
|
16201
16234
|
product_card_template_: product_card_template,
|
|
16202
|
-
class_: () => props.class
|
|
16235
|
+
class_: () => props.class,
|
|
16236
|
+
hideCount0FilterOptions_: () => {
|
|
16237
|
+
var _props$hideCount0Filt;
|
|
16238
|
+
return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
|
|
16239
|
+
}
|
|
16203
16240
|
});
|
|
16204
16241
|
}, "Entire SearchPage failed");
|
|
16205
16242
|
}
|
|
@@ -16866,6 +16903,10 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16866
16903
|
sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
|
|
16867
16904
|
content_blocks_by_row_: () => props.content_blocks_by_row,
|
|
16868
16905
|
showSliderArrow_: () => props.showSliderArrow_,
|
|
16906
|
+
hideCount0FilterOptions_: () => {
|
|
16907
|
+
var _props$hideCount0Filt;
|
|
16908
|
+
return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
|
|
16909
|
+
},
|
|
16869
16910
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
16870
16911
|
history_content_blocks_: history_content_blocks_,
|
|
16871
16912
|
layout_options_: $8tj43$createMemo(() => ({
|