@sonic-equipment/ui 252.0.0 → 254.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/buttons/link/link.d.ts +1 -0
- package/dist/buttons/link/link.js +3 -3
- package/dist/config.js +3 -3
- package/dist/lists/download-document-list/download-document-list.js +2 -1
- package/dist/pages/checkout/payment-page/payment-page.d.ts +3 -1
- package/dist/pages/checkout/payment-page/payment-page.js +1 -3
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +4 -4
- package/package.json +1 -1
|
@@ -5,16 +5,16 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { useRouteLink } from '../../shared/routing/use-route-link.js';
|
|
6
6
|
import styles from './link.module.css.js';
|
|
7
7
|
|
|
8
|
-
const Link = forwardRef(({ children, className: _className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, role, route, tabIndex, target, title, ...rest }, ref) => {
|
|
8
|
+
const Link = forwardRef(({ children, className: _className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, rel, role, route, tabIndex, target, title, ...rest }, ref) => {
|
|
9
9
|
const { getRouteLinkProps, RouteLinkElement } = useRouteLink();
|
|
10
10
|
const className = clsx({
|
|
11
11
|
[styles.hover]: Boolean(href || onClick),
|
|
12
12
|
[styles['has-underline']]: hasUnderline,
|
|
13
13
|
}, styles['link'], color && styles[color], _className);
|
|
14
14
|
if (href) {
|
|
15
|
-
return (jsx(RouteLinkElement, { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, role: role, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...getRouteLinkProps(href, route), ...rest, children: children }));
|
|
15
|
+
return (jsx(RouteLinkElement, { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...getRouteLinkProps(href, route), ...rest, children: children }));
|
|
16
16
|
}
|
|
17
|
-
return (jsx("button", { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, role: role, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
|
|
17
|
+
return (jsx("button", { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
|
|
18
18
|
});
|
|
19
19
|
Link.displayName = 'Link';
|
|
20
20
|
|
package/dist/config.js
CHANGED
|
@@ -70,11 +70,11 @@ const configPerEnvironment = {
|
|
|
70
70
|
production: () => ({
|
|
71
71
|
ALGOLIA_API_KEY: 'e31a3a53449eceb4d0f9273b9bcd9759',
|
|
72
72
|
ALGOLIA_APP_ID: '14CUFCVMAD',
|
|
73
|
-
ALGOLIA_HOST: '
|
|
74
|
-
BFF_API_URL: 'https://
|
|
73
|
+
ALGOLIA_HOST: 'shopapi.sonic-equipment.com',
|
|
74
|
+
BFF_API_URL: 'https://shopapi.sonic-equipment.com/api/v1/bff',
|
|
75
75
|
COOKIE_DOMAIN: '.sonic-equipment.com',
|
|
76
76
|
HOME_PAGE_URL: 'https://sonic-equipment.com/',
|
|
77
|
-
SHOP_API_URL: 'https://
|
|
77
|
+
SHOP_API_URL: 'https://shopapi.sonic-equipment.com',
|
|
78
78
|
SHOP_URL: 'https://shop.sonic-equipment.com',
|
|
79
79
|
}),
|
|
80
80
|
sandbox: () => ({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Link } from '../../buttons/link/link.js';
|
|
3
4
|
import { StrokeDownloadIcon } from '../../icons/stroke/stroke-download-icon.js';
|
|
4
5
|
import { FeatureList } from '../feature-list/feature-list.js';
|
|
5
6
|
import styles from './download-document-list.module.css.js';
|
|
@@ -11,7 +12,7 @@ function DownloadDocumentList({ className, documents, }) {
|
|
|
11
12
|
})), style: { valueAlignment: 'left' } }));
|
|
12
13
|
}
|
|
13
14
|
function DownloadListItem({ document: { href, name }, }) {
|
|
14
|
-
return (jsxs("div", { className: styles['download-list-item'], children: [jsx(StrokeDownloadIcon, {}), jsx(
|
|
15
|
+
return (jsxs("div", { className: styles['download-list-item'], children: [jsx(StrokeDownloadIcon, {}), jsx(Link, { href: href, rel: "download noreferrer", target: "_blank", children: name })] }));
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export { DownloadDocumentList };
|
|
@@ -9,13 +9,11 @@ import { usePaths } from '../../../shared/routing/use-paths.js';
|
|
|
9
9
|
import { hasNo } from '../../../shared/utils/types.js';
|
|
10
10
|
import { ErrorPage } from '../../error-page/error-page.js';
|
|
11
11
|
import { LoadingPage } from '../../loading-page/loading-page.js';
|
|
12
|
-
import { useHasReturnedFromAdyen } from './hooks/use-has-returned-from-adyen.js';
|
|
13
12
|
import { PaymentPageContent } from './payment-page-content.js';
|
|
14
13
|
|
|
15
14
|
const PAYMENT_FORM_ID = 'paymentForm';
|
|
16
|
-
function PaymentPage() {
|
|
15
|
+
function PaymentPage({ hasReturnedFromAdyen, }) {
|
|
17
16
|
const paths = usePaths();
|
|
18
|
-
const hasReturnedFromAdyen = useHasReturnedFromAdyen();
|
|
19
17
|
const isAuthenticated = useIsAuthenticated();
|
|
20
18
|
const { data: cart, error, isLoading: isLoadingCart, } = useFetchCurrentCartWithAtp({
|
|
21
19
|
forceRecalculation: !hasReturnedFromAdyen,
|
|
@@ -37,10 +37,10 @@ function ProductDetailsPanel({ priceComponent, product, }) {
|
|
|
37
37
|
key: { label: specification.nameDisplay },
|
|
38
38
|
value: specification.value,
|
|
39
39
|
})) }) })), product.documents.length > 0 && (jsx(AccordionItem, { id: "downloads", title: jsx(FormattedMessage, { id: "Downloads" }), children: jsx(DownloadDocumentList, { className: styles['feature-list'], documents: product.documents
|
|
40
|
-
.map(
|
|
41
|
-
href:
|
|
42
|
-
id
|
|
43
|
-
name
|
|
40
|
+
.map(({ filePath, id, name }) => ({
|
|
41
|
+
href: `/${filePath.startsWith('/') ? filePath.slice(1) : filePath}`,
|
|
42
|
+
id,
|
|
43
|
+
name,
|
|
44
44
|
}))
|
|
45
45
|
.sort((a, b) => a.name.localeCompare(b.name)) }) }))] }) })] }));
|
|
46
46
|
}
|