bitsnap-react 1.8.0 → 1.10.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 +162 -0
- package/dist/CartProvider-HXLGQ4EX.mjs +2 -0
- package/dist/CartProvider-OHHYOMSG.js +2 -0
- package/dist/CartProvider-OHHYOMSG.js.map +1 -0
- package/dist/analytics.d.mts +45 -0
- package/dist/analytics.d.ts +45 -0
- package/dist/analytics.js +2 -0
- package/dist/analytics.js.map +1 -0
- package/dist/analytics.mjs +2 -0
- package/dist/catalog.d.mts +14 -1
- package/dist/catalog.d.ts +14 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/catalog.mjs +1 -1
- package/dist/chunk-3Z6VNXBP.js +2 -0
- package/dist/chunk-3Z6VNXBP.js.map +1 -0
- package/dist/chunk-43IIYJ6J.mjs +2 -0
- package/dist/chunk-43IIYJ6J.mjs.map +1 -0
- package/dist/chunk-6D3OORMK.mjs +2 -0
- package/dist/chunk-6D3OORMK.mjs.map +1 -0
- package/dist/chunk-ADYVTMGH.mjs +2 -0
- package/dist/chunk-ADYVTMGH.mjs.map +1 -0
- package/dist/{chunk-WRCXZMKK.js → chunk-AJNULBC3.js} +2 -2
- package/dist/chunk-AJNULBC3.js.map +1 -0
- package/dist/chunk-B32ACCW2.js +2 -0
- package/dist/chunk-B32ACCW2.js.map +1 -0
- package/dist/chunk-DDY7IBMG.mjs +2 -0
- package/dist/chunk-DDY7IBMG.mjs.map +1 -0
- package/dist/chunk-DPKT6ITB.js +4 -0
- package/dist/chunk-DPKT6ITB.js.map +1 -0
- package/dist/{chunk-T2POA6RW.js → chunk-F46RJVWC.js} +2 -2
- package/dist/chunk-F46RJVWC.js.map +1 -0
- package/dist/chunk-F6GQLKA6.js +2 -0
- package/dist/chunk-F6GQLKA6.js.map +1 -0
- package/dist/chunk-JSDGZ4NY.js.map +1 -1
- package/dist/chunk-JXCHRSPW.mjs +4 -0
- package/dist/chunk-JXCHRSPW.mjs.map +1 -0
- package/dist/chunk-KOYBZORL.js.map +1 -1
- package/dist/chunk-RLEC25JI.mjs +2 -0
- package/dist/chunk-RLEC25JI.mjs.map +1 -0
- package/dist/chunk-RVILRUW3.js +2 -0
- package/dist/chunk-RVILRUW3.js.map +1 -0
- package/dist/chunk-T2OUOO4X.mjs +2 -0
- package/dist/chunk-T2OUOO4X.mjs.map +1 -0
- package/dist/chunk-VIII45AC.js +2 -0
- package/dist/chunk-VIII45AC.js.map +1 -0
- package/dist/chunk-XIHGWNTS.js +2 -0
- package/dist/chunk-XIHGWNTS.js.map +1 -0
- package/dist/chunk-YXFJG4MF.mjs +2 -0
- package/dist/chunk-YXFJG4MF.mjs.map +1 -0
- package/dist/chunk-ZPTHK4OX.mjs +2 -0
- package/dist/{chunk-OJT3YO2R.mjs.map → chunk-ZPTHK4OX.mjs.map} +1 -1
- package/dist/consent.d.mts +165 -0
- package/dist/consent.d.ts +165 -0
- package/dist/consent.js +75 -0
- package/dist/consent.js.map +1 -0
- package/dist/consent.mjs +75 -0
- package/dist/consent.mjs.map +1 -0
- package/dist/course.d.mts +13 -3
- package/dist/course.d.ts +13 -3
- package/dist/course.js +1 -1
- package/dist/course.js.map +1 -1
- package/dist/course.mjs +1 -1
- package/dist/course.mjs.map +1 -1
- package/dist/embed/analytics.js +1 -0
- package/dist/embed/consent.js +74 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +54 -7
- package/dist/index.d.ts +54 -7
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/instrument-CmxK7S4T.d.mts +929 -0
- package/dist/instrument-CmxK7S4T.d.ts +929 -0
- package/dist/internal.js.map +1 -1
- package/dist/methods-A5KGZBAM.js +2 -0
- package/dist/methods-A5KGZBAM.js.map +1 -0
- package/dist/methods-AOHKV7IN.mjs +2 -0
- package/dist/methods-AOHKV7IN.mjs.map +1 -0
- package/dist/models.js.map +1 -1
- package/dist/returns.d.mts +9 -1
- package/dist/returns.d.ts +9 -1
- package/dist/returns.js +1 -1
- package/dist/returns.js.map +1 -1
- package/dist/returns.mjs +1 -1
- package/dist/{types-PSBBDdQm.d.mts → types-BnVWLcoB.d.mts} +13 -0
- package/dist/{types-BTm_ZolC.d.ts → types-i-IuN4Im.d.ts} +13 -0
- package/package.json +46 -45
- package/dist/CartProvider-5KAG5QGA.mjs +0 -2
- package/dist/CartProvider-7GJXW2IP.js +0 -2
- package/dist/CartProvider-7GJXW2IP.js.map +0 -1
- package/dist/chunk-45AP7UZE.mjs +0 -2
- package/dist/chunk-45AP7UZE.mjs.map +0 -1
- package/dist/chunk-7XTDFTQU.js +0 -4
- package/dist/chunk-7XTDFTQU.js.map +0 -1
- package/dist/chunk-C6Z7LOHB.mjs +0 -2
- package/dist/chunk-C6Z7LOHB.mjs.map +0 -1
- package/dist/chunk-HB6KQT26.mjs +0 -4
- package/dist/chunk-HB6KQT26.mjs.map +0 -1
- package/dist/chunk-LWK4E5G5.js +0 -2
- package/dist/chunk-LWK4E5G5.js.map +0 -1
- package/dist/chunk-OJT3YO2R.mjs +0 -2
- package/dist/chunk-OUYRKNZJ.mjs +0 -2
- package/dist/chunk-OUYRKNZJ.mjs.map +0 -1
- package/dist/chunk-P2YB25KZ.js +0 -2
- package/dist/chunk-P2YB25KZ.js.map +0 -1
- package/dist/chunk-T2POA6RW.js.map +0 -1
- package/dist/chunk-VPKE2ZOR.mjs +0 -2
- package/dist/chunk-VPKE2ZOR.mjs.map +0 -1
- package/dist/chunk-WRCXZMKK.js.map +0 -1
- package/dist/chunk-WSM4OM72.mjs +0 -2
- package/dist/chunk-WSM4OM72.mjs.map +0 -1
- package/dist/chunk-XRNTUSBH.js +0 -2
- package/dist/chunk-XRNTUSBH.js.map +0 -1
- package/dist/chunk-Z2BKIX6F.js +0 -2
- package/dist/chunk-Z2BKIX6F.js.map +0 -1
- package/dist/methods-ITD6WFIY.mjs +0 -2
- package/dist/methods-JENIGNF7.js +0 -2
- package/dist/methods-JENIGNF7.js.map +0 -1
- /package/dist/{CartProvider-5KAG5QGA.mjs.map → CartProvider-HXLGQ4EX.mjs.map} +0 -0
- /package/dist/{methods-ITD6WFIY.mjs.map → analytics.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { A as AnalyticsOption, l as Instrument } from './instrument-CmxK7S4T.mjs';
|
|
2
3
|
import { S as SlotAppearance, A as AppearanceElements } from './appearance-core-Dt2grZdl.mjs';
|
|
3
4
|
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
5
|
export { BitsnapReturns, BitsnapReturnsProps, BitsnapReturnsProvider, BitsnapReturnsProviderProps, CreateReturnInput, Environment, LegacyCreateReturnInput, LegacyReturnsTexts, LegacyReturnsTheme, ReturnsAppearanceProvider, ReturnsChallenge, ReturnsCodeStep, ReturnsCodeStepProps, ReturnsConfirmation, ReturnsConfirmationProps, ReturnsEmailStep, ReturnsEmailStepProps, ReturnsEnvironment, ReturnsEnvironmentInput, ReturnsMyReturnDetail, ReturnsMyReturnDetailProps, ReturnsMyReturnsList, ReturnsMyReturnsListProps, ReturnsOrderDetail, ReturnsOrderDetailProps, ReturnsOrderList, ReturnsOrderListProps, ReturnsProvider, ReturnsProviderProps, ReturnsResult, ReturnsResultProps, ReturnsSessionStatus, ReturnsTextsInput, SelectedReturnLine, UseCreateReturnResult, UseMyReturnResult, UseMyReturnsResult, UseReturnOrdersResult, UseReturnSessionResult, UseReturnableOrderResult, useCreateReturn, useMyReturn, useMyReturns, useReturnOrders, useReturnSession, useReturnableOrder, useReturnsAppearance, useReturnsSlot, useReturnsText } from './returns.mjs';
|
|
5
6
|
export { b as RETURNS_SLOT_NAMES, R as ReturnsAppearance, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, e as ReturnsSlotAppearance, f as ReturnsSlotName, h as ReturnsTextKey, a as ReturnsTexts, g as ReturnsTheme } from './texts-tQtAGJCT.mjs';
|
|
6
7
|
import { ReactNode } from 'react';
|
|
7
8
|
import z__default from 'zod';
|
|
8
|
-
import { P as PanelProps, G as GetThemeOutput } from './types-
|
|
9
|
-
export { a as PanelLoginProps, b as PanelScreen, c as PanelSearchParamsType } from './types-
|
|
9
|
+
import { P as PanelProps, G as GetThemeOutput } from './types-BnVWLcoB.mjs';
|
|
10
|
+
export { a as PanelLoginProps, b as PanelScreen, c as PanelSearchParamsType } from './types-BnVWLcoB.mjs';
|
|
10
11
|
import './models.mjs';
|
|
11
12
|
import '@bufbuild/protobuf/wkt';
|
|
12
13
|
import '@bufbuild/protobuf';
|
|
@@ -34,6 +35,12 @@ type Props$3 = {
|
|
|
34
35
|
};
|
|
35
36
|
}[];
|
|
36
37
|
onClick?: () => Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Usage statistics for your Bitsnap dashboard (Apple Pay clicks and
|
|
40
|
+
* results). On by default; `false` turns it off. Inside `<BitsnapCheckout>`
|
|
41
|
+
* the checkout's setting applies unless this is given.
|
|
42
|
+
*/
|
|
43
|
+
analytics?: AnalyticsOption;
|
|
37
44
|
};
|
|
38
45
|
declare function Wrapper$2(props: Props$3): react_jsx_runtime.JSX.Element;
|
|
39
46
|
|
|
@@ -146,8 +153,15 @@ type BitsnapCartProps = {
|
|
|
146
153
|
* whatever the locale; omitted keys keep the `pl`/`en` defaults.
|
|
147
154
|
*/
|
|
148
155
|
texts?: Partial<CheckoutTexts>;
|
|
156
|
+
/**
|
|
157
|
+
* Usage statistics for your Bitsnap dashboard (cart opened, checkout
|
|
158
|
+
* started, add to cart). On by default; `false` turns it off. An object
|
|
159
|
+
* lets you forward every event: `{ onEvent }`. Nothing is stored on the
|
|
160
|
+
* visitor's device.
|
|
161
|
+
*/
|
|
162
|
+
analytics?: AnalyticsOption;
|
|
149
163
|
};
|
|
150
|
-
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, texts, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
164
|
+
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, texts, analytics, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
151
165
|
|
|
152
166
|
type Props$2 = {
|
|
153
167
|
test?: boolean;
|
|
@@ -166,6 +180,12 @@ type Props$2 = {
|
|
|
166
180
|
[key: string]: string | undefined;
|
|
167
181
|
};
|
|
168
182
|
}[];
|
|
183
|
+
/**
|
|
184
|
+
* Usage statistics for your Bitsnap dashboard. On by default; `false` turns
|
|
185
|
+
* it off. Inside `<BitsnapCheckout>` the checkout's setting applies unless
|
|
186
|
+
* this is given.
|
|
187
|
+
*/
|
|
188
|
+
analytics?: AnalyticsOption;
|
|
169
189
|
};
|
|
170
190
|
declare function Wrapper$1(props: Props$2): react_jsx_runtime.JSX.Element;
|
|
171
191
|
|
|
@@ -299,10 +319,21 @@ interface NotificationsComponentPublicProps {
|
|
|
299
319
|
* Custom CSS class names for various component sections (for easier styling).
|
|
300
320
|
*/
|
|
301
321
|
className?: ComponentClassNames;
|
|
322
|
+
/**
|
|
323
|
+
* Public project ID used for usage statistics. Defaults to the one set by
|
|
324
|
+
* `<BitsnapCheckout projectID>`.
|
|
325
|
+
*/
|
|
326
|
+
projectID?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Usage statistics for your Bitsnap dashboard (sign-ups). On by default;
|
|
329
|
+
* `false` turns it off. An object lets you forward every event:
|
|
330
|
+
* `{ onEvent }`. Nothing is stored on the visitor's device.
|
|
331
|
+
*/
|
|
332
|
+
analytics?: AnalyticsOption;
|
|
302
333
|
}
|
|
303
334
|
|
|
304
335
|
type Props$1 = NotificationsComponentPublicProps;
|
|
305
|
-
declare function Wrapper({ slug, userID, productID, projectName, projectLogo, projectLogoDark, groups, isManaging, texts, showQRCode, showPhoneInput, hiddenGroupIds, className, }: Props$1): react_jsx_runtime.JSX.Element;
|
|
336
|
+
declare function Wrapper({ slug, userID, productID, projectID, analytics, projectName, projectLogo, projectLogoDark, groups, isManaging, texts, showQRCode, showPhoneInput, hiddenGroupIds, className, }: Props$1): react_jsx_runtime.JSX.Element;
|
|
306
337
|
|
|
307
338
|
type ErrTypes = "internal" | "badInput" | "notFound";
|
|
308
339
|
type Err = {
|
|
@@ -414,6 +445,8 @@ declare namespace Bitsnap {
|
|
|
414
445
|
name?: string;
|
|
415
446
|
price?: number;
|
|
416
447
|
currency?: string;
|
|
448
|
+
/** Where `add_to_cart` is reported. Defaults to the mounted `<BitsnapCheckout>`. */
|
|
449
|
+
analytics?: Instrument;
|
|
417
450
|
}): Promise<Err | undefined>;
|
|
418
451
|
function showCart(): void;
|
|
419
452
|
function hideCart(): void;
|
|
@@ -431,15 +464,22 @@ declare function createCheckout(request: LinkRequest & {
|
|
|
431
464
|
declare function getReferenceIfPossible(): string | undefined;
|
|
432
465
|
declare function injectReferenceToRequestIfNeeded(request: LinkRequest): LinkRequest;
|
|
433
466
|
|
|
434
|
-
declare const PanelLogin: (
|
|
467
|
+
declare const PanelLogin: ({ analytics, }?: {
|
|
468
|
+
analytics?: AnalyticsOption;
|
|
469
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
435
470
|
|
|
436
|
-
declare const PanelPage: ({ returnsAppearance, returnsTexts, }?: Pick<PanelProps, "returnsAppearance" | "returnsTexts">) => react_jsx_runtime.JSX.Element;
|
|
471
|
+
declare const PanelPage: ({ returnsAppearance, returnsTexts, analytics, }?: Pick<PanelProps, "returnsAppearance" | "returnsTexts" | "analytics">) => react_jsx_runtime.JSX.Element;
|
|
437
472
|
|
|
438
473
|
interface Props {
|
|
439
474
|
orderID: string;
|
|
440
475
|
initialEmail?: string;
|
|
441
476
|
accessToken?: string;
|
|
442
477
|
onBack?: () => void;
|
|
478
|
+
/**
|
|
479
|
+
* Usage statistics for your Bitsnap dashboard (order viewed). Inside
|
|
480
|
+
* `<Panel>` or `<PanelProvider>` their setting applies unless this is given.
|
|
481
|
+
*/
|
|
482
|
+
analytics?: AnalyticsOption;
|
|
443
483
|
}
|
|
444
484
|
declare function PublicOrderPage(props: Props): react_jsx_runtime.JSX.Element;
|
|
445
485
|
|
|
@@ -461,6 +501,13 @@ declare function getAllowedReturnOrigins(): string[];
|
|
|
461
501
|
|
|
462
502
|
declare const PanelProvider: React.FC<{
|
|
463
503
|
children: React.ReactNode;
|
|
504
|
+
/**
|
|
505
|
+
* Usage statistics for your Bitsnap dashboard (panel logins, orders viewed,
|
|
506
|
+
* downloads, course progress). On by default; `false` turns it off. An
|
|
507
|
+
* object lets you forward every event: `{ onEvent }`. Nothing is stored on
|
|
508
|
+
* the visitor's device.
|
|
509
|
+
*/
|
|
510
|
+
analytics?: AnalyticsOption;
|
|
464
511
|
}>;
|
|
465
512
|
declare const usePanelConfig: () => PanelConfig;
|
|
466
513
|
|
|
@@ -469,4 +516,4 @@ declare function persistReturnURL(returnURL: string | null): void;
|
|
|
469
516
|
declare function readPersistedReturnURL(): string | null;
|
|
470
517
|
declare function buildAccessTokenRedirect(returnURL: string, accessToken: string): string;
|
|
471
518
|
|
|
472
|
-
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, 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, PanelProps, PanelProvider, 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 };
|
|
519
|
+
export { AnalyticsOption, 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, 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, PanelProps, PanelProvider, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { A as AnalyticsOption, l as Instrument } from './instrument-CmxK7S4T.js';
|
|
2
3
|
import { S as SlotAppearance, A as AppearanceElements } from './appearance-core-Dt2grZdl.js';
|
|
3
4
|
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
5
|
export { BitsnapReturns, BitsnapReturnsProps, BitsnapReturnsProvider, BitsnapReturnsProviderProps, CreateReturnInput, Environment, LegacyCreateReturnInput, LegacyReturnsTexts, LegacyReturnsTheme, ReturnsAppearanceProvider, ReturnsChallenge, ReturnsCodeStep, ReturnsCodeStepProps, ReturnsConfirmation, ReturnsConfirmationProps, ReturnsEmailStep, ReturnsEmailStepProps, ReturnsEnvironment, ReturnsEnvironmentInput, ReturnsMyReturnDetail, ReturnsMyReturnDetailProps, ReturnsMyReturnsList, ReturnsMyReturnsListProps, ReturnsOrderDetail, ReturnsOrderDetailProps, ReturnsOrderList, ReturnsOrderListProps, ReturnsProvider, ReturnsProviderProps, ReturnsResult, ReturnsResultProps, ReturnsSessionStatus, ReturnsTextsInput, SelectedReturnLine, UseCreateReturnResult, UseMyReturnResult, UseMyReturnsResult, UseReturnOrdersResult, UseReturnSessionResult, UseReturnableOrderResult, useCreateReturn, useMyReturn, useMyReturns, useReturnOrders, useReturnSession, useReturnableOrder, useReturnsAppearance, useReturnsSlot, useReturnsText } from './returns.js';
|
|
5
6
|
export { b as RETURNS_SLOT_NAMES, R as ReturnsAppearance, c as ReturnsAppearanceElements, d as ReturnsAppearanceTokens, e as ReturnsSlotAppearance, f as ReturnsSlotName, h as ReturnsTextKey, a as ReturnsTexts, g as ReturnsTheme } from './texts-CIEFbJTN.js';
|
|
6
7
|
import { ReactNode } from 'react';
|
|
7
8
|
import z__default from 'zod';
|
|
8
|
-
import { P as PanelProps, G as GetThemeOutput } from './types-
|
|
9
|
-
export { a as PanelLoginProps, b as PanelScreen, c as PanelSearchParamsType } from './types-
|
|
9
|
+
import { P as PanelProps, G as GetThemeOutput } from './types-i-IuN4Im.js';
|
|
10
|
+
export { a as PanelLoginProps, b as PanelScreen, c as PanelSearchParamsType } from './types-i-IuN4Im.js';
|
|
10
11
|
import './models.js';
|
|
11
12
|
import '@bufbuild/protobuf/wkt';
|
|
12
13
|
import '@bufbuild/protobuf';
|
|
@@ -34,6 +35,12 @@ type Props$3 = {
|
|
|
34
35
|
};
|
|
35
36
|
}[];
|
|
36
37
|
onClick?: () => Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Usage statistics for your Bitsnap dashboard (Apple Pay clicks and
|
|
40
|
+
* results). On by default; `false` turns it off. Inside `<BitsnapCheckout>`
|
|
41
|
+
* the checkout's setting applies unless this is given.
|
|
42
|
+
*/
|
|
43
|
+
analytics?: AnalyticsOption;
|
|
37
44
|
};
|
|
38
45
|
declare function Wrapper$2(props: Props$3): react_jsx_runtime.JSX.Element;
|
|
39
46
|
|
|
@@ -146,8 +153,15 @@ type BitsnapCartProps = {
|
|
|
146
153
|
* whatever the locale; omitted keys keep the `pl`/`en` defaults.
|
|
147
154
|
*/
|
|
148
155
|
texts?: Partial<CheckoutTexts>;
|
|
156
|
+
/**
|
|
157
|
+
* Usage statistics for your Bitsnap dashboard (cart opened, checkout
|
|
158
|
+
* started, add to cart). On by default; `false` turns it off. An object
|
|
159
|
+
* lets you forward every event: `{ onEvent }`. Nothing is stored on the
|
|
160
|
+
* visitor's device.
|
|
161
|
+
*/
|
|
162
|
+
analytics?: AnalyticsOption;
|
|
149
163
|
};
|
|
150
|
-
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, texts, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
164
|
+
declare function BitsnapCart({ projectID, locale, children, onVisibleChange, className, numberOfProductsInCartOptions, appearance, texts, analytics, }: BitsnapCartProps): react_jsx_runtime.JSX.Element;
|
|
151
165
|
|
|
152
166
|
type Props$2 = {
|
|
153
167
|
test?: boolean;
|
|
@@ -166,6 +180,12 @@ type Props$2 = {
|
|
|
166
180
|
[key: string]: string | undefined;
|
|
167
181
|
};
|
|
168
182
|
}[];
|
|
183
|
+
/**
|
|
184
|
+
* Usage statistics for your Bitsnap dashboard. On by default; `false` turns
|
|
185
|
+
* it off. Inside `<BitsnapCheckout>` the checkout's setting applies unless
|
|
186
|
+
* this is given.
|
|
187
|
+
*/
|
|
188
|
+
analytics?: AnalyticsOption;
|
|
169
189
|
};
|
|
170
190
|
declare function Wrapper$1(props: Props$2): react_jsx_runtime.JSX.Element;
|
|
171
191
|
|
|
@@ -299,10 +319,21 @@ interface NotificationsComponentPublicProps {
|
|
|
299
319
|
* Custom CSS class names for various component sections (for easier styling).
|
|
300
320
|
*/
|
|
301
321
|
className?: ComponentClassNames;
|
|
322
|
+
/**
|
|
323
|
+
* Public project ID used for usage statistics. Defaults to the one set by
|
|
324
|
+
* `<BitsnapCheckout projectID>`.
|
|
325
|
+
*/
|
|
326
|
+
projectID?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Usage statistics for your Bitsnap dashboard (sign-ups). On by default;
|
|
329
|
+
* `false` turns it off. An object lets you forward every event:
|
|
330
|
+
* `{ onEvent }`. Nothing is stored on the visitor's device.
|
|
331
|
+
*/
|
|
332
|
+
analytics?: AnalyticsOption;
|
|
302
333
|
}
|
|
303
334
|
|
|
304
335
|
type Props$1 = NotificationsComponentPublicProps;
|
|
305
|
-
declare function Wrapper({ slug, userID, productID, projectName, projectLogo, projectLogoDark, groups, isManaging, texts, showQRCode, showPhoneInput, hiddenGroupIds, className, }: Props$1): react_jsx_runtime.JSX.Element;
|
|
336
|
+
declare function Wrapper({ slug, userID, productID, projectID, analytics, projectName, projectLogo, projectLogoDark, groups, isManaging, texts, showQRCode, showPhoneInput, hiddenGroupIds, className, }: Props$1): react_jsx_runtime.JSX.Element;
|
|
306
337
|
|
|
307
338
|
type ErrTypes = "internal" | "badInput" | "notFound";
|
|
308
339
|
type Err = {
|
|
@@ -414,6 +445,8 @@ declare namespace Bitsnap {
|
|
|
414
445
|
name?: string;
|
|
415
446
|
price?: number;
|
|
416
447
|
currency?: string;
|
|
448
|
+
/** Where `add_to_cart` is reported. Defaults to the mounted `<BitsnapCheckout>`. */
|
|
449
|
+
analytics?: Instrument;
|
|
417
450
|
}): Promise<Err | undefined>;
|
|
418
451
|
function showCart(): void;
|
|
419
452
|
function hideCart(): void;
|
|
@@ -431,15 +464,22 @@ declare function createCheckout(request: LinkRequest & {
|
|
|
431
464
|
declare function getReferenceIfPossible(): string | undefined;
|
|
432
465
|
declare function injectReferenceToRequestIfNeeded(request: LinkRequest): LinkRequest;
|
|
433
466
|
|
|
434
|
-
declare const PanelLogin: (
|
|
467
|
+
declare const PanelLogin: ({ analytics, }?: {
|
|
468
|
+
analytics?: AnalyticsOption;
|
|
469
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
435
470
|
|
|
436
|
-
declare const PanelPage: ({ returnsAppearance, returnsTexts, }?: Pick<PanelProps, "returnsAppearance" | "returnsTexts">) => react_jsx_runtime.JSX.Element;
|
|
471
|
+
declare const PanelPage: ({ returnsAppearance, returnsTexts, analytics, }?: Pick<PanelProps, "returnsAppearance" | "returnsTexts" | "analytics">) => react_jsx_runtime.JSX.Element;
|
|
437
472
|
|
|
438
473
|
interface Props {
|
|
439
474
|
orderID: string;
|
|
440
475
|
initialEmail?: string;
|
|
441
476
|
accessToken?: string;
|
|
442
477
|
onBack?: () => void;
|
|
478
|
+
/**
|
|
479
|
+
* Usage statistics for your Bitsnap dashboard (order viewed). Inside
|
|
480
|
+
* `<Panel>` or `<PanelProvider>` their setting applies unless this is given.
|
|
481
|
+
*/
|
|
482
|
+
analytics?: AnalyticsOption;
|
|
443
483
|
}
|
|
444
484
|
declare function PublicOrderPage(props: Props): react_jsx_runtime.JSX.Element;
|
|
445
485
|
|
|
@@ -461,6 +501,13 @@ declare function getAllowedReturnOrigins(): string[];
|
|
|
461
501
|
|
|
462
502
|
declare const PanelProvider: React.FC<{
|
|
463
503
|
children: React.ReactNode;
|
|
504
|
+
/**
|
|
505
|
+
* Usage statistics for your Bitsnap dashboard (panel logins, orders viewed,
|
|
506
|
+
* downloads, course progress). On by default; `false` turns it off. An
|
|
507
|
+
* object lets you forward every event: `{ onEvent }`. Nothing is stored on
|
|
508
|
+
* the visitor's device.
|
|
509
|
+
*/
|
|
510
|
+
analytics?: AnalyticsOption;
|
|
464
511
|
}>;
|
|
465
512
|
declare const usePanelConfig: () => PanelConfig;
|
|
466
513
|
|
|
@@ -469,4 +516,4 @@ declare function persistReturnURL(returnURL: string | null): void;
|
|
|
469
516
|
declare function readPersistedReturnURL(): string | null;
|
|
470
517
|
declare function buildAccessTokenRedirect(returnURL: string, accessToken: string): string;
|
|
471
518
|
|
|
472
|
-
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, 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, PanelProps, PanelProvider, 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 };
|
|
519
|
+
export { AnalyticsOption, 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, 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, PanelProps, PanelProvider, 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 };
|