@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/CHANGELOG.md +18 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/pure.cjs +2 -2
- package/dist/pure.cjs.map +1 -1
- package/dist/pure.d.cts +9 -0
- package/dist/pure.d.ts +9 -0
- package/dist/pure.js +2 -2
- package/dist/pure.js.map +1 -1
- package/package.json +1 -1
package/dist/pure.d.cts
CHANGED
|
@@ -299,6 +299,15 @@ interface OrderItemCardProps {
|
|
|
299
299
|
/**
|
|
300
300
|
* Renders a single order line item as a table row (with optional indented
|
|
301
301
|
* child-item rows), showing image, SKU, quantity, discount and price.
|
|
302
|
+
*
|
|
303
|
+
* `orderItem.product` is optional and really can be absent: a product that is
|
|
304
|
+
* hidden, withdrawn or deleted from the catalog still appears on the orders and
|
|
305
|
+
* quotes it was sold on, but the API returns no product record for it. Every
|
|
306
|
+
* product-derived value below therefore falls back to the order item, which
|
|
307
|
+
* carries its own snapshot of the line — name, sku, quantity and prices — taken
|
|
308
|
+
* when the order was placed. Such a row renders as plain text: the placeholder
|
|
309
|
+
* thumbnail, the untranslated `orderItem.name` (there are no localized names to
|
|
310
|
+
* resolve), and no PDP link (there are no slugs to build one from).
|
|
302
311
|
*/
|
|
303
312
|
declare function OrderItemCard(props: OrderItemCardProps): React.JSX.Element;
|
|
304
313
|
|
package/dist/pure.d.ts
CHANGED
|
@@ -299,6 +299,15 @@ interface OrderItemCardProps {
|
|
|
299
299
|
/**
|
|
300
300
|
* Renders a single order line item as a table row (with optional indented
|
|
301
301
|
* child-item rows), showing image, SKU, quantity, discount and price.
|
|
302
|
+
*
|
|
303
|
+
* `orderItem.product` is optional and really can be absent: a product that is
|
|
304
|
+
* hidden, withdrawn or deleted from the catalog still appears on the orders and
|
|
305
|
+
* quotes it was sold on, but the API returns no product record for it. Every
|
|
306
|
+
* product-derived value below therefore falls back to the order item, which
|
|
307
|
+
* carries its own snapshot of the line — name, sku, quantity and prices — taken
|
|
308
|
+
* when the order was placed. Such a row renders as plain text: the placeholder
|
|
309
|
+
* thumbnail, the untranslated `orderItem.name` (there are no localized names to
|
|
310
|
+
* resolve), and no PDP link (there are no slugs to build one from).
|
|
302
311
|
*/
|
|
303
312
|
declare function OrderItemCard(props: OrderItemCardProps): React.JSX.Element;
|
|
304
313
|
|
package/dist/pure.js
CHANGED
|
@@ -370,11 +370,11 @@ function OrderItemCard(props) {
|
|
|
370
370
|
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",
|
|
371
371
|
children: (() => {
|
|
372
372
|
const PriceImpl = props.priceComponent;
|
|
373
|
-
if (PriceImpl) {
|
|
373
|
+
if (PriceImpl && item?.product?.price) {
|
|
374
374
|
return /* @__PURE__ */ jsx(
|
|
375
375
|
PriceImpl,
|
|
376
376
|
{
|
|
377
|
-
price: item
|
|
377
|
+
price: item.product.price,
|
|
378
378
|
currency: props.currency,
|
|
379
379
|
labels: props.labels
|
|
380
380
|
}
|