bitsnap-react 1.6.0 → 1.7.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/README.md +456 -0
- package/dist/CartProvider-FQCDE3HZ.mjs +2 -0
- package/dist/CartProvider-FQCDE3HZ.mjs.map +1 -0
- package/dist/CartProvider-PDEV6GCV.css +2 -0
- package/dist/CartProvider-PDEV6GCV.css.map +1 -0
- package/dist/appearance-core-Dt2grZdl.d.mts +19 -0
- package/dist/appearance-core-Dt2grZdl.d.ts +19 -0
- package/dist/catalog.css +2 -0
- package/dist/catalog.css.map +1 -0
- package/dist/catalog.d.mts +214 -0
- package/dist/catalog.d.ts +214 -0
- package/dist/catalog.js +2 -0
- package/dist/catalog.js.map +1 -0
- package/dist/catalog.mjs +2 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/chunk-3TENJTY4.mjs +2 -0
- package/dist/chunk-3TENJTY4.mjs.map +1 -0
- package/dist/chunk-4HOZFM6V.mjs +2 -0
- package/dist/chunk-4HOZFM6V.mjs.map +1 -0
- package/dist/chunk-6KQBDN7M.mjs +2 -0
- package/dist/chunk-6KQBDN7M.mjs.map +1 -0
- package/dist/chunk-6N24OFUB.mjs +4 -0
- package/dist/chunk-6N24OFUB.mjs.map +1 -0
- package/dist/chunk-6W4FCL22.mjs +2 -0
- package/dist/chunk-6W4FCL22.mjs.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +57 -23
- package/dist/index.d.ts +57 -23
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/dist/methods-J7S63RTQ.mjs +2 -0
- package/dist/methods-J7S63RTQ.mjs.map +1 -0
- package/dist/methods-QAZED7TJ.css +2 -0
- package/dist/methods-QAZED7TJ.css.map +1 -0
- package/dist/models.d.mts +54 -0
- package/dist/models.d.ts +54 -0
- package/dist/models.js +1 -1
- package/dist/models.js.map +1 -1
- package/dist/models.mjs +1 -1
- package/dist/models.mjs.map +1 -1
- package/dist/returns.d.mts +602 -52
- package/dist/returns.d.ts +602 -52
- package/dist/returns.js +1 -1
- package/dist/returns.js.map +1 -1
- package/dist/returns.mjs +1 -1
- package/package.json +21 -26
- package/dist/chunk-O4ICBP4G.mjs +0 -2
- package/dist/chunk-O4ICBP4G.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { S as SlotAppearance, A as AppearanceElements } from './appearance-core-Dt2grZdl.mjs';
|
|
3
|
+
export { PRODUCT_LIST_SLOT_NAMES, ProductList, ProductListAppearance, ProductListAppearanceElements, ProductListAppearanceTokens, ProductListData, ProductListItemContext, ProductListProps, ProductListSlotAppearance, ProductListSlotName, ProductListTextKey, ProductListTexts, ProductListTheme, PublicListProduct, UseProductsOptions, UseProductsResult, formatProductPrice, useProducts } from './catalog.mjs';
|
|
4
|
+
import { ReturnsAppearance, ReturnsTexts } from './returns.mjs';
|
|
5
|
+
export { BitsnapReturns, BitsnapReturnsProps, BitsnapReturnsProvider, BitsnapReturnsProviderProps, CreateReturnInput, Environment, LegacyCreateReturnInput, LegacyReturnsTexts, LegacyReturnsTheme, RETURNS_SLOT_NAMES, ReturnsAppearanceElements, ReturnsAppearanceProvider, ReturnsAppearanceTokens, ReturnsChallenge, ReturnsCodeStep, ReturnsCodeStepProps, ReturnsConfirmation, ReturnsConfirmationProps, ReturnsEmailStep, ReturnsEmailStepProps, ReturnsEnvironment, ReturnsEnvironmentInput, ReturnsMyReturnDetail, ReturnsMyReturnDetailProps, ReturnsMyReturnsList, ReturnsMyReturnsListProps, ReturnsOrderDetail, ReturnsOrderDetailProps, ReturnsOrderList, ReturnsOrderListProps, ReturnsProvider, ReturnsProviderProps, ReturnsResult, ReturnsResultProps, ReturnsSessionStatus, ReturnsSlotAppearance, ReturnsSlotName, ReturnsTextKey, ReturnsTextsInput, ReturnsTheme, SelectedReturnLine, UseCreateReturnResult, UseMyReturnResult, UseMyReturnsResult, UseReturnOrdersResult, UseReturnSessionResult, UseReturnableOrderResult, useCreateReturn, useMyReturn, useMyReturns, useReturnOrders, useReturnSession, useReturnableOrder, useReturnsAppearance, useReturnsSlot, useReturnsText } from './returns.mjs';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
3
7
|
import z__default from 'zod';
|
|
4
|
-
|
|
5
|
-
import '@tanstack/react-query';
|
|
8
|
+
import './models.mjs';
|
|
6
9
|
import '@bufbuild/protobuf/wkt';
|
|
7
10
|
import '@bufbuild/protobuf';
|
|
8
11
|
|
|
@@ -85,13 +88,8 @@ type CheckoutAppearanceTokens = {
|
|
|
85
88
|
*/
|
|
86
89
|
declare const CHECKOUT_SLOT_NAMES: readonly ["root", "overlay", "panel", "header", "title", "closeButton", "productList", "product", "productImage", "productName", "productPrice", "quantityControl", "quantityInput", "quantityButton", "removeButton", "summary", "totalLabel", "totalValue", "deliveryText", "countryLabel", "countryTrigger", "countryDropdown", "countrySearch", "countryOption", "paymentButtons", "checkoutButton", "emptyState", "error", "skeleton"];
|
|
87
90
|
type CheckoutSlotName = (typeof CHECKOUT_SLOT_NAMES)[number];
|
|
88
|
-
type CheckoutSlotAppearance =
|
|
89
|
-
|
|
90
|
-
className?: string;
|
|
91
|
-
/** Merged after the built-in inline styles. */
|
|
92
|
-
style?: CSSProperties;
|
|
93
|
-
};
|
|
94
|
-
type CheckoutAppearanceElements = Partial<Record<CheckoutSlotName, CheckoutSlotAppearance>>;
|
|
91
|
+
type CheckoutSlotAppearance = SlotAppearance;
|
|
92
|
+
type CheckoutAppearanceElements = AppearanceElements<CheckoutSlotName>;
|
|
95
93
|
type CheckoutAppearance = {
|
|
96
94
|
/**
|
|
97
95
|
* `"dark"` keeps the current presentation, `"light"` applies the light preset.
|
|
@@ -104,6 +102,28 @@ type CheckoutAppearance = {
|
|
|
104
102
|
elements?: CheckoutAppearanceElements;
|
|
105
103
|
};
|
|
106
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Every string the checkout renders. Pass a partial object through the
|
|
107
|
+
* `texts` prop of `BitsnapCheckout` to override any of them, whatever the
|
|
108
|
+
* locale.
|
|
109
|
+
*/
|
|
110
|
+
type CheckoutTexts = {
|
|
111
|
+
/** Drawer title. */
|
|
112
|
+
cart: string;
|
|
113
|
+
/** Shown when the cart has no products. */
|
|
114
|
+
emptyCart: string;
|
|
115
|
+
/** Label next to the total price. */
|
|
116
|
+
total: string;
|
|
117
|
+
/** Delivery note next to the total price. */
|
|
118
|
+
delivery: string;
|
|
119
|
+
/** Country selector placeholder. */
|
|
120
|
+
chooseCountry: string;
|
|
121
|
+
/** Checkout button label. */
|
|
122
|
+
nextStep: string;
|
|
123
|
+
/** Error shown when some products are out of stock. */
|
|
124
|
+
unavailableProducts: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
107
127
|
type BitsnapCartProps = {
|
|
108
128
|
projectID: string;
|
|
109
129
|
locale?: string;
|
|
@@ -119,8 +139,13 @@ type BitsnapCartProps = {
|
|
|
119
139
|
* current presentation; every token and element slot is partial.
|
|
120
140
|
*/
|
|
121
141
|
appearance?: CheckoutAppearance;
|
|
142
|
+
/**
|
|
143
|
+
* Optional text overrides. Any key given here replaces the built-in string
|
|
144
|
+
* whatever the locale; omitted keys keep the `pl`/`en` defaults.
|
|
145
|
+
*/
|
|
146
|
+
texts?: Partial<CheckoutTexts>;
|
|
122
147
|
};
|
|
123
|
-
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, texts, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
124
149
|
|
|
125
150
|
type Props$2 = {
|
|
126
151
|
test?: boolean;
|
|
@@ -401,16 +426,6 @@ declare function injectReferenceToRequestIfNeeded(request: LinkRequest): LinkReq
|
|
|
401
426
|
|
|
402
427
|
declare const PanelLogin: () => react_jsx_runtime.JSX.Element;
|
|
403
428
|
|
|
404
|
-
declare const PanelPage: () => react_jsx_runtime.JSX.Element;
|
|
405
|
-
|
|
406
|
-
interface Props {
|
|
407
|
-
orderID: string;
|
|
408
|
-
initialEmail?: string;
|
|
409
|
-
accessToken?: string;
|
|
410
|
-
onBack?: () => void;
|
|
411
|
-
}
|
|
412
|
-
declare function PublicOrderPage(props: Props): react_jsx_runtime.JSX.Element;
|
|
413
|
-
|
|
414
429
|
interface GetThemeOutput {
|
|
415
430
|
logoURL?: string;
|
|
416
431
|
logoDarkURL?: string;
|
|
@@ -419,22 +434,41 @@ interface GetThemeOutput {
|
|
|
419
434
|
brandDark?: string;
|
|
420
435
|
};
|
|
421
436
|
}
|
|
422
|
-
type PanelScreen = "products" | "notifications" | "profile" | "plans" | "orders" | "order-details";
|
|
437
|
+
type PanelScreen = "products" | "notifications" | "profile" | "plans" | "orders" | "order-details" | "returns" | "return-details";
|
|
423
438
|
type PanelSearchParamsType = {
|
|
424
439
|
product?: string;
|
|
425
440
|
state: PanelScreen;
|
|
426
441
|
orderId?: string;
|
|
442
|
+
returnId?: string;
|
|
427
443
|
};
|
|
428
444
|
interface PanelProps {
|
|
429
445
|
projectID: string;
|
|
430
446
|
theme?: GetThemeOutput;
|
|
431
447
|
loginURL: string;
|
|
448
|
+
/**
|
|
449
|
+
* Appearance of the Returns screen. When omitted, `buttonBackground`,
|
|
450
|
+
* `focusRing` and a readable `buttonForeground` are derived from
|
|
451
|
+
* `theme.colors.brand`.
|
|
452
|
+
*/
|
|
453
|
+
returnsAppearance?: ReturnsAppearance;
|
|
454
|
+
/** Text overrides of the Returns screen. */
|
|
455
|
+
returnsTexts?: Partial<ReturnsTexts>;
|
|
432
456
|
}
|
|
433
457
|
interface PanelLoginProps {
|
|
434
458
|
projectID: string;
|
|
435
459
|
theme?: GetThemeOutput;
|
|
436
460
|
}
|
|
437
461
|
|
|
462
|
+
declare const PanelPage: ({ returnsAppearance, returnsTexts, }?: Pick<PanelProps, "returnsAppearance" | "returnsTexts">) => react_jsx_runtime.JSX.Element;
|
|
463
|
+
|
|
464
|
+
interface Props {
|
|
465
|
+
orderID: string;
|
|
466
|
+
initialEmail?: string;
|
|
467
|
+
accessToken?: string;
|
|
468
|
+
onBack?: () => void;
|
|
469
|
+
}
|
|
470
|
+
declare function PublicOrderPage(props: Props): react_jsx_runtime.JSX.Element;
|
|
471
|
+
|
|
438
472
|
interface PanelConfig {
|
|
439
473
|
projectID?: string;
|
|
440
474
|
loginURL?: string;
|
|
@@ -461,4 +495,4 @@ declare function persistReturnURL(returnURL: string | null): void;
|
|
|
461
495
|
declare function readPersistedReturnURL(): string | null;
|
|
462
496
|
declare function buildAccessTokenRedirect(returnURL: string, accessToken: string): string;
|
|
463
497
|
|
|
464
|
-
export { Wrapper$2 as ApplePayButton, type Props$3 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, CHECKOUT_SLOT_NAMES, type CheckoutAppearance, type CheckoutAppearanceElements, type CheckoutAppearanceTokens, type CheckoutSlotAppearance, type CheckoutSlotName, type CheckoutTheme, type ComponentClassNames, type CustomizationTexts, type GetThemeOutput, Wrapper$1 as GooglePayButton, type Props$2 as GooglePayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props$1 as NotificationsComponentProps, type NotificationsComponentPublicProps, PanelPage as Panel, type PanelConfig, PanelLogin, type PanelLoginProps, type PanelProps, PanelProvider, type PanelScreen, type PanelSearchParamsType, type PublicNotificationGroup, PublicOrderPage, buildAccessTokenRedirect, createCheckout, createPaymentURL, getAllowedReturnOrigins, getLocale, getPanelConfig, getReferenceIfPossible, getReturnURLFromSearch, injectReferenceToRequestIfNeeded, persistReturnURL, readPersistedReturnURL, setAllowedReturnOrigins, setCustomHost, setHost, setLocale, setLoginURL, setPanelConfig, setProjectID as setPanelProjectID, setProjectID$1 as setProjectID, setTheme, usePanelConfig };
|
|
498
|
+
export { Wrapper$2 as ApplePayButton, type Props$3 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, CHECKOUT_SLOT_NAMES, type CheckoutAppearance, type CheckoutAppearanceElements, type CheckoutAppearanceTokens, type CheckoutSlotAppearance, type CheckoutSlotName, type CheckoutTexts, type CheckoutTheme, type ComponentClassNames, type CustomizationTexts, type GetThemeOutput, Wrapper$1 as GooglePayButton, type Props$2 as GooglePayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props$1 as NotificationsComponentProps, type NotificationsComponentPublicProps, PanelPage as Panel, type PanelConfig, PanelLogin, type PanelLoginProps, type PanelProps, PanelProvider, type PanelScreen, type PanelSearchParamsType, type PublicNotificationGroup, PublicOrderPage, ReturnsAppearance, ReturnsTexts, buildAccessTokenRedirect, createCheckout, createPaymentURL, getAllowedReturnOrigins, getLocale, getPanelConfig, getReferenceIfPossible, getReturnURLFromSearch, injectReferenceToRequestIfNeeded, persistReturnURL, readPersistedReturnURL, setAllowedReturnOrigins, setCustomHost, setHost, setLocale, setLoginURL, setPanelConfig, setProjectID as setPanelProjectID, setProjectID$1 as setProjectID, setTheme, usePanelConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { S as SlotAppearance, A as AppearanceElements } from './appearance-core-Dt2grZdl.js';
|
|
3
|
+
export { PRODUCT_LIST_SLOT_NAMES, ProductList, ProductListAppearance, ProductListAppearanceElements, ProductListAppearanceTokens, ProductListData, ProductListItemContext, ProductListProps, ProductListSlotAppearance, ProductListSlotName, ProductListTextKey, ProductListTexts, ProductListTheme, PublicListProduct, UseProductsOptions, UseProductsResult, formatProductPrice, useProducts } from './catalog.js';
|
|
4
|
+
import { ReturnsAppearance, ReturnsTexts } from './returns.js';
|
|
5
|
+
export { BitsnapReturns, BitsnapReturnsProps, BitsnapReturnsProvider, BitsnapReturnsProviderProps, CreateReturnInput, Environment, LegacyCreateReturnInput, LegacyReturnsTexts, LegacyReturnsTheme, RETURNS_SLOT_NAMES, ReturnsAppearanceElements, ReturnsAppearanceProvider, ReturnsAppearanceTokens, ReturnsChallenge, ReturnsCodeStep, ReturnsCodeStepProps, ReturnsConfirmation, ReturnsConfirmationProps, ReturnsEmailStep, ReturnsEmailStepProps, ReturnsEnvironment, ReturnsEnvironmentInput, ReturnsMyReturnDetail, ReturnsMyReturnDetailProps, ReturnsMyReturnsList, ReturnsMyReturnsListProps, ReturnsOrderDetail, ReturnsOrderDetailProps, ReturnsOrderList, ReturnsOrderListProps, ReturnsProvider, ReturnsProviderProps, ReturnsResult, ReturnsResultProps, ReturnsSessionStatus, ReturnsSlotAppearance, ReturnsSlotName, ReturnsTextKey, ReturnsTextsInput, ReturnsTheme, SelectedReturnLine, UseCreateReturnResult, UseMyReturnResult, UseMyReturnsResult, UseReturnOrdersResult, UseReturnSessionResult, UseReturnableOrderResult, useCreateReturn, useMyReturn, useMyReturns, useReturnOrders, useReturnSession, useReturnableOrder, useReturnsAppearance, useReturnsSlot, useReturnsText } from './returns.js';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
3
7
|
import z__default from 'zod';
|
|
4
|
-
|
|
5
|
-
import '@tanstack/react-query';
|
|
8
|
+
import './models.js';
|
|
6
9
|
import '@bufbuild/protobuf/wkt';
|
|
7
10
|
import '@bufbuild/protobuf';
|
|
8
11
|
|
|
@@ -85,13 +88,8 @@ type CheckoutAppearanceTokens = {
|
|
|
85
88
|
*/
|
|
86
89
|
declare const CHECKOUT_SLOT_NAMES: readonly ["root", "overlay", "panel", "header", "title", "closeButton", "productList", "product", "productImage", "productName", "productPrice", "quantityControl", "quantityInput", "quantityButton", "removeButton", "summary", "totalLabel", "totalValue", "deliveryText", "countryLabel", "countryTrigger", "countryDropdown", "countrySearch", "countryOption", "paymentButtons", "checkoutButton", "emptyState", "error", "skeleton"];
|
|
87
90
|
type CheckoutSlotName = (typeof CHECKOUT_SLOT_NAMES)[number];
|
|
88
|
-
type CheckoutSlotAppearance =
|
|
89
|
-
|
|
90
|
-
className?: string;
|
|
91
|
-
/** Merged after the built-in inline styles. */
|
|
92
|
-
style?: CSSProperties;
|
|
93
|
-
};
|
|
94
|
-
type CheckoutAppearanceElements = Partial<Record<CheckoutSlotName, CheckoutSlotAppearance>>;
|
|
91
|
+
type CheckoutSlotAppearance = SlotAppearance;
|
|
92
|
+
type CheckoutAppearanceElements = AppearanceElements<CheckoutSlotName>;
|
|
95
93
|
type CheckoutAppearance = {
|
|
96
94
|
/**
|
|
97
95
|
* `"dark"` keeps the current presentation, `"light"` applies the light preset.
|
|
@@ -104,6 +102,28 @@ type CheckoutAppearance = {
|
|
|
104
102
|
elements?: CheckoutAppearanceElements;
|
|
105
103
|
};
|
|
106
104
|
|
|
105
|
+
/**
|
|
106
|
+
* Every string the checkout renders. Pass a partial object through the
|
|
107
|
+
* `texts` prop of `BitsnapCheckout` to override any of them, whatever the
|
|
108
|
+
* locale.
|
|
109
|
+
*/
|
|
110
|
+
type CheckoutTexts = {
|
|
111
|
+
/** Drawer title. */
|
|
112
|
+
cart: string;
|
|
113
|
+
/** Shown when the cart has no products. */
|
|
114
|
+
emptyCart: string;
|
|
115
|
+
/** Label next to the total price. */
|
|
116
|
+
total: string;
|
|
117
|
+
/** Delivery note next to the total price. */
|
|
118
|
+
delivery: string;
|
|
119
|
+
/** Country selector placeholder. */
|
|
120
|
+
chooseCountry: string;
|
|
121
|
+
/** Checkout button label. */
|
|
122
|
+
nextStep: string;
|
|
123
|
+
/** Error shown when some products are out of stock. */
|
|
124
|
+
unavailableProducts: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
107
127
|
type BitsnapCartProps = {
|
|
108
128
|
projectID: string;
|
|
109
129
|
locale?: string;
|
|
@@ -119,8 +139,13 @@ type BitsnapCartProps = {
|
|
|
119
139
|
* current presentation; every token and element slot is partial.
|
|
120
140
|
*/
|
|
121
141
|
appearance?: CheckoutAppearance;
|
|
142
|
+
/**
|
|
143
|
+
* Optional text overrides. Any key given here replaces the built-in string
|
|
144
|
+
* whatever the locale; omitted keys keep the `pl`/`en` defaults.
|
|
145
|
+
*/
|
|
146
|
+
texts?: Partial<CheckoutTexts>;
|
|
122
147
|
};
|
|
123
|
-
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
148
|
+
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, texts, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
124
149
|
|
|
125
150
|
type Props$2 = {
|
|
126
151
|
test?: boolean;
|
|
@@ -401,16 +426,6 @@ declare function injectReferenceToRequestIfNeeded(request: LinkRequest): LinkReq
|
|
|
401
426
|
|
|
402
427
|
declare const PanelLogin: () => react_jsx_runtime.JSX.Element;
|
|
403
428
|
|
|
404
|
-
declare const PanelPage: () => react_jsx_runtime.JSX.Element;
|
|
405
|
-
|
|
406
|
-
interface Props {
|
|
407
|
-
orderID: string;
|
|
408
|
-
initialEmail?: string;
|
|
409
|
-
accessToken?: string;
|
|
410
|
-
onBack?: () => void;
|
|
411
|
-
}
|
|
412
|
-
declare function PublicOrderPage(props: Props): react_jsx_runtime.JSX.Element;
|
|
413
|
-
|
|
414
429
|
interface GetThemeOutput {
|
|
415
430
|
logoURL?: string;
|
|
416
431
|
logoDarkURL?: string;
|
|
@@ -419,22 +434,41 @@ interface GetThemeOutput {
|
|
|
419
434
|
brandDark?: string;
|
|
420
435
|
};
|
|
421
436
|
}
|
|
422
|
-
type PanelScreen = "products" | "notifications" | "profile" | "plans" | "orders" | "order-details";
|
|
437
|
+
type PanelScreen = "products" | "notifications" | "profile" | "plans" | "orders" | "order-details" | "returns" | "return-details";
|
|
423
438
|
type PanelSearchParamsType = {
|
|
424
439
|
product?: string;
|
|
425
440
|
state: PanelScreen;
|
|
426
441
|
orderId?: string;
|
|
442
|
+
returnId?: string;
|
|
427
443
|
};
|
|
428
444
|
interface PanelProps {
|
|
429
445
|
projectID: string;
|
|
430
446
|
theme?: GetThemeOutput;
|
|
431
447
|
loginURL: string;
|
|
448
|
+
/**
|
|
449
|
+
* Appearance of the Returns screen. When omitted, `buttonBackground`,
|
|
450
|
+
* `focusRing` and a readable `buttonForeground` are derived from
|
|
451
|
+
* `theme.colors.brand`.
|
|
452
|
+
*/
|
|
453
|
+
returnsAppearance?: ReturnsAppearance;
|
|
454
|
+
/** Text overrides of the Returns screen. */
|
|
455
|
+
returnsTexts?: Partial<ReturnsTexts>;
|
|
432
456
|
}
|
|
433
457
|
interface PanelLoginProps {
|
|
434
458
|
projectID: string;
|
|
435
459
|
theme?: GetThemeOutput;
|
|
436
460
|
}
|
|
437
461
|
|
|
462
|
+
declare const PanelPage: ({ returnsAppearance, returnsTexts, }?: Pick<PanelProps, "returnsAppearance" | "returnsTexts">) => react_jsx_runtime.JSX.Element;
|
|
463
|
+
|
|
464
|
+
interface Props {
|
|
465
|
+
orderID: string;
|
|
466
|
+
initialEmail?: string;
|
|
467
|
+
accessToken?: string;
|
|
468
|
+
onBack?: () => void;
|
|
469
|
+
}
|
|
470
|
+
declare function PublicOrderPage(props: Props): react_jsx_runtime.JSX.Element;
|
|
471
|
+
|
|
438
472
|
interface PanelConfig {
|
|
439
473
|
projectID?: string;
|
|
440
474
|
loginURL?: string;
|
|
@@ -461,4 +495,4 @@ declare function persistReturnURL(returnURL: string | null): void;
|
|
|
461
495
|
declare function readPersistedReturnURL(): string | null;
|
|
462
496
|
declare function buildAccessTokenRedirect(returnURL: string, accessToken: string): string;
|
|
463
497
|
|
|
464
|
-
export { Wrapper$2 as ApplePayButton, type Props$3 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, CHECKOUT_SLOT_NAMES, type CheckoutAppearance, type CheckoutAppearanceElements, type CheckoutAppearanceTokens, type CheckoutSlotAppearance, type CheckoutSlotName, type CheckoutTheme, type ComponentClassNames, type CustomizationTexts, type GetThemeOutput, Wrapper$1 as GooglePayButton, type Props$2 as GooglePayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props$1 as NotificationsComponentProps, type NotificationsComponentPublicProps, PanelPage as Panel, type PanelConfig, PanelLogin, type PanelLoginProps, type PanelProps, PanelProvider, type PanelScreen, type PanelSearchParamsType, type PublicNotificationGroup, PublicOrderPage, buildAccessTokenRedirect, createCheckout, createPaymentURL, getAllowedReturnOrigins, getLocale, getPanelConfig, getReferenceIfPossible, getReturnURLFromSearch, injectReferenceToRequestIfNeeded, persistReturnURL, readPersistedReturnURL, setAllowedReturnOrigins, setCustomHost, setHost, setLocale, setLoginURL, setPanelConfig, setProjectID as setPanelProjectID, setProjectID$1 as setProjectID, setTheme, usePanelConfig };
|
|
498
|
+
export { Wrapper$2 as ApplePayButton, type Props$3 as ApplePayButtonProps, Bitsnap, type BitsnapCartProps, BitsnapCart as BitsnapCheckout, CHECKOUT_SLOT_NAMES, type CheckoutAppearance, type CheckoutAppearanceElements, type CheckoutAppearanceTokens, type CheckoutSlotAppearance, type CheckoutSlotName, type CheckoutTexts, type CheckoutTheme, type ComponentClassNames, type CustomizationTexts, type GetThemeOutput, Wrapper$1 as GooglePayButton, type Props$2 as GooglePayButtonProps, type LinkRequest, type NotificationGroup, Wrapper as NotificationsComponent, type Props$1 as NotificationsComponentProps, type NotificationsComponentPublicProps, PanelPage as Panel, type PanelConfig, PanelLogin, type PanelLoginProps, type PanelProps, PanelProvider, type PanelScreen, type PanelSearchParamsType, type PublicNotificationGroup, PublicOrderPage, ReturnsAppearance, ReturnsTexts, buildAccessTokenRedirect, createCheckout, createPaymentURL, getAllowedReturnOrigins, getLocale, getPanelConfig, getReferenceIfPossible, getReturnURLFromSearch, injectReferenceToRequestIfNeeded, persistReturnURL, readPersistedReturnURL, setAllowedReturnOrigins, setCustomHost, setHost, setLocale, setLoginURL, setPanelConfig, setProjectID as setPanelProjectID, setProjectID$1 as setProjectID, setTheme, usePanelConfig };
|