@sonic-equipment/ui 132.0.0 → 134.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.
Files changed (130) hide show
  1. package/dist/address/address.d.ts +2 -13
  2. package/dist/algolia/{algolia-intialization.js → algolia-initialization.js} +7 -0
  3. package/dist/algolia/algolia-insights-provider.js +7 -0
  4. package/dist/algolia/algolia-search-provider.js +19 -0
  5. package/dist/algolia/use-algolia-insights.d.ts +13 -6
  6. package/dist/algolia/use-algolia-insights.js +93 -10
  7. package/dist/buttons/add-to-cart-button/connected-add-to-cart-button.js +1 -1
  8. package/dist/buttons/button/button.d.ts +4 -1
  9. package/dist/buttons/button/button.js +3 -2
  10. package/dist/country-selector/country-select/country-select.d.ts +1 -0
  11. package/dist/country-selector/country-select/country-select.js +2 -2
  12. package/dist/delivery-time/delivery-time.js +6 -5
  13. package/dist/display/info-display/info-display.d.ts +7 -0
  14. package/dist/display/info-display/info-display.js +8 -0
  15. package/dist/display/info-display/info-display.module.css.js +3 -0
  16. package/dist/exports.d.ts +20 -7
  17. package/dist/forms/checkbox/checkbox.d.ts +2 -1
  18. package/dist/forms/checkbox/checkbox.js +2 -2
  19. package/dist/forms/field-error/field-error.d.ts +2 -1
  20. package/dist/forms/field-error/field-error.js +3 -2
  21. package/dist/forms/input/input.d.ts +2 -0
  22. package/dist/forms/input/input.js +5 -3
  23. package/dist/forms/input/input.module.css.js +1 -1
  24. package/dist/forms/label/label.d.ts +3 -1
  25. package/dist/forms/label/label.js +3 -2
  26. package/dist/forms/switch/switch.d.ts +3 -1
  27. package/dist/forms/switch/switch.js +2 -2
  28. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.d.ts +10 -0
  29. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.js +18 -0
  30. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.module.css.js +3 -0
  31. package/dist/forms/text-field/text-field.d.ts +5 -3
  32. package/dist/forms/text-field/text-field.js +11 -3
  33. package/dist/forms/text-field/text-field.module.css.js +1 -1
  34. package/dist/forms/textarea/textarea.d.ts +1 -0
  35. package/dist/forms/textarea/textarea.js +3 -2
  36. package/dist/global-search/plugins/categories-plugin.js +2 -1
  37. package/dist/global-search/plugins/popular-categories-plugin.js +2 -0
  38. package/dist/global-search/plugins/query-suggestions-plugin.js +1 -0
  39. package/dist/global-search/plugins/quick-access-plugin.js +2 -2
  40. package/dist/global-search/search-result-panel/sections/with-results.js +0 -1
  41. package/dist/icons/stroke/stroke-dehashed-icon.js +7 -0
  42. package/dist/icons/stroke/stroke-hashed-icon.js +7 -0
  43. package/dist/index.js +22 -9
  44. package/dist/info-icon-tooltip/info-icon-tooltip.d.ts +7 -0
  45. package/dist/info-icon-tooltip/info-icon-tooltip.js +20 -0
  46. package/dist/info-icon-tooltip/info-icon-tooltip.module.css.js +3 -0
  47. package/dist/intl/translation-id.d.ts +1 -1
  48. package/dist/pages/checkout/cart-page/cart-page.js +6 -9
  49. package/dist/pages/checkout/cart-page/components/empty-cart-page.d.ts +1 -0
  50. package/dist/pages/checkout/cart-page/components/empty-cart-page.js +11 -0
  51. package/dist/pages/checkout/components/billing-and-invoice-information.d.ts +7 -0
  52. package/dist/pages/checkout/components/billing-and-invoice-information.js +12 -0
  53. package/dist/pages/checkout/components/billing-and-invoice-information.module.css.js +3 -0
  54. package/dist/pages/checkout/constants.d.ts +8 -0
  55. package/dist/pages/checkout/constants.js +10 -0
  56. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.module.css.js +1 -1
  57. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.d.ts +5 -0
  58. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +83 -0
  59. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page.d.ts +4 -0
  60. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page.js +41 -0
  61. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page.module.css.js +3 -0
  62. package/dist/{checkout → pages/checkout/payment-page/components}/adyen-payment.js +5 -5
  63. package/dist/pages/checkout/payment-page/components/adyen-payment.module.css.js +3 -0
  64. package/dist/{checkout → pages/checkout/payment-page/components}/payment.d.ts +4 -2
  65. package/dist/pages/checkout/payment-page/components/payment.js +288 -0
  66. package/dist/pages/checkout/payment-page/components/payment.module.css.js +3 -0
  67. package/dist/pages/checkout/payment-page/payment-page-content.d.ts +15 -0
  68. package/dist/pages/checkout/payment-page/payment-page-content.js +43 -0
  69. package/dist/pages/checkout/payment-page/payment-page.js +13 -41
  70. package/dist/{checkout → pages/checkout/payment-page/utils}/parse-amount.js +1 -1
  71. package/dist/pages/checkout/shipping-page/components/edit-address.js +11 -7
  72. package/dist/pages/checkout/shipping-page/hooks/use-patch-shipping-details.d.ts +12 -0
  73. package/dist/pages/checkout/shipping-page/hooks/use-patch-shipping-details.js +21 -0
  74. package/dist/pages/checkout/shipping-page/shipping-page-content.d.ts +14 -0
  75. package/dist/pages/checkout/shipping-page/shipping-page-content.js +40 -0
  76. package/dist/pages/checkout/shipping-page/shipping-page.js +55 -78
  77. package/dist/pages/checkout/shipping-page/shipping-page.module.css.js +1 -1
  78. package/dist/pages/components/page/page.d.ts +3 -2
  79. package/dist/pages/components/page/page.js +3 -2
  80. package/dist/pages/components/page-meta-data/page-meta-data.d.ts +3 -4
  81. package/dist/pages/components/page-meta-data/page-meta-data.js +2 -2
  82. package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +11 -1
  83. package/dist/pages/product/product-details-page/product-details-page.js +2 -10
  84. package/dist/pages/product/product-details-page/product-details.js +10 -4
  85. package/dist/pages/product/product-listing-page/product-listing-page-data-types.d.ts +1 -1
  86. package/dist/pages/product/product-listing-page/product-listing-page.js +2 -10
  87. package/dist/pages/product/product-listing-page/product-listing-product-overview/product-listing-product-overview.js +0 -1
  88. package/dist/pages/product/product-listing-page/product-listing.js +8 -1
  89. package/dist/pages/product/search-result-page/search-result-product-overview/search-result-product-overview.js +0 -1
  90. package/dist/pages/product/search-result-page/search-results-page.js +4 -7
  91. package/dist/shared/api/bff/model/bff.model.d.ts +4 -4
  92. package/dist/shared/api/bff/services/bff-service.js +1 -4
  93. package/dist/shared/api/storefront/hooks/cart/use-fetch-cart-by-id.d.ts +8 -0
  94. package/dist/shared/api/storefront/hooks/cart/use-fetch-cart-by-id.js +20 -0
  95. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-count.d.ts +1 -1
  96. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-count.js +3 -3
  97. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.d.ts +2 -5
  98. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.js +3 -16
  99. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.js +11 -8
  100. package/dist/shared/api/storefront/hooks/cart/use-place-order.js +2 -2
  101. package/dist/shared/fetch/request.d.ts +18 -13
  102. package/dist/shared/fetch/request.js +22 -9
  103. package/dist/shared/ga/use-data-layer.d.ts +7 -3
  104. package/dist/shared/ga/use-data-layer.js +6 -1
  105. package/dist/shared/model/address.d.ts +13 -0
  106. package/dist/shared/providers/react-query-container.d.ts +2 -1
  107. package/dist/shared/providers/react-query-container.js +2 -2
  108. package/dist/shared/utils/date.d.ts +2 -0
  109. package/dist/shared/utils/date.js +11 -1
  110. package/dist/shared/utils/promise.d.ts +2 -0
  111. package/dist/shared/utils/promise.js +9 -0
  112. package/dist/sign-in-form/sign-in-form.d.ts +19 -0
  113. package/dist/sign-in-form/sign-in-form.js +49 -0
  114. package/dist/sign-in-form/sign-in-form.module.css.js +3 -0
  115. package/dist/styles.css +532 -314
  116. package/dist/tooltip/tooltip.d.ts +3 -2
  117. package/dist/tooltip/tooltip.js +12 -6
  118. package/package.json +1 -1
  119. package/dist/checkout/adyen-payment.module.css.js +0 -3
  120. package/dist/checkout/payment.js +0 -213
  121. package/dist/checkout/payment.module.css.js +0 -3
  122. package/dist/shared/utils/wait.d.ts +0 -1
  123. package/dist/shared/utils/wait.js +0 -5
  124. /package/dist/algolia/{algolia-intialization.d.ts → algolia-initialization.d.ts} +0 -0
  125. /package/dist/{checkout → pages/checkout/payment-page/components}/adyen-payment.d.ts +0 -0
  126. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-get-adyen-redirect-result.d.ts +0 -0
  127. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-get-adyen-redirect-result.js +0 -0
  128. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-has-returned-from-adyen.d.ts +0 -0
  129. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-has-returned-from-adyen.js +0 -0
  130. /package/dist/{checkout → pages/checkout/payment-page/utils}/parse-amount.d.ts +0 -0
