@wix/headless-bookings 0.0.40 → 0.0.41

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.
@@ -71,7 +71,17 @@ export function Data(props) {
71
71
  const discount = convertMultiCurrencyPriceToMoneyData(priceSummary?.discount, currency);
72
72
  const payNow = convertMultiCurrencyPriceToMoneyData(paymentDetails?.response?.payNow?.total, currency);
73
73
  const payLater = convertMultiCurrencyPriceToMoneyData(paymentDetails?.response?.payLater?.total, currency);
74
- return props.children({ subtotal, total, tax, discount, payNow, payLater, currency, isLoading, error });
74
+ return props.children({
75
+ subtotal,
76
+ total,
77
+ tax,
78
+ discount,
79
+ payNow,
80
+ payLater,
81
+ currency,
82
+ isLoading,
83
+ error,
84
+ });
75
85
  }
76
86
  /**
77
87
  * Core component that provides access to calculated line items via render props.
@@ -116,5 +126,11 @@ export function LineItems(props) {
116
126
  };
117
127
  });
118
128
  const hasLineItems = lineItems.length > 0;
119
- return props.children({ lineItems, hasLineItems, currency, isLoading, error });
129
+ return props.children({
130
+ lineItems,
131
+ hasLineItems,
132
+ currency,
133
+ isLoading,
134
+ error,
135
+ });
120
136
  }
@@ -294,7 +294,7 @@ export const LineItemPrice = React.forwardRef((props, ref) => {
294
294
  const { asChild, children, className } = props;
295
295
  const { lineItem } = useLineItemContext();
296
296
  const { totalPrice, priceText } = lineItem;
297
- return (_jsx(AsChildSlot, { ref: ref, asChild: asChild, className: className, "data-testid": TestIds.paymentLineItemPrice, "data-has-price-text": !!priceText, customElement: children, customElementProps: { totalPrice, priceText }, children: priceText ? _jsx("span", { children: priceText }) : totalPrice ? _jsx(Money, { money: totalPrice }) : null }));
297
+ return (_jsx(AsChildSlot, { ref: ref, asChild: asChild, className: className, "data-testid": TestIds.paymentLineItemPrice, "data-has-price-text": !!priceText, customElement: children, customElementProps: { totalPrice, priceText }, children: priceText ? (_jsx("span", { children: priceText })) : totalPrice ? (_jsx(Money, { money: totalPrice })) : null }));
298
298
  });
299
299
  LineItemPrice.displayName = 'Payment.LineItemPrice';
300
300
  /**
@@ -71,7 +71,17 @@ export function Data(props) {
71
71
  const discount = convertMultiCurrencyPriceToMoneyData(priceSummary?.discount, currency);
72
72
  const payNow = convertMultiCurrencyPriceToMoneyData(paymentDetails?.response?.payNow?.total, currency);
73
73
  const payLater = convertMultiCurrencyPriceToMoneyData(paymentDetails?.response?.payLater?.total, currency);
74
- return props.children({ subtotal, total, tax, discount, payNow, payLater, currency, isLoading, error });
74
+ return props.children({
75
+ subtotal,
76
+ total,
77
+ tax,
78
+ discount,
79
+ payNow,
80
+ payLater,
81
+ currency,
82
+ isLoading,
83
+ error,
84
+ });
75
85
  }
76
86
  /**
77
87
  * Core component that provides access to calculated line items via render props.
@@ -116,5 +126,11 @@ export function LineItems(props) {
116
126
  };
117
127
  });
118
128
  const hasLineItems = lineItems.length > 0;
119
- return props.children({ lineItems, hasLineItems, currency, isLoading, error });
129
+ return props.children({
130
+ lineItems,
131
+ hasLineItems,
132
+ currency,
133
+ isLoading,
134
+ error,
135
+ });
120
136
  }
@@ -294,7 +294,7 @@ export const LineItemPrice = React.forwardRef((props, ref) => {
294
294
  const { asChild, children, className } = props;
295
295
  const { lineItem } = useLineItemContext();
296
296
  const { totalPrice, priceText } = lineItem;
297
- return (_jsx(AsChildSlot, { ref: ref, asChild: asChild, className: className, "data-testid": TestIds.paymentLineItemPrice, "data-has-price-text": !!priceText, customElement: children, customElementProps: { totalPrice, priceText }, children: priceText ? _jsx("span", { children: priceText }) : totalPrice ? _jsx(Money, { money: totalPrice }) : null }));
297
+ return (_jsx(AsChildSlot, { ref: ref, asChild: asChild, className: className, "data-testid": TestIds.paymentLineItemPrice, "data-has-price-text": !!priceText, customElement: children, customElementProps: { totalPrice, priceText }, children: priceText ? (_jsx("span", { children: priceText })) : totalPrice ? (_jsx(Money, { money: totalPrice })) : null }));
298
298
  });
299
299
  LineItemPrice.displayName = 'Payment.LineItemPrice';
300
300
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-bookings",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -72,5 +72,5 @@
72
72
  "groupId": "com.wixpress.headless-components"
73
73
  }
74
74
  },
75
- "falconPackageHash": "74b83da9361fcd8b13b0615fe645d53672b0f2db9714094ec5026205"
75
+ "falconPackageHash": "5847d0ce3b07a2485f7d9b707eee272b9f100b3d13614c2d92018112"
76
76
  }