@depict-ai/ui 4.0.11 → 4.0.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 +9 -8
- package/ES10/index.d.ts +3 -3
- package/ES10/index.js +9 -8
- package/latest/index.cjs +9 -8
- package/latest/index.d.ts +3 -3
- package/latest/index.js +9 -8
- package/package.json +1 -1
- package/server/ES10/index.cjs +9 -8
- package/server/ES10/index.d.ts +3 -3
- package/server/ES10/index.js +9 -8
- package/server/latest/index.cjs +9 -8
- package/server/latest/index.d.ts +3 -3
- package/server/latest/index.js +9 -8
package/ES10/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
94
94
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
95
95
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.
|
|
97
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.12";
|
|
98
98
|
function $a28000bc10de28ad$export$e417c49320921907(dependency, fetcher) {
|
|
99
99
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $52FdA$solidjs.createSignal();
|
|
100
100
|
const deparallelizedFetcher = $52FdA$depictaiutilishared.deparallelize_no_drop(async dependencyValue => {
|
|
@@ -597,7 +597,6 @@ function $76012c4468a53d1f$var$deep_equal(obj1, obj2) {
|
|
|
597
597
|
return true;
|
|
598
598
|
}
|
|
599
599
|
var $6e8d48eea3d0469d$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=instant-results>`);
|
|
600
|
-
const $6e8d48eea3d0469d$export$62fda23edba5cc9b = 250;
|
|
601
600
|
function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
602
601
|
let {
|
|
603
602
|
depict_api_: depict_api_,
|
|
@@ -623,7 +622,7 @@ function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
|
623
622
|
// don't wait if it's the first request
|
|
624
623
|
write_current_instant_query(value);
|
|
625
624
|
clearTimeout(timeout);
|
|
626
|
-
timeout = setTimeout($52FdA$depictaiutilishared.catchify(() => write_current_instant_query(value)),
|
|
625
|
+
timeout = setTimeout($52FdA$depictaiutilishared.catchify(() => write_current_instant_query(value)), 250);
|
|
627
626
|
});
|
|
628
627
|
const [search_results] = $52FdA$solidjs.createResource($52FdA$solidjs.createMemo(() => ({
|
|
629
628
|
// <-- key order important, see comment below
|
|
@@ -3236,15 +3235,16 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
3236
3235
|
itemIndex_: itemIndex_,
|
|
3237
3236
|
selected_index_: selected_index_,
|
|
3238
3237
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
3238
|
+
showPlaceholders_: showPlaceholders_,
|
|
3239
3239
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
3240
3240
|
} = _ref;
|
|
3241
3241
|
const listings_by_id = $52FdA$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
3242
3242
|
const productCards = $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.For), {
|
|
3243
3243
|
get each() {
|
|
3244
|
-
return Object.keys(listings_by_id());
|
|
3244
|
+
return $52FdA$solidjsweb.memo(() => !!showPlaceholders_())() ? [,,,] : Object.keys(listings_by_id());
|
|
3245
3245
|
},
|
|
3246
3246
|
children: (listingId, index) => {
|
|
3247
|
-
const listing = $52FdA$solidjs.createMemo(() => listings_by_id()[listingId]);
|
|
3247
|
+
const listing = $52FdA$solidjs.createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
3248
3248
|
return $52FdA$solidjsweb.createComponent((0, $d1e7b96fb13cd1d3$export$67152d26d4f56ee8), {
|
|
3249
3249
|
listing_: listing,
|
|
3250
3250
|
i18n_: i18n_,
|
|
@@ -3268,7 +3268,7 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
3268
3268
|
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
3269
3269
|
get when() {
|
|
3270
3270
|
var _listing_suggestions_2;
|
|
3271
|
-
return (_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length;
|
|
3271
|
+
return ((_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length) || showPlaceholders_();
|
|
3272
3272
|
},
|
|
3273
3273
|
get children() {
|
|
3274
3274
|
var _el$ = $52FdA$solidjsweb.getNextElement($f765bad01136eee1$var$_tmpl$),
|
|
@@ -3775,7 +3775,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3775
3775
|
$52FdA$solidjs.createEffect($52FdA$solidjs.on(get_search_field_value_, () => {
|
|
3776
3776
|
setShowStaleListingSuggestions(true);
|
|
3777
3777
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
3778
|
-
listingSuggestionsDebounceTimeout = setTimeout($52FdA$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)),
|
|
3778
|
+
listingSuggestionsDebounceTimeout = setTimeout($52FdA$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
3779
3779
|
}, {
|
|
3780
3780
|
defer: true
|
|
3781
3781
|
}));
|
|
@@ -3885,7 +3885,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3885
3885
|
},
|
|
3886
3886
|
selected_index_: selected_index_,
|
|
3887
3887
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
3888
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
3888
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
3889
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
3889
3890
|
});
|
|
3890
3891
|
}
|
|
3891
3892
|
});
|
package/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.12";
|
|
14
14
|
export type ModalAlignmentSignals = {
|
|
15
15
|
body_: Signal<JSX.CSSProperties>;
|
|
16
16
|
field_: Signal<JSX.CSSProperties>;
|
|
@@ -1207,7 +1207,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1207
1207
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
1208
1208
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1209
1209
|
layout?: PossibleLayout;
|
|
1210
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1210
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1211
1211
|
export function BreadCrumbs<T extends Display>({
|
|
1212
1212
|
depict_category
|
|
1213
1213
|
}: {
|
|
@@ -1339,7 +1339,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1339
1339
|
* Open the modal with support for alignment.
|
|
1340
1340
|
* @returns {void}
|
|
1341
1341
|
*/
|
|
1342
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1342
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1343
1343
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1344
1344
|
export interface PageReplacer {
|
|
1345
1345
|
readonly render_: () => Node_Array;
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.12";
|
|
14
14
|
function $a604a8ffa4e4c03f$export$e417c49320921907(dependency, fetcher) {
|
|
15
15
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $8tj43$createSignal();
|
|
16
16
|
const deparallelizedFetcher = $8tj43$deparallelize_no_drop(async dependencyValue => {
|
|
@@ -513,7 +513,6 @@ function $2d7bad8684bc7f44$var$deep_equal(obj1, obj2) {
|
|
|
513
513
|
return true;
|
|
514
514
|
}
|
|
515
515
|
var $f7414b949aeabc90$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=instant-results>`);
|
|
516
|
-
const $f7414b949aeabc90$export$62fda23edba5cc9b = 250;
|
|
517
516
|
function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
518
517
|
let {
|
|
519
518
|
depict_api_: depict_api_,
|
|
@@ -539,7 +538,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
539
538
|
// don't wait if it's the first request
|
|
540
539
|
write_current_instant_query(value);
|
|
541
540
|
clearTimeout(timeout);
|
|
542
|
-
timeout = setTimeout($8tj43$catchify(() => write_current_instant_query(value)),
|
|
541
|
+
timeout = setTimeout($8tj43$catchify(() => write_current_instant_query(value)), 250);
|
|
543
542
|
});
|
|
544
543
|
const [search_results] = $8tj43$createResource($8tj43$createMemo(() => ({
|
|
545
544
|
// <-- key order important, see comment below
|
|
@@ -3152,15 +3151,16 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
3152
3151
|
itemIndex_: itemIndex_,
|
|
3153
3152
|
selected_index_: selected_index_,
|
|
3154
3153
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
3154
|
+
showPlaceholders_: showPlaceholders_,
|
|
3155
3155
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
3156
3156
|
} = _ref;
|
|
3157
3157
|
const listings_by_id = $8tj43$createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
3158
3158
|
const productCards = $8tj43$createComponent((0, $8tj43$For), {
|
|
3159
3159
|
get each() {
|
|
3160
|
-
return Object.keys(listings_by_id());
|
|
3160
|
+
return $8tj43$memo(() => !!showPlaceholders_())() ? [,,,] : Object.keys(listings_by_id());
|
|
3161
3161
|
},
|
|
3162
3162
|
children: (listingId, index) => {
|
|
3163
|
-
const listing = $8tj43$createMemo(() => listings_by_id()[listingId]);
|
|
3163
|
+
const listing = $8tj43$createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
3164
3164
|
return $8tj43$createComponent((0, $26db6925469636a4$export$67152d26d4f56ee8), {
|
|
3165
3165
|
listing_: listing,
|
|
3166
3166
|
i18n_: i18n_,
|
|
@@ -3184,7 +3184,7 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
3184
3184
|
return $8tj43$createComponent((0, $8tj43$Show), {
|
|
3185
3185
|
get when() {
|
|
3186
3186
|
var _listing_suggestions_2;
|
|
3187
|
-
return (_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length;
|
|
3187
|
+
return ((_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length) || showPlaceholders_();
|
|
3188
3188
|
},
|
|
3189
3189
|
get children() {
|
|
3190
3190
|
var _el$ = $8tj43$getNextElement($ab401afaded322ab$var$_tmpl$),
|
|
@@ -3691,7 +3691,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
3691
3691
|
$8tj43$createEffect($8tj43$on(get_search_field_value_, () => {
|
|
3692
3692
|
setShowStaleListingSuggestions(true);
|
|
3693
3693
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
3694
|
-
listingSuggestionsDebounceTimeout = setTimeout($8tj43$catchify(() => setShowStaleListingSuggestions(false)),
|
|
3694
|
+
listingSuggestionsDebounceTimeout = setTimeout($8tj43$catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
3695
3695
|
}, {
|
|
3696
3696
|
defer: true
|
|
3697
3697
|
}));
|
|
@@ -3801,7 +3801,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
3801
3801
|
},
|
|
3802
3802
|
selected_index_: selected_index_,
|
|
3803
3803
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
3804
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
3804
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
3805
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
3805
3806
|
});
|
|
3806
3807
|
}
|
|
3807
3808
|
});
|
package/latest/index.cjs
CHANGED
|
@@ -88,7 +88,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
88
88
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
89
89
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
90
90
|
/*! Depict.ai search and product listing SDK */
|
|
91
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.
|
|
91
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.12";
|
|
92
92
|
function $53df95e470b2f8d2$export$e417c49320921907(dependency, fetcher) {
|
|
93
93
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $gVhhF$solidjs.createSignal();
|
|
94
94
|
const deparallelizedFetcher = $gVhhF$depictaiutilishared.deparallelize_no_drop(async dependencyValue => {
|
|
@@ -571,7 +571,6 @@ function $a73063cc642f3e5f$var$deep_equal(obj1, obj2) {
|
|
|
571
571
|
return true;
|
|
572
572
|
}
|
|
573
573
|
var $6ae556e536054e87$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=instant-results>`);
|
|
574
|
-
const $6ae556e536054e87$export$62fda23edba5cc9b = 250;
|
|
575
574
|
function $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
576
575
|
depict_api_: depict_api_,
|
|
577
576
|
search_field_value_: [get_search_field_value],
|
|
@@ -596,7 +595,7 @@ function $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
|
596
595
|
// don't wait if it's the first request
|
|
597
596
|
write_current_instant_query(value);
|
|
598
597
|
clearTimeout(timeout);
|
|
599
|
-
timeout = setTimeout($gVhhF$depictaiutilishared.catchify(() => write_current_instant_query(value)),
|
|
598
|
+
timeout = setTimeout($gVhhF$depictaiutilishared.catchify(() => write_current_instant_query(value)), 250);
|
|
600
599
|
});
|
|
601
600
|
const [search_results] = $gVhhF$solidjs.createResource($gVhhF$solidjs.createMemo(() => ({
|
|
602
601
|
// <-- key order important, see comment below
|
|
@@ -3089,15 +3088,16 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
3089
3088
|
itemIndex_: itemIndex_,
|
|
3090
3089
|
selected_index_: selected_index_,
|
|
3091
3090
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
3091
|
+
showPlaceholders_: showPlaceholders_,
|
|
3092
3092
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
3093
3093
|
}) {
|
|
3094
3094
|
const listings_by_id = $gVhhF$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
3095
3095
|
const productCards = $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.For), {
|
|
3096
3096
|
get each() {
|
|
3097
|
-
return Object.keys(listings_by_id());
|
|
3097
|
+
return $gVhhF$solidjsweb.memo(() => !!showPlaceholders_())() ? [,,,] : Object.keys(listings_by_id());
|
|
3098
3098
|
},
|
|
3099
3099
|
children: (listingId, index) => {
|
|
3100
|
-
const listing = $gVhhF$solidjs.createMemo(() => listings_by_id()[listingId]);
|
|
3100
|
+
const listing = $gVhhF$solidjs.createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
3101
3101
|
return $gVhhF$solidjsweb.createComponent((0, $1f3b5fa875714dea$export$67152d26d4f56ee8), {
|
|
3102
3102
|
listing_: listing,
|
|
3103
3103
|
i18n_: i18n_,
|
|
@@ -3117,7 +3117,7 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
3117
3117
|
})) || []));
|
|
3118
3118
|
return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
3119
3119
|
get when() {
|
|
3120
|
-
return listing_suggestions_()?.length;
|
|
3120
|
+
return listing_suggestions_()?.length || showPlaceholders_();
|
|
3121
3121
|
},
|
|
3122
3122
|
get children() {
|
|
3123
3123
|
var _el$ = $gVhhF$solidjsweb.getNextElement($83e616b38be339e4$var$_tmpl$),
|
|
@@ -3610,7 +3610,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
3610
3610
|
$gVhhF$solidjs.createEffect($gVhhF$solidjs.on(get_search_field_value_, () => {
|
|
3611
3611
|
setShowStaleListingSuggestions(true);
|
|
3612
3612
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
3613
|
-
listingSuggestionsDebounceTimeout = setTimeout($gVhhF$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)),
|
|
3613
|
+
listingSuggestionsDebounceTimeout = setTimeout($gVhhF$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
3614
3614
|
}, {
|
|
3615
3615
|
defer: true
|
|
3616
3616
|
}));
|
|
@@ -3720,7 +3720,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
3720
3720
|
},
|
|
3721
3721
|
selected_index_: selected_index_,
|
|
3722
3722
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
3723
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
3723
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
3724
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
3724
3725
|
});
|
|
3725
3726
|
}
|
|
3726
3727
|
});
|
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 _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.12";
|
|
14
14
|
export type ModalAlignmentSignals = {
|
|
15
15
|
body_: Signal<JSX.CSSProperties>;
|
|
16
16
|
field_: Signal<JSX.CSSProperties>;
|
|
@@ -1207,7 +1207,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1207
1207
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
1208
1208
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1209
1209
|
layout?: PossibleLayout;
|
|
1210
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1210
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1211
1211
|
export function BreadCrumbs<T extends Display>({
|
|
1212
1212
|
depict_category
|
|
1213
1213
|
}: {
|
|
@@ -1339,7 +1339,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1339
1339
|
* Open the modal with support for alignment.
|
|
1340
1340
|
* @returns {void}
|
|
1341
1341
|
*/
|
|
1342
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1342
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1343
1343
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1344
1344
|
export interface PageReplacer {
|
|
1345
1345
|
readonly render_: () => Node_Array;
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.12";
|
|
11
11
|
function $136f1d4d6c7ba6ac$export$e417c49320921907(dependency, fetcher) {
|
|
12
12
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $9HbP8$createSignal();
|
|
13
13
|
const deparallelizedFetcher = $9HbP8$deparallelize_no_drop(async dependencyValue => {
|
|
@@ -490,7 +490,6 @@ function $29ec7cddbe1d3484$var$deep_equal(obj1, obj2) {
|
|
|
490
490
|
return true;
|
|
491
491
|
}
|
|
492
492
|
var $eea41f703612261b$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=instant-results>`);
|
|
493
|
-
const $eea41f703612261b$export$62fda23edba5cc9b = 250;
|
|
494
493
|
function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
495
494
|
depict_api_: depict_api_,
|
|
496
495
|
search_field_value_: [get_search_field_value],
|
|
@@ -515,7 +514,7 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
515
514
|
// don't wait if it's the first request
|
|
516
515
|
write_current_instant_query(value);
|
|
517
516
|
clearTimeout(timeout);
|
|
518
|
-
timeout = setTimeout($9HbP8$catchify(() => write_current_instant_query(value)),
|
|
517
|
+
timeout = setTimeout($9HbP8$catchify(() => write_current_instant_query(value)), 250);
|
|
519
518
|
});
|
|
520
519
|
const [search_results] = $9HbP8$createResource($9HbP8$createMemo(() => ({
|
|
521
520
|
// <-- key order important, see comment below
|
|
@@ -3008,15 +3007,16 @@ function $44f30a4222ce604b$export$c8d7e00464029b45({
|
|
|
3008
3007
|
itemIndex_: itemIndex_,
|
|
3009
3008
|
selected_index_: selected_index_,
|
|
3010
3009
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
3010
|
+
showPlaceholders_: showPlaceholders_,
|
|
3011
3011
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
3012
3012
|
}) {
|
|
3013
3013
|
const listings_by_id = $9HbP8$createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
3014
3014
|
const productCards = $9HbP8$createComponent((0, $9HbP8$For), {
|
|
3015
3015
|
get each() {
|
|
3016
|
-
return Object.keys(listings_by_id());
|
|
3016
|
+
return $9HbP8$memo(() => !!showPlaceholders_())() ? [,,,] : Object.keys(listings_by_id());
|
|
3017
3017
|
},
|
|
3018
3018
|
children: (listingId, index) => {
|
|
3019
|
-
const listing = $9HbP8$createMemo(() => listings_by_id()[listingId]);
|
|
3019
|
+
const listing = $9HbP8$createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
3020
3020
|
return $9HbP8$createComponent((0, $4ce5b8892775b62d$export$67152d26d4f56ee8), {
|
|
3021
3021
|
listing_: listing,
|
|
3022
3022
|
i18n_: i18n_,
|
|
@@ -3036,7 +3036,7 @@ function $44f30a4222ce604b$export$c8d7e00464029b45({
|
|
|
3036
3036
|
})) || []));
|
|
3037
3037
|
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
3038
3038
|
get when() {
|
|
3039
|
-
return listing_suggestions_()?.length;
|
|
3039
|
+
return listing_suggestions_()?.length || showPlaceholders_();
|
|
3040
3040
|
},
|
|
3041
3041
|
get children() {
|
|
3042
3042
|
var _el$ = $9HbP8$getNextElement($44f30a4222ce604b$var$_tmpl$),
|
|
@@ -3529,7 +3529,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
3529
3529
|
$9HbP8$createEffect($9HbP8$on(get_search_field_value_, () => {
|
|
3530
3530
|
setShowStaleListingSuggestions(true);
|
|
3531
3531
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
3532
|
-
listingSuggestionsDebounceTimeout = setTimeout($9HbP8$catchify(() => setShowStaleListingSuggestions(false)),
|
|
3532
|
+
listingSuggestionsDebounceTimeout = setTimeout($9HbP8$catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
3533
3533
|
}, {
|
|
3534
3534
|
defer: true
|
|
3535
3535
|
}));
|
|
@@ -3639,7 +3639,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
3639
3639
|
},
|
|
3640
3640
|
selected_index_: selected_index_,
|
|
3641
3641
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
3642
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
3642
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
3643
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
3643
3644
|
});
|
|
3644
3645
|
}
|
|
3645
3646
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.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",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
94
94
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
95
95
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
96
96
|
/*! Depict.ai search and product listing SDK */
|
|
97
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.
|
|
97
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0.12";
|
|
98
98
|
function $a28000bc10de28ad$export$e417c49320921907(dependency, fetcher) {
|
|
99
99
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $3hooq$solidjs.createSignal();
|
|
100
100
|
const deparallelizedFetcher = $3hooq$depictaiutilishared.deparallelize_no_drop(async dependencyValue => {
|
|
@@ -489,7 +489,6 @@ function $76012c4468a53d1f$var$deep_equal(obj1, obj2) {
|
|
|
489
489
|
return true;
|
|
490
490
|
}
|
|
491
491
|
var $6e8d48eea3d0469d$var$_tmpl$ = ["<div", ' class="instant-results" style="', '">', "</div>"];
|
|
492
|
-
const $6e8d48eea3d0469d$export$62fda23edba5cc9b = 250;
|
|
493
492
|
function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
494
493
|
let {
|
|
495
494
|
depict_api_: depict_api_,
|
|
@@ -515,7 +514,7 @@ function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
|
515
514
|
// don't wait if it's the first request
|
|
516
515
|
write_current_instant_query(value);
|
|
517
516
|
clearTimeout(timeout);
|
|
518
|
-
timeout = setTimeout($3hooq$depictaiutilishared.catchify(() => write_current_instant_query(value)),
|
|
517
|
+
timeout = setTimeout($3hooq$depictaiutilishared.catchify(() => write_current_instant_query(value)), 250);
|
|
519
518
|
});
|
|
520
519
|
const [search_results] = $3hooq$solidjs.createResource($3hooq$solidjs.createMemo(() => ({
|
|
521
520
|
// <-- key order important, see comment below
|
|
@@ -2541,15 +2540,16 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
2541
2540
|
itemIndex_: itemIndex_,
|
|
2542
2541
|
selected_index_: selected_index_,
|
|
2543
2542
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
2543
|
+
showPlaceholders_: showPlaceholders_,
|
|
2544
2544
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
2545
2545
|
} = _ref;
|
|
2546
2546
|
const listings_by_id = $3hooq$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
2547
2547
|
const productCards = $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.For), {
|
|
2548
2548
|
get each() {
|
|
2549
|
-
return Object.keys(listings_by_id());
|
|
2549
|
+
return showPlaceholders_() ? [,,,] : Object.keys(listings_by_id());
|
|
2550
2550
|
},
|
|
2551
2551
|
children: (listingId, index) => {
|
|
2552
|
-
const listing = $3hooq$solidjs.createMemo(() => listings_by_id()[listingId]);
|
|
2552
|
+
const listing = $3hooq$solidjs.createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
2553
2553
|
return $3hooq$solidjsweb.createComponent((0, $d1e7b96fb13cd1d3$export$67152d26d4f56ee8), {
|
|
2554
2554
|
listing_: listing,
|
|
2555
2555
|
i18n_: i18n_,
|
|
@@ -2573,7 +2573,7 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
2573
2573
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
2574
2574
|
get when() {
|
|
2575
2575
|
var _listing_suggestions_2;
|
|
2576
|
-
return (_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length;
|
|
2576
|
+
return ((_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length) || showPlaceholders_();
|
|
2577
2577
|
},
|
|
2578
2578
|
get children() {
|
|
2579
2579
|
return $3hooq$solidjsweb.ssr($f765bad01136eee1$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "order:" + $3hooq$solidjsweb.escape(itemIndex_(), true), $3hooq$solidjsweb.escape(i18n_.listing_suggestions_()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
@@ -3013,7 +3013,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3013
3013
|
$3hooq$solidjs.createEffect($3hooq$solidjs.on(get_search_field_value_, () => {
|
|
3014
3014
|
setShowStaleListingSuggestions(true);
|
|
3015
3015
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
3016
|
-
listingSuggestionsDebounceTimeout = setTimeout($3hooq$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)),
|
|
3016
|
+
listingSuggestionsDebounceTimeout = setTimeout($3hooq$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
3017
3017
|
}, {
|
|
3018
3018
|
defer: true
|
|
3019
3019
|
}));
|
|
@@ -3116,7 +3116,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
3116
3116
|
},
|
|
3117
3117
|
selected_index_: selected_index_,
|
|
3118
3118
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
3119
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
3119
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
3120
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
3120
3121
|
});
|
|
3121
3122
|
}
|
|
3122
3123
|
});
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.12";
|
|
14
14
|
export type ModalAlignmentSignals = {
|
|
15
15
|
body_: Signal<JSX.CSSProperties>;
|
|
16
16
|
field_: Signal<JSX.CSSProperties>;
|
|
@@ -1207,7 +1207,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1207
1207
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
1208
1208
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1209
1209
|
layout?: PossibleLayout;
|
|
1210
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1210
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1211
1211
|
export function BreadCrumbs<T extends Display>({
|
|
1212
1212
|
depict_category
|
|
1213
1213
|
}: {
|
|
@@ -1339,7 +1339,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1339
1339
|
* Open the modal with support for alignment.
|
|
1340
1340
|
* @returns {void}
|
|
1341
1341
|
*/
|
|
1342
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1342
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1343
1343
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1344
1344
|
export interface PageReplacer {
|
|
1345
1345
|
readonly render_: () => Node_Array;
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.0.12";
|
|
14
14
|
function $a604a8ffa4e4c03f$export$e417c49320921907(dependency, fetcher) {
|
|
15
15
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $b8hua$createSignal();
|
|
16
16
|
const deparallelizedFetcher = $b8hua$deparallelize_no_drop(async dependencyValue => {
|
|
@@ -405,7 +405,6 @@ function $2d7bad8684bc7f44$var$deep_equal(obj1, obj2) {
|
|
|
405
405
|
return true;
|
|
406
406
|
}
|
|
407
407
|
var $f7414b949aeabc90$var$_tmpl$ = ["<div", ' class="instant-results" style="', '">', "</div>"];
|
|
408
|
-
const $f7414b949aeabc90$export$62fda23edba5cc9b = 250;
|
|
409
408
|
function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
410
409
|
let {
|
|
411
410
|
depict_api_: depict_api_,
|
|
@@ -431,7 +430,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
431
430
|
// don't wait if it's the first request
|
|
432
431
|
write_current_instant_query(value);
|
|
433
432
|
clearTimeout(timeout);
|
|
434
|
-
timeout = setTimeout($b8hua$catchify(() => write_current_instant_query(value)),
|
|
433
|
+
timeout = setTimeout($b8hua$catchify(() => write_current_instant_query(value)), 250);
|
|
435
434
|
});
|
|
436
435
|
const [search_results] = $b8hua$createResource($b8hua$createMemo(() => ({
|
|
437
436
|
// <-- key order important, see comment below
|
|
@@ -2457,15 +2456,16 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
2457
2456
|
itemIndex_: itemIndex_,
|
|
2458
2457
|
selected_index_: selected_index_,
|
|
2459
2458
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
2459
|
+
showPlaceholders_: showPlaceholders_,
|
|
2460
2460
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
2461
2461
|
} = _ref;
|
|
2462
2462
|
const listings_by_id = $b8hua$createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
2463
2463
|
const productCards = $b8hua$createComponent((0, $b8hua$For), {
|
|
2464
2464
|
get each() {
|
|
2465
|
-
return Object.keys(listings_by_id());
|
|
2465
|
+
return showPlaceholders_() ? [,,,] : Object.keys(listings_by_id());
|
|
2466
2466
|
},
|
|
2467
2467
|
children: (listingId, index) => {
|
|
2468
|
-
const listing = $b8hua$createMemo(() => listings_by_id()[listingId]);
|
|
2468
|
+
const listing = $b8hua$createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
2469
2469
|
return $b8hua$createComponent((0, $26db6925469636a4$export$67152d26d4f56ee8), {
|
|
2470
2470
|
listing_: listing,
|
|
2471
2471
|
i18n_: i18n_,
|
|
@@ -2489,7 +2489,7 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
2489
2489
|
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
2490
2490
|
get when() {
|
|
2491
2491
|
var _listing_suggestions_2;
|
|
2492
|
-
return (_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length;
|
|
2492
|
+
return ((_listing_suggestions_2 = listing_suggestions_()) === null || _listing_suggestions_2 === void 0 ? void 0 : _listing_suggestions_2.length) || showPlaceholders_();
|
|
2493
2493
|
},
|
|
2494
2494
|
get children() {
|
|
2495
2495
|
return $b8hua$ssr($ab401afaded322ab$var$_tmpl$, $b8hua$ssrHydrationKey(), "order:" + $b8hua$escape(itemIndex_(), true), $b8hua$escape(i18n_.listing_suggestions_()), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
@@ -2929,7 +2929,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
2929
2929
|
$b8hua$createEffect($b8hua$on(get_search_field_value_, () => {
|
|
2930
2930
|
setShowStaleListingSuggestions(true);
|
|
2931
2931
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
2932
|
-
listingSuggestionsDebounceTimeout = setTimeout($b8hua$catchify(() => setShowStaleListingSuggestions(false)),
|
|
2932
|
+
listingSuggestionsDebounceTimeout = setTimeout($b8hua$catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
2933
2933
|
}, {
|
|
2934
2934
|
defer: true
|
|
2935
2935
|
}));
|
|
@@ -3032,7 +3032,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
3032
3032
|
},
|
|
3033
3033
|
selected_index_: selected_index_,
|
|
3034
3034
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
3035
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
3035
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
3036
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
3036
3037
|
});
|
|
3037
3038
|
}
|
|
3038
3039
|
});
|
package/server/latest/index.cjs
CHANGED
|
@@ -88,7 +88,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
88
88
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
89
89
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
90
90
|
/*! Depict.ai search and product listing SDK */
|
|
91
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.
|
|
91
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0.12";
|
|
92
92
|
function $53df95e470b2f8d2$export$e417c49320921907(dependency, fetcher) {
|
|
93
93
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $5vyXB$solidjs.createSignal();
|
|
94
94
|
const deparallelizedFetcher = $5vyXB$depictaiutilishared.deparallelize_no_drop(async dependencyValue => {
|
|
@@ -466,7 +466,6 @@ function $a73063cc642f3e5f$var$deep_equal(obj1, obj2) {
|
|
|
466
466
|
return true;
|
|
467
467
|
}
|
|
468
468
|
var $6ae556e536054e87$var$_tmpl$ = ["<div", ' class="instant-results" style="', '">', "</div>"];
|
|
469
|
-
const $6ae556e536054e87$export$62fda23edba5cc9b = 250;
|
|
470
469
|
function $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
471
470
|
depict_api_: depict_api_,
|
|
472
471
|
search_field_value_: [get_search_field_value],
|
|
@@ -491,7 +490,7 @@ function $6ae556e536054e87$export$62f101a8aa597bf8({
|
|
|
491
490
|
// don't wait if it's the first request
|
|
492
491
|
write_current_instant_query(value);
|
|
493
492
|
clearTimeout(timeout);
|
|
494
|
-
timeout = setTimeout($5vyXB$depictaiutilishared.catchify(() => write_current_instant_query(value)),
|
|
493
|
+
timeout = setTimeout($5vyXB$depictaiutilishared.catchify(() => write_current_instant_query(value)), 250);
|
|
495
494
|
});
|
|
496
495
|
const [search_results] = $5vyXB$solidjs.createResource($5vyXB$solidjs.createMemo(() => ({
|
|
497
496
|
// <-- key order important, see comment below
|
|
@@ -2415,15 +2414,16 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
2415
2414
|
itemIndex_: itemIndex_,
|
|
2416
2415
|
selected_index_: selected_index_,
|
|
2417
2416
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
2417
|
+
showPlaceholders_: showPlaceholders_,
|
|
2418
2418
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
2419
2419
|
}) {
|
|
2420
2420
|
const listings_by_id = $5vyXB$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
2421
2421
|
const productCards = $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.For), {
|
|
2422
2422
|
get each() {
|
|
2423
|
-
return Object.keys(listings_by_id());
|
|
2423
|
+
return showPlaceholders_() ? [,,,] : Object.keys(listings_by_id());
|
|
2424
2424
|
},
|
|
2425
2425
|
children: (listingId, index) => {
|
|
2426
|
-
const listing = $5vyXB$solidjs.createMemo(() => listings_by_id()[listingId]);
|
|
2426
|
+
const listing = $5vyXB$solidjs.createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
2427
2427
|
return $5vyXB$solidjsweb.createComponent((0, $1f3b5fa875714dea$export$67152d26d4f56ee8), {
|
|
2428
2428
|
listing_: listing,
|
|
2429
2429
|
i18n_: i18n_,
|
|
@@ -2443,7 +2443,7 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
2443
2443
|
})) || []));
|
|
2444
2444
|
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
2445
2445
|
get when() {
|
|
2446
|
-
return listing_suggestions_()?.length;
|
|
2446
|
+
return listing_suggestions_()?.length || showPlaceholders_();
|
|
2447
2447
|
},
|
|
2448
2448
|
get children() {
|
|
2449
2449
|
return $5vyXB$solidjsweb.ssr($83e616b38be339e4$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), "order:" + $5vyXB$solidjsweb.escape(itemIndex_(), true), $5vyXB$solidjsweb.escape(i18n_.listing_suggestions_()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
@@ -2869,7 +2869,7 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
2869
2869
|
$5vyXB$solidjs.createEffect($5vyXB$solidjs.on(get_search_field_value_, () => {
|
|
2870
2870
|
setShowStaleListingSuggestions(true);
|
|
2871
2871
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
2872
|
-
listingSuggestionsDebounceTimeout = setTimeout($5vyXB$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)),
|
|
2872
|
+
listingSuggestionsDebounceTimeout = setTimeout($5vyXB$depictaiutilishared.catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
2873
2873
|
}, {
|
|
2874
2874
|
defer: true
|
|
2875
2875
|
}));
|
|
@@ -2972,7 +2972,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
2972
2972
|
},
|
|
2973
2973
|
selected_index_: selected_index_,
|
|
2974
2974
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
2975
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
2975
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
2976
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
2976
2977
|
});
|
|
2977
2978
|
}
|
|
2978
2979
|
});
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "4.0.
|
|
13
|
+
export const version = "4.0.12";
|
|
14
14
|
export type ModalAlignmentSignals = {
|
|
15
15
|
body_: Signal<JSX.CSSProperties>;
|
|
16
16
|
field_: Signal<JSX.CSSProperties>;
|
|
@@ -1207,7 +1207,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1207
1207
|
on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
|
|
1208
1208
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1209
1209
|
layout?: PossibleLayout;
|
|
1210
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1210
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1211
1211
|
export function BreadCrumbs<T extends Display>({
|
|
1212
1212
|
depict_category
|
|
1213
1213
|
}: {
|
|
@@ -1339,7 +1339,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1339
1339
|
* Open the modal with support for alignment.
|
|
1340
1340
|
* @returns {void}
|
|
1341
1341
|
*/
|
|
1342
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1342
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1343
1343
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1344
1344
|
export interface PageReplacer {
|
|
1345
1345
|
readonly render_: () => Node_Array;
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.0.12";
|
|
11
11
|
function $136f1d4d6c7ba6ac$export$e417c49320921907(dependency, fetcher) {
|
|
12
12
|
const [promiseOfCurrentFetcherRun, setPromiseOfCurrentFetcherRun] = $i7OB2$createSignal();
|
|
13
13
|
const deparallelizedFetcher = $i7OB2$deparallelize_no_drop(async dependencyValue => {
|
|
@@ -385,7 +385,6 @@ function $29ec7cddbe1d3484$var$deep_equal(obj1, obj2) {
|
|
|
385
385
|
return true;
|
|
386
386
|
}
|
|
387
387
|
var $eea41f703612261b$var$_tmpl$ = ["<div", ' class="instant-results" style="', '">', "</div>"];
|
|
388
|
-
const $eea41f703612261b$export$62fda23edba5cc9b = 250;
|
|
389
388
|
function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
390
389
|
depict_api_: depict_api_,
|
|
391
390
|
search_field_value_: [get_search_field_value],
|
|
@@ -410,7 +409,7 @@ function $eea41f703612261b$export$62f101a8aa597bf8({
|
|
|
410
409
|
// don't wait if it's the first request
|
|
411
410
|
write_current_instant_query(value);
|
|
412
411
|
clearTimeout(timeout);
|
|
413
|
-
timeout = setTimeout($i7OB2$catchify(() => write_current_instant_query(value)),
|
|
412
|
+
timeout = setTimeout($i7OB2$catchify(() => write_current_instant_query(value)), 250);
|
|
414
413
|
});
|
|
415
414
|
const [search_results] = $i7OB2$createResource($i7OB2$createMemo(() => ({
|
|
416
415
|
// <-- key order important, see comment below
|
|
@@ -2334,15 +2333,16 @@ function $44f30a4222ce604b$export$c8d7e00464029b45({
|
|
|
2334
2333
|
itemIndex_: itemIndex_,
|
|
2335
2334
|
selected_index_: selected_index_,
|
|
2336
2335
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
2336
|
+
showPlaceholders_: showPlaceholders_,
|
|
2337
2337
|
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
2338
2338
|
}) {
|
|
2339
2339
|
const listings_by_id = $i7OB2$createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
2340
2340
|
const productCards = $i7OB2$createComponent((0, $i7OB2$For), {
|
|
2341
2341
|
get each() {
|
|
2342
|
-
return Object.keys(listings_by_id());
|
|
2342
|
+
return showPlaceholders_() ? [,,,] : Object.keys(listings_by_id());
|
|
2343
2343
|
},
|
|
2344
2344
|
children: (listingId, index) => {
|
|
2345
|
-
const listing = $i7OB2$createMemo(() => listings_by_id()[listingId]);
|
|
2345
|
+
const listing = $i7OB2$createMemo(() => listingId == undefined ? undefined : listings_by_id()[listingId]);
|
|
2346
2346
|
return $i7OB2$createComponent((0, $4ce5b8892775b62d$export$67152d26d4f56ee8), {
|
|
2347
2347
|
listing_: listing,
|
|
2348
2348
|
i18n_: i18n_,
|
|
@@ -2362,7 +2362,7 @@ function $44f30a4222ce604b$export$c8d7e00464029b45({
|
|
|
2362
2362
|
})) || []));
|
|
2363
2363
|
return $i7OB2$createComponent((0, $i7OB2$Show), {
|
|
2364
2364
|
get when() {
|
|
2365
|
-
return listing_suggestions_()?.length;
|
|
2365
|
+
return listing_suggestions_()?.length || showPlaceholders_();
|
|
2366
2366
|
},
|
|
2367
2367
|
get children() {
|
|
2368
2368
|
return $i7OB2$ssr($44f30a4222ce604b$var$_tmpl$, $i7OB2$ssrHydrationKey(), "order:" + $i7OB2$escape(itemIndex_(), true), $i7OB2$escape(i18n_.listing_suggestions_()), $i7OB2$escape($i7OB2$createComponent((0, $i7OB2$Show), {
|
|
@@ -2788,7 +2788,7 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
2788
2788
|
$i7OB2$createEffect($i7OB2$on(get_search_field_value_, () => {
|
|
2789
2789
|
setShowStaleListingSuggestions(true);
|
|
2790
2790
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
2791
|
-
listingSuggestionsDebounceTimeout = setTimeout($i7OB2$catchify(() => setShowStaleListingSuggestions(false)),
|
|
2791
|
+
listingSuggestionsDebounceTimeout = setTimeout($i7OB2$catchify(() => setShowStaleListingSuggestions(false)), 350);
|
|
2792
2792
|
}, {
|
|
2793
2793
|
defer: true
|
|
2794
2794
|
}));
|
|
@@ -2891,7 +2891,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
2891
2891
|
},
|
|
2892
2892
|
selected_index_: selected_index_,
|
|
2893
2893
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
2894
|
-
modalLayoutStacked_: modalLayoutStacked_
|
|
2894
|
+
modalLayoutStacked_: modalLayoutStacked_,
|
|
2895
|
+
showPlaceholders_: () => !suggestions_response_.latest
|
|
2895
2896
|
});
|
|
2896
2897
|
}
|
|
2897
2898
|
});
|