@depict-ai/ui 3.0.4 → 3.0.5
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 -24
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +34 -24
- package/latest/index.cjs +34 -24
- package/latest/index.d.ts +1 -1
- package/latest/index.js +34 -24
- package/locales/require.js +1152 -0
- package/package.json +1 -1
- package/server/ES10/index.cjs +32 -22
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +32 -22
- package/server/latest/index.cjs +32 -22
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +32 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
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
|
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
83
83
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
84
84
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
85
85
|
/*! Depict.ai search and product listing SDK */
|
|
86
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.
|
|
86
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.5";
|
|
87
87
|
const $9d19451330d04c3c$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
88
88
|
function $9d19451330d04c3c$export$8be2714ec7f169ee() {
|
|
89
89
|
var _$escape2, _$escape3;
|
|
@@ -948,27 +948,31 @@ function $76012c4468a53d1f$export$43f0fb951fcb0c54(_ref) {
|
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
950
|
// source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
|
|
951
|
+
// deeply diffs two objects
|
|
952
|
+
// Modified by chatGPT to not be recursive, since stiga was getting a stack overflow just due to the size of their data
|
|
953
|
+
// Modified futher to bias towards saying objects are equal non-primitive objects differ
|
|
951
954
|
function $76012c4468a53d1f$var$deep_equal(obj1, obj2) {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}
|
|
969
|
-
|
|
955
|
+
const stack = [[obj1, obj2]];
|
|
956
|
+
while (stack.length > 0) {
|
|
957
|
+
const [currentObj1, currentObj2] = stack.pop();
|
|
958
|
+
if (currentObj1 === currentObj2) continue;
|
|
959
|
+
if (Array.isArray(currentObj1) && Array.isArray(currentObj2)) {
|
|
960
|
+
if (currentObj1.length !== currentObj2.length) return false;
|
|
961
|
+
for (let i = 0; i < currentObj1.length; i++) stack.push([currentObj1[i], currentObj2[i]]);
|
|
962
|
+
} else if (typeof currentObj1 === "object" && typeof currentObj2 === "object" && currentObj1 !== null && currentObj2 !== null) {
|
|
963
|
+
if (Array.isArray(currentObj1) || Array.isArray(currentObj2)) return false;
|
|
964
|
+
const keys1 = Object.keys(currentObj1);
|
|
965
|
+
const keys2 = Object.keys(currentObj2);
|
|
966
|
+
if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
|
|
967
|
+
for (let key in currentObj1) {
|
|
968
|
+
if ($76012c4468a53d1f$var$result_ids.includes(key)) continue; // ignore comparing values for keys we know are changing with every request
|
|
969
|
+
stack.push([currentObj1[key], currentObj2[key]]);
|
|
970
|
+
}
|
|
971
|
+
} else if (typeof currentObj1 !== "function" && typeof currentObj2 !== "function")
|
|
972
|
+
// Claim that all functions are equal, since the only way a function ends up here is because someone added it in the displayTransformer and that shouldn't force us to re-render, right?
|
|
973
|
+
return false;
|
|
970
974
|
}
|
|
971
|
-
return
|
|
975
|
+
return true;
|
|
972
976
|
}
|
|
973
977
|
const $6c2c739b113a8ddf$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
|
|
974
978
|
$6c2c739b113a8ddf$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
|
|
@@ -4745,6 +4749,9 @@ function $b3dc12c672c9df24$export$967e966fca9515e(api_response) {
|
|
|
4745
4749
|
}
|
|
4746
4750
|
return api_response;
|
|
4747
4751
|
}
|
|
4752
|
+
|
|
4753
|
+
// Minifiable and tree-shakable enum
|
|
4754
|
+
// Why not use const enum? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/9223#note_1675965260
|
|
4748
4755
|
const $c3739e86187f2054$export$74ee7529ce0f8a00 = "listingId";
|
|
4749
4756
|
const $c3739e86187f2054$export$5aae649db1b959fc = "externalId";
|
|
4750
4757
|
function $e270e9f953fcbc58$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
@@ -7930,7 +7937,7 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
7930
7937
|
category_title: category_title
|
|
7931
7938
|
} = props;
|
|
7932
7939
|
const shared_properties = $9cbefc32b9dab36d$var$get_shared_properties(depict_category);
|
|
7933
|
-
const diffableListingQuery = $3hooq$solidjs.createMemo(() => Object.values(depict_category.listing_query).join(""));
|
|
7940
|
+
const diffableListingQuery = $3hooq$solidjs.createMemo(() => Object.values(depict_category.listing_query || {}).join(""));
|
|
7934
7941
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
7935
7942
|
$3hooq$solidjs.createEffect(prev => {
|
|
7936
7943
|
// 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
|
|
@@ -7981,7 +7988,10 @@ function $9cbefc32b9dab36d$export$e2bf8ce7779e827e(props) {
|
|
|
7981
7988
|
min_products_to_fetch_: $9cbefc32b9dab36d$var$min_products_to_fetch_,
|
|
7982
7989
|
local_filter_cache_: local_filter_cache_,
|
|
7983
7990
|
id_to_query_for_: $3hooq$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
|
|
7984
|
-
id_type_: $3hooq$solidjs.createMemo(() =>
|
|
7991
|
+
id_type_: $3hooq$solidjs.createMemo(() => {
|
|
7992
|
+
if (!depict_category.disable_override_listing_id && override_listing_id_accessor_()) return $c3739e86187f2054$export$74ee7529ce0f8a00;
|
|
7993
|
+
return depict_category.listing_query.type;
|
|
7994
|
+
}),
|
|
7985
7995
|
i18n_: i18n_,
|
|
7986
7996
|
show_quicklinks_: $3hooq$solidjs.createMemo(() => {
|
|
7987
7997
|
var _props$show_quicklink;
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "3.0.
|
|
13
|
+
export const version = "3.0.5";
|
|
14
14
|
export type SDKColsAtSize = [number, number?][];
|
|
15
15
|
/**
|
|
16
16
|
* Transform SDK ColsAtSize into valid Layout ColsAtSize
|
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 = "3.0.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.5";
|
|
14
14
|
const $ca6ab5f08bd28bca$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
15
15
|
function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
|
|
16
16
|
var _$escape2, _$escape3;
|
|
@@ -875,27 +875,31 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
|
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
// source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
|
|
878
|
+
// deeply diffs two objects
|
|
879
|
+
// Modified by chatGPT to not be recursive, since stiga was getting a stack overflow just due to the size of their data
|
|
880
|
+
// Modified futher to bias towards saying objects are equal non-primitive objects differ
|
|
878
881
|
function $2d7bad8684bc7f44$var$deep_equal(obj1, obj2) {
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
}
|
|
896
|
-
|
|
882
|
+
const stack = [[obj1, obj2]];
|
|
883
|
+
while (stack.length > 0) {
|
|
884
|
+
const [currentObj1, currentObj2] = stack.pop();
|
|
885
|
+
if (currentObj1 === currentObj2) continue;
|
|
886
|
+
if (Array.isArray(currentObj1) && Array.isArray(currentObj2)) {
|
|
887
|
+
if (currentObj1.length !== currentObj2.length) return false;
|
|
888
|
+
for (let i = 0; i < currentObj1.length; i++) stack.push([currentObj1[i], currentObj2[i]]);
|
|
889
|
+
} else if (typeof currentObj1 === "object" && typeof currentObj2 === "object" && currentObj1 !== null && currentObj2 !== null) {
|
|
890
|
+
if (Array.isArray(currentObj1) || Array.isArray(currentObj2)) return false;
|
|
891
|
+
const keys1 = Object.keys(currentObj1);
|
|
892
|
+
const keys2 = Object.keys(currentObj2);
|
|
893
|
+
if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
|
|
894
|
+
for (let key in currentObj1) {
|
|
895
|
+
if ($2d7bad8684bc7f44$var$result_ids.includes(key)) continue; // ignore comparing values for keys we know are changing with every request
|
|
896
|
+
stack.push([currentObj1[key], currentObj2[key]]);
|
|
897
|
+
}
|
|
898
|
+
} else if (typeof currentObj1 !== "function" && typeof currentObj2 !== "function")
|
|
899
|
+
// Claim that all functions are equal, since the only way a function ends up here is because someone added it in the displayTransformer and that shouldn't force us to re-render, right?
|
|
900
|
+
return false;
|
|
897
901
|
}
|
|
898
|
-
return
|
|
902
|
+
return true;
|
|
899
903
|
}
|
|
900
904
|
const $63f1f8dbcd07d3b0$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
|
|
901
905
|
$63f1f8dbcd07d3b0$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
|
|
@@ -4672,6 +4676,9 @@ function $ed0fefda39a0f15d$export$967e966fca9515e(api_response) {
|
|
|
4672
4676
|
}
|
|
4673
4677
|
return api_response;
|
|
4674
4678
|
}
|
|
4679
|
+
|
|
4680
|
+
// Minifiable and tree-shakable enum
|
|
4681
|
+
// Why not use const enum? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/9223#note_1675965260
|
|
4675
4682
|
const $397620a4d7958ed1$export$74ee7529ce0f8a00 = "listingId";
|
|
4676
4683
|
const $397620a4d7958ed1$export$5aae649db1b959fc = "externalId";
|
|
4677
4684
|
function $284849364a6ef73a$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
@@ -7857,7 +7864,7 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
7857
7864
|
category_title: category_title
|
|
7858
7865
|
} = props;
|
|
7859
7866
|
const shared_properties = $f5f54892fd0c7d9f$var$get_shared_properties(depict_category);
|
|
7860
|
-
const diffableListingQuery = $b8hua$createMemo(() => Object.values(depict_category.listing_query).join(""));
|
|
7867
|
+
const diffableListingQuery = $b8hua$createMemo(() => Object.values(depict_category.listing_query || {}).join(""));
|
|
7861
7868
|
return $83e8cf2c0b87a58a$export$23fca46f3143581f(() => {
|
|
7862
7869
|
$b8hua$createEffect(prev => {
|
|
7863
7870
|
// 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
|
|
@@ -7908,7 +7915,10 @@ function $f5f54892fd0c7d9f$export$e2bf8ce7779e827e(props) {
|
|
|
7908
7915
|
min_products_to_fetch_: $f5f54892fd0c7d9f$var$min_products_to_fetch_,
|
|
7909
7916
|
local_filter_cache_: local_filter_cache_,
|
|
7910
7917
|
id_to_query_for_: $b8hua$createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
|
|
7911
|
-
id_type_: $b8hua$createMemo(() =>
|
|
7918
|
+
id_type_: $b8hua$createMemo(() => {
|
|
7919
|
+
if (!depict_category.disable_override_listing_id && override_listing_id_accessor_()) return $397620a4d7958ed1$export$74ee7529ce0f8a00;
|
|
7920
|
+
return depict_category.listing_query.type;
|
|
7921
|
+
}),
|
|
7912
7922
|
i18n_: i18n_,
|
|
7913
7923
|
show_quicklinks_: $b8hua$createMemo(() => {
|
|
7914
7924
|
var _props$show_quicklink;
|
package/server/latest/index.cjs
CHANGED
|
@@ -77,7 +77,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
77
77
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
78
78
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
79
79
|
/*! Depict.ai search and product listing SDK */
|
|
80
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.
|
|
80
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.5";
|
|
81
81
|
const $0f313083912e447a$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
82
82
|
function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
|
|
83
83
|
return $5vyXB$solidjsweb.ssr($0f313083912e447a$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("width", $5vyXB$solidjsweb.escape(props.width_, true) ?? 14, false) + $5vyXB$solidjsweb.ssrAttribute("height", $5vyXB$solidjsweb.escape(props.height_, true) ?? 26, false));
|
|
@@ -894,27 +894,31 @@ function $a73063cc642f3e5f$export$43f0fb951fcb0c54({
|
|
|
894
894
|
});
|
|
895
895
|
}
|
|
896
896
|
// source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
|
|
897
|
+
// deeply diffs two objects
|
|
898
|
+
// Modified by chatGPT to not be recursive, since stiga was getting a stack overflow just due to the size of their data
|
|
899
|
+
// Modified futher to bias towards saying objects are equal non-primitive objects differ
|
|
897
900
|
function $a73063cc642f3e5f$var$deep_equal(obj1, obj2) {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}
|
|
915
|
-
|
|
901
|
+
const stack = [[obj1, obj2]];
|
|
902
|
+
while (stack.length > 0) {
|
|
903
|
+
const [currentObj1, currentObj2] = stack.pop();
|
|
904
|
+
if (currentObj1 === currentObj2) continue;
|
|
905
|
+
if (Array.isArray(currentObj1) && Array.isArray(currentObj2)) {
|
|
906
|
+
if (currentObj1.length !== currentObj2.length) return false;
|
|
907
|
+
for (let i = 0; i < currentObj1.length; i++) stack.push([currentObj1[i], currentObj2[i]]);
|
|
908
|
+
} else if (typeof currentObj1 === "object" && typeof currentObj2 === "object" && currentObj1 !== null && currentObj2 !== null) {
|
|
909
|
+
if (Array.isArray(currentObj1) || Array.isArray(currentObj2)) return false;
|
|
910
|
+
const keys1 = Object.keys(currentObj1);
|
|
911
|
+
const keys2 = Object.keys(currentObj2);
|
|
912
|
+
if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
|
|
913
|
+
for (let key in currentObj1) {
|
|
914
|
+
if ($a73063cc642f3e5f$var$result_ids.includes(key)) continue; // ignore comparing values for keys we know are changing with every request
|
|
915
|
+
stack.push([currentObj1[key], currentObj2[key]]);
|
|
916
|
+
}
|
|
917
|
+
} else if (typeof currentObj1 !== "function" && typeof currentObj2 !== "function")
|
|
918
|
+
// Claim that all functions are equal, since the only way a function ends up here is because someone added it in the displayTransformer and that shouldn't force us to re-render, right?
|
|
919
|
+
return false;
|
|
916
920
|
}
|
|
917
|
-
return
|
|
921
|
+
return true;
|
|
918
922
|
}
|
|
919
923
|
const $f48d0fbb00835aaa$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
|
|
920
924
|
$f48d0fbb00835aaa$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
|
|
@@ -4450,6 +4454,9 @@ function $67dc366d96177e70$export$967e966fca9515e(api_response) {
|
|
|
4450
4454
|
}
|
|
4451
4455
|
return api_response;
|
|
4452
4456
|
}
|
|
4457
|
+
|
|
4458
|
+
// Minifiable and tree-shakable enum
|
|
4459
|
+
// Why not use const enum? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/9223#note_1675965260
|
|
4453
4460
|
const $779741d0f266ea8c$export$74ee7529ce0f8a00 = "listingId";
|
|
4454
4461
|
const $779741d0f266ea8c$export$5aae649db1b959fc = "externalId";
|
|
4455
4462
|
const $e1d6c0f3d89d531c$var$v3_base_url = (0, $5vyXB$depictaiutilishared.base_url) + "/v3/";
|
|
@@ -7355,7 +7362,7 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
7355
7362
|
category_title: category_title
|
|
7356
7363
|
} = props;
|
|
7357
7364
|
const shared_properties = $48567ac5b39bac56$var$get_shared_properties(depict_category);
|
|
7358
|
-
const diffableListingQuery = $5vyXB$solidjs.createMemo(() => Object.values(depict_category.listing_query).join(""));
|
|
7365
|
+
const diffableListingQuery = $5vyXB$solidjs.createMemo(() => Object.values(depict_category.listing_query || {}).join(""));
|
|
7359
7366
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
7360
7367
|
$5vyXB$solidjs.createEffect(prev => {
|
|
7361
7368
|
// 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
|
|
@@ -7406,7 +7413,10 @@ function $48567ac5b39bac56$export$e2bf8ce7779e827e(props) {
|
|
|
7406
7413
|
min_products_to_fetch_: $48567ac5b39bac56$var$min_products_to_fetch_,
|
|
7407
7414
|
local_filter_cache_: local_filter_cache_,
|
|
7408
7415
|
id_to_query_for_: $5vyXB$solidjs.createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
|
|
7409
|
-
id_type_: $5vyXB$solidjs.createMemo(() =>
|
|
7416
|
+
id_type_: $5vyXB$solidjs.createMemo(() => {
|
|
7417
|
+
if (!depict_category.disable_override_listing_id && override_listing_id_accessor_()) return $779741d0f266ea8c$export$74ee7529ce0f8a00;
|
|
7418
|
+
return depict_category.listing_query.type;
|
|
7419
|
+
}),
|
|
7410
7420
|
i18n_: i18n_,
|
|
7411
7421
|
show_quicklinks_: $5vyXB$solidjs.createMemo(() => props.show_quicklinks ?? true),
|
|
7412
7422
|
category_title_: category_title,
|
package/server/latest/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
|
|
|
10
10
|
import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
13
|
-
export const version = "3.0.
|
|
13
|
+
export const version = "3.0.5";
|
|
14
14
|
export type SDKColsAtSize = [number, number?][];
|
|
15
15
|
/**
|
|
16
16
|
* Transform SDK ColsAtSize into valid Layout ColsAtSize
|
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 = "3.0.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.5";
|
|
11
11
|
const $fbbadcb080ad1d4a$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
|
|
12
12
|
function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
|
|
13
13
|
return $i7OB2$ssr($fbbadcb080ad1d4a$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("width", $i7OB2$escape(props.width_, true) ?? 14, false) + $i7OB2$ssrAttribute("height", $i7OB2$escape(props.height_, true) ?? 26, false));
|
|
@@ -824,27 +824,31 @@ function $29ec7cddbe1d3484$export$43f0fb951fcb0c54({
|
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
826
|
// source: https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934
|
|
827
|
+
// deeply diffs two objects
|
|
828
|
+
// Modified by chatGPT to not be recursive, since stiga was getting a stack overflow just due to the size of their data
|
|
829
|
+
// Modified futher to bias towards saying objects are equal non-primitive objects differ
|
|
827
830
|
function $29ec7cddbe1d3484$var$deep_equal(obj1, obj2) {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
}
|
|
845
|
-
|
|
831
|
+
const stack = [[obj1, obj2]];
|
|
832
|
+
while (stack.length > 0) {
|
|
833
|
+
const [currentObj1, currentObj2] = stack.pop();
|
|
834
|
+
if (currentObj1 === currentObj2) continue;
|
|
835
|
+
if (Array.isArray(currentObj1) && Array.isArray(currentObj2)) {
|
|
836
|
+
if (currentObj1.length !== currentObj2.length) return false;
|
|
837
|
+
for (let i = 0; i < currentObj1.length; i++) stack.push([currentObj1[i], currentObj2[i]]);
|
|
838
|
+
} else if (typeof currentObj1 === "object" && typeof currentObj2 === "object" && currentObj1 !== null && currentObj2 !== null) {
|
|
839
|
+
if (Array.isArray(currentObj1) || Array.isArray(currentObj2)) return false;
|
|
840
|
+
const keys1 = Object.keys(currentObj1);
|
|
841
|
+
const keys2 = Object.keys(currentObj2);
|
|
842
|
+
if (keys1.length !== keys2.length || !keys1.every(key => keys2.includes(key))) return false;
|
|
843
|
+
for (let key in currentObj1) {
|
|
844
|
+
if ($29ec7cddbe1d3484$var$result_ids.includes(key)) continue; // ignore comparing values for keys we know are changing with every request
|
|
845
|
+
stack.push([currentObj1[key], currentObj2[key]]);
|
|
846
|
+
}
|
|
847
|
+
} else if (typeof currentObj1 !== "function" && typeof currentObj2 !== "function")
|
|
848
|
+
// Claim that all functions are equal, since the only way a function ends up here is because someone added it in the displayTransformer and that shouldn't force us to re-render, right?
|
|
849
|
+
return false;
|
|
846
850
|
}
|
|
847
|
-
return
|
|
851
|
+
return true;
|
|
848
852
|
}
|
|
849
853
|
const $c8d5ff4524619fcd$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
|
|
850
854
|
$c8d5ff4524619fcd$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
|
|
@@ -4380,6 +4384,9 @@ function $e5014ccd0b76d9f4$export$967e966fca9515e(api_response) {
|
|
|
4380
4384
|
}
|
|
4381
4385
|
return api_response;
|
|
4382
4386
|
}
|
|
4387
|
+
|
|
4388
|
+
// Minifiable and tree-shakable enum
|
|
4389
|
+
// Why not use const enum? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/9223#note_1675965260
|
|
4383
4390
|
const $c20599a0d81d953a$export$74ee7529ce0f8a00 = "listingId";
|
|
4384
4391
|
const $c20599a0d81d953a$export$5aae649db1b959fc = "externalId";
|
|
4385
4392
|
const $7fa23e2a0079eca4$var$v3_base_url = (0, $i7OB2$base_url) + "/v3/";
|
|
@@ -7285,7 +7292,7 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
7285
7292
|
category_title: category_title
|
|
7286
7293
|
} = props;
|
|
7287
7294
|
const shared_properties = $961b5c64bef4662f$var$get_shared_properties(depict_category);
|
|
7288
|
-
const diffableListingQuery = $i7OB2$createMemo(() => Object.values(depict_category.listing_query).join(""));
|
|
7295
|
+
const diffableListingQuery = $i7OB2$createMemo(() => Object.values(depict_category.listing_query || {}).join(""));
|
|
7289
7296
|
return $16b52438165aafe2$export$23fca46f3143581f(() => {
|
|
7290
7297
|
$i7OB2$createEffect(prev => {
|
|
7291
7298
|
// 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
|
|
@@ -7336,7 +7343,10 @@ function $961b5c64bef4662f$export$e2bf8ce7779e827e(props) {
|
|
|
7336
7343
|
min_products_to_fetch_: $961b5c64bef4662f$var$min_products_to_fetch_,
|
|
7337
7344
|
local_filter_cache_: local_filter_cache_,
|
|
7338
7345
|
id_to_query_for_: $i7OB2$createMemo(() => !depict_category.disable_override_listing_id && override_listing_id_accessor_() || depict_category.listing_query.id),
|
|
7339
|
-
id_type_: $i7OB2$createMemo(() =>
|
|
7346
|
+
id_type_: $i7OB2$createMemo(() => {
|
|
7347
|
+
if (!depict_category.disable_override_listing_id && override_listing_id_accessor_()) return $c20599a0d81d953a$export$74ee7529ce0f8a00;
|
|
7348
|
+
return depict_category.listing_query.type;
|
|
7349
|
+
}),
|
|
7340
7350
|
i18n_: i18n_,
|
|
7341
7351
|
show_quicklinks_: $i7OB2$createMemo(() => props.show_quicklinks ?? true),
|
|
7342
7352
|
category_title_: category_title,
|