@propeller-commerce/propeller-v2-react-ui 0.19.0 → 0.19.1

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.cts CHANGED
@@ -5326,6 +5326,15 @@ interface OrderItemCardProps {
5326
5326
  /**
5327
5327
  * Renders a single order line item as a table row (with optional indented
5328
5328
  * child-item rows), showing image, SKU, quantity, discount and price.
5329
+ *
5330
+ * `orderItem.product` is optional and really can be absent: a product that is
5331
+ * hidden, withdrawn or deleted from the catalog still appears on the orders and
5332
+ * quotes it was sold on, but the API returns no product record for it. Every
5333
+ * product-derived value below therefore falls back to the order item, which
5334
+ * carries its own snapshot of the line — name, sku, quantity and prices — taken
5335
+ * when the order was placed. Such a row renders as plain text: the placeholder
5336
+ * thumbnail, the untranslated `orderItem.name` (there are no localized names to
5337
+ * resolve), and no PDP link (there are no slugs to build one from).
5329
5338
  */
5330
5339
  declare function OrderItemCard(props: OrderItemCardProps): React$1.JSX.Element;
5331
5340
 
package/dist/index.d.ts CHANGED
@@ -5326,6 +5326,15 @@ interface OrderItemCardProps {
5326
5326
  /**
5327
5327
  * Renders a single order line item as a table row (with optional indented
5328
5328
  * child-item rows), showing image, SKU, quantity, discount and price.
5329
+ *
5330
+ * `orderItem.product` is optional and really can be absent: a product that is
5331
+ * hidden, withdrawn or deleted from the catalog still appears on the orders and
5332
+ * quotes it was sold on, but the API returns no product record for it. Every
5333
+ * product-derived value below therefore falls back to the order item, which
5334
+ * carries its own snapshot of the line — name, sku, quantity and prices — taken
5335
+ * when the order was placed. Such a row renders as plain text: the placeholder
5336
+ * thumbnail, the untranslated `orderItem.name` (there are no localized names to
5337
+ * resolve), and no PDP link (there are no slugs to build one from).
5329
5338
  */
5330
5339
  declare function OrderItemCard(props: OrderItemCardProps): React$1.JSX.Element;
5331
5340
 
package/dist/index.js CHANGED
@@ -13733,11 +13733,11 @@ function OrderItemCard(props) {
13733
13733
  className: isChildItem ? "propeller-order-item-card__cell propeller-order-item-card__cell--price px-6 py-2 text-right whitespace-nowrap text-sm text-muted-foreground" : "propeller-order-item-card__cell propeller-order-item-card__cell--price px-6 py-4 text-right whitespace-nowrap",
13734
13734
  children: (() => {
13735
13735
  const PriceImpl = props.priceComponent;
13736
- if (PriceImpl) {
13736
+ if (PriceImpl && item?.product?.price) {
13737
13737
  return /* @__PURE__ */ jsx(
13738
13738
  PriceImpl,
13739
13739
  {
13740
- price: item?.product?.price,
13740
+ price: item.product.price,
13741
13741
  currency: props.currency,
13742
13742
  labels: props.labels
13743
13743
  }
@@ -14746,7 +14746,7 @@ function OrderShipments(props) {
14746
14746
  /* @__PURE__ */ jsxs("td", { className: "px-4 py-2 text-muted-foreground", children: [
14747
14747
  !!shipmentItem.sku ? /* @__PURE__ */ jsx(Fragment, { children: shipmentItem.sku }) : null,
14748
14748
  !shipmentItem.sku ? /* @__PURE__ */ jsxs(Fragment, { children: [
14749
- !!getOrderItemForShipmentItem(shipmentItem) ? /* @__PURE__ */ jsx(Fragment, { children: getOrderItemForShipmentItem(shipmentItem)?.product?.sku || "-" }) : null,
14749
+ !!getOrderItemForShipmentItem(shipmentItem) ? /* @__PURE__ */ jsx(Fragment, { children: getOrderItemForShipmentItem(shipmentItem)?.product?.sku || getOrderItemForShipmentItem(shipmentItem)?.sku || "-" }) : null,
14750
14750
  !getOrderItemForShipmentItem(shipmentItem) ? /* @__PURE__ */ jsx(Fragment, { children: "-" }) : null
14751
14751
  ] }) : null
14752
14752
  ] }),