@sonic-equipment/ui 0.0.75 → 0.0.76
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.js +8 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query
|
|
|
19
19
|
import { createLocalStorageRecentSearchesPlugin, search } from '@algolia/autocomplete-plugin-recent-searches';
|
|
20
20
|
|
|
21
21
|
const environments = ['sandbox', 'production', 'local'];
|
|
22
|
-
const localUrls = /
|
|
22
|
+
const localUrls = /localhost:6006/i;
|
|
23
23
|
const sandboxUrls = /local|insitesandbox.com|azurestaticapps|ui.sonic-equipment.com|sandbox|accept|test/i;
|
|
24
24
|
const productionUrls = /sonic-equipment.com|production/i;
|
|
25
25
|
let environmentUrl;
|
|
@@ -7566,10 +7566,11 @@ function ProductDetailsPanel({ product }) {
|
|
|
7566
7566
|
flexDirection: 'column',
|
|
7567
7567
|
gap: '8px',
|
|
7568
7568
|
}, children: [jsx(Heading, { size: "xs", children: product.productTitle }), jsx(ProductSku, { sku: product.productNumber })] }), jsxs("div", { style: {
|
|
7569
|
+
alignItems: 'flex-end',
|
|
7569
7570
|
display: 'flex',
|
|
7570
7571
|
justifyContent: 'space-between',
|
|
7571
7572
|
width: '100%',
|
|
7572
|
-
}, children: [jsx(ProductPrice, { isVatIncluded: false, originalPrice: product.unitListPrice, price: product.unitListPrice }), jsxs("div", { style: { display: 'flex', gap: '8px' }, children: [product.canAddToCart && (jsx(ConnectedAddToCartButton, { productId: product.storefrontId })), product.canAddToWishlist && (jsx(ConnectedFavoriteButton, { productId: product.storefrontId }))] })] }), jsxs("div", { children: [jsx(Heading, { size: "xxs", children: jsx(FormattedMessage, { id: "Product Features" }) }), jsx(ShowAll, { initialHeight: 216, children: jsx("div", { className: styles$l.description, dangerouslySetInnerHTML: {
|
|
7573
|
+
}, children: [jsx(ProductPrice, { isVatIncluded: false, originalPrice: product.unitListPrice, price: product.unitListPrice }), jsxs("div", { style: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [product.canAddToCart && (jsx(ConnectedAddToCartButton, { productId: product.storefrontId })), product.canAddToWishlist && (jsx(ConnectedFavoriteButton, { productId: product.storefrontId }))] })] }), jsxs("div", { children: [jsx(Heading, { size: "xxs", children: jsx(FormattedMessage, { id: "Product Features" }) }), jsx(ShowAll, { initialHeight: 216, children: jsx("div", { className: styles$l.description, dangerouslySetInnerHTML: {
|
|
7573
7574
|
__html: product.content.htmlContent,
|
|
7574
7575
|
} }) })] }), jsx("div", { children: jsxs(Accordion, { indented: true, borderType: ['top', 'middle-accentuated'], children: [Boolean(product.attributeTypes.length) && (jsx(AccordionItem, { id: "specification", title: jsx(FormattedMessage, { id: "Specifications" }), children: jsx(FeatureList, { className: styles$l['feature-list'], features: product.attributeTypes.map(attribute => ({
|
|
7575
7576
|
id: `${attribute.id}`,
|
|
@@ -7599,15 +7600,17 @@ function ProductDetailsPage({ pageUrl }) {
|
|
|
7599
7600
|
if (!data || isFetching)
|
|
7600
7601
|
return jsx(LoadingPage, {});
|
|
7601
7602
|
const { breadCrumb, included, product, recentlyViewed } = data;
|
|
7602
|
-
return (jsx(Page, { breadCrumb: breadCrumb, children: jsx(ProductDetailsPageLayout, { imageGallery: jsx(ImagesGrid, { images: product.images }), included: included
|
|
7603
|
+
return (jsx(Page, { breadCrumb: breadCrumb, children: jsx(ProductDetailsPageLayout, { imageGallery: jsx(ImagesGrid, { images: product.images }), included: included !== undefined &&
|
|
7604
|
+
Boolean(included.length) && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Includes" }) }), jsx(ProductCarousel, { allowExpandToGrid: true, hasOverflow: true, productCards: included.map(product => (jsx(ConnectedProductCard, { href: product.href, image: {
|
|
7603
7605
|
fit: 'contain',
|
|
7604
7606
|
image: product.image,
|
|
7605
7607
|
title: product.image.altText,
|
|
7606
|
-
}, price: product.price, productId: product.productId, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))) })] })), productInformation: jsx(ProductDetailsPanel, { product: product }), recentlyViewed: recentlyViewed
|
|
7608
|
+
}, price: product.price, productId: product.productId, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))) })] })), productInformation: jsx(ProductDetailsPanel, { product: product }), recentlyViewed: recentlyViewed !== undefined &&
|
|
7609
|
+
Boolean(recentlyViewed.length) && (jsxs(Fragment, { children: [jsx(Heading, { size: "s", tag: "h2", children: jsx(FormattedMessage, { id: "Recently viewed" }) }), jsx(ProductCarousel, { hasOverflow: true, productCards: recentlyViewed.map(product => (jsx(ConnectedProductCard, { href: product.href, image: {
|
|
7607
7610
|
fit: 'contain',
|
|
7608
7611
|
image: product.image,
|
|
7609
7612
|
title: product.image.altText,
|
|
7610
|
-
}, price: product.price, productId: product.productId, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))) })] }))
|
|
7613
|
+
}, price: product.price, productId: product.productId, sku: product.sku, tags: product.tags, title: product.title }, product.storefrontId))) })] })), usp: jsx("div", { style: {
|
|
7611
7614
|
backgroundColor: '#bcbcbc',
|
|
7612
7615
|
display: 'grid',
|
|
7613
7616
|
fontWeight: 'bold',
|