@sonic-equipment/ui 148.0.0 → 150.0.0
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/address-info-display/address-info-display.js +1 -2
- package/dist/algolia/algolia-hit-type.d.ts +2 -0
- package/dist/algolia/use-algolia-insights.js +3 -3
- package/dist/cards/orderline-card/orderline-card.js +2 -2
- package/dist/cards/orderline-card/orderline-card.module.css.js +1 -1
- package/dist/cards/product-card/product-card.js +3 -2
- package/dist/cards/product-card/product-card.module.css.js +1 -1
- package/dist/cart-totals/cart-totals-summary.d.ts +4 -2
- package/dist/cart-totals/cart-totals-summary.js +3 -2
- package/dist/cart-totals/cart-totals.d.ts +7 -5
- package/dist/cart-totals/cart-totals.js +3 -2
- package/dist/delivery-time/delivery-time.js +2 -2
- package/dist/display/price/price.d.ts +18 -0
- package/dist/display/price/price.js +30 -0
- package/dist/display/price/price.module.css.js +3 -0
- package/dist/display/product-sku/product-sku.d.ts +2 -1
- package/dist/display/product-sku/product-sku.js +3 -2
- package/dist/exports.d.ts +4 -2
- package/dist/global-search/search-result-panel/sections/with-results.js +1 -0
- package/dist/index.js +8 -6
- package/dist/intl/intl-context.d.ts +10 -4
- package/dist/intl/intl-context.js +4 -0
- package/dist/intl/intl-provider.d.ts +4 -2
- package/dist/intl/intl-provider.js +18 -4
- package/dist/intl/missing-translation-provider.js +3 -2
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/intl/types.d.ts +2 -0
- package/dist/intl/types.js +6 -1
- package/dist/intl/use-country-code.d.ts +3 -0
- package/dist/intl/use-country-code.js +15 -0
- package/dist/intl/use-culture-code.d.ts +2 -1
- package/dist/intl/use-culture-code.js +5 -4
- package/dist/intl/use-currency-code.d.ts +4 -0
- package/dist/intl/use-currency-code.js +15 -0
- package/dist/intl/use-formatted-message.js +2 -3
- package/dist/intl/use-intl.d.ts +1 -0
- package/dist/intl/use-intl.js +9 -0
- package/dist/intl/use-language-code.js +2 -3
- package/dist/pages/checkout/cart-page/cart-page.js +6 -1
- package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +6 -1
- package/dist/pages/checkout/payment-page/components/adyen-payment.d.ts +3 -2
- package/dist/pages/checkout/payment-page/components/payment.js +22 -22
- package/dist/pages/checkout/payment-page/payment-page-content.js +7 -2
- package/dist/pages/checkout/payment-page/utils/parse-amount.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/shipping-page-content.js +6 -2
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +2 -2
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.module.css.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +1 -0
- package/dist/pages/product/search-result-page/search-result-product-overview/search-result-product-overview.js +1 -0
- package/dist/shared/api/bff/model/bff.model.d.ts +3 -0
- package/dist/shared/api/storefront/hooks/cart/use-place-order.d.ts +1 -1
- package/dist/shared/api/storefront/services/cart-service.d.ts +1 -1
- package/dist/shared/api/storefront/services/cart-service.js +1 -1
- package/dist/shared/ga/use-data-layer.js +4 -4
- package/dist/shared/hooks/use-cookie.js +1 -1
- package/dist/shared/model/currency.d.ts +8 -1
- package/dist/shared/model/currency.js +28 -30
- package/dist/shared/model/hit.d.ts +2 -0
- package/dist/shared/model/hit.js +1 -0
- package/dist/shared/model/price.d.ts +5 -2
- package/dist/shared/utils/price.d.ts +19 -5
- package/dist/shared/utils/price.js +36 -7
- package/dist/shared/utils/string.d.ts +0 -1
- package/dist/shared/utils/string.js +1 -4
- package/dist/styles.css +467 -278
- package/package.json +1 -1
- package/dist/display/product-price/product-price.d.ts +0 -7
- package/dist/display/product-price/product-price.js +0 -19
- package/dist/display/product-price/product-price.module.css.js +0 -3
- package/dist/display/product-price/product-total-price.d.ts +0 -7
- package/dist/display/product-price/product-total-price.js +0 -16
- package/dist/display/product-price/product-total-price.module.css.js +0 -3
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface ProductPriceProps {
|
|
2
|
-
className?: string;
|
|
3
|
-
isVatIncluded: boolean | null;
|
|
4
|
-
originalPrice: number;
|
|
5
|
-
price: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function ProductPrice({ className, isVatIncluded, originalPrice, price, }: ProductPriceProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { FormattedMessage } from '../../intl/formatted-message.js';
|
|
4
|
-
import { formatPrice } from '../../shared/utils/price.js';
|
|
5
|
-
import styles from './product-price.module.css.js';
|
|
6
|
-
|
|
7
|
-
function ProductPrice({ className, isVatIncluded = false, originalPrice, price, }) {
|
|
8
|
-
if (Number.isNaN(price))
|
|
9
|
-
return;
|
|
10
|
-
const originalPriceWithCurrency = formatPrice(Number.isNaN(originalPrice) ? price : originalPrice);
|
|
11
|
-
const priceWithCurrency = formatPrice(price);
|
|
12
|
-
const [wholes, decimals] = priceWithCurrency.split('.');
|
|
13
|
-
const showOriginalPrice = priceWithCurrency !== originalPriceWithCurrency;
|
|
14
|
-
return (jsxs("div", { className: clsx(className, styles['product-price']), "data-current-price": price, "data-original-price": originalPrice, children: [jsx("span", { className: clsx(styles['original-price'], {
|
|
15
|
-
[styles['is-hidden']]: !showOriginalPrice,
|
|
16
|
-
}), children: originalPriceWithCurrency }), jsxs("div", { className: styles['current-price-wrapper'], children: [jsxs("div", { className: styles['current-price'], children: [jsx("span", { className: styles.wholes, children: wholes }), jsx("span", { className: styles.dot, children: "." }), jsx("span", { className: styles.decimals, children: decimals })] }), isVatIncluded !== null && (jsx("span", { className: styles.vat, children: isVatIncluded ? (jsx(FormattedMessage, { id: "Incl. VAT" })) : (jsx(FormattedMessage, { id: "Excl. VAT" })) }))] })] }));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { ProductPrice };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var styles = {"product-price":"product-price-module-oIU1K","original-price":"product-price-module-til0s","is-hidden":"product-price-module-V1NCf","current-price-wrapper":"product-price-module-FfVhl","current-price":"product-price-module-pvy2w","wholes":"product-price-module-GCw07","dot":"product-price-module-N56iV","decimals":"product-price-module-eWOOF","vat":"product-price-module-96DoG"};
|
|
2
|
-
|
|
3
|
-
export { styles as default };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface ProductTotalPriceProps {
|
|
2
|
-
className?: string;
|
|
3
|
-
originalTotalPrice: number;
|
|
4
|
-
pricePerUnit?: number;
|
|
5
|
-
totalPrice: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function ProductTotalPrice({ className, originalTotalPrice: originalPrice, pricePerUnit, totalPrice, }: ProductTotalPriceProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
5
|
-
import { formatPrice } from '../../shared/utils/price.js';
|
|
6
|
-
import { ProductPrice } from './product-price.js';
|
|
7
|
-
import styles from './product-total-price.module.css.js';
|
|
8
|
-
|
|
9
|
-
function ProductTotalPrice({ className, originalTotalPrice: originalPrice, pricePerUnit, totalPrice, }) {
|
|
10
|
-
const t = useFormattedMessage();
|
|
11
|
-
if (Number.isNaN(totalPrice))
|
|
12
|
-
return;
|
|
13
|
-
return (jsxs("div", { className: clsx(styles['product-total-price'], className), "data-price-per-unit": pricePerUnit, children: [jsx(ProductPrice, { isVatIncluded: null, originalPrice: originalPrice, price: totalPrice }), jsx("span", { className: styles['price-per-unit'], children: `${formatPrice(pricePerUnit ?? 0)}/${t('pc')}` })] }));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { ProductTotalPrice };
|