@@ -1,3 +1,3 @@
1
- var styles = {"input-container":"input-module-2woJR","shadow-input":"input-module-pNKEt","lg":"input-module-Dx2qC","md":"input-module-sH6e7","focus":"input-module-hEEuy","growing-input":"input-module-6HwY4"};
1
+ var styles = {"input-container":"input-module-2woJR","shadow-input":"input-module-pNKEt","lg":"input-module-Dx2qC","md":"input-module-sH6e7","focus":"input-module-hEEuy","growing-input":"input-module-6HwY4","inline-element":"input-module-oeAz2","input":"input-module-zjVxG"};
2
2
 
3
3
  export { styles as default };
@@ -1,6 +1,8 @@
1
1
  interface LabelProps {
2
2
  children: string | React.ReactNode;
3
+ className?: string;
4
+ 'data-test-selector'?: string;
3
5
  isRequired?: boolean;
4
6
  }
5
- export declare function Label({ children, isRequired }: LabelProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export declare function Label({ children, className, 'data-test-selector': dataTestSelector, isRequired, }: LabelProps): import("react/jsx-runtime").JSX.Element | null;
6
8
  export {};
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { Label as Label$1 } from 'react-aria-components';
4
+ import clsx from 'clsx';
4
5
  import styles from './label.module.css.js';
5
6
 
6
- function Label({ children, isRequired }) {
7
+ function Label({ children, className, 'data-test-selector': dataTestSelector, isRequired, }) {
7
8
  if (!children)
8
9
  return null;
9
- return (jsxs(Label$1, { className: styles.label, children: [children, isRequired && jsx("span", { className: styles.required, children: "*" })] }));
10
+ return (jsxs(Label$1, { className: clsx(className, styles.label), "data-test-selector": dataTestSelector, children: [children, isRequired && jsx("span", { className: styles.required, children: "*" })] }));
10
11
  }
11
12
 
12
13
  export { Label };
@@ -4,9 +4,11 @@ export interface SwitchProps {
4
4
  children?: ReactNode;
5
5
  className?: string;
6
6
  'data-test-selector'?: string;
7
+ defaultSelected?: boolean;
7
8
  isDisabled?: boolean;
8
9
  isSelected?: boolean;
10
+ name?: string;
9
11
  onChange?: (isSelected: boolean) => void;
10
12
  value?: string;
11
13
  }
12
- export declare function Switch({ _pseudo, children, className, 'data-test-selector': dataTestSelector, isDisabled, isSelected, onChange, value, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Switch({ _pseudo, children, className, 'data-test-selector': dataTestSelector, defaultSelected, isDisabled, isSelected, name, onChange, value, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,8 @@ import { Switch as Switch$1 } from 'react-aria-components';
4
4
  import clsx from 'clsx';
5
5
  import styles from './switch.module.css.js';
6
6
 
7
- function Switch({ _pseudo = 'none', children, className, 'data-test-selector': dataTestSelector, isDisabled, isSelected, onChange, value, }) {
8
- return (jsxs(Switch$1, { className: clsx(className, styles.switch, styles[_pseudo]), "data-test-selector": dataTestSelector, isDisabled: isDisabled, isSelected: isSelected, onChange: onChange, value: value, children: [jsx("div", { className: styles.indicator }), children] }));
7
+ function Switch({ _pseudo = 'none', children, className, 'data-test-selector': dataTestSelector, defaultSelected, isDisabled, isSelected, name, onChange, value, }) {
8
+ return (jsxs(Switch$1, { className: clsx(className, styles.switch, styles[_pseudo]), "data-test-selector": dataTestSelector, defaultSelected: defaultSelected, isDisabled: isDisabled, isSelected: isSelected, name: name, onChange: onChange, value: value, children: [jsx("div", { className: styles.indicator }), children] }));
9
9
  }
10
10
 
11
11
  export { Switch };
@@ -0,0 +1,10 @@
1
+ interface PasswordRevealToggleProps {
2
+ onChange: (showPassword: boolean) => void;
3
+ showPassword: boolean;
4
+ }
5
+ /**
6
+ * This component is used to show a toggle to reveal password value.
7
+ * It can be used as inline element of the Input component.
8
+ */
9
+ export declare function PasswordRevealToggle({ onChange, showPassword, }: PasswordRevealToggleProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,18 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Checkbox } from 'react-aria-components';
3
+ import { StrokeDehashedIcon } from '../../../icons/stroke/stroke-dehashed-icon.js';
4
+ import { StrokeHashedIcon } from '../../../icons/stroke/stroke-hashed-icon.js';
5
+ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
6
+ import styles from './password-reveal-toggle.module.css.js';
7
+
8
+ /**
9
+ * This component is used to show a toggle to reveal password value.
10
+ * It can be used as inline element of the Input component.
11
+ */
12
+ function PasswordRevealToggle({ onChange, showPassword, }) {
13
+ const t = useFormattedMessage();
14
+ const helpText = showPassword ? t('Conceal value') : t('Reveal value');
15
+ return (jsx(Checkbox, { "aria-label": helpText, className: styles.toggle, onChange: onChange, children: jsx("span", { title: helpText, children: showPassword ? jsx(StrokeHashedIcon, {}) : jsx(StrokeDehashedIcon, {}) }) }));
16
+ }
17
+
18
+ export { PasswordRevealToggle };
@@ -0,0 +1,3 @@
1
+ var styles = {"toggle":"password-reveal-toggle-module-uUQbW"};
2
+
3
+ export { styles as default };
@@ -1,9 +1,11 @@
1
- import { FormEventHandler, KeyboardEvent } from 'react';
2
- import { ValidateFunction } from '../field-error/field-error';
1
+ import { type FormEventHandler, type KeyboardEvent } from 'react';
2
+ import { type ValidateFunction } from '../field-error/field-error';
3
3
  interface TextFieldProps {
4
4
  autoFocus?: boolean;
5
5
  autoGrow?: boolean;
6
+ 'data-test-selector'?: string;
6
7
  defaultValue?: string;
8
+ info?: string;
7
9
  isDisabled?: boolean;
8
10
  isInvalid?: boolean;
9
11
  isMultiline?: boolean;
@@ -29,5 +31,5 @@ interface TextFieldProps {
29
31
  * It can be used as a single line input or as a textarea.
30
32
  * This field can also grow when a user types in text.
31
33
  */
32
- export declare function TextField({ autoFocus, autoGrow, defaultValue, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onChange, onInput, onKeyUp, placeholder, rows, showLabel, size, type, validate, value, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function TextField({ autoFocus, autoGrow, 'data-test-selector': dataTestSelector, defaultValue, info, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onChange, onInput, onKeyUp, placeholder, rows, showLabel, size, type: defaultType, validate, value, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
33
35
  export {};
@@ -1,11 +1,14 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useState, useCallback } from 'react';
3
4
  import { TextField as TextField$1 } from 'react-aria-components';
4
5
  import clsx from 'clsx';
6
+ import { InfoIconTooltip } from '../../info-icon-tooltip/info-icon-tooltip.js';
5
7
  import { FieldError } from '../field-error/field-error.js';
6
8
  import { Input } from '../input/input.js';
7
9
  import { Label } from '../label/label.js';
8
10
  import { TextArea } from '../textarea/textarea.js';
11
+ import { PasswordRevealToggle } from './password-reveal-toggle/password-reveal-toggle.js';
9
12
  import styles from './text-field.module.css.js';
10
13
 
11
14
  /**
@@ -13,10 +16,15 @@ import styles from './text-field.module.css.js';
13
16
  * It can be used as a single line input or as a textarea.
14
17
  * This field can also grow when a user types in text.
15
18
  */
16
- function TextField({ autoFocus, autoGrow, defaultValue, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onChange, onInput, onKeyUp, placeholder, rows, showLabel = false, size = 'lg', type = 'text', validate, value, }) {
17
- return (jsxs(TextField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles.field, styles[size]), defaultValue: defaultValue, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxLength: maxLength, minLength: minLength, name: name, onChange: value => {
19
+ function TextField({ autoFocus, autoGrow, 'data-test-selector': dataTestSelector, defaultValue, info, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onChange, onInput, onKeyUp, placeholder, rows, showLabel = false, size = 'lg', type: defaultType = 'text', validate, value, }) {
20
+ const [type, setType] = useState(defaultType);
21
+ const isPasswordInput = type === 'password';
22
+ const togglePasswordType = useCallback(() => {
23
+ setType(isPasswordInput ? 'text' : 'password');
24
+ }, [isPasswordInput]);
25
+ return (jsxs(TextField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles.field, styles[size]), "data-info": info ? true : undefined, defaultValue: defaultValue, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxLength: maxLength, minLength: minLength, name: name, onChange: value => {
18
26
  onChange?.(value);
19
- }, onInput: onInput, onKeyUp: e => onKeyUp?.(e), validate: validate, value: value, children: [showLabel && jsx(Label, { isRequired: isRequired, children: label }), isMultiline ? (jsx(TextArea, { autoGrow: autoGrow, label: label, placeholder: placeholder, rows: rows, size: size })) : (jsx(Input, { autoGrow: autoGrow, label: label, placeholder: placeholder, size: size, type: type })), jsx(FieldError, {}, Math.random())] }));
27
+ }, onInput: onInput, onKeyUp: e => onKeyUp?.(e), validate: validate, value: value, children: [showLabel && (jsx(Label, { className: styles['label'], "data-test-selector": dataTestSelector ? `${dataTestSelector}-label` : undefined, isRequired: isRequired, children: label })), isMultiline ? (jsx(TextArea, { autoGrow: autoGrow, className: styles['input'], "data-test-selector": dataTestSelector, label: label, placeholder: placeholder, rows: rows, size: size })) : (jsx(Input, { autoGrow: autoGrow, className: styles['input'], "data-test-selector": dataTestSelector, inlineElement: defaultType === 'password' && (jsx(PasswordRevealToggle, { onChange: togglePasswordType, showPassword: !isPasswordInput })), label: label, placeholder: placeholder, size: size, type: type })), info && (jsx(InfoIconTooltip, { className: styles['info'], children: info })), jsx(FieldError, { className: styles['error'] }, Math.random())] }));
20
28
  }
21
29
 
22
30
  export { TextField };
@@ -1,3 +1,3 @@
1
- var styles = {"field":"text-field-module-JeaK0"};
1
+ var styles = {"field":"text-field-module-JeaK0","label":"text-field-module-hFl0f","input":"text-field-module-nHYDe","info":"text-field-module-kHn5y","error":"text-field-module-8XbgH"};
2
2
 
3
3
  export { styles as default };
@@ -2,6 +2,7 @@ import { ComponentProps, FC } from 'react';
2
2
  import { TextArea as AriaTextArea } from 'react-aria-components';
3
3
  export interface TextAreaProps extends Omit<ComponentProps<typeof AriaTextArea>, 'size'> {
4
4
  autoGrow?: boolean;
5
+ className?: string;
5
6
  label: string;
6
7
  size?: 'md' | 'lg';
7
8
  }
@@ -2,6 +2,7 @@
2
2
  import { jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { forwardRef, useRef, useCallback, useEffect } from 'react';
4
4
  import { useContextProps, TextAreaContext, TextArea as TextArea$1 } from 'react-aria-components';
5
+ import clsx from 'clsx';
5
6
  import styles from './textarea.module.css.js';
6
7
 
7
8
  /**
@@ -10,7 +11,7 @@ import styles from './textarea.module.css.js';
10
11
  * The initial height is calculated based on the style of the textarea.
11
12
  * The height is updated everytime the user types.
12
13
  */
13
- const TextArea = forwardRef(({ autoGrow, label, size, ...textAreaProps }, _ref) => {
14
+ const TextArea = forwardRef(({ autoGrow, className, label, size, ...textAreaProps }, _ref) => {
14
15
  const textAreaRef = useRef(null);
15
16
  const [props, ref] = useContextProps(textAreaProps, textAreaRef, TextAreaContext);
16
17
  const initialHeight = useRef(null);
@@ -40,7 +41,7 @@ const TextArea = forwardRef(({ autoGrow, label, size, ...textAreaProps }, _ref)
40
41
  }
41
42
  updateHeight();
42
43
  }, [ref, autoGrow, updateHeight, size]);
43
- return (jsx(Fragment, { children: jsx("div", { className: styles['input-container'], children: jsx(TextArea$1, { "aria-label": label, ...textAreaProps, ref: node => {
44
+ return (jsx(Fragment, { children: jsx("div", { className: clsx(className, styles['input-container']), children: jsx(TextArea$1, { "aria-label": label, ...textAreaProps, ref: node => {
44
45
  ref.current =
45
46
  node;
46
47
  return (textAreaRef.current = node);
@@ -14,7 +14,8 @@ const categoriesPlugin = ({ productsIndexName, searchClient, }) => {
14
14
  {
15
15
  indexName: productsIndexName,
16
16
  params: {
17
- hitsPerPage: 1,
17
+ analytics: false,
18
+ hitsPerPage: 0,
18
19
  },
19
20
  query,
20
21
  },
@@ -11,6 +11,8 @@ const popularCategoriesPlugin = ({ productsIndexName, searchClient, }) => {
11
11
  {
12
12
  indexName: productsIndexName,
13
13
  params: {
14
+ analytics: false,
15
+ hitsPerPage: 0,
14
16
  ruleContexts: ['no-results'],
15
17
  },
16
18
  },
@@ -3,6 +3,7 @@ import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query
3
3
  const querySuggestionsPlugin = ({ searchClient, suggestionsIndexName, }) => createQuerySuggestionsPlugin({
4
4
  getSearchParams({ state }) {
5
5
  return {
6
+ analytics: false,
6
7
  hitsPerPage: state.query ? 10 : 0,
7
8
  };
8
9
  },
@@ -2,7 +2,7 @@ import { getAlgoliaResults } from '@algolia/autocomplete-preset-algolia';
2
2
 
3
3
  const quickAccessPlugin = ({ productsIndexName, searchClient, }) => {
4
4
  return {
5
- getSources({ query }) {
5
+ getSources() {
6
6
  return [
7
7
  {
8
8
  getItems() {
@@ -11,10 +11,10 @@ const quickAccessPlugin = ({ productsIndexName, searchClient, }) => {
11
11
  {
12
12
  indexName: productsIndexName,
13
13
  params: {
14
+ analytics: false,
14
15
  hitsPerPage: 0,
15
16
  ruleContexts: ['quick-access'],
16
17
  },
17
- query,
18
18
  },
19
19
  ],
20
20
  searchClient,
@@ -66,7 +66,6 @@ function ProductHitCard({ autocomplete, hit, index, source, }) {
66
66
  }, onAddToCart: ({ cartLine }) => hit.queryId &&
67
67
  sendAddToCartFromSearchEvent({
68
68
  cartLine,
69
- objectId: hit.objectId,
70
69
  queryId: hit.queryId,
71
70
  }), onClick: () => {
72
71
  close();
@@ -0,0 +1,7 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+
3
+ function StrokeDehashedIcon(props) {
4
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M11.9999099,7.6660389 C9.53942024,7.6660389 7.53751323,9.61026864 7.53751323,11.9998688 C7.53751323,14.3896147 9.53942024,16.3338444 11.9999099,16.3338444 C14.4605497,16.3338444 16.4624567,14.3896147 16.4624567,11.9998688 C16.4624567,9.61026864 14.4605497,7.6660389 11.9999099,7.6660389 M11.9997748,5 C17.5138784,5 22,8.14019646 22,11.9997813 C22,15.8596577 17.5138784,19 11.9997748,19 C6.48597148,19 2,15.8596577 2,11.9997813 C2,8.14019646 6.48597148,5 11.9997748,5 Z M11.9997748,6.29192404 C9.61000954,6.29192404 7.37625851,6.93416735 5.70995473,8.1005302 C4.17533954,9.17472735 3.33025009,10.5595463 3.33025009,11.9997813 C3.33025009,13.4401621 4.17533954,14.824981 5.71010489,15.899324 C7.37625851,17.0656868 9.61000954,17.708076 11.9997748,17.708076 C14.3896901,17.708076 16.6235913,17.0656868 18.2898951,15.899324 C19.8246605,14.824981 20.6697499,13.4401621 20.6697499,11.9997813 C20.6697499,10.5595463 19.8246605,9.17487318 18.2898951,8.1005302 C16.6235913,6.93416735 14.3896901,6.29192404 11.9997748,6.29192404 Z M11.9999099,10.249887 C12.9936558,10.249887 13.8021067,11.0348996 13.8021067,11.9998688 C13.8021067,12.9649837 12.9936558,13.7501422 11.9999099,13.7501422 C11.0063141,13.7501422 10.1980134,12.9649837 10.1980134,11.9998688 C10.1980134,11.0348996 11.0063141,10.249887 11.9999099,10.249887 Z", fillRule: "evenodd" }) }));
5
+ }
6
+
7
+ export { StrokeDehashedIcon };
@@ -0,0 +1,7 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+
3
+ function StrokeHashedIcon(props) {
4
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M4.93374005,4.18971899 L20.0027973,18.8949316 C20.2618651,19.1477442 20.2618651,19.5576512 20.0027973,19.8103175 C19.8734132,19.9367238 19.7035965,20 19.5337799,20 C19.3639632,20 19.1942963,19.9367238 19.0647624,19.8103175 L3.99555542,5.10495875 C3.73663742,4.85229237 3.73663742,4.44238537 3.99570517,4.18971899 C4.25462316,3.93676034 4.67452256,3.93676034 4.93374005,4.18971899 Z M4.94633404,7.794314 C5.19911228,8.05311803 5.18922877,8.46273276 4.92417102,8.70955376 C3.87906478,9.68237048 3.32663651,10.8200268 3.32663651,11.9994776 C3.32663651,15.1521812 7.20711193,17.7169861 11.9769535,17.7169861 C12.8107622,17.7169861 13.6414263,17.6357353 14.4460338,17.4752798 C14.8060331,17.40382 15.15555,17.6297438 15.2287778,17.9798819 C15.3020056,18.3303122 15.0704919,18.6722667 14.7116905,18.7437264 C13.8197787,18.9214258 12.8997138,19.0115907 11.9769535,19.0115907 C6.47573224,19.0115907 2,15.8660477 2,11.9994776 C2,10.4576135 2.69454116,8.99597719 4.0084489,7.77283224 C4.27350665,7.5258651 4.69340605,7.53580224 4.94633404,7.794314 Z M12.0231963,4.98695522 C17.5244175,4.98695522 22,8.13264437 22,11.9990684 C22,13.5409325 21.3054588,15.0024226 19.9917008,16.2255676 C19.8632152,16.3452517 19.6984901,16.4045822 19.5339147,16.4045822 C19.3588567,16.4045822 19.1840983,16.3373604 19.0538157,16.2040858 C18.8008877,15.9452818 18.810921,15.5356671 19.075829,15.2888461 C20.1209352,14.3160293 20.6732137,13.178373 20.6732137,11.9990684 C20.6732137,8.84636479 16.7928881,6.28170603 12.0231963,6.28170603 C11.1887885,6.28170603 10.3581245,6.36281062 9.55396621,6.52312006 C9.19441612,6.59531046 8.84474954,6.36880213 8.77137197,6.01851797 C8.69814415,5.66808767 8.92965787,5.32613317 9.28845921,5.25467345 C10.1797721,5.07697401 11.0999867,4.98695522 12.0231963,4.98695522 Z M7.64053377,11.1276836 C7.68815431,10.902052 7.97792084,10.8221165 8.14489225,10.9850564 L13.0393259,15.7613132 C13.2062973,15.9242531 13.124384,16.206877 12.8931697,16.2533477 C12.4097763,16.3505271 11.8983796,16.3712782 11.3714088,16.2990878 C9.42465696,16.0326848 7.86800423,14.5140561 7.59411123,12.614455 C7.51983516,12.0996235 7.54094993,11.5998438 7.64053377,11.1276836 Z M11.1026372,7.74588506 C11.5867795,7.64812115 12.0993742,7.62707779 12.6272434,7.69912205 C14.5757923,7.96537893 16.1339425,9.48576126 16.4064878,11.3872621 C16.4803146,11.9023859 16.4587506,12.4024578 16.3585677,12.8749103 C16.3107974,13.1003957 16.0211807,13.1801851 15.854359,13.0173914 L10.9566309,8.23791959 C10.7898092,8.07512587 10.8715728,7.79250194 11.1026372,7.74588506 Z", fillRule: "evenodd" }) }));
5
+ }
6
+
7
+ export { StrokeHashedIcon };
package/dist/index.js CHANGED
@@ -12,10 +12,10 @@ export { AlgoliaFilterPanel } from './algolia/algolia-filter-panel.js';
12
12
  export { isAlgoliaProductHit } from './algolia/algolia-hit-type.js';
13
13
  export { AlgoliaHitsProvider } from './algolia/algolia-hits-provider.js';
14
14
  export { algoliaIndexesPerEnvironment, getAlgoliaIndex } from './algolia/algolia-index-config.js';
15
+ export { userToken } from './algolia/algolia-initialization.js';
15
16
  export { AlgoliaInsightInstantSearchProvider } from './algolia/algolia-insight-instant-search-provider.js';
16
17
  export { AlgoliaInsightsProvider, AlgoliaInsightsProviderContext } from './algolia/algolia-insights-provider.js';
17
18
  export { AlgoliaInstantSearchStateProvider } from './algolia/algolia-instant-search-state-provider.js';
18
- export { userToken } from './algolia/algolia-intialization.js';
19
19
  export { AlgoliaMultiSelectFilterSection } from './algolia/algolia-multi-select-filter-section.js';
20
20
  export { AlgoliaPagination } from './algolia/algolia-pagination.js';
21
21
  export { AlgoliaProvider, useAlgolia } from './algolia/algolia-provider.js';
@@ -61,11 +61,6 @@ export { ProductUsp } from './carousel/usp-carousel/product-usp-carousel-slide.j
61
61
  export { USPCarousel } from './carousel/usp-carousel/usp-carousel.js';
62
62
  export { CartTotals, formatDisplayPriceToSymbolSpaceValue } from './cart-totals/cart-totals.js';
63
63
  export { CartTotalsSummary } from './cart-totals/cart-totals-summary.js';
64
- export { AdyenPayment } from './checkout/adyen-payment.js';
65
- export { parseAmount } from './checkout/parse-amount.js';
66
- export { Payment } from './checkout/payment.js';
67
- export { useGetAdyenRedirectResult } from './checkout/use-get-adyen-redirect-result.js';
68
- export { useHasReturnedFromAdyen } from './checkout/use-has-returned-from-adyen.js';
69
64
  export { Accordion } from './collapsables/accordion/accordion.js';
70
65
  export { AccordionItem } from './collapsables/accordion/accordion-item.js';
71
66
  export { ShowAll } from './collapsables/show-all/show-all.js';
@@ -76,6 +71,7 @@ export { CountrySelectorDialog } from './country-selector/country-selector-dialo
76
71
  export { CountrySelectorTrigger } from './country-selector/country-selector-trigger/country-selector-trigger.js';
77
72
  export { useCountriesLanguages } from './country-selector/use-countries-languages.js';
78
73
  export { DeliveryTime } from './delivery-time/delivery-time.js';
74
+ export { InfoDisplay } from './display/info-display/info-display.js';
79
75
  export { ProductPrice } from './display/product-price/product-price.js';
80
76
  export { ProductTotalPrice } from './display/product-price/product-total-price.js';
81
77
  export { ProductSku } from './display/product-sku/product-sku.js';
@@ -90,6 +86,7 @@ export { Label } from './forms/label/label.js';
90
86
  export { NumberField } from './forms/number-field/number-field.js';
91
87
  export { Select } from './forms/select/select.js';
92
88
  export { Switch } from './forms/switch/switch.js';
89
+ export { PasswordRevealToggle } from './forms/text-field/password-reveal-toggle/password-reveal-toggle.js';
93
90
  export { TextField } from './forms/text-field/text-field.js';
94
91
  export { TextArea } from './forms/textarea/textarea.js';
95
92
  export { CategoriesGrid } from './global-search/categories-grid/categories-grid.js';
@@ -115,6 +112,7 @@ export { SearchList } from './global-search/search-section/search-list.js';
115
112
  export { SearchListItem } from './global-search/search-section/search-list-item.js';
116
113
  export { SearchSection } from './global-search/search-section/search-section.js';
117
114
  export { ConnectedCartIcon } from './header/cart-icon/connected-cart-icon.js';
115
+ export { InfoIconTooltip } from './info-icon-tooltip/info-icon-tooltip.js';
118
116
  export { FormattedMessage } from './intl/formatted-message.js';
119
117
  export { IntlContext } from './intl/intl-context.js';
120
118
  export { IntlProvider } from './intl/intl-provider.js';
@@ -146,16 +144,29 @@ export { AnnouncementProvider } from './notifications/announcements/announcement
146
144
  export { ConnectedAnnouncement, now } from './notifications/announcements/connected-announcement.js';
147
145
  export { IntersectionObserverComponent } from './observers/intersection-observer.js';
148
146
  export { CartPage } from './pages/checkout/cart-page/cart-page.js';
147
+ export { EmptyCart } from './pages/checkout/cart-page/components/empty-cart-page.js';
148
+ export { BillingAndInvoiceInformation } from './pages/checkout/components/billing-and-invoice-information.js';
149
+ export { CHECKOUT_PATHS } from './pages/checkout/constants.js';
149
150
  export { CheckoutPageLayout } from './pages/checkout/layouts/checkout-page-layout/checkout-page-layout.js';
150
151
  export { CheckoutPageSection } from './pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.js';
151
152
  export { CheckoutPageSectionContent } from './pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-content.js';
152
153
  export { CheckoutPageSectionHeader } from './pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-header.js';
153
154
  export { CheckoutPageSectionLink } from './pages/checkout/layouts/checkout-page-layout/components/checkout-page-section-link.js';
155
+ export { OrderConfirmationPage } from './pages/checkout/order-confirmation-page/order-confirmation-page.js';
156
+ export { OrderConfirmationPageContent } from './pages/checkout/order-confirmation-page/order-confirmation-page-content.js';
157
+ export { AdyenPayment } from './pages/checkout/payment-page/components/adyen-payment.js';
158
+ export { Payment } from './pages/checkout/payment-page/components/payment.js';
159
+ export { useGetAdyenRedirectResult } from './pages/checkout/payment-page/hooks/use-get-adyen-redirect-result.js';
160
+ export { useHasReturnedFromAdyen } from './pages/checkout/payment-page/hooks/use-has-returned-from-adyen.js';
154
161
  export { PaymentPage } from './pages/checkout/payment-page/payment-page.js';
162
+ export { PaymentPageContent } from './pages/checkout/payment-page/payment-page-content.js';
163
+ export { parseAmount } from './pages/checkout/payment-page/utils/parse-amount.js';
155
164
  export { EDIT_ADDRESS_FORM_ID, EditAddresses } from './pages/checkout/shipping-page/components/edit-address.js';
156
165
  export { ReadOnlyAddresses } from './pages/checkout/shipping-page/components/readonly-address.js';
157
166
  export { SonicAddress } from './pages/checkout/shipping-page/components/sonic-address.js';
167
+ export { usePatchShippingDetails } from './pages/checkout/shipping-page/hooks/use-patch-shipping-details.js';
158
168
  export { ShippingPage } from './pages/checkout/shipping-page/shipping-page.js';
169
+ export { ShippingPageContent } from './pages/checkout/shipping-page/shipping-page-content.js';
159
170
  export { PageContainer } from './pages/components/page-container/page-container.js';
160
171
  export { PageMetaData } from './pages/components/page-meta-data/page-meta-data.js';
161
172
  export { Page } from './pages/components/page/page.js';
@@ -195,6 +206,7 @@ export { useSignOut } from './shared/api/storefront/hooks/authentication/use-sig
195
206
  export { useAddProductToCurrentCart } from './shared/api/storefront/hooks/cart/use-add-product-to-current-cart.js';
196
207
  export { useDeleteCartLineById } from './shared/api/storefront/hooks/cart/use-delete-cart-line-by-id.js';
197
208
  export { useDeleteCurrentCart } from './shared/api/storefront/hooks/cart/use-delete-current-cart.js';
209
+ export { useFetchCartById } from './shared/api/storefront/hooks/cart/use-fetch-cart-by-id.js';
198
210
  export { useFetchCurrentCart } from './shared/api/storefront/hooks/cart/use-fetch-current-cart.js';
199
211
  export { useFetchCurrentCheckoutAtp } from './shared/api/storefront/hooks/cart/use-fetch-current-cart-checkout-atp.js';
200
212
  export { useFetchCurrentCartCount } from './shared/api/storefront/hooks/cart/use-fetch-current-cart-count.js';
@@ -237,7 +249,7 @@ export { fetchTranslations } from './shared/api/storefront/services/translation-
237
249
  export { fetchCountries, fetchCountriesLanguages, fetchCountriesWithLanguages, fetchSettings, updateLocale } from './shared/api/storefront/services/website-service.js';
238
250
  export { WishListNameAlreadyExistsError, addWishListItemToWishList, createWishList, deleteWishList, deleteWishListItemFromWishList, getWishList, getWishListItemsByWishListId, getWishLists } from './shared/api/storefront/services/wishlist-service.js';
239
251
  export { useFeatureFlags } from './shared/feature-flags/use-feature-flags.js';
240
- export { BadRequestError, ForbiddenRequestError, InternalServerErrorRequestError, NotFoundRequestError, RequestError, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, isRequestError, request } from './shared/fetch/request.js';
252
+ export { BadRequestError, ForbiddenRequestError, InternalServerErrorRequestError, NotFoundRequestError, RequestError, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, isFormData, isJsonBody, isRequestError, request } from './shared/fetch/request.js';
241
253
  export { dataLayer } from './shared/ga/data-layer.js';
242
254
  export { GoogleAnalyticsProvider, useGoogleAnalyticsProvider } from './shared/ga/google-analytics-provider.js';
243
255
  export { isGAEvent } from './shared/ga/types.js';
@@ -274,21 +286,22 @@ export { RouteProvider, useBasePath, useNavigate, useOnNavigate } from './shared
274
286
  export { withRouting } from './shared/routing/with-routing.js';
275
287
  export { ensureArray } from './shared/utils/array.js';
276
288
  export { breakpoints, getCurrentBreakpoints } from './shared/utils/breakpoints.js';
277
- export { convertDateUnitToPluralOrSingle, getDateUnitObject } from './shared/utils/date.js';
289
+ export { convertDateUnitToPluralOrSingle, formatDateToLocaleString, getDateUnitObject } from './shared/utils/date.js';
278
290
  export { environment, environments } from './shared/utils/environment.js';
279
291
  export { EventEmitter } from './shared/utils/event-emitter.js';
280
292
  export { clone, deepMerge, isPlainObject, default as main, merge } from './shared/utils/merge.js';
281
293
  export { currencies, formatPrice, getCurrencyByCountryCode } from './shared/utils/price.js';
294
+ export { isPromise, wait } from './shared/utils/promise.js';
282
295
  export { random, randomInt } from './shared/utils/random.js';
283
296
  export { camelCase, capitalizeFirstLetter } from './shared/utils/string.js';
284
297
  export { TIME } from './shared/utils/time.js';
285
298
  export { has, hasNo } from './shared/utils/types.js';
286
299
  export { createUUID } from './shared/utils/uuid.js';
287
- export { wait } from './shared/utils/wait.js';
288
300
  export { Sidebar } from './sidebar/sidebar.js';
289
301
  export { SidebarDetectBreakpoint, SidebarProvider } from './sidebar/sidebar-provider.js';
290
302
  export { ToggleSidebarButton } from './sidebar/toggle-sidebar-button.js';
291
303
  export { useSidebar, useSidebarActions } from './sidebar/use-sidebar.js';
304
+ export { SignInForm } from './sign-in-form/sign-in-form.js';
292
305
  export { Toast } from './toast/toast.js';
293
306
  export { ToastProvider } from './toast/toast-provider.js';
294
307
  export { useToast } from './toast/use-toast.js';
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface InfoIconTooltipProps {
3
+ children: string | ReactNode;
4
+ className?: string;
5
+ variant?: 'solid' | 'stroke';
6
+ }
7
+ export declare function InfoIconTooltip({ children, className, variant, }: InfoIconTooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import clsx from 'clsx';
4
+ import { SolidInformationIcon } from '../icons/solid/solid-information-icon.js';
5
+ import { StrokeInformationIcon } from '../icons/stroke/stroke-information-icon.js';
6
+ import { IconButton } from '../buttons/icon-button/icon-button.js';
7
+ import { useFormattedMessage } from '../intl/use-formatted-message.js';
8
+ import { Tooltip } from '../tooltip/tooltip.js';
9
+ import styles from './info-icon-tooltip.module.css.js';
10
+
11
+ function InfoIconTooltip({ children, className, variant = 'solid', }) {
12
+ const t = useFormattedMessage();
13
+ const triggerLabel = t('Information');
14
+ function Icon(props) {
15
+ return (jsx(IconButton, { ...props, className: clsx(styles.trigger), children: variant === 'stroke' ? (jsx(StrokeInformationIcon, { "aria-description": triggerLabel })) : (jsx(SolidInformationIcon, { "aria-description": triggerLabel })) }));
16
+ }
17
+ return (jsx(Tooltip, { className: clsx(className, styles['info-icon-tooltip'], styles[variant]), trigger: jsx(Icon, {}), children: children }));
18
+ }
19
+
20
+ export { InfoIconTooltip };
@@ -0,0 +1,3 @@
1
+ var styles = {"info-icon-tooltip":"info-icon-tooltip-module-oR4nD","stroke":"info-icon-tooltip-module-5zfDr","trigger":"info-icon-tooltip-module-0lY-K"};
2
+
3
+ export { styles as default };
@@ -1 +1 @@
1
- export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Add order notes' | 'Add to list' | 'Address' | 'Amount: {0}' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Billing address' | 'Billing and shipping address' | 'Cancel' | 'Cart' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Company name' | 'Continue shopping' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Delivery expected in {0} {1}' | 'Delivery date' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Email' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Features' | 'First name' | 'Fulfillment method' | 'Hide filters' | 'Home' | 'Incl. VAT' | 'Includes' | 'Industry' | 'Language' | 'Last name' | 'List name already exists' | 'New list name' | 'of' | 'Order number' | 'Order' | 'Pay by invoice' | 'Pay' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Remove all' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a desired delivery date' | 'Select a list' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'sign in' | 'Sonic address' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Submit' | 'Subtotal' | 'Suggestions' | 'tag.limited' | 'tag.new' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are no products in your shopping cart.' | 'Total amount is' | 'Total' | 'Total' | 'Try another search' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unable to update the product in your cart.' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You must ' | 'Your cart has been emptied.' | 'Your favorites are available on multiple devices' | 'Your shopping cart is still empty';
1
+ export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Add order notes' | 'Add to list' | 'Address' | 'Amount: {0}' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Cancel' | 'Cart' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Company name' | 'Conceal value' | 'Continue shopping' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Delivery date' | 'Delivery expected in {0} {1}' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Email' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Features' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'Incl. VAT' | 'Includes' | 'Industry' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'New list name' | 'New user?' | 'of' | 'Or sign in as guest' | 'Order number' | 'Order' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Pay by invoice' | 'Pay' | 'Payment method' | 'Payment' | 'Password' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid e-mail address' | 'Please enter a valid phone number' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Requested delivery date' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a desired delivery date' | 'Select a list' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'sign in' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Submit' | 'Subtotal' | 'Suggestions' | 'tag.limited' | 'tag.new' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are no products in your shopping cart.' | 'Total amount is' | 'Total' | 'Total' | 'Try another search' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unable to update the product in your cart.' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You must ' | 'Your cart has been emptied.' | 'Your favorites are available on multiple devices' | 'Your shopping cart is still empty';
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { ConnectedOrderLineCard } from '../../../cards/orderline-card/connected-orderline-card.js';
3
3
  import { CartTotals } from '../../../cart-totals/cart-totals.js';
4
4
  import { CartTotalsSummary } from '../../../cart-totals/cart-totals-summary.js';
@@ -9,7 +9,6 @@ import { CheckoutPageLayout } from '../layouts/checkout-page-layout/checkout-pag
9
9
  import { Page } from '../../components/page/page.js';
10
10
  import { ErrorPage } from '../../error-page/error-page.js';
11
11
  import { LoadingPage } from '../../loading-page/loading-page.js';
12
- import { NoResults } from '../../product/product-listing-page/no-results/no-results.js';
13
12
  import { useIsAuthenticated } from '../../../shared/api/storefront/hooks/authentication/use-is-authenticated.js';
14
13
  import { useDeleteCartLineById } from '../../../shared/api/storefront/hooks/cart/use-delete-cart-line-by-id.js';
15
14
  import { useDeleteCurrentCart } from '../../../shared/api/storefront/hooks/cart/use-delete-current-cart.js';
@@ -18,11 +17,9 @@ import { RouteButton } from '../../../shared/routing/route-button.js';
18
17
  import { useToast } from '../../../toast/use-toast.js';
19
18
  import { useFetchCurrentCartLinesWithAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.js';
20
19
  import { useFetchCurrentCartWithAtp } from '../../../shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.js';
20
+ import { CHECKOUT_PATHS } from '../constants.js';
21
+ import { EmptyCart } from './components/empty-cart-page.js';
21
22
 
22
- function EmptyCart() {
23
- const t = useFormattedMessage();
24
- return (jsx(NoResults, { content: jsxs(Fragment, { children: [jsx(FormattedMessage, { id: "There are no products in your shopping cart." }), jsx("br", {}), jsx(FormattedMessage, { id: "Click the button below to continue shopping." })] }), title: t('Your shopping cart is still empty') }));
25
- }
26
23
  function CartContent({ cartLines }) {
27
24
  const { addToast } = useToast();
28
25
  const { data: currentCart } = useFetchCurrentCartWithAtp();
@@ -107,9 +104,9 @@ function CartPage() {
107
104
  if (isLoading)
108
105
  return jsx(LoadingPage, {});
109
106
  return (jsx(Page, { breadCrumb: [
110
- { href: '/', label: 'home' },
111
- { href: '/cart', label: t('Cart') },
112
- ], title: t('Cart'), children: cartLines?.length ? (jsx(CartContent, { cartLines: cartLines })) : (jsx(EmptyCart, {})) }));
107
+ { href: CHECKOUT_PATHS.HOME, label: 'home' },
108
+ { href: CHECKOUT_PATHS.CART, label: t('Cart') },
109
+ ], canonicalUrl: CHECKOUT_PATHS.CART, title: t('Cart'), children: cartLines?.length ? (jsx(CartContent, { cartLines: cartLines })) : (jsx(EmptyCart, {})) }));
113
110
  }
114
111
 
115
112
  export { CartPage };
@@ -0,0 +1 @@
1
+ export declare function EmptyCart(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { FormattedMessage } from '../../../../intl/formatted-message.js';
3
+ import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
4
+ import { NoResults } from '../../../product/product-listing-page/no-results/no-results.js';
5
+
6
+ function EmptyCart() {
7
+ const t = useFormattedMessage();
8
+ return (jsx(NoResults, { content: jsxs(Fragment, { children: [jsx(FormattedMessage, { id: "There are no products in your shopping cart." }), jsx("br", {}), jsx(FormattedMessage, { id: "Click the button below to continue shopping." })] }), title: t('Your shopping cart is still empty') }));
9
+ }
10
+
11
+ export { EmptyCart };
@@ -0,0 +1,7 @@
1
+ import { AddressType } from '../../../shared/model/address';
2
+ interface BillingAndInvoiceInformationProps {
3
+ billToAddress: AddressType;
4
+ shipToAddress: AddressType;
5
+ }
6
+ export declare function BillingAndInvoiceInformation({ billToAddress, shipToAddress, }: BillingAndInvoiceInformationProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Address } from '../../../address/address.js';
3
+ import { InfoDisplay } from '../../../display/info-display/info-display.js';
4
+ import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
5
+ import styles from './billing-and-invoice-information.module.css.js';
6
+
7
+ function BillingAndInvoiceInformation({ billToAddress, shipToAddress, }) {
8
+ const t = useFormattedMessage();
9
+ return (jsxs("div", { className: styles['billing-and-invoice-information'], children: [jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "billing-address", label: t('Billing address'), value: jsx(Address, { ...billToAddress }) }) }), jsx("section", { className: styles.section, children: jsx(InfoDisplay, { id: "shipping-address", label: t('Shipping address'), value: jsx(Address, { ...shipToAddress }) }) })] }));
10
+ }
11
+
12
+ export { BillingAndInvoiceInformation };
@@ -0,0 +1,3 @@
1
+ var styles = {"billing-and-invoice-information":"billing-and-invoice-information-module-FXmcK","section":"billing-and-invoice-information-module-5-ORs"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,8 @@
1
+ export declare const CHECKOUT_PATHS: {
2
+ readonly CART: "/cart";
3
+ readonly CHECKOUT_SHIPPING: "/CheckoutShipping";
4
+ readonly CHECKOUT_SHIPPING_VIA_SIGNIN: "/signin?returnUrl=/CheckoutShipping";
5
+ readonly HOME: "/";
6
+ readonly ORDER_CONFIRMATION: "/OrderConfirmation";
7
+ readonly REVIEW_AND_SUBMIT: "/CheckoutReviewAndSubmit";
8
+ };
@@ -0,0 +1,10 @@
1
+ const CHECKOUT_PATHS = {
2
+ CART: '/cart',
3
+ CHECKOUT_SHIPPING: '/CheckoutShipping',
4
+ CHECKOUT_SHIPPING_VIA_SIGNIN: '/signin?returnUrl=/CheckoutShipping',
5
+ HOME: '/',
6
+ ORDER_CONFIRMATION: '/OrderConfirmation',
7
+ REVIEW_AND_SUBMIT: '/CheckoutReviewAndSubmit',
8
+ };
9
+
10
+ export { CHECKOUT_PATHS };
@@ -1,3 +1,3 @@
1
- var styles = {"section":"checkout-page-section-module-zyovs","has-border":"checkout-page-section-module-pe5iL","section-header":"checkout-page-section-module-lcEdH","section-content":"checkout-page-section-module-ZkhMj","stretch":"checkout-page-section-module-24DRv","section-link":"checkout-page-section-module-l508k"};
1
+ var styles = {"section":"checkout-page-section-module-zyovs","has-border":"checkout-page-section-module-pe5iL","section-header":"checkout-page-section-module-lcEdH","section-link":"checkout-page-section-module-l508k","section-content":"checkout-page-section-module-ZkhMj","stretch":"checkout-page-section-module-24DRv"};
2
2
 
3
3
  export { styles as default };
@@ -0,0 +1,5 @@
1
+ import { CartModel } from '../../../shared/api/storefront/model/storefront.model';
2
+ export interface OrderConfirmationPageContentProps {
3
+ cart: CartModel;
4
+ }
5
+ export declare function OrderConfirmationPageContent({ cart, }: OrderConfirmationPageContentProps): import("react/jsx-runtime").JSX.Element;