@depict-ai/ui 4.0.28 → 4.1.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 +18 -10
- package/ES10/index.d.ts +31 -6
- package/ES10/index.js +18 -10
- package/latest/index.cjs +16 -10
- package/latest/index.d.ts +31 -6
- package/latest/index.js +16 -10
- package/package.json +1 -1
- package/server/ES10/index.cjs +18 -10
- package/server/ES10/index.d.ts +31 -6
- package/server/ES10/index.js +18 -10
- package/server/latest/index.cjs +16 -10
- package/server/latest/index.d.ts +31 -6
- package/server/latest/index.js +16 -10
package/ES10/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
98
98
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
99
99
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
100
100
|
/*! Depict.ai search and product listing SDK */
|
|
101
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0
|
|
101
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.0";
|
|
102
102
|
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
103
103
|
let $cfcd56242923775d$var$has_ran = false;
|
|
104
104
|
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
@@ -12440,6 +12440,11 @@ var $9cbefc32b9dab36d$var$_market_signal = /*#__PURE__*/new WeakMap();
|
|
|
12440
12440
|
var $9cbefc32b9dab36d$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
|
|
12441
12441
|
var $9cbefc32b9dab36d$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
|
|
12442
12442
|
class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
12443
|
+
/**
|
|
12444
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
12445
|
+
*/ /**
|
|
12446
|
+
* 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.
|
|
12447
|
+
*/
|
|
12443
12448
|
get localization() {
|
|
12444
12449
|
// allow reactive access
|
|
12445
12450
|
return $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[0]();
|
|
@@ -12490,6 +12495,8 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
|
12490
12495
|
listing_query_state_key: listing_query_state_key,
|
|
12491
12496
|
...props_on_class
|
|
12492
12497
|
} = _ref2;
|
|
12498
|
+
$parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "historyStateSignals_", void 0);
|
|
12499
|
+
$parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "selectedFilters_", void 0);
|
|
12493
12500
|
$9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_router, {
|
|
12494
12501
|
writable: true,
|
|
12495
12502
|
value: void 0
|
|
@@ -12551,8 +12558,9 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
|
12551
12558
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
12552
12559
|
});
|
|
12553
12560
|
const i18n_ = $39cca429fb71d8ff$export$f091cbac892643a4($parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[0]);
|
|
12561
|
+
this.historyStateSignals_ = state_;
|
|
12562
|
+
this.selectedFilters_ = selected_filters_;
|
|
12554
12563
|
$9cbefc32b9dab36d$var$privately_shared_properties.set(this, {
|
|
12555
|
-
state_: state_,
|
|
12556
12564
|
breadcrumb_signal_: $52FdA$solidjs.createSignal(),
|
|
12557
12565
|
quicklinks_signal_: $52FdA$solidjs.createSignal(),
|
|
12558
12566
|
i18n_: i18n_,
|
|
@@ -12618,14 +12626,14 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
12618
12626
|
};
|
|
12619
12627
|
});
|
|
12620
12628
|
const {
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
+
local_filter_cache: local_filter_cache_,
|
|
12630
|
+
filters_open: category_filters_open_,
|
|
12631
|
+
sorting_open: category_sorting_open_,
|
|
12632
|
+
expanded_filters: expanded_filters_,
|
|
12633
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
12634
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
12635
|
+
} = depict_category.historyStateSignals_;
|
|
12636
|
+
const {
|
|
12629
12637
|
current_sorting_: current_sorting_,
|
|
12630
12638
|
selected_filters_: selected_filters_,
|
|
12631
12639
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/ES10/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/S
|
|
|
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
6
|
import { ProductListing, GetListingResponse } from "@depict-ai/types/api/GetListingResponse";
|
|
7
|
-
import { ProductListingResponseV3 } from "@depict-ai/types/api/ProductListingResponseV3";
|
|
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";
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
|
-
import { SearchFilter as
|
|
13
|
-
export const version = "4.0
|
|
12
|
+
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
+
export const version = "4.1.0";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
|
@@ -78,12 +78,16 @@ export function createDeparallelizedNoDropResource<T, X>(dependency: Accessor<T
|
|
|
78
78
|
export function throw_globally<T extends (...args: any) => any>(fn?: T): (...args: Parameters<T>) => ReturnType<T> | undefined;
|
|
79
79
|
declare const LISTING_ID = "listingId";
|
|
80
80
|
declare const EXTERNAL_ID = "externalId";
|
|
81
|
+
type ScrollRestorationData = {
|
|
82
|
+
min_results_loaded: number;
|
|
83
|
+
for_id: string;
|
|
84
|
+
}[];
|
|
81
85
|
export type SDKGridSpacing = string | {
|
|
82
86
|
horizontal: string;
|
|
83
87
|
vertical: string;
|
|
84
88
|
};
|
|
85
89
|
export type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
86
|
-
type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
90
|
+
export type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
87
91
|
export interface SDKRenderingInfo {
|
|
88
92
|
/**
|
|
89
93
|
* If you call this function with a provided function, the provided function will be called whenever the index of the currently displayed product changes.
|
|
@@ -667,7 +671,7 @@ export type BaseSearchProviderConfig<InputDisplay extends Display, PossibleTrans
|
|
|
667
671
|
urlParamName?: string;
|
|
668
672
|
/**
|
|
669
673
|
* Whether to enable category suggestions in the search modal and search page.
|
|
670
|
-
* @default
|
|
674
|
+
* @default true
|
|
671
675
|
*/
|
|
672
676
|
enableCategorySuggestions?: boolean;
|
|
673
677
|
/**
|
|
@@ -1184,6 +1188,27 @@ type CategoryConstructorOptionsWithoutApi<InputDisplay extends Display, OutputDi
|
|
|
1184
1188
|
type DepictCategoryConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay> = CategoryConstructorOptionsWithApi<InputDisplay, OutputDisplay> | CategoryConstructorOptionsWithoutApi<InputDisplay, OutputDisplay>;
|
|
1185
1189
|
export class DepictCategory<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never = InputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<InputDisplay> : never> {
|
|
1186
1190
|
#private;
|
|
1191
|
+
/**
|
|
1192
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
1193
|
+
*/
|
|
1194
|
+
historyStateSignals_: {
|
|
1195
|
+
filters_open: Signal<boolean>;
|
|
1196
|
+
sorting_open: Signal<boolean>;
|
|
1197
|
+
expanded_filters: Signal<{
|
|
1198
|
+
section_: string;
|
|
1199
|
+
expanded_: boolean;
|
|
1200
|
+
}[]>;
|
|
1201
|
+
local_filter_cache: Signal<_SearchFilter2[]>;
|
|
1202
|
+
expanded_hierarchical_filters: Signal<{
|
|
1203
|
+
value_: string[];
|
|
1204
|
+
expanded_: boolean;
|
|
1205
|
+
}[]>;
|
|
1206
|
+
scroll_restoration_data: Signal<ScrollRestorationData>;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* 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.
|
|
1210
|
+
*/
|
|
1211
|
+
selectedFilters_: Signal<FilterWithData[]>;
|
|
1187
1212
|
get localization(): category_i18n;
|
|
1188
1213
|
set localization(locale_obj: category_i18n);
|
|
1189
1214
|
get listing_query(): ListingQuery;
|
|
@@ -1301,7 +1326,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
|
|
|
1301
1326
|
set merchant(tenant: string);
|
|
1302
1327
|
get market(): string;
|
|
1303
1328
|
set market(market: string);
|
|
1304
|
-
fetchSearchResults(query: string, filters?:
|
|
1329
|
+
fetchSearchResults(query: string, filters?: _SearchFilter3[], maxResults?: number): Promise<([OutputDisplay] extends [never] ? InputDisplay : ModernDisplayWithPageUrl<OutputDisplay>)[]>;
|
|
1305
1330
|
}
|
|
1306
1331
|
/**
|
|
1307
1332
|
* This is the SearchPage component visible outside - exported from @depict-ai/ui.
|
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.1.0";
|
|
14
14
|
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
15
15
|
let $68e6625c8d51f847$var$has_ran = false;
|
|
16
16
|
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
@@ -12352,6 +12352,11 @@ var $f5f54892fd0c7d9f$var$_market_signal = /*#__PURE__*/new WeakMap();
|
|
|
12352
12352
|
var $f5f54892fd0c7d9f$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
|
|
12353
12353
|
var $f5f54892fd0c7d9f$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
|
|
12354
12354
|
class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
12355
|
+
/**
|
|
12356
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
12357
|
+
*/ /**
|
|
12358
|
+
* 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.
|
|
12359
|
+
*/
|
|
12355
12360
|
get localization() {
|
|
12356
12361
|
// allow reactive access
|
|
12357
12362
|
return $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f5f54892fd0c7d9f$var$_localization_signal)[0]();
|
|
@@ -12402,6 +12407,8 @@ class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
|
12402
12407
|
listing_query_state_key: listing_query_state_key,
|
|
12403
12408
|
...props_on_class
|
|
12404
12409
|
} = _ref2;
|
|
12410
|
+
$8tj43$babelruntimehelpersdefineProperty(this, "historyStateSignals_", void 0);
|
|
12411
|
+
$8tj43$babelruntimehelpersdefineProperty(this, "selectedFilters_", void 0);
|
|
12405
12412
|
$f5f54892fd0c7d9f$var$_classPrivateFieldInitSpec(this, $f5f54892fd0c7d9f$var$_router, {
|
|
12406
12413
|
writable: true,
|
|
12407
12414
|
value: void 0
|
|
@@ -12463,8 +12470,9 @@ class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
|
12463
12470
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
12464
12471
|
});
|
|
12465
12472
|
const i18n_ = $e18ab2868df26f40$export$f091cbac892643a4($8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f5f54892fd0c7d9f$var$_localization_signal)[0]);
|
|
12473
|
+
this.historyStateSignals_ = state_;
|
|
12474
|
+
this.selectedFilters_ = selected_filters_;
|
|
12466
12475
|
$f5f54892fd0c7d9f$var$privately_shared_properties.set(this, {
|
|
12467
|
-
state_: state_,
|
|
12468
12476
|
breadcrumb_signal_: $8tj43$createSignal(),
|
|
12469
12477
|
quicklinks_signal_: $8tj43$createSignal(),
|
|
12470
12478
|
i18n_: i18n_,
|
|
@@ -12530,14 +12538,14 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
12530
12538
|
};
|
|
12531
12539
|
});
|
|
12532
12540
|
const {
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
+
local_filter_cache: local_filter_cache_,
|
|
12542
|
+
filters_open: category_filters_open_,
|
|
12543
|
+
sorting_open: category_sorting_open_,
|
|
12544
|
+
expanded_filters: expanded_filters_,
|
|
12545
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
12546
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
12547
|
+
} = depict_category.historyStateSignals_;
|
|
12548
|
+
const {
|
|
12541
12549
|
current_sorting_: current_sorting_,
|
|
12542
12550
|
selected_filters_: selected_filters_,
|
|
12543
12551
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/latest/index.cjs
CHANGED
|
@@ -92,7 +92,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
92
92
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
93
93
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
94
94
|
/*! Depict.ai search and product listing SDK */
|
|
95
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0
|
|
95
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.0";
|
|
96
96
|
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
97
97
|
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
98
98
|
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
@@ -11712,6 +11712,11 @@ const $48567ac5b39bac56$var$InExternalAreaDiv = ({
|
|
|
11712
11712
|
return _el$;
|
|
11713
11713
|
})();
|
|
11714
11714
|
class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
11715
|
+
/**
|
|
11716
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
11717
|
+
*/ /**
|
|
11718
|
+
* 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.
|
|
11719
|
+
*/
|
|
11715
11720
|
#router;
|
|
11716
11721
|
#localization_signal = $gVhhF$solidjs.createSignal();
|
|
11717
11722
|
#merchant_signal = $gVhhF$solidjs.createSignal();
|
|
@@ -11805,8 +11810,9 @@ class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
|
11805
11810
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
11806
11811
|
});
|
|
11807
11812
|
const i18n_ = $0785f4c9947d9b5f$export$f091cbac892643a4(this.#localization_signal[0]);
|
|
11813
|
+
this.historyStateSignals_ = state_;
|
|
11814
|
+
this.selectedFilters_ = selected_filters_;
|
|
11808
11815
|
$48567ac5b39bac56$var$privately_shared_properties.set(this, {
|
|
11809
|
-
state_: state_,
|
|
11810
11816
|
breadcrumb_signal_: $gVhhF$solidjs.createSignal(),
|
|
11811
11817
|
quicklinks_signal_: $gVhhF$solidjs.createSignal(),
|
|
11812
11818
|
i18n_: i18n_,
|
|
@@ -11863,14 +11869,14 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
11863
11869
|
};
|
|
11864
11870
|
});
|
|
11865
11871
|
const {
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11872
|
+
local_filter_cache: local_filter_cache_,
|
|
11873
|
+
filters_open: category_filters_open_,
|
|
11874
|
+
sorting_open: category_sorting_open_,
|
|
11875
|
+
expanded_filters: expanded_filters_,
|
|
11876
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
11877
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
11878
|
+
} = depict_category.historyStateSignals_;
|
|
11879
|
+
const {
|
|
11874
11880
|
current_sorting_: current_sorting_,
|
|
11875
11881
|
selected_filters_: selected_filters_,
|
|
11876
11882
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/latest/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/S
|
|
|
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
6
|
import { ProductListing, GetListingResponse } from "@depict-ai/types/api/GetListingResponse";
|
|
7
|
-
import { ProductListingResponseV3 } from "@depict-ai/types/api/ProductListingResponseV3";
|
|
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";
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
|
-
import { SearchFilter as
|
|
13
|
-
export const version = "4.0
|
|
12
|
+
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
+
export const version = "4.1.0";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
|
@@ -78,12 +78,16 @@ export function createDeparallelizedNoDropResource<T, X>(dependency: Accessor<T
|
|
|
78
78
|
export function throw_globally<T extends (...args: any) => any>(fn?: T): (...args: Parameters<T>) => ReturnType<T> | undefined;
|
|
79
79
|
declare const LISTING_ID = "listingId";
|
|
80
80
|
declare const EXTERNAL_ID = "externalId";
|
|
81
|
+
type ScrollRestorationData = {
|
|
82
|
+
min_results_loaded: number;
|
|
83
|
+
for_id: string;
|
|
84
|
+
}[];
|
|
81
85
|
export type SDKGridSpacing = string | {
|
|
82
86
|
horizontal: string;
|
|
83
87
|
vertical: string;
|
|
84
88
|
};
|
|
85
89
|
export type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
86
|
-
type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
90
|
+
export type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
87
91
|
export interface SDKRenderingInfo {
|
|
88
92
|
/**
|
|
89
93
|
* If you call this function with a provided function, the provided function will be called whenever the index of the currently displayed product changes.
|
|
@@ -667,7 +671,7 @@ export type BaseSearchProviderConfig<InputDisplay extends Display, PossibleTrans
|
|
|
667
671
|
urlParamName?: string;
|
|
668
672
|
/**
|
|
669
673
|
* Whether to enable category suggestions in the search modal and search page.
|
|
670
|
-
* @default
|
|
674
|
+
* @default true
|
|
671
675
|
*/
|
|
672
676
|
enableCategorySuggestions?: boolean;
|
|
673
677
|
/**
|
|
@@ -1184,6 +1188,27 @@ type CategoryConstructorOptionsWithoutApi<InputDisplay extends Display, OutputDi
|
|
|
1184
1188
|
type DepictCategoryConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay> = CategoryConstructorOptionsWithApi<InputDisplay, OutputDisplay> | CategoryConstructorOptionsWithoutApi<InputDisplay, OutputDisplay>;
|
|
1185
1189
|
export class DepictCategory<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never = InputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<InputDisplay> : never> {
|
|
1186
1190
|
#private;
|
|
1191
|
+
/**
|
|
1192
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
1193
|
+
*/
|
|
1194
|
+
historyStateSignals_: {
|
|
1195
|
+
filters_open: Signal<boolean>;
|
|
1196
|
+
sorting_open: Signal<boolean>;
|
|
1197
|
+
expanded_filters: Signal<{
|
|
1198
|
+
section_: string;
|
|
1199
|
+
expanded_: boolean;
|
|
1200
|
+
}[]>;
|
|
1201
|
+
local_filter_cache: Signal<_SearchFilter2[]>;
|
|
1202
|
+
expanded_hierarchical_filters: Signal<{
|
|
1203
|
+
value_: string[];
|
|
1204
|
+
expanded_: boolean;
|
|
1205
|
+
}[]>;
|
|
1206
|
+
scroll_restoration_data: Signal<ScrollRestorationData>;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* 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.
|
|
1210
|
+
*/
|
|
1211
|
+
selectedFilters_: Signal<FilterWithData[]>;
|
|
1187
1212
|
get localization(): category_i18n;
|
|
1188
1213
|
set localization(locale_obj: category_i18n);
|
|
1189
1214
|
get listing_query(): ListingQuery;
|
|
@@ -1301,7 +1326,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
|
|
|
1301
1326
|
set merchant(tenant: string);
|
|
1302
1327
|
get market(): string;
|
|
1303
1328
|
set market(market: string);
|
|
1304
|
-
fetchSearchResults(query: string, filters?:
|
|
1329
|
+
fetchSearchResults(query: string, filters?: _SearchFilter3[], maxResults?: number): Promise<([OutputDisplay] extends [never] ? InputDisplay : ModernDisplayWithPageUrl<OutputDisplay>)[]>;
|
|
1305
1330
|
}
|
|
1306
1331
|
/**
|
|
1307
1332
|
* This is the SearchPage component visible outside - exported from @depict-ai/ui.
|
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.1.0";
|
|
11
11
|
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
12
12
|
let $90980bd87c9960f9$var$has_ran = false;
|
|
13
13
|
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
@@ -11627,6 +11627,11 @@ const $961b5c64bef4662f$var$InExternalAreaDiv = ({
|
|
|
11627
11627
|
return _el$;
|
|
11628
11628
|
})();
|
|
11629
11629
|
class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
11630
|
+
/**
|
|
11631
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
11632
|
+
*/ /**
|
|
11633
|
+
* 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.
|
|
11634
|
+
*/
|
|
11630
11635
|
#router;
|
|
11631
11636
|
#localization_signal = $9HbP8$createSignal();
|
|
11632
11637
|
#merchant_signal = $9HbP8$createSignal();
|
|
@@ -11720,8 +11725,9 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
11720
11725
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
11721
11726
|
});
|
|
11722
11727
|
const i18n_ = $c16e74cfe125bb05$export$f091cbac892643a4(this.#localization_signal[0]);
|
|
11728
|
+
this.historyStateSignals_ = state_;
|
|
11729
|
+
this.selectedFilters_ = selected_filters_;
|
|
11723
11730
|
$961b5c64bef4662f$var$privately_shared_properties.set(this, {
|
|
11724
|
-
state_: state_,
|
|
11725
11731
|
breadcrumb_signal_: $9HbP8$createSignal(),
|
|
11726
11732
|
quicklinks_signal_: $9HbP8$createSignal(),
|
|
11727
11733
|
i18n_: i18n_,
|
|
@@ -11778,14 +11784,14 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
11778
11784
|
};
|
|
11779
11785
|
});
|
|
11780
11786
|
const {
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11788
|
-
|
|
11787
|
+
local_filter_cache: local_filter_cache_,
|
|
11788
|
+
filters_open: category_filters_open_,
|
|
11789
|
+
sorting_open: category_sorting_open_,
|
|
11790
|
+
expanded_filters: expanded_filters_,
|
|
11791
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
11792
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
11793
|
+
} = depict_category.historyStateSignals_;
|
|
11794
|
+
const {
|
|
11789
11795
|
current_sorting_: current_sorting_,
|
|
11790
11796
|
selected_filters_: selected_filters_,
|
|
11791
11797
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
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
|
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
|
|
|
98
98
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
99
99
|
$parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
|
|
100
100
|
/*! Depict.ai search and product listing SDK */
|
|
101
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.0
|
|
101
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.0";
|
|
102
102
|
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
103
103
|
let $cfcd56242923775d$var$has_ran = false;
|
|
104
104
|
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
@@ -10132,6 +10132,11 @@ var $9cbefc32b9dab36d$var$_market_signal = /*#__PURE__*/new WeakMap();
|
|
|
10132
10132
|
var $9cbefc32b9dab36d$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
|
|
10133
10133
|
var $9cbefc32b9dab36d$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
|
|
10134
10134
|
class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
10135
|
+
/**
|
|
10136
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
10137
|
+
*/ /**
|
|
10138
|
+
* 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.
|
|
10139
|
+
*/
|
|
10135
10140
|
get localization() {
|
|
10136
10141
|
// allow reactive access
|
|
10137
10142
|
return $parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[0]();
|
|
@@ -10182,6 +10187,8 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
|
10182
10187
|
listing_query_state_key: listing_query_state_key,
|
|
10183
10188
|
...props_on_class
|
|
10184
10189
|
} = _ref2;
|
|
10190
|
+
$parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "historyStateSignals_", void 0);
|
|
10191
|
+
$parcel$interopDefault($3hooq$babelruntimehelpersdefineProperty)(this, "selectedFilters_", void 0);
|
|
10185
10192
|
$9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(this, $9cbefc32b9dab36d$var$_router, {
|
|
10186
10193
|
writable: true,
|
|
10187
10194
|
value: void 0
|
|
@@ -10243,8 +10250,9 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
|
10243
10250
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
10244
10251
|
});
|
|
10245
10252
|
const i18n_ = $39cca429fb71d8ff$export$f091cbac892643a4($parcel$interopDefault($3hooq$babelruntimehelpersclassPrivateFieldGet)(this, $9cbefc32b9dab36d$var$_localization_signal)[0]);
|
|
10253
|
+
this.historyStateSignals_ = state_;
|
|
10254
|
+
this.selectedFilters_ = selected_filters_;
|
|
10246
10255
|
$9cbefc32b9dab36d$var$privately_shared_properties.set(this, {
|
|
10247
|
-
state_: state_,
|
|
10248
10256
|
breadcrumb_signal_: $3hooq$solidjs.createSignal(),
|
|
10249
10257
|
quicklinks_signal_: $3hooq$solidjs.createSignal(),
|
|
10250
10258
|
i18n_: i18n_,
|
|
@@ -10310,14 +10318,14 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
10310
10318
|
};
|
|
10311
10319
|
});
|
|
10312
10320
|
const {
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
+
local_filter_cache: local_filter_cache_,
|
|
10322
|
+
filters_open: category_filters_open_,
|
|
10323
|
+
sorting_open: category_sorting_open_,
|
|
10324
|
+
expanded_filters: expanded_filters_,
|
|
10325
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
10326
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
10327
|
+
} = depict_category.historyStateSignals_;
|
|
10328
|
+
const {
|
|
10321
10329
|
current_sorting_: current_sorting_,
|
|
10322
10330
|
selected_filters_: selected_filters_,
|
|
10323
10331
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/S
|
|
|
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
6
|
import { ProductListing, GetListingResponse } from "@depict-ai/types/api/GetListingResponse";
|
|
7
|
-
import { ProductListingResponseV3 } from "@depict-ai/types/api/ProductListingResponseV3";
|
|
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";
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
|
-
import { SearchFilter as
|
|
13
|
-
export const version = "4.0
|
|
12
|
+
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
+
export const version = "4.1.0";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
|
@@ -78,12 +78,16 @@ export function createDeparallelizedNoDropResource<T, X>(dependency: Accessor<T
|
|
|
78
78
|
export function throw_globally<T extends (...args: any) => any>(fn?: T): (...args: Parameters<T>) => ReturnType<T> | undefined;
|
|
79
79
|
declare const LISTING_ID = "listingId";
|
|
80
80
|
declare const EXTERNAL_ID = "externalId";
|
|
81
|
+
type ScrollRestorationData = {
|
|
82
|
+
min_results_loaded: number;
|
|
83
|
+
for_id: string;
|
|
84
|
+
}[];
|
|
81
85
|
export type SDKGridSpacing = string | {
|
|
82
86
|
horizontal: string;
|
|
83
87
|
vertical: string;
|
|
84
88
|
};
|
|
85
89
|
export type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
86
|
-
type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
90
|
+
export type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
87
91
|
export interface SDKRenderingInfo {
|
|
88
92
|
/**
|
|
89
93
|
* If you call this function with a provided function, the provided function will be called whenever the index of the currently displayed product changes.
|
|
@@ -667,7 +671,7 @@ export type BaseSearchProviderConfig<InputDisplay extends Display, PossibleTrans
|
|
|
667
671
|
urlParamName?: string;
|
|
668
672
|
/**
|
|
669
673
|
* Whether to enable category suggestions in the search modal and search page.
|
|
670
|
-
* @default
|
|
674
|
+
* @default true
|
|
671
675
|
*/
|
|
672
676
|
enableCategorySuggestions?: boolean;
|
|
673
677
|
/**
|
|
@@ -1184,6 +1188,27 @@ type CategoryConstructorOptionsWithoutApi<InputDisplay extends Display, OutputDi
|
|
|
1184
1188
|
type DepictCategoryConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay> = CategoryConstructorOptionsWithApi<InputDisplay, OutputDisplay> | CategoryConstructorOptionsWithoutApi<InputDisplay, OutputDisplay>;
|
|
1185
1189
|
export class DepictCategory<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never = InputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<InputDisplay> : never> {
|
|
1186
1190
|
#private;
|
|
1191
|
+
/**
|
|
1192
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
1193
|
+
*/
|
|
1194
|
+
historyStateSignals_: {
|
|
1195
|
+
filters_open: Signal<boolean>;
|
|
1196
|
+
sorting_open: Signal<boolean>;
|
|
1197
|
+
expanded_filters: Signal<{
|
|
1198
|
+
section_: string;
|
|
1199
|
+
expanded_: boolean;
|
|
1200
|
+
}[]>;
|
|
1201
|
+
local_filter_cache: Signal<_SearchFilter2[]>;
|
|
1202
|
+
expanded_hierarchical_filters: Signal<{
|
|
1203
|
+
value_: string[];
|
|
1204
|
+
expanded_: boolean;
|
|
1205
|
+
}[]>;
|
|
1206
|
+
scroll_restoration_data: Signal<ScrollRestorationData>;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* 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.
|
|
1210
|
+
*/
|
|
1211
|
+
selectedFilters_: Signal<FilterWithData[]>;
|
|
1187
1212
|
get localization(): category_i18n;
|
|
1188
1213
|
set localization(locale_obj: category_i18n);
|
|
1189
1214
|
get listing_query(): ListingQuery;
|
|
@@ -1301,7 +1326,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
|
|
|
1301
1326
|
set merchant(tenant: string);
|
|
1302
1327
|
get market(): string;
|
|
1303
1328
|
set market(market: string);
|
|
1304
|
-
fetchSearchResults(query: string, filters?:
|
|
1329
|
+
fetchSearchResults(query: string, filters?: _SearchFilter3[], maxResults?: number): Promise<([OutputDisplay] extends [never] ? InputDisplay : ModernDisplayWithPageUrl<OutputDisplay>)[]>;
|
|
1305
1330
|
}
|
|
1306
1331
|
/**
|
|
1307
1332
|
* This is the SearchPage component visible outside - exported from @depict-ai/ui.
|
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.1.0";
|
|
14
14
|
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
15
15
|
let $68e6625c8d51f847$var$has_ran = false;
|
|
16
16
|
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
@@ -10044,6 +10044,11 @@ var $f5f54892fd0c7d9f$var$_market_signal = /*#__PURE__*/new WeakMap();
|
|
|
10044
10044
|
var $f5f54892fd0c7d9f$var$_listing_query_signal = /*#__PURE__*/new WeakMap();
|
|
10045
10045
|
var $f5f54892fd0c7d9f$var$_disable_override_listing_id = /*#__PURE__*/new WeakMap();
|
|
10046
10046
|
class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
10047
|
+
/**
|
|
10048
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
10049
|
+
*/ /**
|
|
10050
|
+
* 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.
|
|
10051
|
+
*/
|
|
10047
10052
|
get localization() {
|
|
10048
10053
|
// allow reactive access
|
|
10049
10054
|
return $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f5f54892fd0c7d9f$var$_localization_signal)[0]();
|
|
@@ -10094,6 +10099,8 @@ class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
|
10094
10099
|
listing_query_state_key: listing_query_state_key,
|
|
10095
10100
|
...props_on_class
|
|
10096
10101
|
} = _ref2;
|
|
10102
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "historyStateSignals_", void 0);
|
|
10103
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "selectedFilters_", void 0);
|
|
10097
10104
|
$f5f54892fd0c7d9f$var$_classPrivateFieldInitSpec(this, $f5f54892fd0c7d9f$var$_router, {
|
|
10098
10105
|
writable: true,
|
|
10099
10106
|
value: void 0
|
|
@@ -10155,8 +10162,9 @@ class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
|
10155
10162
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
10156
10163
|
});
|
|
10157
10164
|
const i18n_ = $e18ab2868df26f40$export$f091cbac892643a4($b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f5f54892fd0c7d9f$var$_localization_signal)[0]);
|
|
10165
|
+
this.historyStateSignals_ = state_;
|
|
10166
|
+
this.selectedFilters_ = selected_filters_;
|
|
10158
10167
|
$f5f54892fd0c7d9f$var$privately_shared_properties.set(this, {
|
|
10159
|
-
state_: state_,
|
|
10160
10168
|
breadcrumb_signal_: $b8hua$createSignal(),
|
|
10161
10169
|
quicklinks_signal_: $b8hua$createSignal(),
|
|
10162
10170
|
i18n_: i18n_,
|
|
@@ -10222,14 +10230,14 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
10222
10230
|
};
|
|
10223
10231
|
});
|
|
10224
10232
|
const {
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
+
local_filter_cache: local_filter_cache_,
|
|
10234
|
+
filters_open: category_filters_open_,
|
|
10235
|
+
sorting_open: category_sorting_open_,
|
|
10236
|
+
expanded_filters: expanded_filters_,
|
|
10237
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
10238
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
10239
|
+
} = depict_category.historyStateSignals_;
|
|
10240
|
+
const {
|
|
10233
10241
|
current_sorting_: current_sorting_,
|
|
10234
10242
|
selected_filters_: selected_filters_,
|
|
10235
10243
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/server/latest/index.cjs
CHANGED
|
@@ -92,7 +92,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
|
|
|
92
92
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
93
93
|
$parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
|
|
94
94
|
/*! Depict.ai search and product listing SDK */
|
|
95
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.0
|
|
95
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.0";
|
|
96
96
|
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
97
97
|
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
98
98
|
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
@@ -9474,6 +9474,11 @@ const $48567ac5b39bac56$var$InExternalAreaDiv = ({
|
|
|
9474
9474
|
children: children
|
|
9475
9475
|
}) => $5vyXB$solidjsweb.ssr($48567ac5b39bac56$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey() + $5vyXB$solidjsweb.ssrAttribute("id", $5vyXB$solidjsweb.escape((0, $0b6e2070a98de347$export$44dad306455dddf).PLP_CATEGORY, true), false), $5vyXB$solidjsweb.escape(children));
|
|
9476
9476
|
class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
9477
|
+
/**
|
|
9478
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
9479
|
+
*/ /**
|
|
9480
|
+
* 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.
|
|
9481
|
+
*/
|
|
9477
9482
|
#router;
|
|
9478
9483
|
#localization_signal = $5vyXB$solidjs.createSignal();
|
|
9479
9484
|
#merchant_signal = $5vyXB$solidjs.createSignal();
|
|
@@ -9567,8 +9572,9 @@ class $48567ac5b39bac56$export$f34314aa9505732e {
|
|
|
9567
9572
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
9568
9573
|
});
|
|
9569
9574
|
const i18n_ = $0785f4c9947d9b5f$export$f091cbac892643a4(this.#localization_signal[0]);
|
|
9575
|
+
this.historyStateSignals_ = state_;
|
|
9576
|
+
this.selectedFilters_ = selected_filters_;
|
|
9570
9577
|
$48567ac5b39bac56$var$privately_shared_properties.set(this, {
|
|
9571
|
-
state_: state_,
|
|
9572
9578
|
breadcrumb_signal_: $5vyXB$solidjs.createSignal(),
|
|
9573
9579
|
quicklinks_signal_: $5vyXB$solidjs.createSignal(),
|
|
9574
9580
|
i18n_: i18n_,
|
|
@@ -9625,14 +9631,14 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
9625
9631
|
};
|
|
9626
9632
|
});
|
|
9627
9633
|
const {
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9634
|
+
local_filter_cache: local_filter_cache_,
|
|
9635
|
+
filters_open: category_filters_open_,
|
|
9636
|
+
sorting_open: category_sorting_open_,
|
|
9637
|
+
expanded_filters: expanded_filters_,
|
|
9638
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
9639
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
9640
|
+
} = depict_category.historyStateSignals_;
|
|
9641
|
+
const {
|
|
9636
9642
|
current_sorting_: current_sorting_,
|
|
9637
9643
|
selected_filters_: selected_filters_,
|
|
9638
9644
|
override_listing_id_accessor_: override_listing_id_accessor_,
|
package/server/latest/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/S
|
|
|
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
6
|
import { ProductListing, GetListingResponse } from "@depict-ai/types/api/GetListingResponse";
|
|
7
|
-
import { ProductListingResponseV3 } from "@depict-ai/types/api/ProductListingResponseV3";
|
|
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";
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
|
-
import { SearchFilter as
|
|
13
|
-
export const version = "4.0
|
|
12
|
+
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
+
export const version = "4.1.0";
|
|
14
14
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
|
|
@@ -78,12 +78,16 @@ export function createDeparallelizedNoDropResource<T, X>(dependency: Accessor<T
|
|
|
78
78
|
export function throw_globally<T extends (...args: any) => any>(fn?: T): (...args: Parameters<T>) => ReturnType<T> | undefined;
|
|
79
79
|
declare const LISTING_ID = "listingId";
|
|
80
80
|
declare const EXTERNAL_ID = "externalId";
|
|
81
|
+
type ScrollRestorationData = {
|
|
82
|
+
min_results_loaded: number;
|
|
83
|
+
for_id: string;
|
|
84
|
+
}[];
|
|
81
85
|
export type SDKGridSpacing = string | {
|
|
82
86
|
horizontal: string;
|
|
83
87
|
vertical: string;
|
|
84
88
|
};
|
|
85
89
|
export type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
86
|
-
type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
90
|
+
export type FilterWithData = WithRequired<SearchFilter, "data">;
|
|
87
91
|
export interface SDKRenderingInfo {
|
|
88
92
|
/**
|
|
89
93
|
* If you call this function with a provided function, the provided function will be called whenever the index of the currently displayed product changes.
|
|
@@ -667,7 +671,7 @@ export type BaseSearchProviderConfig<InputDisplay extends Display, PossibleTrans
|
|
|
667
671
|
urlParamName?: string;
|
|
668
672
|
/**
|
|
669
673
|
* Whether to enable category suggestions in the search modal and search page.
|
|
670
|
-
* @default
|
|
674
|
+
* @default true
|
|
671
675
|
*/
|
|
672
676
|
enableCategorySuggestions?: boolean;
|
|
673
677
|
/**
|
|
@@ -1184,6 +1188,27 @@ type CategoryConstructorOptionsWithoutApi<InputDisplay extends Display, OutputDi
|
|
|
1184
1188
|
type DepictCategoryConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay> = CategoryConstructorOptionsWithApi<InputDisplay, OutputDisplay> | CategoryConstructorOptionsWithoutApi<InputDisplay, OutputDisplay>;
|
|
1185
1189
|
export class DepictCategory<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never = InputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<InputDisplay> : never> {
|
|
1186
1190
|
#private;
|
|
1191
|
+
/**
|
|
1192
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
1193
|
+
*/
|
|
1194
|
+
historyStateSignals_: {
|
|
1195
|
+
filters_open: Signal<boolean>;
|
|
1196
|
+
sorting_open: Signal<boolean>;
|
|
1197
|
+
expanded_filters: Signal<{
|
|
1198
|
+
section_: string;
|
|
1199
|
+
expanded_: boolean;
|
|
1200
|
+
}[]>;
|
|
1201
|
+
local_filter_cache: Signal<_SearchFilter2[]>;
|
|
1202
|
+
expanded_hierarchical_filters: Signal<{
|
|
1203
|
+
value_: string[];
|
|
1204
|
+
expanded_: boolean;
|
|
1205
|
+
}[]>;
|
|
1206
|
+
scroll_restoration_data: Signal<ScrollRestorationData>;
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* 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.
|
|
1210
|
+
*/
|
|
1211
|
+
selectedFilters_: Signal<FilterWithData[]>;
|
|
1187
1212
|
get localization(): category_i18n;
|
|
1188
1213
|
set localization(locale_obj: category_i18n);
|
|
1189
1214
|
get listing_query(): ListingQuery;
|
|
@@ -1301,7 +1326,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
|
|
|
1301
1326
|
set merchant(tenant: string);
|
|
1302
1327
|
get market(): string;
|
|
1303
1328
|
set market(market: string);
|
|
1304
|
-
fetchSearchResults(query: string, filters?:
|
|
1329
|
+
fetchSearchResults(query: string, filters?: _SearchFilter3[], maxResults?: number): Promise<([OutputDisplay] extends [never] ? InputDisplay : ModernDisplayWithPageUrl<OutputDisplay>)[]>;
|
|
1305
1330
|
}
|
|
1306
1331
|
/**
|
|
1307
1332
|
* This is the SearchPage component visible outside - exported from @depict-ai/ui.
|
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.1.0";
|
|
11
11
|
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
12
12
|
let $90980bd87c9960f9$var$has_ran = false;
|
|
13
13
|
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
@@ -9389,6 +9389,11 @@ const $961b5c64bef4662f$var$InExternalAreaDiv = ({
|
|
|
9389
9389
|
children: children
|
|
9390
9390
|
}) => $i7OB2$ssr($961b5c64bef4662f$var$_tmpl$, $i7OB2$ssrHydrationKey() + $i7OB2$ssrAttribute("id", $i7OB2$escape((0, $f86ba724282f6690$export$44dad306455dddf).PLP_CATEGORY, true), false), $i7OB2$escape(children));
|
|
9391
9391
|
class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
9392
|
+
/**
|
|
9393
|
+
* Used internally in @depict-ai/react-ui for `useCategoryFilterHelpers`. These are solid-js signals that contain the value of the state for this DepictCategory instance that's currently in history.state. Calling the setters updates history.state with history.replaceState.
|
|
9394
|
+
*/ /**
|
|
9395
|
+
* 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.
|
|
9396
|
+
*/
|
|
9392
9397
|
#router;
|
|
9393
9398
|
#localization_signal = $i7OB2$createSignal();
|
|
9394
9399
|
#merchant_signal = $i7OB2$createSignal();
|
|
@@ -9482,8 +9487,9 @@ class $961b5c64bef4662f$export$f34314aa9505732e {
|
|
|
9482
9487
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
9483
9488
|
});
|
|
9484
9489
|
const i18n_ = $c16e74cfe125bb05$export$f091cbac892643a4(this.#localization_signal[0]);
|
|
9490
|
+
this.historyStateSignals_ = state_;
|
|
9491
|
+
this.selectedFilters_ = selected_filters_;
|
|
9485
9492
|
$961b5c64bef4662f$var$privately_shared_properties.set(this, {
|
|
9486
|
-
state_: state_,
|
|
9487
9493
|
breadcrumb_signal_: $i7OB2$createSignal(),
|
|
9488
9494
|
quicklinks_signal_: $i7OB2$createSignal(),
|
|
9489
9495
|
i18n_: i18n_,
|
|
@@ -9540,14 +9546,14 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
9540
9546
|
};
|
|
9541
9547
|
});
|
|
9542
9548
|
const {
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9549
|
+
local_filter_cache: local_filter_cache_,
|
|
9550
|
+
filters_open: category_filters_open_,
|
|
9551
|
+
sorting_open: category_sorting_open_,
|
|
9552
|
+
expanded_filters: expanded_filters_,
|
|
9553
|
+
expanded_hierarchical_filters: expanded_hierarchical_filters_,
|
|
9554
|
+
scroll_restoration_data: scroll_restoration_data_
|
|
9555
|
+
} = depict_category.historyStateSignals_;
|
|
9556
|
+
const {
|
|
9551
9557
|
current_sorting_: current_sorting_,
|
|
9552
9558
|
selected_filters_: selected_filters_,
|
|
9553
9559
|
override_listing_id_accessor_: override_listing_id_accessor_,
|