@depict-ai/portal-components 2.7.19 → 2.7.21

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
@@ -1,11 +1,11 @@
1
+ import { ModernDisplayWithPageUrl } from "@depict-ai/ui/latest";
1
2
  import { ModernDisplay } from "@depict-ai/utilishared";
2
3
  import { BaseProductListingConfig } from "@depict-ai/ui";
3
- import { ModernDisplayWithPageUrl } from "@depict-ai/ui/latest";
4
4
  import { SearchFilter } from "@depict-ai/types/api/SearchResponse";
5
5
  import { Locale } from "@depict-ai/react-ui/locales/latest";
6
6
  import { ReactNode } from "react";
7
7
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
8
- export const version = "2.7.19";
8
+ export const version = "2.7.21";
9
9
  type TextOptions = {
10
10
  /** Enabled */
11
11
  enabled: boolean;
@@ -44,7 +44,12 @@ type ProductCardSchema = {
44
44
  /** Image Carousel */
45
45
  image_carousel: boolean;
46
46
  image_aspect_ratio: number;
47
+ is_ejected: boolean;
47
48
  };
49
+ export function ReactDefaultProductCard(react_props: {
50
+ options?: ProductCardSchema;
51
+ display: null | ModernDisplayWithPageUrl<any>;
52
+ }): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
48
53
  interface PortalRecsConfig<T extends ModernDisplay> extends BaseProductListingConfig {
49
54
  /**
50
55
  * A promise containing the recommendations to render, see https://docs.depict.ai/api-guide/recommendations/api-client/fetching
@@ -57,7 +62,7 @@ interface PortalRecsConfig<T extends ModernDisplay> extends BaseProductListingCo
57
62
  /**
58
63
  * Config to use for the product card
59
64
  */
60
- productCardConfig: ProductCardSchema;
65
+ productCardConfig?: ProductCardSchema | null;
61
66
  }
62
67
  interface PortalRecommendationGridConfig<T extends ModernDisplay> extends PortalRecsConfig<T> {
63
68
  maxRows?: number;
@@ -79,10 +84,6 @@ declare function SolidWrapper<T extends ModernDisplay>(props: PortalRecommendati
79
84
  */
80
85
  export function PortalRecsSlider<T extends ModernDisplay>(props: Parameters<typeof _SolidWrapper1<T>>[0]): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
81
86
  declare function _SolidWrapper1<T extends ModernDisplay>(props: PortalRecsConfig<T>): HTMLDivElement;
82
- export function ReactDefaultProductCard(react_props: {
83
- options?: ProductCardSchema;
84
- display: null | ModernDisplayWithPageUrl<any>;
85
- }): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
86
87
  export function ReactSelectedFilters(react_props: {
87
88
  availableFilters: SearchFilter[] | undefined;
88
89
  hidden?: boolean;
package/dist/main.js CHANGED
@@ -21,7 +21,7 @@ $parcel$export(module.exports, "ExpandingSection", () => $2214dc111b9e2866$expor
21
21
  $parcel$export(module.exports, "ReactLookCard", () => $35bab9ff48bfe404$export$48787da2a5568bc);
22
22
  $parcel$export(module.exports, "version", () => $0a017be3a74fcc94$export$83d89fbfd8236492);
23
23
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
24
- const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.19";
24
+ const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.21";
25
25
 
26
26
 
27
27
 
@@ -1019,6 +1019,63 @@ function $3375ddd88f77967d$var$InComponentOrDiv(props) {
1019
1019
 
1020
1020
 
1021
1021
 
1022
+
1023
+
1024
+
1025
+ function $70cc6bd7e3f1dd4b$export$d1a48be4967fe67c(react_props) {
1026
+ return (0, $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef)({
1027
+ solid_component: (props_store)=>{
1028
+ return (0, $3375ddd88f77967d$export$f11681c54c860912)(()=>props_store.display, {
1029
+ set_on_index_change: ()=>{},
1030
+ depictCardsDataset: {},
1031
+ formatPrice: (price)=>price && (0, $7jsgb$depictaiutilisharedlatest.standard_price_format)(price)
1032
+ }, ()=>props_store?.options || $70cc6bd7e3f1dd4b$export$5c9921af2948d16a);
1033
+ },
1034
+ // Work around in case https://github.com/solidjs/solid/issues/2139 potentially arises
1035
+ props: structuredClone(react_props),
1036
+ className: "depict"
1037
+ });
1038
+ }
1039
+ const $70cc6bd7e3f1dd4b$export$5c9921af2948d16a = {
1040
+ image_radius: "md",
1041
+ alignment: "left",
1042
+ sizes: true,
1043
+ smart_labels: {
1044
+ font_size_rem: 1,
1045
+ enabled: true,
1046
+ bold: false,
1047
+ italic: false,
1048
+ color: "#0f0f0f"
1049
+ },
1050
+ title: {
1051
+ font_size_rem: 1,
1052
+ enabled: true,
1053
+ bold: false,
1054
+ italic: false,
1055
+ color: "#0f0f0f"
1056
+ },
1057
+ price: {
1058
+ font_size_rem: 1,
1059
+ enabled: true,
1060
+ bold: false,
1061
+ italic: false,
1062
+ color: "#0f0f0f"
1063
+ },
1064
+ original_price: {
1065
+ font_size_rem: 1,
1066
+ enabled: true,
1067
+ bold: false,
1068
+ italic: false,
1069
+ color: "#0f0f0f"
1070
+ },
1071
+ use_hover_image: true,
1072
+ image_carousel: true,
1073
+ color_options: true,
1074
+ image_aspect_ratio: 1,
1075
+ is_ejected: false
1076
+ };
1077
+
1078
+
1022
1079
  function $9b4cfecb283dbb57$export$d20a7e68f6a71456(props) {
1023
1080
  return (0, $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef)({
1024
1081
  solid_component: $9b4cfecb283dbb57$export$ef681ece395f74,
@@ -1036,7 +1093,7 @@ function $9b4cfecb283dbb57$export$ef681ece395f74(props) {
1036
1093
  ...info,
1037
1094
  depictCardsDataset: {},
1038
1095
  formatPrice: (price)=>price && (0, $7jsgb$depictaiutilisharedlatest.standard_price_format)(price)
1039
- }, ()=>props.productCardConfig);
1096
+ }, ()=>props.productCardConfig || (0, $70cc6bd7e3f1dd4b$export$5c9921af2948d16a));
1040
1097
  },
1041
1098
  get cols_at_size () {
1042
1099
  return props.columnsAtSize || (0, $7jsgb$depictaiui.defaultColsAtSize);
@@ -1066,6 +1123,7 @@ function $9b4cfecb283dbb57$export$ef681ece395f74(props) {
1066
1123
 
1067
1124
 
1068
1125
 
1126
+
1069
1127
  function $1113a95ded76fc38$export$a640309a759938e9(props) {
1070
1128
  return (0, $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef)({
1071
1129
  solid_component: $1113a95ded76fc38$var$SolidWrapper,
@@ -1083,7 +1141,7 @@ function $1113a95ded76fc38$var$SolidWrapper(props) {
1083
1141
  ...info,
1084
1142
  depictCardsDataset: {},
1085
1143
  formatPrice: (price)=>price && (0, $7jsgb$depictaiutilisharedlatest.standard_price_format)(price)
1086
- }, ()=>props.productCardConfig);
1144
+ }, ()=>props.productCardConfig || (0, $70cc6bd7e3f1dd4b$export$5c9921af2948d16a));
1087
1145
  },
1088
1146
  get cols_at_size () {
1089
1147
  return props.columnsAtSize || (0, $7jsgb$depictaiui.defaultColsAtSize);
@@ -1101,62 +1159,6 @@ function $1113a95ded76fc38$var$SolidWrapper(props) {
1101
1159
 
1102
1160
 
1103
1161
 
1104
- function $70cc6bd7e3f1dd4b$export$d1a48be4967fe67c(react_props) {
1105
- return (0, $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef)({
1106
- solid_component: (props_store)=>{
1107
- return (0, $3375ddd88f77967d$export$f11681c54c860912)(()=>props_store.display, {
1108
- set_on_index_change: ()=>{},
1109
- depictCardsDataset: {},
1110
- formatPrice: (price)=>price && (0, $7jsgb$depictaiutilisharedlatest.standard_price_format)(price)
1111
- }, ()=>props_store?.options || {
1112
- image_radius: "md",
1113
- alignment: "left",
1114
- sizes: true,
1115
- smart_labels: {
1116
- font_size_rem: 1,
1117
- enabled: true,
1118
- bold: false,
1119
- italic: false,
1120
- color: "#0f0f0f"
1121
- },
1122
- title: {
1123
- font_size_rem: 1,
1124
- enabled: true,
1125
- bold: false,
1126
- italic: false,
1127
- color: "#0f0f0f"
1128
- },
1129
- price: {
1130
- font_size_rem: 1,
1131
- enabled: true,
1132
- bold: false,
1133
- italic: false,
1134
- color: "#0f0f0f"
1135
- },
1136
- original_price: {
1137
- font_size_rem: 1,
1138
- enabled: true,
1139
- bold: false,
1140
- italic: false,
1141
- color: "#0f0f0f"
1142
- },
1143
- use_hover_image: true,
1144
- image_carousel: true,
1145
- color_options: true,
1146
- image_aspect_ratio: 1,
1147
- underline_text: false,
1148
- is_ejected: false
1149
- });
1150
- },
1151
- // Work around in case https://github.com/solidjs/solid/issues/2139 potentially arises
1152
- props: structuredClone(react_props),
1153
- className: "depict"
1154
- });
1155
- }
1156
-
1157
-
1158
-
1159
-
1160
1162
 
1161
1163
  function $a1efb49ef2dfa3c2$export$32717ad33b14d079(get_value, get_set_function) {
1162
1164
  const return_value = [
package/dist/module.js CHANGED
@@ -8,7 +8,7 @@ import {createContext as $2MCgq$createContext, createMemo as $2MCgq$createMemo,
8
8
  import {createPortal as $2MCgq$createPortal} from "react-dom";
9
9
 
10
10
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
11
- const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.19";
11
+ const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.21";
12
12
 
13
13
 
14
14
 
@@ -1006,6 +1006,63 @@ function $29535f590238371c$var$InComponentOrDiv(props) {
1006
1006
 
1007
1007
 
1008
1008
 
1009
+
1010
+
1011
+
1012
+ function $474e9d712b745d60$export$d1a48be4967fe67c(react_props) {
1013
+ return (0, $0fe03f2fcd2418f8$export$f6e64e17bd69eeef)({
1014
+ solid_component: (props_store)=>{
1015
+ return (0, $29535f590238371c$export$f11681c54c860912)(()=>props_store.display, {
1016
+ set_on_index_change: ()=>{},
1017
+ depictCardsDataset: {},
1018
+ formatPrice: (price)=>price && (0, $2MCgq$standard_price_format)(price)
1019
+ }, ()=>props_store?.options || $474e9d712b745d60$export$5c9921af2948d16a);
1020
+ },
1021
+ // Work around in case https://github.com/solidjs/solid/issues/2139 potentially arises
1022
+ props: structuredClone(react_props),
1023
+ className: "depict"
1024
+ });
1025
+ }
1026
+ const $474e9d712b745d60$export$5c9921af2948d16a = {
1027
+ image_radius: "md",
1028
+ alignment: "left",
1029
+ sizes: true,
1030
+ smart_labels: {
1031
+ font_size_rem: 1,
1032
+ enabled: true,
1033
+ bold: false,
1034
+ italic: false,
1035
+ color: "#0f0f0f"
1036
+ },
1037
+ title: {
1038
+ font_size_rem: 1,
1039
+ enabled: true,
1040
+ bold: false,
1041
+ italic: false,
1042
+ color: "#0f0f0f"
1043
+ },
1044
+ price: {
1045
+ font_size_rem: 1,
1046
+ enabled: true,
1047
+ bold: false,
1048
+ italic: false,
1049
+ color: "#0f0f0f"
1050
+ },
1051
+ original_price: {
1052
+ font_size_rem: 1,
1053
+ enabled: true,
1054
+ bold: false,
1055
+ italic: false,
1056
+ color: "#0f0f0f"
1057
+ },
1058
+ use_hover_image: true,
1059
+ image_carousel: true,
1060
+ color_options: true,
1061
+ image_aspect_ratio: 1,
1062
+ is_ejected: false
1063
+ };
1064
+
1065
+
1009
1066
  function $8ade1943efc108c6$export$d20a7e68f6a71456(props) {
1010
1067
  return (0, $0fe03f2fcd2418f8$export$f6e64e17bd69eeef)({
1011
1068
  solid_component: $8ade1943efc108c6$export$ef681ece395f74,
@@ -1023,7 +1080,7 @@ function $8ade1943efc108c6$export$ef681ece395f74(props) {
1023
1080
  ...info,
1024
1081
  depictCardsDataset: {},
1025
1082
  formatPrice: (price)=>price && (0, $2MCgq$standard_price_format)(price)
1026
- }, ()=>props.productCardConfig);
1083
+ }, ()=>props.productCardConfig || (0, $474e9d712b745d60$export$5c9921af2948d16a));
1027
1084
  },
1028
1085
  get cols_at_size () {
1029
1086
  return props.columnsAtSize || (0, $2MCgq$defaultColsAtSize);
@@ -1053,6 +1110,7 @@ function $8ade1943efc108c6$export$ef681ece395f74(props) {
1053
1110
 
1054
1111
 
1055
1112
 
1113
+
1056
1114
  function $e3716493302f533c$export$a640309a759938e9(props) {
1057
1115
  return (0, $0fe03f2fcd2418f8$export$f6e64e17bd69eeef)({
1058
1116
  solid_component: $e3716493302f533c$var$SolidWrapper,
@@ -1070,7 +1128,7 @@ function $e3716493302f533c$var$SolidWrapper(props) {
1070
1128
  ...info,
1071
1129
  depictCardsDataset: {},
1072
1130
  formatPrice: (price)=>price && (0, $2MCgq$standard_price_format)(price)
1073
- }, ()=>props.productCardConfig);
1131
+ }, ()=>props.productCardConfig || (0, $474e9d712b745d60$export$5c9921af2948d16a));
1074
1132
  },
1075
1133
  get cols_at_size () {
1076
1134
  return props.columnsAtSize || (0, $2MCgq$defaultColsAtSize);
@@ -1088,62 +1146,6 @@ function $e3716493302f533c$var$SolidWrapper(props) {
1088
1146
 
1089
1147
 
1090
1148
 
1091
- function $474e9d712b745d60$export$d1a48be4967fe67c(react_props) {
1092
- return (0, $0fe03f2fcd2418f8$export$f6e64e17bd69eeef)({
1093
- solid_component: (props_store)=>{
1094
- return (0, $29535f590238371c$export$f11681c54c860912)(()=>props_store.display, {
1095
- set_on_index_change: ()=>{},
1096
- depictCardsDataset: {},
1097
- formatPrice: (price)=>price && (0, $2MCgq$standard_price_format)(price)
1098
- }, ()=>props_store?.options || {
1099
- image_radius: "md",
1100
- alignment: "left",
1101
- sizes: true,
1102
- smart_labels: {
1103
- font_size_rem: 1,
1104
- enabled: true,
1105
- bold: false,
1106
- italic: false,
1107
- color: "#0f0f0f"
1108
- },
1109
- title: {
1110
- font_size_rem: 1,
1111
- enabled: true,
1112
- bold: false,
1113
- italic: false,
1114
- color: "#0f0f0f"
1115
- },
1116
- price: {
1117
- font_size_rem: 1,
1118
- enabled: true,
1119
- bold: false,
1120
- italic: false,
1121
- color: "#0f0f0f"
1122
- },
1123
- original_price: {
1124
- font_size_rem: 1,
1125
- enabled: true,
1126
- bold: false,
1127
- italic: false,
1128
- color: "#0f0f0f"
1129
- },
1130
- use_hover_image: true,
1131
- image_carousel: true,
1132
- color_options: true,
1133
- image_aspect_ratio: 1,
1134
- underline_text: false,
1135
- is_ejected: false
1136
- });
1137
- },
1138
- // Work around in case https://github.com/solidjs/solid/issues/2139 potentially arises
1139
- props: structuredClone(react_props),
1140
- className: "depict"
1141
- });
1142
- }
1143
-
1144
-
1145
-
1146
-
1147
1149
 
1148
1150
  function $d899f63cec76a884$export$32717ad33b14d079(get_value, get_set_function) {
1149
1151
  const return_value = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/portal-components",
3
- "version": "2.7.19",
3
+ "version": "2.7.21",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -79,6 +79,7 @@ export type ProductCardSchema = {
79
79
  /** Image Carousel */
80
80
  image_carousel: boolean;
81
81
  image_aspect_ratio: number;
82
+ is_ejected: boolean;
82
83
  };
83
84
 
84
85
  const sizeOrder = [