@depict-ai/ui 1.4.6 → 1.4.8
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 +34 -2
- package/ES10/index.d.ts +3 -1
- package/ES10/index.js +34 -2
- package/latest/index.cjs +33 -2
- package/latest/index.d.ts +3 -1
- package/latest/index.js +33 -2
- package/package.json +2 -2
- package/server/ES10/index.cjs +34 -2
- package/server/ES10/index.d.ts +3 -1
- package/server/ES10/index.js +34 -2
- package/server/latest/index.cjs +33 -2
- package/server/latest/index.d.ts +3 -1
- package/server/latest/index.js +33 -2
package/ES10/index.cjs
CHANGED
|
@@ -60,7 +60,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
60
60
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
61
61
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
62
62
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.
|
|
63
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.8";
|
|
64
64
|
function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
|
|
65
65
|
const {
|
|
66
66
|
collapse: collapse,
|
|
@@ -6763,6 +6763,24 @@ function $73014ff36186a4dd$var$_get_navigation_happened_promise2(is_replace) {
|
|
|
6763
6763
|
(0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).add(handler);
|
|
6764
6764
|
});
|
|
6765
6765
|
}
|
|
6766
|
+
|
|
6767
|
+
/**
|
|
6768
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
6769
|
+
* @param fn the function to wrap
|
|
6770
|
+
*/
|
|
6771
|
+
function $bdea39a75c454f4f$export$f50b88e2a00918b5(fn) {
|
|
6772
|
+
return function () {
|
|
6773
|
+
if (!fn) return;
|
|
6774
|
+
try {
|
|
6775
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
6776
|
+
return Reflect.apply(fn, this, args);
|
|
6777
|
+
} catch (e) {
|
|
6778
|
+
queueMicrotask(() => {
|
|
6779
|
+
throw e;
|
|
6780
|
+
});
|
|
6781
|
+
}
|
|
6782
|
+
};
|
|
6783
|
+
}
|
|
6766
6784
|
const $9cbefc32b9dab36d$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="depict plp category"></div>`, 2);
|
|
6767
6785
|
function $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
6768
6786
|
$9cbefc32b9dab36d$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
@@ -6952,10 +6970,17 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
6952
6970
|
} = props;
|
|
6953
6971
|
const shared_properties = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
|
|
6954
6972
|
return (0, $d05611ff6b8c8357$export$23fca46f3143581f)(() => {
|
|
6973
|
+
(0, $52FdA$solidjs.createEffect)(prev => {
|
|
6974
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
6975
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
6976
|
+
(0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
6977
|
+
return id;
|
|
6978
|
+
});
|
|
6979
|
+
(0, $52FdA$solidjs.onCleanup)(() => (0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
6955
6980
|
const grid_spacing_override = (0, $52FdA$solidjs.createMemo)(() => {
|
|
6956
6981
|
const {
|
|
6957
6982
|
grid_spacing: grid_spacing
|
|
6958
|
-
} = props; // can be reactive
|
|
6983
|
+
} = props; // can be reactive, therefore read in the memo
|
|
6959
6984
|
return typeof grid_spacing === "string" ? {
|
|
6960
6985
|
grid_spacing: grid_spacing
|
|
6961
6986
|
} : {
|
|
@@ -10611,6 +10636,13 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
10611
10636
|
grid_spacing: grid_spacing.horizontal
|
|
10612
10637
|
};
|
|
10613
10638
|
});
|
|
10639
|
+
(0, $52FdA$solidjs.createEffect)(prev => {
|
|
10640
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
10641
|
+
const search_query = shared_properties.get_search_query_();
|
|
10642
|
+
(0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
10643
|
+
return search_query;
|
|
10644
|
+
});
|
|
10645
|
+
(0, $52FdA$solidjs.onCleanup)(() => (0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
10614
10646
|
(0, $52FdA$solidjs.onCleanup)(shared_properties.reset_history_state_);
|
|
10615
10647
|
return (0, $739c927cbecd26b0$export$a54ec244c8863715)({
|
|
10616
10648
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.8";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
|
@@ -568,6 +568,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
568
568
|
show_quicklinks?: boolean;
|
|
569
569
|
show_breadcrumbs?: boolean;
|
|
570
570
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
571
|
+
on_query_id_change?: (new_query_id?: string | undefined, old_query_id?: string | undefined) => void;
|
|
571
572
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
572
573
|
export function BreadCrumbs<T extends Display>({
|
|
573
574
|
depict_category
|
|
@@ -703,6 +704,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
703
704
|
grid_spacing: SDKGridSpacing;
|
|
704
705
|
cols_at_size: SDKColsAtSize;
|
|
705
706
|
product_card_template: ProductCardTemplate<[TransformedDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<TransformedDisplay>>;
|
|
707
|
+
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
706
708
|
extra_depict_options?: {
|
|
707
709
|
recommendations_cols_at_size?: SDKColsAtSize;
|
|
708
710
|
};
|
package/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.8";
|
|
12
12
|
function $8e8b179489080711$export$5bad61ecde080b1f() {
|
|
13
13
|
const {
|
|
14
14
|
collapse: collapse,
|
|
@@ -6711,6 +6711,24 @@ function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
|
6711
6711
|
(0, $8tj43$instant_exec_on_suspect_history_change).add(handler);
|
|
6712
6712
|
});
|
|
6713
6713
|
}
|
|
6714
|
+
|
|
6715
|
+
/**
|
|
6716
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
6717
|
+
* @param fn the function to wrap
|
|
6718
|
+
*/
|
|
6719
|
+
function $01c33966d9ddb108$export$f50b88e2a00918b5(fn) {
|
|
6720
|
+
return function () {
|
|
6721
|
+
if (!fn) return;
|
|
6722
|
+
try {
|
|
6723
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
6724
|
+
return Reflect.apply(fn, this, args);
|
|
6725
|
+
} catch (e) {
|
|
6726
|
+
queueMicrotask(() => {
|
|
6727
|
+
throw e;
|
|
6728
|
+
});
|
|
6729
|
+
}
|
|
6730
|
+
};
|
|
6731
|
+
}
|
|
6714
6732
|
const $f5f54892fd0c7d9f$var$_tmpl$ = /*#__PURE__*/(0, $8tj43$template)(`<div class="depict plp category"></div>`, 2);
|
|
6715
6733
|
function $f5f54892fd0c7d9f$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
6716
6734
|
$f5f54892fd0c7d9f$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
@@ -6900,10 +6918,17 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
6900
6918
|
} = props;
|
|
6901
6919
|
const shared_properties = $f5f54892fd0c7d9f$var$get_shared_properties(depict_category);
|
|
6902
6920
|
return (0, $83e8cf2c0b87a58a$export$23fca46f3143581f)(() => {
|
|
6921
|
+
(0, $8tj43$createEffect)(prev => {
|
|
6922
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
6923
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
6924
|
+
(0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
6925
|
+
return id;
|
|
6926
|
+
});
|
|
6927
|
+
(0, $8tj43$onCleanup)(() => (0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
6903
6928
|
const grid_spacing_override = (0, $8tj43$createMemo)(() => {
|
|
6904
6929
|
const {
|
|
6905
6930
|
grid_spacing: grid_spacing
|
|
6906
|
-
} = props; // can be reactive
|
|
6931
|
+
} = props; // can be reactive, therefore read in the memo
|
|
6907
6932
|
return typeof grid_spacing === "string" ? {
|
|
6908
6933
|
grid_spacing: grid_spacing
|
|
6909
6934
|
} : {
|
|
@@ -10559,6 +10584,13 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
10559
10584
|
grid_spacing: grid_spacing.horizontal
|
|
10560
10585
|
};
|
|
10561
10586
|
});
|
|
10587
|
+
(0, $8tj43$createEffect)(prev => {
|
|
10588
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
10589
|
+
const search_query = shared_properties.get_search_query_();
|
|
10590
|
+
(0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
10591
|
+
return search_query;
|
|
10592
|
+
});
|
|
10593
|
+
(0, $8tj43$onCleanup)(() => (0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
10562
10594
|
(0, $8tj43$onCleanup)(shared_properties.reset_history_state_);
|
|
10563
10595
|
return (0, $da279c5a540c6846$export$a54ec244c8863715)({
|
|
10564
10596
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/latest/index.cjs
CHANGED
|
@@ -54,7 +54,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
54
54
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
55
55
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
56
56
|
/*! Depict.ai search and product listing SDK */
|
|
57
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.
|
|
57
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.8";
|
|
58
58
|
function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
|
|
59
59
|
const {
|
|
60
60
|
collapse: collapse,
|
|
@@ -6282,6 +6282,23 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
6282
6282
|
this.on_navigation_ = on_navigation;
|
|
6283
6283
|
}
|
|
6284
6284
|
}
|
|
6285
|
+
|
|
6286
|
+
/**
|
|
6287
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
6288
|
+
* @param fn the function to wrap
|
|
6289
|
+
*/
|
|
6290
|
+
function $deaaf04362a1bc71$export$f50b88e2a00918b5(fn) {
|
|
6291
|
+
return function (...args) {
|
|
6292
|
+
if (!fn) return;
|
|
6293
|
+
try {
|
|
6294
|
+
return Reflect.apply(fn, this, args);
|
|
6295
|
+
} catch (e) {
|
|
6296
|
+
queueMicrotask(() => {
|
|
6297
|
+
throw e;
|
|
6298
|
+
});
|
|
6299
|
+
}
|
|
6300
|
+
};
|
|
6301
|
+
}
|
|
6285
6302
|
const $48567ac5b39bac56$var$_tmpl$ = /*#__PURE__*/(0, $gVhhF$solidjsweb.template)(`<div class="depict plp category"></div>`, 2);
|
|
6286
6303
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
6287
6304
|
/**
|
|
@@ -6418,10 +6435,17 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
6418
6435
|
} = props;
|
|
6419
6436
|
const shared_properties = $48567ac5b39bac56$var$get_shared_properties(depict_category);
|
|
6420
6437
|
return (0, $95837413165cc2df$export$23fca46f3143581f)(() => {
|
|
6438
|
+
(0, $gVhhF$solidjs.createEffect)(prev => {
|
|
6439
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
6440
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
6441
|
+
(0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
6442
|
+
return id;
|
|
6443
|
+
});
|
|
6444
|
+
(0, $gVhhF$solidjs.onCleanup)(() => (0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
6421
6445
|
const grid_spacing_override = (0, $gVhhF$solidjs.createMemo)(() => {
|
|
6422
6446
|
const {
|
|
6423
6447
|
grid_spacing: grid_spacing
|
|
6424
|
-
} = props; // can be reactive
|
|
6448
|
+
} = props; // can be reactive, therefore read in the memo
|
|
6425
6449
|
return typeof grid_spacing === "string" ? {
|
|
6426
6450
|
grid_spacing: grid_spacing
|
|
6427
6451
|
} : {
|
|
@@ -9835,6 +9859,13 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
9835
9859
|
grid_spacing: grid_spacing.horizontal
|
|
9836
9860
|
};
|
|
9837
9861
|
});
|
|
9862
|
+
(0, $gVhhF$solidjs.createEffect)(prev => {
|
|
9863
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
9864
|
+
const search_query = shared_properties.get_search_query_();
|
|
9865
|
+
(0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
9866
|
+
return search_query;
|
|
9867
|
+
});
|
|
9868
|
+
(0, $gVhhF$solidjs.onCleanup)(() => (0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
9838
9869
|
(0, $gVhhF$solidjs.onCleanup)(shared_properties.reset_history_state_);
|
|
9839
9870
|
return (0, $f1d7cb69f839a526$export$a54ec244c8863715)({
|
|
9840
9871
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/latest/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.8";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
|
@@ -568,6 +568,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
568
568
|
show_quicklinks?: boolean;
|
|
569
569
|
show_breadcrumbs?: boolean;
|
|
570
570
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
571
|
+
on_query_id_change?: (new_query_id?: string | undefined, old_query_id?: string | undefined) => void;
|
|
571
572
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
572
573
|
export function BreadCrumbs<T extends Display>({
|
|
573
574
|
depict_category
|
|
@@ -703,6 +704,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
703
704
|
grid_spacing: SDKGridSpacing;
|
|
704
705
|
cols_at_size: SDKColsAtSize;
|
|
705
706
|
product_card_template: ProductCardTemplate<[TransformedDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<TransformedDisplay>>;
|
|
707
|
+
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
706
708
|
extra_depict_options?: {
|
|
707
709
|
recommendations_cols_at_size?: SDKColsAtSize;
|
|
708
710
|
};
|
package/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createSignal as $9HbP8$createSignal, createMemo as $9HbP8$createMemo, u
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.8";
|
|
9
9
|
function $24e27fab9c821b86$export$5bad61ecde080b1f(...params) {
|
|
10
10
|
const {
|
|
11
11
|
collapse: collapse,
|
|
@@ -6233,6 +6233,23 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
6233
6233
|
this.on_navigation_ = on_navigation;
|
|
6234
6234
|
}
|
|
6235
6235
|
}
|
|
6236
|
+
|
|
6237
|
+
/**
|
|
6238
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
6239
|
+
* @param fn the function to wrap
|
|
6240
|
+
*/
|
|
6241
|
+
function $d8dbf52fea1773e2$export$f50b88e2a00918b5(fn) {
|
|
6242
|
+
return function (...args) {
|
|
6243
|
+
if (!fn) return;
|
|
6244
|
+
try {
|
|
6245
|
+
return Reflect.apply(fn, this, args);
|
|
6246
|
+
} catch (e) {
|
|
6247
|
+
queueMicrotask(() => {
|
|
6248
|
+
throw e;
|
|
6249
|
+
});
|
|
6250
|
+
}
|
|
6251
|
+
};
|
|
6252
|
+
}
|
|
6236
6253
|
const $961b5c64bef4662f$var$_tmpl$ = /*#__PURE__*/(0, $9HbP8$template)(`<div class="depict plp category"></div>`, 2);
|
|
6237
6254
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
6238
6255
|
/**
|
|
@@ -6369,10 +6386,17 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
6369
6386
|
} = props;
|
|
6370
6387
|
const shared_properties = $961b5c64bef4662f$var$get_shared_properties(depict_category);
|
|
6371
6388
|
return (0, $16b52438165aafe2$export$23fca46f3143581f)(() => {
|
|
6389
|
+
(0, $9HbP8$createEffect)(prev => {
|
|
6390
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
6391
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
6392
|
+
(0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
6393
|
+
return id;
|
|
6394
|
+
});
|
|
6395
|
+
(0, $9HbP8$onCleanup)(() => (0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
6372
6396
|
const grid_spacing_override = (0, $9HbP8$createMemo)(() => {
|
|
6373
6397
|
const {
|
|
6374
6398
|
grid_spacing: grid_spacing
|
|
6375
|
-
} = props; // can be reactive
|
|
6399
|
+
} = props; // can be reactive, therefore read in the memo
|
|
6376
6400
|
return typeof grid_spacing === "string" ? {
|
|
6377
6401
|
grid_spacing: grid_spacing
|
|
6378
6402
|
} : {
|
|
@@ -9786,6 +9810,13 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
9786
9810
|
grid_spacing: grid_spacing.horizontal
|
|
9787
9811
|
};
|
|
9788
9812
|
});
|
|
9813
|
+
(0, $9HbP8$createEffect)(prev => {
|
|
9814
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
9815
|
+
const search_query = shared_properties.get_search_query_();
|
|
9816
|
+
(0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
9817
|
+
return search_query;
|
|
9818
|
+
});
|
|
9819
|
+
(0, $9HbP8$onCleanup)(() => (0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
9789
9820
|
(0, $9HbP8$onCleanup)(shared_properties.reset_history_state_);
|
|
9790
9821
|
return (0, $7097477c78a89208$export$a54ec244c8863715)({
|
|
9791
9822
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^1.0.
|
|
239
|
+
"@depict-ai/plp-styling": "^1.0.33",
|
|
240
240
|
"@depict-ai/types": "^1.0.34",
|
|
241
241
|
"@depict-ai/utilishared": "^1.0.30",
|
|
242
242
|
"solid-js": "^1.7.3"
|
package/server/ES10/index.cjs
CHANGED
|
@@ -60,7 +60,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
60
60
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
61
61
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
62
62
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.
|
|
63
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.8";
|
|
64
64
|
function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
|
|
65
65
|
const {
|
|
66
66
|
collapse: collapse,
|
|
@@ -5488,6 +5488,24 @@ function $73014ff36186a4dd$var$_get_navigation_happened_promise2(is_replace) {
|
|
|
5488
5488
|
(0, $3hooq$depictaiutilishared.instant_exec_on_suspect_history_change).add(handler);
|
|
5489
5489
|
});
|
|
5490
5490
|
}
|
|
5491
|
+
|
|
5492
|
+
/**
|
|
5493
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
5494
|
+
* @param fn the function to wrap
|
|
5495
|
+
*/
|
|
5496
|
+
function $bdea39a75c454f4f$export$f50b88e2a00918b5(fn) {
|
|
5497
|
+
return function () {
|
|
5498
|
+
if (!fn) return;
|
|
5499
|
+
try {
|
|
5500
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
5501
|
+
return Reflect.apply(fn, this, args);
|
|
5502
|
+
} catch (e) {
|
|
5503
|
+
queueMicrotask(() => {
|
|
5504
|
+
throw e;
|
|
5505
|
+
});
|
|
5506
|
+
}
|
|
5507
|
+
};
|
|
5508
|
+
}
|
|
5491
5509
|
const $9cbefc32b9dab36d$var$_tmpl$ = ["<div", ' class="depict plp category">', "</div>"];
|
|
5492
5510
|
function $9cbefc32b9dab36d$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
5493
5511
|
$9cbefc32b9dab36d$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
@@ -5672,10 +5690,17 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
5672
5690
|
} = props;
|
|
5673
5691
|
const shared_properties = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
|
|
5674
5692
|
return (0, $d05611ff6b8c8357$export$23fca46f3143581f)(() => {
|
|
5693
|
+
(0, $3hooq$solidjs.createEffect)(prev => {
|
|
5694
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
5695
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
5696
|
+
(0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
5697
|
+
return id;
|
|
5698
|
+
});
|
|
5699
|
+
(0, $3hooq$solidjs.onCleanup)(() => (0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
5675
5700
|
const grid_spacing_override = (0, $3hooq$solidjs.createMemo)(() => {
|
|
5676
5701
|
const {
|
|
5677
5702
|
grid_spacing: grid_spacing
|
|
5678
|
-
} = props; // can be reactive
|
|
5703
|
+
} = props; // can be reactive, therefore read in the memo
|
|
5679
5704
|
return typeof grid_spacing === "string" ? {
|
|
5680
5705
|
grid_spacing: grid_spacing
|
|
5681
5706
|
} : {
|
|
@@ -8698,6 +8723,13 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
8698
8723
|
grid_spacing: grid_spacing.horizontal
|
|
8699
8724
|
};
|
|
8700
8725
|
});
|
|
8726
|
+
(0, $3hooq$solidjs.createEffect)(prev => {
|
|
8727
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
8728
|
+
const search_query = shared_properties.get_search_query_();
|
|
8729
|
+
(0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
8730
|
+
return search_query;
|
|
8731
|
+
});
|
|
8732
|
+
(0, $3hooq$solidjs.onCleanup)(() => (0, $bdea39a75c454f4f$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
8701
8733
|
(0, $3hooq$solidjs.onCleanup)(shared_properties.reset_history_state_);
|
|
8702
8734
|
return (0, $739c927cbecd26b0$export$a54ec244c8863715)({
|
|
8703
8735
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.8";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
|
@@ -568,6 +568,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
568
568
|
show_quicklinks?: boolean;
|
|
569
569
|
show_breadcrumbs?: boolean;
|
|
570
570
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
571
|
+
on_query_id_change?: (new_query_id?: string | undefined, old_query_id?: string | undefined) => void;
|
|
571
572
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
572
573
|
export function BreadCrumbs<T extends Display>({
|
|
573
574
|
depict_category
|
|
@@ -703,6 +704,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
703
704
|
grid_spacing: SDKGridSpacing;
|
|
704
705
|
cols_at_size: SDKColsAtSize;
|
|
705
706
|
product_card_template: ProductCardTemplate<[TransformedDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<TransformedDisplay>>;
|
|
707
|
+
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
706
708
|
extra_depict_options?: {
|
|
707
709
|
recommendations_cols_at_size?: SDKColsAtSize;
|
|
708
710
|
};
|
package/server/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.8";
|
|
12
12
|
function $8e8b179489080711$export$5bad61ecde080b1f() {
|
|
13
13
|
const {
|
|
14
14
|
collapse: collapse,
|
|
@@ -5436,6 +5436,24 @@ function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
|
5436
5436
|
(0, $b8hua$instant_exec_on_suspect_history_change).add(handler);
|
|
5437
5437
|
});
|
|
5438
5438
|
}
|
|
5439
|
+
|
|
5440
|
+
/**
|
|
5441
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
5442
|
+
* @param fn the function to wrap
|
|
5443
|
+
*/
|
|
5444
|
+
function $01c33966d9ddb108$export$f50b88e2a00918b5(fn) {
|
|
5445
|
+
return function () {
|
|
5446
|
+
if (!fn) return;
|
|
5447
|
+
try {
|
|
5448
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
5449
|
+
return Reflect.apply(fn, this, args);
|
|
5450
|
+
} catch (e) {
|
|
5451
|
+
queueMicrotask(() => {
|
|
5452
|
+
throw e;
|
|
5453
|
+
});
|
|
5454
|
+
}
|
|
5455
|
+
};
|
|
5456
|
+
}
|
|
5439
5457
|
const $f5f54892fd0c7d9f$var$_tmpl$ = ["<div", ' class="depict plp category">', "</div>"];
|
|
5440
5458
|
function $f5f54892fd0c7d9f$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
5441
5459
|
$f5f54892fd0c7d9f$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
@@ -5620,10 +5638,17 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
5620
5638
|
} = props;
|
|
5621
5639
|
const shared_properties = $f5f54892fd0c7d9f$var$get_shared_properties(depict_category);
|
|
5622
5640
|
return (0, $83e8cf2c0b87a58a$export$23fca46f3143581f)(() => {
|
|
5641
|
+
(0, $b8hua$createEffect)(prev => {
|
|
5642
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
5643
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
5644
|
+
(0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
5645
|
+
return id;
|
|
5646
|
+
});
|
|
5647
|
+
(0, $b8hua$onCleanup)(() => (0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
5623
5648
|
const grid_spacing_override = (0, $b8hua$createMemo)(() => {
|
|
5624
5649
|
const {
|
|
5625
5650
|
grid_spacing: grid_spacing
|
|
5626
|
-
} = props; // can be reactive
|
|
5651
|
+
} = props; // can be reactive, therefore read in the memo
|
|
5627
5652
|
return typeof grid_spacing === "string" ? {
|
|
5628
5653
|
grid_spacing: grid_spacing
|
|
5629
5654
|
} : {
|
|
@@ -8646,6 +8671,13 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
8646
8671
|
grid_spacing: grid_spacing.horizontal
|
|
8647
8672
|
};
|
|
8648
8673
|
});
|
|
8674
|
+
(0, $b8hua$createEffect)(prev => {
|
|
8675
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
8676
|
+
const search_query = shared_properties.get_search_query_();
|
|
8677
|
+
(0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
8678
|
+
return search_query;
|
|
8679
|
+
});
|
|
8680
|
+
(0, $b8hua$onCleanup)(() => (0, $01c33966d9ddb108$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
8649
8681
|
(0, $b8hua$onCleanup)(shared_properties.reset_history_state_);
|
|
8650
8682
|
return (0, $da279c5a540c6846$export$a54ec244c8863715)({
|
|
8651
8683
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/server/latest/index.cjs
CHANGED
|
@@ -54,7 +54,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
54
54
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
55
55
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
56
56
|
/*! Depict.ai search and product listing SDK */
|
|
57
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.
|
|
57
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.8";
|
|
58
58
|
function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
|
|
59
59
|
const {
|
|
60
60
|
collapse: collapse,
|
|
@@ -5062,6 +5062,23 @@ class $e96dd13889871fc0$export$7e1297a3a19f10d8 {
|
|
|
5062
5062
|
this.on_navigation_ = on_navigation;
|
|
5063
5063
|
}
|
|
5064
5064
|
}
|
|
5065
|
+
|
|
5066
|
+
/**
|
|
5067
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
5068
|
+
* @param fn the function to wrap
|
|
5069
|
+
*/
|
|
5070
|
+
function $deaaf04362a1bc71$export$f50b88e2a00918b5(fn) {
|
|
5071
|
+
return function (...args) {
|
|
5072
|
+
if (!fn) return;
|
|
5073
|
+
try {
|
|
5074
|
+
return Reflect.apply(fn, this, args);
|
|
5075
|
+
} catch (e) {
|
|
5076
|
+
queueMicrotask(() => {
|
|
5077
|
+
throw e;
|
|
5078
|
+
});
|
|
5079
|
+
}
|
|
5080
|
+
};
|
|
5081
|
+
}
|
|
5065
5082
|
const $48567ac5b39bac56$var$_tmpl$ = ["<div", ' class="depict plp category">', "</div>"];
|
|
5066
5083
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
5067
5084
|
/**
|
|
@@ -5193,10 +5210,17 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
5193
5210
|
} = props;
|
|
5194
5211
|
const shared_properties = $48567ac5b39bac56$var$get_shared_properties(depict_category);
|
|
5195
5212
|
return (0, $95837413165cc2df$export$23fca46f3143581f)(() => {
|
|
5213
|
+
(0, $5vyXB$solidjs.createEffect)(prev => {
|
|
5214
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
5215
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
5216
|
+
(0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
5217
|
+
return id;
|
|
5218
|
+
});
|
|
5219
|
+
(0, $5vyXB$solidjs.onCleanup)(() => (0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
5196
5220
|
const grid_spacing_override = (0, $5vyXB$solidjs.createMemo)(() => {
|
|
5197
5221
|
const {
|
|
5198
5222
|
grid_spacing: grid_spacing
|
|
5199
|
-
} = props; // can be reactive
|
|
5223
|
+
} = props; // can be reactive, therefore read in the memo
|
|
5200
5224
|
return typeof grid_spacing === "string" ? {
|
|
5201
5225
|
grid_spacing: grid_spacing
|
|
5202
5226
|
} : {
|
|
@@ -7982,6 +8006,13 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
|
|
|
7982
8006
|
grid_spacing: grid_spacing.horizontal
|
|
7983
8007
|
};
|
|
7984
8008
|
});
|
|
8009
|
+
(0, $5vyXB$solidjs.createEffect)(prev => {
|
|
8010
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
8011
|
+
const search_query = shared_properties.get_search_query_();
|
|
8012
|
+
(0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
8013
|
+
return search_query;
|
|
8014
|
+
});
|
|
8015
|
+
(0, $5vyXB$solidjs.onCleanup)(() => (0, $deaaf04362a1bc71$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
7985
8016
|
(0, $5vyXB$solidjs.onCleanup)(shared_properties.reset_history_state_);
|
|
7986
8017
|
return (0, $f1d7cb69f839a526$export$a54ec244c8863715)({
|
|
7987
8018
|
input_modal_open_: () => !!depict_search.modal_open,
|
package/server/latest/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.8";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
|
@@ -568,6 +568,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
568
568
|
show_quicklinks?: boolean;
|
|
569
569
|
show_breadcrumbs?: boolean;
|
|
570
570
|
category_title: typeof CategoryTitle | typeof embedded_num_products;
|
|
571
|
+
on_query_id_change?: (new_query_id?: string | undefined, old_query_id?: string | undefined) => void;
|
|
571
572
|
}): import("@depict-ai/utilishared").Node_Array;
|
|
572
573
|
export function BreadCrumbs<T extends Display>({
|
|
573
574
|
depict_category
|
|
@@ -703,6 +704,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
|
|
|
703
704
|
grid_spacing: SDKGridSpacing;
|
|
704
705
|
cols_at_size: SDKColsAtSize;
|
|
705
706
|
product_card_template: ProductCardTemplate<[TransformedDisplay] extends [never] ? OriginalDisplay : ModernDisplayWithPageUrl<TransformedDisplay>>;
|
|
707
|
+
on_query_change?: (new_query?: string | undefined, old_query?: string | undefined) => void;
|
|
706
708
|
extra_depict_options?: {
|
|
707
709
|
recommendations_cols_at_size?: SDKColsAtSize;
|
|
708
710
|
};
|
package/server/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, u
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.8";
|
|
9
9
|
function $24e27fab9c821b86$export$5bad61ecde080b1f(...params) {
|
|
10
10
|
const {
|
|
11
11
|
collapse: collapse,
|
|
@@ -5013,6 +5013,23 @@ class $4fd2ba03703a7d92$export$7e1297a3a19f10d8 {
|
|
|
5013
5013
|
this.on_navigation_ = on_navigation;
|
|
5014
5014
|
}
|
|
5015
5015
|
}
|
|
5016
|
+
|
|
5017
|
+
/**
|
|
5018
|
+
* Wraps a function in a try/catch block and throws the error globally. If undefined is provided as fn, a no-op is returned.
|
|
5019
|
+
* @param fn the function to wrap
|
|
5020
|
+
*/
|
|
5021
|
+
function $d8dbf52fea1773e2$export$f50b88e2a00918b5(fn) {
|
|
5022
|
+
return function (...args) {
|
|
5023
|
+
if (!fn) return;
|
|
5024
|
+
try {
|
|
5025
|
+
return Reflect.apply(fn, this, args);
|
|
5026
|
+
} catch (e) {
|
|
5027
|
+
queueMicrotask(() => {
|
|
5028
|
+
throw e;
|
|
5029
|
+
});
|
|
5030
|
+
}
|
|
5031
|
+
};
|
|
5032
|
+
}
|
|
5016
5033
|
const $961b5c64bef4662f$var$_tmpl$ = ["<div", ' class="depict plp category">', "</div>"];
|
|
5017
5034
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
5018
5035
|
/**
|
|
@@ -5144,10 +5161,17 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
5144
5161
|
} = props;
|
|
5145
5162
|
const shared_properties = $961b5c64bef4662f$var$get_shared_properties(depict_category);
|
|
5146
5163
|
return (0, $16b52438165aafe2$export$23fca46f3143581f)(() => {
|
|
5164
|
+
(0, $i7OB2$createEffect)(prev => {
|
|
5165
|
+
// this is here (and not on DepictCategory) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
5166
|
+
const id = depict_category.category_id; // <- this is a reactive getter
|
|
5167
|
+
(0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_id_change)(id, prev);
|
|
5168
|
+
return id;
|
|
5169
|
+
});
|
|
5170
|
+
(0, $i7OB2$onCleanup)(() => (0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_id_change)());
|
|
5147
5171
|
const grid_spacing_override = (0, $i7OB2$createMemo)(() => {
|
|
5148
5172
|
const {
|
|
5149
5173
|
grid_spacing: grid_spacing
|
|
5150
|
-
} = props; // can be reactive
|
|
5174
|
+
} = props; // can be reactive, therefore read in the memo
|
|
5151
5175
|
return typeof grid_spacing === "string" ? {
|
|
5152
5176
|
grid_spacing: grid_spacing
|
|
5153
5177
|
} : {
|
|
@@ -7933,6 +7957,13 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
|
|
|
7933
7957
|
grid_spacing: grid_spacing.horizontal
|
|
7934
7958
|
};
|
|
7935
7959
|
});
|
|
7960
|
+
(0, $i7OB2$createEffect)(prev => {
|
|
7961
|
+
// this is here (and not on DepictSearch) so that people also know when PageReplacer removes the page, it's intended to help people replace their own content when a depict page is navigated, see https://depictaiworkspace.slack.com/archives/C04M8MGCF3K/p1691670636155369
|
|
7962
|
+
const search_query = shared_properties.get_search_query_();
|
|
7963
|
+
(0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_change)(search_query, prev);
|
|
7964
|
+
return search_query;
|
|
7965
|
+
});
|
|
7966
|
+
(0, $i7OB2$onCleanup)(() => (0, $d8dbf52fea1773e2$export$f50b88e2a00918b5)(props.on_query_change)());
|
|
7936
7967
|
(0, $i7OB2$onCleanup)(shared_properties.reset_history_state_);
|
|
7937
7968
|
return (0, $7097477c78a89208$export$a54ec244c8863715)({
|
|
7938
7969
|
input_modal_open_: () => !!depict_search.modal_open,
|