@depict-ai/portal-components 2.7.10 → 2.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { SearchFilter } from "@depict-ai/types/api/SearchResponse";
4
4
  import { Locale } from "@depict-ai/react-ui/locales/latest";
5
5
  import { ReactNode } from "react";
6
6
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
7
- export const version = "2.7.10";
7
+ export const version = "2.7.11";
8
8
  type TextOptions = {
9
9
  /** Enabled */
10
10
  enabled: boolean;
@@ -54,11 +54,6 @@ export function DefaultSolidProductCard(display: Accessor<null | ModernDisplayWi
54
54
  interface YourDisplay {
55
55
  variant_index: number;
56
56
  variant_displays: YourVariantDisplay[];
57
- search_result_id: string;
58
- /** SKUs of the different variants, slated for removal */
59
- variant_skus: string[];
60
- /** Product of the different variants, slated for removal */
61
- variant_product_ids: string[];
62
57
  }
63
58
  type YourVariantDisplay = {
64
59
  title: string;
@@ -67,6 +62,10 @@ type YourVariantDisplay = {
67
62
  preview_image_url: string;
68
63
  video_urls: string[];
69
64
  }[];
65
+ video?: {
66
+ preview_image_url: string;
67
+ video_urls: string[];
68
+ };
70
69
  page_url: string;
71
70
  color_name: string;
72
71
  size_name: string | null;
package/dist/main.js CHANGED
@@ -19,7 +19,7 @@ $parcel$export(module.exports, "ExpandingSection", () => $2214dc111b9e2866$expor
19
19
  $parcel$export(module.exports, "ReactLookCard", () => $35bab9ff48bfe404$export$48787da2a5568bc);
20
20
  $parcel$export(module.exports, "version", () => $0a017be3a74fcc94$export$83d89fbfd8236492);
21
21
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
22
- const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.10";
22
+ const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.12";
23
23
 
24
24
 
25
25
 
@@ -207,6 +207,8 @@ function $3375ddd88f77967d$export$f11681c54c860912(display, info, configuredOpti
207
207
  (0, $7jsgb$solidjs.createEffect)(()=>(0, $7jsgb$depictaiutilisharedlatest.dlog)("Got passed options", JSON.parse(JSON.stringify(configuredOptions_()))));
208
208
  (0, $7jsgb$solidjs.createEffect)(()=>(0, $7jsgb$depictaiutilisharedlatest.dlog)("Got passed display", JSON.parse(JSON.stringify(display()))));
209
209
  (0, $7jsgb$solidjs.createEffect)(()=>noHoverSupport_() && setCardIsHovered(false));
210
+ // For switch from placeholders to product
211
+ (0, $7jsgb$solidjs.createEffect)(()=>!showVariantIndex() && defaultVariantIndex() != undefined && setShowVariantIndex(defaultVariantIndex()));
210
212
  return (0, $7jsgb$solidjsweb.createComponent)($3375ddd88f77967d$var$ContainsColorSwatchesProvider, {
211
213
  get children () {
212
214
  var _el$3 = $3375ddd88f77967d$var$_tmpl$3();
@@ -217,7 +219,7 @@ function $3375ddd88f77967d$export$f11681c54c860912(display, info, configuredOpti
217
219
  get children () {
218
220
  return (0, $7jsgb$solidjsweb.createComponent)($3375ddd88f77967d$var$ImagesAndVideos, {
219
221
  image_urls_: ()=>variantToShow()?.image_urls,
220
- video_: ()=>variantToShow()?.videos?.[0],
222
+ video_: ()=>variantToShow()?.video,
221
223
  configuredOptions_: configuredOptions_,
222
224
  cardIsHovered_: ()=>showVariantIndex() === display()?.variant_index && cardIsHovered(),
223
225
  aspectRatio_: aspectRatio_
package/dist/module.js CHANGED
@@ -7,7 +7,7 @@ import {createStore as $2MCgq$createStore, reconcile as $2MCgq$reconcile} from "
7
7
  import {createPortal as $2MCgq$createPortal} from "react-dom";
8
8
 
9
9
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
10
- const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.10";
10
+ const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.12";
11
11
 
12
12
 
13
13
 
@@ -195,6 +195,8 @@ function $29535f590238371c$export$f11681c54c860912(display, info, configuredOpti
195
195
  (0, $2MCgq$createEffect)(()=>(0, $2MCgq$dlog)("Got passed options", JSON.parse(JSON.stringify(configuredOptions_()))));
196
196
  (0, $2MCgq$createEffect)(()=>(0, $2MCgq$dlog)("Got passed display", JSON.parse(JSON.stringify(display()))));
197
197
  (0, $2MCgq$createEffect)(()=>noHoverSupport_() && setCardIsHovered(false));
198
+ // For switch from placeholders to product
199
+ (0, $2MCgq$createEffect)(()=>!showVariantIndex() && defaultVariantIndex() != undefined && setShowVariantIndex(defaultVariantIndex()));
198
200
  return (0, $2MCgq$createComponent)($29535f590238371c$var$ContainsColorSwatchesProvider, {
199
201
  get children () {
200
202
  var _el$3 = $29535f590238371c$var$_tmpl$3();
@@ -205,7 +207,7 @@ function $29535f590238371c$export$f11681c54c860912(display, info, configuredOpti
205
207
  get children () {
206
208
  return (0, $2MCgq$createComponent)($29535f590238371c$var$ImagesAndVideos, {
207
209
  image_urls_: ()=>variantToShow()?.image_urls,
208
- video_: ()=>variantToShow()?.videos?.[0],
210
+ video_: ()=>variantToShow()?.video,
209
211
  configuredOptions_: configuredOptions_,
210
212
  cardIsHovered_: ()=>showVariantIndex() === display()?.variant_index && cardIsHovered(),
211
213
  aspectRatio_: aspectRatio_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/portal-components",
3
- "version": "2.7.10",
3
+ "version": "2.7.12",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -103,7 +103,7 @@
103
103
  "@depict-ai/plp-styling": "^4.4.16",
104
104
  "@depict-ai/react-ui": "^4.8.6",
105
105
  "@depict-ai/types": "^5.4.4",
106
- "@depict-ai/ui": "^4.8.15",
106
+ "@depict-ai/ui": "^4.8.16",
107
107
  "@depict-ai/utilishared": "^2.4.5",
108
108
  "parcel": "^2.10.3",
109
109
  "solid-js": "^1.8.16"
@@ -278,6 +278,10 @@ export function DefaultSolidProductCard(
278
278
  createEffect(() => dlog("Got passed display", JSON.parse(JSON.stringify(display()))));
279
279
 
280
280
  createEffect(() => noHoverSupport_() && setCardIsHovered(false));
281
+ // For switch from placeholders to product
282
+ createEffect(
283
+ () => !showVariantIndex() && defaultVariantIndex() != undefined && setShowVariantIndex(defaultVariantIndex())
284
+ );
281
285
 
282
286
  return (
283
287
  <ContainsColorSwatchesProvider>
@@ -290,7 +294,7 @@ export function DefaultSolidProductCard(
290
294
  <LinkWrapped class="upper">
291
295
  <ImagesAndVideos
292
296
  image_urls_={() => variantToShow()?.image_urls}
293
- video_={() => variantToShow()?.videos?.[0]}
297
+ video_={() => variantToShow()?.video}
294
298
  configuredOptions_={configuredOptions_}
295
299
  cardIsHovered_={() => showVariantIndex() === display()?.variant_index && cardIsHovered()}
296
300
  aspectRatio_={aspectRatio_}
@@ -1005,11 +1009,6 @@ function InComponentOrDiv(props: {
1005
1009
  interface YourDisplay {
1006
1010
  variant_index: number;
1007
1011
  variant_displays: YourVariantDisplay[];
1008
- search_result_id: string;
1009
- /** SKUs of the different variants, slated for removal */
1010
- variant_skus: string[];
1011
- /** Product of the different variants, slated for removal */
1012
- variant_product_ids: string[];
1013
1012
  }
1014
1013
 
1015
1014
  type YourVariantDisplay = {
@@ -1017,6 +1016,7 @@ type YourVariantDisplay = {
1017
1016
  title: string;
1018
1017
  image_urls: string[];
1019
1018
  videos?: { preview_image_url: string; video_urls: string[] }[];
1019
+ video?: { preview_image_url: string; video_urls: string[] };
1020
1020
  page_url: string;
1021
1021
  color_name: string;
1022
1022
  size_name: string | null;