@sonic-equipment/ui 129.0.0 → 131.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/algolia/algolia-query-string-routing.js +2 -2
- package/dist/carousel/carousel.js +3 -3
- package/dist/carousel/pagination/transitions.js +1 -1
- package/dist/carousel/usp-carousel/usp-carousel.js +1 -1
- package/dist/cart-totals/cart-totals.d.ts +3 -1
- package/dist/cart-totals/cart-totals.js +6 -3
- package/dist/checkout/payment.d.ts +1 -2
- package/dist/checkout/payment.js +6 -23
- package/dist/exports.d.ts +2 -1
- package/dist/forms/checkbox/checkbox.d.ts +1 -1
- package/dist/forms/switch/switch.d.ts +12 -0
- package/dist/forms/switch/switch.js +11 -0
- package/dist/forms/switch/switch.module.css.js +3 -0
- package/dist/index.js +3 -2
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/media/image-lightbox/image-lightbox.js +3 -3
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/routers/history.js +22 -22
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/stateMappings/simple.js +5 -5
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/documentation.js +1 -1
- package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/logger.js +1 -1
- package/dist/node_modules/.pnpm/qs@6.9.7/node_modules/qs/lib/stringify.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/ssr-window.esm.js +2 -2
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/swiper-core.js +46 -44
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/update-on-virtual-data.js +2 -2
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/update-swiper.js +6 -6
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/utils.js +25 -9
- package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/swiper-react.js +5 -5
- package/dist/pages/checkout/cart-page/cart-page.js +1 -1
- package/dist/pages/checkout/payment-page/payment-page.js +3 -5
- package/dist/pages/checkout/shipping-page/components/edit-address.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/components/edit-address.js +4 -3
- package/dist/pages/checkout/shipping-page/components/readonly-address.d.ts +2 -1
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +4 -3
- package/dist/pages/checkout/shipping-page/components/sonic-address.d.ts +1 -0
- package/dist/pages/checkout/shipping-page/components/sonic-address.js +9 -0
- package/dist/pages/checkout/shipping-page/components/sonic-address.module.css.js +3 -0
- package/dist/pages/checkout/shipping-page/shipping-page.js +43 -19
- package/dist/pages/checkout/shipping-page/shipping-page.module.css.js +3 -0
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-lines-with-atp.d.ts +31 -5
- package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-with-atp.d.ts +31 -5
- package/dist/shared/fetch/request.js +4 -4
- package/dist/shared/providers/global-state-provider.js +2 -2
- package/dist/shared/utils/event-emitter.js +1 -1
- package/dist/styles.css +116 -16
- package/package.json +56 -55
- package/dist/checkout/payment-details.d.ts +0 -8
- package/dist/checkout/payment-details.js +0 -71
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/noop.js +0 -0
- /package/dist/node_modules/.pnpm/{instantsearch.js@4.75.4_algoliasearch@4.24.0 → instantsearch.js@4.77.3_algoliasearch@4.24.0}/node_modules/instantsearch.js/es/lib/utils/safelyRunOnBrowser.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/free-mode.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.1.14 → swiper@11.2.1}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import historyRouter from '../node_modules/.pnpm/instantsearch.js@4.
|
|
3
|
-
import simpleStateMapping from '../node_modules/.pnpm/instantsearch.js@4.
|
|
2
|
+
import historyRouter from '../node_modules/.pnpm/instantsearch.js@4.77.3_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/routers/history.js';
|
|
3
|
+
import simpleStateMapping from '../node_modules/.pnpm/instantsearch.js@4.77.3_algoliasearch@4.24.0/node_modules/instantsearch.js/es/lib/stateMappings/simple.js';
|
|
4
4
|
|
|
5
5
|
function createQueryStringRouting({ algoliaIndex, hierarchicalCategories, }) {
|
|
6
6
|
return {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import Navigation from '../node_modules/.pnpm/swiper@11.1
|
|
6
|
-
import freeMode from '../node_modules/.pnpm/swiper@11.1
|
|
7
|
-
import { Swiper, SwiperSlide } from '../node_modules/.pnpm/swiper@11.1
|
|
5
|
+
import Navigation from '../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/modules/navigation.js';
|
|
6
|
+
import freeMode from '../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/modules/free-mode.js';
|
|
7
|
+
import { Swiper, SwiperSlide } from '../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/swiper-react.js';
|
|
8
8
|
import { breakpoints } from '../shared/utils/breakpoints.js';
|
|
9
9
|
import { deepMerge } from '../shared/utils/merge.js';
|
|
10
10
|
import { CarouselNavigationButton } from './carousel-navigation-button.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState } from 'react';
|
|
4
|
-
import { Swiper, SwiperSlide } from '../../node_modules/.pnpm/swiper@11.1
|
|
4
|
+
import { Swiper, SwiperSlide } from '../../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/swiper-react.js';
|
|
5
5
|
import { CarouselPagination } from '../pagination/pagination.js';
|
|
6
6
|
import styles from './usp-carousel.module.css.js';
|
|
7
7
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export interface CartTotalsProps {
|
|
2
|
+
deliveryDate?: string;
|
|
2
3
|
fulfillmentMethod?: string;
|
|
3
4
|
orderNumber?: string;
|
|
4
5
|
shippingCost: string;
|
|
@@ -7,4 +8,5 @@ export interface CartTotalsProps {
|
|
|
7
8
|
total: string;
|
|
8
9
|
vatPercentage: number | undefined;
|
|
9
10
|
}
|
|
10
|
-
export declare
|
|
11
|
+
export declare const formatDisplayPriceToSymbolSpaceValue: (displayPrice: string) => string;
|
|
12
|
+
export declare function CartTotals({ deliveryDate, fulfillmentMethod, orderNumber, shippingCost, subtotal, tax, total, vatPercentage, }: CartTotalsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { FormattedMessage } from '../intl/formatted-message.js';
|
|
3
|
+
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
3
4
|
import { Heading } from '../typography/heading/heading.js';
|
|
4
5
|
import styles from './cart-totals.module.css.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const formatDisplayPriceToSymbolSpaceValue = (displayPrice) => displayPrice.replace(/^(\D)([\d,.]*$)/, (_, symbol, value) => `${symbol} ${value}`);
|
|
8
|
+
function CartTotals({ deliveryDate, fulfillmentMethod, orderNumber, shippingCost, subtotal, tax, total, vatPercentage, }) {
|
|
9
|
+
const t = useFormattedMessage();
|
|
10
|
+
return (jsxs("div", { className: styles['cart-totals'], children: [orderNumber && (jsxs("section", { className: styles.section, children: [jsx(Heading, { className: styles['section-header'], size: "xxxs", tag: "h3", children: jsx(FormattedMessage, { id: "Order number" }) }), jsx("div", { children: jsx("div", { className: styles.line, children: jsx("p", { className: styles.label, "data-test-selector": "orderConfirmation_orderNumber", children: orderNumber }) }) })] })), deliveryDate !== undefined && (jsxs("section", { className: styles.section, children: [jsx(Heading, { className: styles['section-header'], size: "xxxs", tag: "h3", children: jsx(FormattedMessage, { id: "Delivery date" }) }), jsx("div", { children: jsx("div", { className: styles.line, children: jsx("p", { className: styles.label, "data-test-selector": "deliveryDate", children: deliveryDate || t('As soon as possible') }) }) })] })), fulfillmentMethod && (jsxs("section", { className: styles.section, children: [jsx(Heading, { className: styles['section-header'], size: "xxxs", tag: "h3", children: jsx(FormattedMessage, { id: "Fulfillment method" }) }), jsx("div", { children: jsx("div", { className: styles.line, children: jsx("p", { className: styles.label, "data-test-selector": "fulfillmentMethod", children: fulfillmentMethod }) }) })] })), jsxs("section", { className: styles.section, children: [jsx(Heading, { className: styles['section-header'], size: "xxxs", tag: "h3", children: jsx(FormattedMessage, { id: "Cost overview" }) }), jsxs("div", { children: [jsxs("div", { className: styles.line, children: [jsxs("p", { className: styles.label, children: [jsx(FormattedMessage, { id: "Subtotal" }), ' ', jsx(FormattedMessage, { id: "Excl. VAT" })] }), jsx("p", { className: styles.value, "data-test-selector": "cartTotal_subTotal", children: formatDisplayPriceToSymbolSpaceValue(subtotal) })] }), jsxs("div", { className: styles.line, children: [jsx("p", { className: styles.label, children: jsx(FormattedMessage, { id: "Shipping and handling" }) }), jsx("p", { className: styles.value, "data-test-selector": "shippingCost", children: formatDisplayPriceToSymbolSpaceValue(shippingCost) })] }), jsxs("div", { className: styles.line, children: [jsxs("p", { className: styles.label, children: [jsx(FormattedMessage, { id: "VAT" }), ' ', vatPercentage ? `${vatPercentage}%` : ''] }), jsx("p", { className: styles.value, "data-test-selector": "vatAmount", children: formatDisplayPriceToSymbolSpaceValue(tax) })] })] })] }), jsx("section", { className: styles.totals, children: jsxs("div", { className: styles.line, children: [jsx("p", { className: styles.label, children: jsx(FormattedMessage, { id: "Total" }) }), jsx("p", { className: styles.value, "data-test-selector": "cartTotal_orderGrandTotalDisplay", children: formatDisplayPriceToSymbolSpaceValue(total) })] }) })] }));
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
export { CartTotals };
|
|
13
|
+
export { CartTotals, formatDisplayPriceToSymbolSpaceValue };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { AdyenPaymentModel, CartModel, CheckoutAtpEntry } from '../shared/api/storefront/model/storefront.model';
|
|
2
|
-
export declare function Payment({ atp, cart: _cart, form,
|
|
2
|
+
export declare function Payment({ atp, cart: _cart, form, onError: _onError, onPaymentComplete, onProcessing, onValidating, }: {
|
|
3
3
|
atp: CheckoutAtpEntry[];
|
|
4
4
|
cart: CartModel;
|
|
5
5
|
form: string;
|
|
6
|
-
fulfillmentMethods: string[];
|
|
7
6
|
onError?: (error: unknown, result: AdyenPaymentModel | null) => void;
|
|
8
7
|
onPaymentComplete: () => void;
|
|
9
8
|
onProcessing: (processing: boolean) => void;
|
package/dist/checkout/payment.js
CHANGED
|
@@ -10,9 +10,7 @@ import { Select } from '../forms/select/select.js';
|
|
|
10
10
|
import { TextField } from '../forms/text-field/text-field.js';
|
|
11
11
|
import { FormattedMessage } from '../intl/formatted-message.js';
|
|
12
12
|
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
13
|
-
import { useFetchSession } from '../shared/api/storefront/hooks/authentication/use-fetch-session.js';
|
|
14
13
|
import { usePatchSession } from '../shared/api/storefront/hooks/authentication/use-patch-session.js';
|
|
15
|
-
import { useFetchCurrentCart } from '../shared/api/storefront/hooks/cart/use-fetch-current-cart.js';
|
|
16
14
|
import { usePatchCart } from '../shared/api/storefront/hooks/cart/use-patch-cart.js';
|
|
17
15
|
import { usePlaceOrder } from '../shared/api/storefront/hooks/cart/use-place-order.js';
|
|
18
16
|
import { useInvalidateAdyen } from '../shared/api/storefront/hooks/payment/use-invalidate-adyen.js';
|
|
@@ -24,12 +22,10 @@ import { AdyenPayment } from './adyen-payment.js';
|
|
|
24
22
|
import { useHasReturnedFromAdyen } from './use-has-returned-from-adyen.js';
|
|
25
23
|
import styles from './payment.module.css.js';
|
|
26
24
|
|
|
27
|
-
function Payment({ atp, cart: _cart, form,
|
|
28
|
-
const { data: session } = useFetchSession();
|
|
25
|
+
function Payment({ atp, cart: _cart, form, onError: _onError, onPaymentComplete, onProcessing, onValidating, }) {
|
|
29
26
|
const { isLoading: isPatchingCart, mutate: patchCart } = usePatchCart();
|
|
30
|
-
const { isLoading: isPatchingSession
|
|
27
|
+
const { isLoading: isPatchingSession } = usePatchSession();
|
|
31
28
|
const { isLoading: isPlacingCart, mutate: placeOrder } = usePlaceOrder();
|
|
32
|
-
const { refetch: refetchCart } = useFetchCurrentCart();
|
|
33
29
|
const dropinRef = useRef(null);
|
|
34
30
|
const [paymentError, setPaymentError] = useState();
|
|
35
31
|
const invalidateAdyen = useInvalidateAdyen();
|
|
@@ -60,10 +56,6 @@ function Payment({ atp, cart: _cart, form, fulfillmentMethods, onError: _onError
|
|
|
60
56
|
...acc,
|
|
61
57
|
[atp.date || '']: atp.displayDate,
|
|
62
58
|
}), {});
|
|
63
|
-
const fulfillmentMethodOptions = fulfillmentMethods.reduce((acc, method) => ({
|
|
64
|
-
...acc,
|
|
65
|
-
[method]: t(`fulfillmentMethod.${method}`),
|
|
66
|
-
}), {});
|
|
67
59
|
const paymentMethodOptions = cart.paymentOptions?.paymentMethods?.reduce((acc, method) => {
|
|
68
60
|
acc[method.name] = t(`paymentMethod.${method.description}`);
|
|
69
61
|
return acc;
|
|
@@ -122,7 +114,6 @@ function Payment({ atp, cart: _cart, form, fulfillmentMethods, onError: _onError
|
|
|
122
114
|
cart: {
|
|
123
115
|
...cart,
|
|
124
116
|
customerVatNumber: formData.get('vatNumber')?.toString(),
|
|
125
|
-
fulfillmentMethod: formData.get('fulfillmentMethod')?.toString(),
|
|
126
117
|
poNumber: formData.get('poNumber')?.toString(),
|
|
127
118
|
properties: {
|
|
128
119
|
...cart.properties,
|
|
@@ -161,22 +152,14 @@ function Payment({ atp, cart: _cart, form, fulfillmentMethods, onError: _onError
|
|
|
161
152
|
console.error(error);
|
|
162
153
|
_onError?.(error, result);
|
|
163
154
|
}, [_onError, invalidateAdyen]);
|
|
164
|
-
return (jsxs(Form, { className: styles['payment-form'], id: form, onSubmit: e => {
|
|
155
|
+
return (jsxs(Form, { className: styles['payment-form'], "data-test-selector": "paymentForm", id: form, onSubmit: e => {
|
|
165
156
|
e.preventDefault();
|
|
166
157
|
onSubmit(e);
|
|
167
|
-
}, validationErrors: validationErrors, children: [jsxs("div", { className: styles['delivery-date'], children: [jsx(Select, { showLabel: true, "data-test-selector": "
|
|
158
|
+
}, validationErrors: validationErrors, children: [hasAtp && (jsxs("div", { className: styles['delivery-date'], children: [jsx(Select, { showLabel: true, "data-test-selector": "deliveryDateSelect", isDisabled: hasReturnedFromAdyen || asSoonAsPossible, isRequired: !asSoonAsPossible, label: t('Select a desired delivery date'), name: "deliveryDate", onChange: setDeliveryDate, options: atpSelectOptions, selectedOption: deliveryDate, variant: "solid" }, String(asSoonAsPossible)), jsxs("div", { className: styles['asap-checkbox'], children: [jsx(Checkbox, { "data-test-selector": "asapCheckbox", isDisabled: hasReturnedFromAdyen || !hasAtp, isSelected: asSoonAsPossible, onChange: checked => {
|
|
168
159
|
setAsSoonAsPossible(checked);
|
|
169
160
|
if (checked)
|
|
170
161
|
setDeliveryDate('');
|
|
171
|
-
}, children: jsx(FormattedMessage, { id: "As soon as possible" }) }), jsx(Tooltip, { text: t('Selecting As Soon As Possible will enable us to send the products to you as they become available.') })] })] }), jsx(Select, { isRequired: true,
|
|
172
|
-
await patchSession({
|
|
173
|
-
session: {
|
|
174
|
-
...session,
|
|
175
|
-
fulfillmentMethod: value,
|
|
176
|
-
},
|
|
177
|
-
});
|
|
178
|
-
await refetchCart();
|
|
179
|
-
}, options: fulfillmentMethodOptions, variant: "solid" }), jsx(Select, { isRequired: true, defaultSelectedOption: cart.properties.industry, isDisabled: hasReturnedFromAdyen, label: t('Industry'), name: "industry", options: {
|
|
162
|
+
}, children: jsx(FormattedMessage, { id: "As soon as possible" }) }), jsx(Tooltip, { text: t('Selecting As Soon As Possible will enable us to send the products to you as they become available.') })] })] })), jsx(Select, { isRequired: true, "data-test-selector": "industrySelect", defaultSelectedOption: cart.properties.industry, isDisabled: hasReturnedFromAdyen, label: t('Industry'), name: "industry", options: {
|
|
180
163
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
181
164
|
PP: 'Private User',
|
|
182
165
|
AU: 'Automotive',
|
|
@@ -188,7 +171,7 @@ function Payment({ atp, cart: _cart, form, fulfillmentMethods, onError: _onError
|
|
|
188
171
|
MA: 'Maritime',
|
|
189
172
|
OT: 'Other',
|
|
190
173
|
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
191
|
-
}, variant: "solid" }), jsx(TextField, { showLabel: true, defaultValue: cart.customerVatNumber, isDisabled: hasReturnedFromAdyen || isProcessing, label: t('VAT Number'), name: "vatNumber", onInput: e => debouncedValidator(e.target.value), validate: () => validationErrors.vatNumber ?? true }), jsx(TextField, { showLabel: true, defaultValue: cart.poNumber, isDisabled: hasReturnedFromAdyen || isProcessing, label: t('PO Number'), name: "poNumber" }), paymentMethodOptions && (jsx(Select, { defaultSelectedOption: cart.paymentOptions?.paymentMethods?.[0]?.name || 'ADY', isDisabled: (hasReturnedFromAdyen ||
|
|
174
|
+
}, variant: "solid" }), jsx(TextField, { showLabel: true, defaultValue: cart.customerVatNumber, isDisabled: hasReturnedFromAdyen || isProcessing, label: t('VAT Number'), name: "vatNumber", onInput: e => debouncedValidator(e.target.value), validate: () => validationErrors.vatNumber ?? true }), jsx(TextField, { showLabel: true, defaultValue: cart.poNumber, isDisabled: hasReturnedFromAdyen || isProcessing, label: t('PO Number'), name: "poNumber" }), paymentMethodOptions && (jsx(Select, { "data-test-selector": "paymentMethodSelect", defaultSelectedOption: cart.paymentOptions?.paymentMethods?.[0]?.name || 'ADY', isDisabled: (hasReturnedFromAdyen ||
|
|
192
175
|
(cart.paymentOptions?.paymentMethods &&
|
|
193
176
|
cart.paymentOptions.paymentMethods.length <= 1)) ??
|
|
194
177
|
true, label: t('Payment method'), name: "paymentMethod", options: paymentMethodOptions, variant: "solid" })), cart.paymentMethod?.name !== 'PBI' &&
|
package/dist/exports.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ export * from './cart-totals/cart-totals-summary';
|
|
|
59
59
|
export * from './checkout/adyen-payment';
|
|
60
60
|
export * from './checkout/parse-amount';
|
|
61
61
|
export * from './checkout/payment';
|
|
62
|
-
export * from './checkout/payment-details';
|
|
63
62
|
export * from './checkout/use-get-adyen-redirect-result';
|
|
64
63
|
export * from './checkout/use-has-returned-from-adyen';
|
|
65
64
|
export * from './collapsables/accordion/accordion';
|
|
@@ -85,6 +84,7 @@ export * from './forms/input/input';
|
|
|
85
84
|
export * from './forms/label/label';
|
|
86
85
|
export * from './forms/number-field/number-field';
|
|
87
86
|
export * from './forms/select/select';
|
|
87
|
+
export * from './forms/switch/switch';
|
|
88
88
|
export * from './forms/text-field/text-field';
|
|
89
89
|
export * from './forms/textarea/textarea';
|
|
90
90
|
export * from './global-search/categories-grid/categories-grid';
|
|
@@ -151,6 +151,7 @@ export * from './pages/checkout/layouts/checkout-page-layout/components/checkout
|
|
|
151
151
|
export * from './pages/checkout/payment-page/payment-page';
|
|
152
152
|
export * from './pages/checkout/shipping-page/components/edit-address';
|
|
153
153
|
export * from './pages/checkout/shipping-page/components/readonly-address';
|
|
154
|
+
export * from './pages/checkout/shipping-page/components/sonic-address';
|
|
154
155
|
export * from './pages/checkout/shipping-page/shipping-page';
|
|
155
156
|
export * from './pages/components/page-container/page-container';
|
|
156
157
|
export * from './pages/components/page-meta-data/page-meta-data';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
_pseudo?: 'none' | 'focus' | 'hover' | 'active';
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
'data-test-selector'?: string;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
onChange?: (isSelected: boolean) => void;
|
|
10
|
+
value?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Switch({ _pseudo, children, className, 'data-test-selector': dataTestSelector, isDisabled, isSelected, onChange, value, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Switch as Switch$1 } from 'react-aria-components';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import styles from './switch.module.css.js';
|
|
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] }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { Switch };
|
package/dist/index.js
CHANGED
|
@@ -59,12 +59,11 @@ export { Animation } from './carousel/pagination/transitions.js';
|
|
|
59
59
|
export { ProductUSPCarousel } from './carousel/usp-carousel/product-usp-carousel.js';
|
|
60
60
|
export { ProductUsp } from './carousel/usp-carousel/product-usp-carousel-slide.js';
|
|
61
61
|
export { USPCarousel } from './carousel/usp-carousel/usp-carousel.js';
|
|
62
|
-
export { CartTotals } from './cart-totals/cart-totals.js';
|
|
62
|
+
export { CartTotals, formatDisplayPriceToSymbolSpaceValue } from './cart-totals/cart-totals.js';
|
|
63
63
|
export { CartTotalsSummary } from './cart-totals/cart-totals-summary.js';
|
|
64
64
|
export { AdyenPayment } from './checkout/adyen-payment.js';
|
|
65
65
|
export { parseAmount } from './checkout/parse-amount.js';
|
|
66
66
|
export { Payment } from './checkout/payment.js';
|
|
67
|
-
export { PaymentDetails } from './checkout/payment-details.js';
|
|
68
67
|
export { useGetAdyenRedirectResult } from './checkout/use-get-adyen-redirect-result.js';
|
|
69
68
|
export { useHasReturnedFromAdyen } from './checkout/use-has-returned-from-adyen.js';
|
|
70
69
|
export { Accordion } from './collapsables/accordion/accordion.js';
|
|
@@ -90,6 +89,7 @@ export { Input } from './forms/input/input.js';
|
|
|
90
89
|
export { Label } from './forms/label/label.js';
|
|
91
90
|
export { NumberField } from './forms/number-field/number-field.js';
|
|
92
91
|
export { Select } from './forms/select/select.js';
|
|
92
|
+
export { Switch } from './forms/switch/switch.js';
|
|
93
93
|
export { TextField } from './forms/text-field/text-field.js';
|
|
94
94
|
export { TextArea } from './forms/textarea/textarea.js';
|
|
95
95
|
export { CategoriesGrid } from './global-search/categories-grid/categories-grid.js';
|
|
@@ -154,6 +154,7 @@ export { CheckoutPageSectionLink } from './pages/checkout/layouts/checkout-page-
|
|
|
154
154
|
export { PaymentPage } from './pages/checkout/payment-page/payment-page.js';
|
|
155
155
|
export { EDIT_ADDRESS_FORM_ID, EditAddresses } from './pages/checkout/shipping-page/components/edit-address.js';
|
|
156
156
|
export { ReadOnlyAddresses } from './pages/checkout/shipping-page/components/readonly-address.js';
|
|
157
|
+
export { SonicAddress } from './pages/checkout/shipping-page/components/sonic-address.js';
|
|
157
158
|
export { ShippingPage } from './pages/checkout/shipping-page/shipping-page.js';
|
|
158
159
|
export { PageContainer } from './pages/components/page-container/page-container.js';
|
|
159
160
|
export { PageMetaData } from './pages/components/page-meta-data/page-meta-data.js';
|
|
@@ -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}' | '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' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | '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' | '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' | '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' | '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';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import Navigation from '../../node_modules/.pnpm/swiper@11.1
|
|
6
|
-
import Thumb from '../../node_modules/.pnpm/swiper@11.1
|
|
7
|
-
import { Swiper, SwiperSlide } from '../../node_modules/.pnpm/swiper@11.1
|
|
5
|
+
import Navigation from '../../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/modules/navigation.js';
|
|
6
|
+
import Thumb from '../../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/modules/thumbs.js';
|
|
7
|
+
import { Swiper, SwiperSlide } from '../../node_modules/.pnpm/swiper@11.2.1/node_modules/swiper/swiper-react.js';
|
|
8
8
|
import { CarouselNavigationButton } from '../../carousel/carousel-navigation-button.js';
|
|
9
9
|
import { CarouselPagination } from '../../carousel/pagination/pagination.js';
|
|
10
10
|
import { Image } from '../image/image.js';
|
|
@@ -3,13 +3,13 @@ import { safelyRunOnBrowser } from '../utils/safelyRunOnBrowser.js';
|
|
|
3
3
|
import { createDocumentationLink } from '../utils/documentation.js';
|
|
4
4
|
import { warning as _warning } from '../utils/logger.js';
|
|
5
5
|
|
|
6
|
-
function _typeof(
|
|
6
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
9
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
function _toPropertyKey(
|
|
12
|
-
function _toPrimitive(
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (undefined !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
var setWindowTitle = function setWindowTitle(title) {
|
|
14
14
|
if (title) {
|
|
15
15
|
// This function is only executed on browsers so we can disable this check.
|
|
@@ -26,7 +26,7 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
26
26
|
var _this = this;
|
|
27
27
|
var windowTitle = _ref.windowTitle,
|
|
28
28
|
_ref$writeDelay = _ref.writeDelay,
|
|
29
|
-
writeDelay = _ref$writeDelay ===
|
|
29
|
+
writeDelay = _ref$writeDelay === undefined ? 400 : _ref$writeDelay,
|
|
30
30
|
createURL = _ref.createURL,
|
|
31
31
|
parseURL = _ref.parseURL,
|
|
32
32
|
getLocation = _ref.getLocation,
|
|
@@ -39,7 +39,7 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
39
39
|
/**
|
|
40
40
|
* Transforms a UI state into a title for the page.
|
|
41
41
|
*/
|
|
42
|
-
_defineProperty(this, "windowTitle",
|
|
42
|
+
_defineProperty(this, "windowTitle", undefined);
|
|
43
43
|
/**
|
|
44
44
|
* Time in milliseconds before performing a write in the history.
|
|
45
45
|
* It prevents from adding too many entries in the history and
|
|
@@ -47,24 +47,24 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
47
47
|
*
|
|
48
48
|
* @default 400
|
|
49
49
|
*/
|
|
50
|
-
_defineProperty(this, "writeDelay",
|
|
50
|
+
_defineProperty(this, "writeDelay", undefined);
|
|
51
51
|
/**
|
|
52
52
|
* Creates a full URL based on the route state.
|
|
53
53
|
* The storage adaptor maps all syncable keys to the query string of the URL.
|
|
54
54
|
*/
|
|
55
|
-
_defineProperty(this, "_createURL",
|
|
55
|
+
_defineProperty(this, "_createURL", undefined);
|
|
56
56
|
/**
|
|
57
57
|
* Parses the URL into a route state.
|
|
58
58
|
* It should be symmetrical to `createURL`.
|
|
59
59
|
*/
|
|
60
|
-
_defineProperty(this, "parseURL",
|
|
60
|
+
_defineProperty(this, "parseURL", undefined);
|
|
61
61
|
/**
|
|
62
62
|
* Returns the location to store in the history.
|
|
63
63
|
* @default () => window.location
|
|
64
64
|
*/
|
|
65
|
-
_defineProperty(this, "getLocation",
|
|
66
|
-
_defineProperty(this, "writeTimer",
|
|
67
|
-
_defineProperty(this, "_onPopState",
|
|
65
|
+
_defineProperty(this, "getLocation", undefined);
|
|
66
|
+
_defineProperty(this, "writeTimer", undefined);
|
|
67
|
+
_defineProperty(this, "_onPopState", undefined);
|
|
68
68
|
/**
|
|
69
69
|
* Indicates if last action was back/forward in the browser.
|
|
70
70
|
*/
|
|
@@ -80,10 +80,10 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
80
80
|
* and thus to prevent the `write` method from calling `pushState`.
|
|
81
81
|
*/
|
|
82
82
|
_defineProperty(this, "latestAcknowledgedHistory", 0);
|
|
83
|
-
_defineProperty(this, "_start",
|
|
84
|
-
_defineProperty(this, "_dispose",
|
|
85
|
-
_defineProperty(this, "_push",
|
|
86
|
-
_defineProperty(this, "_cleanUrlOnDispose",
|
|
83
|
+
_defineProperty(this, "_start", undefined);
|
|
84
|
+
_defineProperty(this, "_dispose", undefined);
|
|
85
|
+
_defineProperty(this, "_push", undefined);
|
|
86
|
+
_defineProperty(this, "_cleanUrlOnDispose", undefined);
|
|
87
87
|
this.windowTitle = windowTitle;
|
|
88
88
|
this.writeTimer = undefined;
|
|
89
89
|
this.writeDelay = writeDelay;
|
|
@@ -201,7 +201,7 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
201
201
|
// eslint-disable-next-line no-new
|
|
202
202
|
new URL(url);
|
|
203
203
|
} catch (e) {
|
|
204
|
-
process.env.NODE_ENV === 'development' ? _warning(false, "The URL returned by the `createURL` function is invalid.\nPlease make sure it returns an absolute URL to avoid issues, e.g: `https://algolia.com/search?query=iphone`.") :
|
|
204
|
+
process.env.NODE_ENV === 'development' ? _warning(false, "The URL returned by the `createURL` function is invalid.\nPlease make sure it returns an absolute URL to avoid issues, e.g: `https://algolia.com/search?query=iphone`.") : undefined;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
return url;
|
|
@@ -270,14 +270,14 @@ var BrowserHistory = /*#__PURE__*/function () {
|
|
|
270
270
|
function historyRouter() {
|
|
271
271
|
var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
272
272
|
_ref7$createURL = _ref7.createURL,
|
|
273
|
-
createURL = _ref7$createURL ===
|
|
273
|
+
createURL = _ref7$createURL === undefined ? function (_ref8) {
|
|
274
274
|
var qsModule = _ref8.qsModule,
|
|
275
275
|
routeState = _ref8.routeState,
|
|
276
276
|
location = _ref8.location;
|
|
277
277
|
var protocol = location.protocol,
|
|
278
278
|
hostname = location.hostname,
|
|
279
279
|
_location$port = location.port,
|
|
280
|
-
port = _location$port ===
|
|
280
|
+
port = _location$port === undefined ? '' : _location$port,
|
|
281
281
|
pathname = location.pathname,
|
|
282
282
|
hash = location.hash;
|
|
283
283
|
var queryString = qsModule.stringify(routeState);
|
|
@@ -290,7 +290,7 @@ function historyRouter() {
|
|
|
290
290
|
return "".concat(protocol, "//").concat(hostname).concat(portWithPrefix).concat(pathname, "?").concat(queryString).concat(hash);
|
|
291
291
|
} : _ref7$createURL,
|
|
292
292
|
_ref7$parseURL = _ref7.parseURL,
|
|
293
|
-
parseURL = _ref7$parseURL ===
|
|
293
|
+
parseURL = _ref7$parseURL === undefined ? function (_ref9) {
|
|
294
294
|
var qsModule = _ref9.qsModule,
|
|
295
295
|
location = _ref9.location;
|
|
296
296
|
// `qs` by default converts arrays with more than 20 items to an object.
|
|
@@ -308,10 +308,10 @@ function historyRouter() {
|
|
|
308
308
|
});
|
|
309
309
|
} : _ref7$parseURL,
|
|
310
310
|
_ref7$writeDelay = _ref7.writeDelay,
|
|
311
|
-
writeDelay = _ref7$writeDelay ===
|
|
311
|
+
writeDelay = _ref7$writeDelay === undefined ? 400 : _ref7$writeDelay,
|
|
312
312
|
windowTitle = _ref7.windowTitle,
|
|
313
313
|
_ref7$getLocation = _ref7.getLocation,
|
|
314
|
-
getLocation = _ref7$getLocation ===
|
|
314
|
+
getLocation = _ref7$getLocation === undefined ? function () {
|
|
315
315
|
return safelyRunOnBrowser(function (_ref10) {
|
|
316
316
|
var window = _ref10.window;
|
|
317
317
|
return window.location;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["configure"];
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (undefined !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
10
|
function getIndexStateWithoutConfigure(uiState) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function createDocumentationLink(_ref) {
|
|
2
2
|
var name = _ref.name,
|
|
3
3
|
_ref$connector = _ref.connector,
|
|
4
|
-
connector = _ref$connector ===
|
|
4
|
+
connector = _ref$connector === undefined ? false : _ref$connector;
|
|
5
5
|
return ['https://www.algolia.com/doc/api-reference/widgets/', name, '/js/', connector ? '#connector' : ''].join('');
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -23,7 +23,7 @@ if (process.env.NODE_ENV === 'development') {
|
|
|
23
23
|
var hasAlreadyPrinted = _warning.cache[message];
|
|
24
24
|
if (!hasAlreadyPrinted) {
|
|
25
25
|
_warning.cache[message] = true;
|
|
26
|
-
process.env.NODE_ENV === 'development' ? warn(message) :
|
|
26
|
+
process.env.NODE_ENV === 'development' ? warn(message) : undefined;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
_warning.cache = {};
|
|
@@ -127,7 +127,7 @@ function requireStringify () {
|
|
|
127
127
|
var objKeys;
|
|
128
128
|
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
129
129
|
// we need to join elements in
|
|
130
|
-
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null :
|
|
130
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : undefined }];
|
|
131
131
|
} else if (isArray(filter)) {
|
|
132
132
|
objKeys = filter;
|
|
133
133
|
} else {
|
|
@@ -107,7 +107,7 @@ function Thumb(_ref) {
|
|
|
107
107
|
let newThumbsIndex;
|
|
108
108
|
let direction;
|
|
109
109
|
if (thumbsSwiper.params.loop) {
|
|
110
|
-
const newThumbsSlide = thumbsSwiper.slides.
|
|
110
|
+
const newThumbsSlide = thumbsSwiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`);
|
|
111
111
|
newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);
|
|
112
112
|
direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
|
|
113
113
|
} else {
|
|
@@ -14,10 +14,10 @@ function isObject(obj) {
|
|
|
14
14
|
return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;
|
|
15
15
|
}
|
|
16
16
|
function extend(target, src) {
|
|
17
|
-
if (target ===
|
|
17
|
+
if (target === undefined) {
|
|
18
18
|
target = {};
|
|
19
19
|
}
|
|
20
|
-
if (src ===
|
|
20
|
+
if (src === undefined) {
|
|
21
21
|
src = {};
|
|
22
22
|
}
|
|
23
23
|
Object.keys(src).forEach(key => {
|