@whop/elements-react-native 0.1.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 +179 -0
- package/android/build.gradle +64 -0
- package/android/consumer-rules.pro +3 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/java/com/whop/elements/WhopAddressSuggestionsModule.kt +102 -0
- package/android/src/main/java/com/whop/elements/WhopAuthSessionModule.kt +126 -0
- package/android/src/main/java/com/whop/elements/WhopElementsPackage.kt +39 -0
- package/android/src/main/java/com/whop/elements/WhopPayButtonManager.kt +74 -0
- package/android/src/main/java/com/whop/elements/WhopPayButtonPressEvent.kt +17 -0
- package/android/src/main/java/com/whop/elements/WhopPayButtonView.kt +178 -0
- package/android/src/main/java/com/whop/elements/WhopPlatformPayModule.kt +212 -0
- package/assets/whop-wordmark-dark.png +0 -0
- package/assets/whop-wordmark-dark@2x.png +0 -0
- package/assets/whop-wordmark-dark@3x.png +0 -0
- package/assets/whop-wordmark-light.png +0 -0
- package/assets/whop-wordmark-light@2x.png +0 -0
- package/assets/whop-wordmark-light@3x.png +0 -0
- package/ios/Package.swift +59 -0
- package/ios/Sources/ElementsReactNative/WhopAddressSuggestionsImpl.swift +189 -0
- package/ios/Sources/ElementsReactNative/WhopAuthSessionImpl.swift +106 -0
- package/ios/Sources/ElementsReactNative/WhopPayButtonImpl.swift +89 -0
- package/ios/Sources/ElementsReactNative/WhopPlatformPayImpl.swift +181 -0
- package/ios/generated/WhopAddressSuggestionsModule.h +11 -0
- package/ios/generated/WhopAddressSuggestionsModule.mm +46 -0
- package/ios/generated/WhopAuthSessionModule.h +11 -0
- package/ios/generated/WhopAuthSessionModule.mm +45 -0
- package/ios/generated/WhopElementsShims.h +35 -0
- package/ios/generated/WhopPayButtonComponentView.h +12 -0
- package/ios/generated/WhopPayButtonComponentView.mm +82 -0
- package/ios/generated/WhopPlatformPayModule.h +11 -0
- package/ios/generated/WhopPlatformPayModule.mm +51 -0
- package/lib/module/api/client.js +139 -0
- package/lib/module/api/client.js.map +1 -0
- package/lib/module/api/client.test.js +137 -0
- package/lib/module/api/client.test.js.map +1 -0
- package/lib/module/api/types.js +2 -0
- package/lib/module/api/types.js.map +1 -0
- package/lib/module/controller/actions.js +148 -0
- package/lib/module/controller/actions.js.map +1 -0
- package/lib/module/controller/actions.test.js +102 -0
- package/lib/module/controller/actions.test.js.map +1 -0
- package/lib/module/controller/store.js +158 -0
- package/lib/module/controller/store.js.map +1 -0
- package/lib/module/core/address/country-data.js +1370 -0
- package/lib/module/core/address/country-data.js.map +1 -0
- package/lib/module/core/address/country-name.js +38 -0
- package/lib/module/core/address/country-name.js.map +1 -0
- package/lib/module/core/address/country-names.generated.js +249 -0
- package/lib/module/core/address/country-names.generated.js.map +1 -0
- package/lib/module/core/address/engine.js +245 -0
- package/lib/module/core/address/engine.js.map +1 -0
- package/lib/module/core/address/engine.test.js +216 -0
- package/lib/module/core/address/engine.test.js.map +1 -0
- package/lib/module/core/address/form-state.js +409 -0
- package/lib/module/core/address/form-state.js.map +1 -0
- package/lib/module/core/address/form-state.test.js +516 -0
- package/lib/module/core/address/form-state.test.js.map +1 -0
- package/lib/module/core/address/places.js +36 -0
- package/lib/module/core/address/places.js.map +1 -0
- package/lib/module/core/address/required-coverage.test.js +57 -0
- package/lib/module/core/address/required-coverage.test.js.map +1 -0
- package/lib/module/core/address/suggest.js +102 -0
- package/lib/module/core/address/suggest.js.map +1 -0
- package/lib/module/core/address/suggest.test.js +156 -0
- package/lib/module/core/address/suggest.test.js.map +1 -0
- package/lib/module/core/address/use-suggestions.js +33 -0
- package/lib/module/core/address/use-suggestions.js.map +1 -0
- package/lib/module/core/payments/address-change.js +91 -0
- package/lib/module/core/payments/address-change.js.map +1 -0
- package/lib/module/core/payments/billing-merge.js +62 -0
- package/lib/module/core/payments/billing-merge.js.map +1 -0
- package/lib/module/core/payments/browser-info.js +42 -0
- package/lib/module/core/payments/browser-info.js.map +1 -0
- package/lib/module/core/payments/bt.js +151 -0
- package/lib/module/core/payments/bt.js.map +1 -0
- package/lib/module/core/payments/bt.test.js +23 -0
- package/lib/module/core/payments/bt.test.js.map +1 -0
- package/lib/module/core/payments/currency.js +37 -0
- package/lib/module/core/payments/currency.js.map +1 -0
- package/lib/module/core/payments/detail.js +159 -0
- package/lib/module/core/payments/detail.js.map +1 -0
- package/lib/module/core/payments/detail.test.js +225 -0
- package/lib/module/core/payments/detail.test.js.map +1 -0
- package/lib/module/core/payments/errors.js +115 -0
- package/lib/module/core/payments/errors.js.map +1 -0
- package/lib/module/core/payments/mint.js +89 -0
- package/lib/module/core/payments/mint.js.map +1 -0
- package/lib/module/core/payments/plan.js +131 -0
- package/lib/module/core/payments/plan.js.map +1 -0
- package/lib/module/core/payments/refusals.js +17 -0
- package/lib/module/core/payments/refusals.js.map +1 -0
- package/lib/module/core/payments/secure-fields.js +87 -0
- package/lib/module/core/payments/secure-fields.js.map +1 -0
- package/lib/module/core/payments/tax-id-catalog.js +616 -0
- package/lib/module/core/payments/tax-id-catalog.js.map +1 -0
- package/lib/module/core/payments/wallet-contact.js +42 -0
- package/lib/module/core/payments/wallet-contact.js.map +1 -0
- package/lib/module/core/payments/wallet-contact.test.js +77 -0
- package/lib/module/core/payments/wallet-contact.test.js.map +1 -0
- package/lib/module/elements/address.js +467 -0
- package/lib/module/elements/address.js.map +1 -0
- package/lib/module/elements/branding.js +114 -0
- package/lib/module/elements/branding.js.map +1 -0
- package/lib/module/elements/card-fields/context.js +254 -0
- package/lib/module/elements/card-fields/context.js.map +1 -0
- package/lib/module/elements/card-fields/fields.js +309 -0
- package/lib/module/elements/card-fields/fields.js.map +1 -0
- package/lib/module/elements/card-fields/index.js +30 -0
- package/lib/module/elements/card-fields/index.js.map +1 -0
- package/lib/module/elements/card.js +107 -0
- package/lib/module/elements/card.js.map +1 -0
- package/lib/module/elements/email.js +84 -0
- package/lib/module/elements/email.js.map +1 -0
- package/lib/module/elements/payment/declared-fields.js +186 -0
- package/lib/module/elements/payment/declared-fields.js.map +1 -0
- package/lib/module/elements/payment/index.js +448 -0
- package/lib/module/elements/payment/index.js.map +1 -0
- package/lib/module/elements/payment/wallet.js +132 -0
- package/lib/module/elements/payment/wallet.js.map +1 -0
- package/lib/module/elements/tax-id.js +100 -0
- package/lib/module/elements/tax-id.js.map +1 -0
- package/lib/module/i18n/catalogs.js +103 -0
- package/lib/module/i18n/catalogs.js.map +1 -0
- package/lib/module/i18n/index.js +45 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/index.js +27 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/namespace.js +174 -0
- package/lib/module/namespace.js.map +1 -0
- package/lib/module/native/index.js +128 -0
- package/lib/module/native/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/provider.js +56 -0
- package/lib/module/provider.js.map +1 -0
- package/lib/module/specs/NativeWhopAddressSuggestions.js +6 -0
- package/lib/module/specs/NativeWhopAddressSuggestions.js.map +1 -0
- package/lib/module/specs/NativeWhopAuthSession.js +10 -0
- package/lib/module/specs/NativeWhopAuthSession.js.map +1 -0
- package/lib/module/specs/NativeWhopPlatformPay.js +10 -0
- package/lib/module/specs/NativeWhopPlatformPay.js.map +1 -0
- package/lib/module/specs/WhopPayButtonNativeComponent.ts +22 -0
- package/lib/module/theme/appearance.js +85 -0
- package/lib/module/theme/appearance.js.map +1 -0
- package/lib/module/theme/appearance.test.js +124 -0
- package/lib/module/theme/appearance.test.js.map +1 -0
- package/lib/module/theme/provider.js +25 -0
- package/lib/module/theme/provider.js.map +1 -0
- package/lib/module/theme/resolve.js +69 -0
- package/lib/module/theme/resolve.js.map +1 -0
- package/lib/module/theme/scales.generated.js +419 -0
- package/lib/module/theme/scales.generated.js.map +1 -0
- package/lib/module/ui/element-frame.js +83 -0
- package/lib/module/ui/element-frame.js.map +1 -0
- package/lib/module/ui/payment-method-icon.js +69 -0
- package/lib/module/ui/payment-method-icon.js.map +1 -0
- package/lib/module/ui/primitives.js +266 -0
- package/lib/module/ui/primitives.js.map +1 -0
- package/lib/module/ui/select.js +281 -0
- package/lib/module/ui/select.js.map +1 -0
- package/lib/module/ui/suggestions.js +71 -0
- package/lib/module/ui/suggestions.js.map +1 -0
- package/lib/module/ui/whop-logo.js +42 -0
- package/lib/module/ui/whop-logo.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/api/client.d.ts +87 -0
- package/lib/typescript/src/api/client.d.ts.map +1 -0
- package/lib/typescript/src/api/types.d.ts +175 -0
- package/lib/typescript/src/api/types.d.ts.map +1 -0
- package/lib/typescript/src/controller/actions.d.ts +42 -0
- package/lib/typescript/src/controller/actions.d.ts.map +1 -0
- package/lib/typescript/src/controller/store.d.ts +90 -0
- package/lib/typescript/src/controller/store.d.ts.map +1 -0
- package/lib/typescript/src/core/address/country-data.d.ts +4 -0
- package/lib/typescript/src/core/address/country-data.d.ts.map +1 -0
- package/lib/typescript/src/core/address/country-name.d.ts +2 -0
- package/lib/typescript/src/core/address/country-name.d.ts.map +1 -0
- package/lib/typescript/src/core/address/country-names.generated.d.ts +2 -0
- package/lib/typescript/src/core/address/country-names.generated.d.ts.map +1 -0
- package/lib/typescript/src/core/address/engine.d.ts +97 -0
- package/lib/typescript/src/core/address/engine.d.ts.map +1 -0
- package/lib/typescript/src/core/address/form-state.d.ts +144 -0
- package/lib/typescript/src/core/address/form-state.d.ts.map +1 -0
- package/lib/typescript/src/core/address/places.d.ts +23 -0
- package/lib/typescript/src/core/address/places.d.ts.map +1 -0
- package/lib/typescript/src/core/address/suggest.d.ts +47 -0
- package/lib/typescript/src/core/address/suggest.d.ts.map +1 -0
- package/lib/typescript/src/core/address/use-suggestions.d.ts +3 -0
- package/lib/typescript/src/core/address/use-suggestions.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/address-change.d.ts +52 -0
- package/lib/typescript/src/core/payments/address-change.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/billing-merge.d.ts +39 -0
- package/lib/typescript/src/core/payments/billing-merge.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/browser-info.d.ts +12 -0
- package/lib/typescript/src/core/payments/browser-info.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/bt.d.ts +55 -0
- package/lib/typescript/src/core/payments/bt.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/currency.d.ts +7 -0
- package/lib/typescript/src/core/payments/currency.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/detail.d.ts +53 -0
- package/lib/typescript/src/core/payments/detail.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/errors.d.ts +62 -0
- package/lib/typescript/src/core/payments/errors.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/mint.d.ts +74 -0
- package/lib/typescript/src/core/payments/mint.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/plan.d.ts +69 -0
- package/lib/typescript/src/core/payments/plan.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/refusals.d.ts +12 -0
- package/lib/typescript/src/core/payments/refusals.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/secure-fields.d.ts +33 -0
- package/lib/typescript/src/core/payments/secure-fields.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/tax-id-catalog.d.ts +481 -0
- package/lib/typescript/src/core/payments/tax-id-catalog.d.ts.map +1 -0
- package/lib/typescript/src/core/payments/wallet-contact.d.ts +40 -0
- package/lib/typescript/src/core/payments/wallet-contact.d.ts.map +1 -0
- package/lib/typescript/src/elements/address.d.ts +55 -0
- package/lib/typescript/src/elements/address.d.ts.map +1 -0
- package/lib/typescript/src/elements/branding.d.ts +18 -0
- package/lib/typescript/src/elements/branding.d.ts.map +1 -0
- package/lib/typescript/src/elements/card-fields/context.d.ts +67 -0
- package/lib/typescript/src/elements/card-fields/context.d.ts.map +1 -0
- package/lib/typescript/src/elements/card-fields/fields.d.ts +15 -0
- package/lib/typescript/src/elements/card-fields/fields.d.ts.map +1 -0
- package/lib/typescript/src/elements/card-fields/index.d.ts +21 -0
- package/lib/typescript/src/elements/card-fields/index.d.ts.map +1 -0
- package/lib/typescript/src/elements/card.d.ts +21 -0
- package/lib/typescript/src/elements/card.d.ts.map +1 -0
- package/lib/typescript/src/elements/email.d.ts +31 -0
- package/lib/typescript/src/elements/email.d.ts.map +1 -0
- package/lib/typescript/src/elements/payment/declared-fields.d.ts +43 -0
- package/lib/typescript/src/elements/payment/declared-fields.d.ts.map +1 -0
- package/lib/typescript/src/elements/payment/index.d.ts +37 -0
- package/lib/typescript/src/elements/payment/index.d.ts.map +1 -0
- package/lib/typescript/src/elements/payment/wallet.d.ts +39 -0
- package/lib/typescript/src/elements/payment/wallet.d.ts.map +1 -0
- package/lib/typescript/src/elements/tax-id.d.ts +41 -0
- package/lib/typescript/src/elements/tax-id.d.ts.map +1 -0
- package/lib/typescript/src/i18n/catalogs.d.ts +7 -0
- package/lib/typescript/src/i18n/catalogs.d.ts.map +1 -0
- package/lib/typescript/src/i18n/index.d.ts +17 -0
- package/lib/typescript/src/i18n/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +42 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/namespace.d.ts +36 -0
- package/lib/typescript/src/namespace.d.ts.map +1 -0
- package/lib/typescript/src/native/index.d.ts +62 -0
- package/lib/typescript/src/native/index.d.ts.map +1 -0
- package/lib/typescript/src/provider.d.ts +37 -0
- package/lib/typescript/src/provider.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeWhopAddressSuggestions.d.ts +13 -0
- package/lib/typescript/src/specs/NativeWhopAddressSuggestions.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeWhopAuthSession.d.ts +20 -0
- package/lib/typescript/src/specs/NativeWhopAuthSession.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeWhopPlatformPay.d.ts +24 -0
- package/lib/typescript/src/specs/NativeWhopPlatformPay.d.ts.map +1 -0
- package/lib/typescript/src/specs/WhopPayButtonNativeComponent.d.ts +21 -0
- package/lib/typescript/src/specs/WhopPayButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/theme/appearance.d.ts +71 -0
- package/lib/typescript/src/theme/appearance.d.ts.map +1 -0
- package/lib/typescript/src/theme/provider.d.ts +11 -0
- package/lib/typescript/src/theme/provider.d.ts.map +1 -0
- package/lib/typescript/src/theme/resolve.d.ts +19 -0
- package/lib/typescript/src/theme/resolve.d.ts.map +1 -0
- package/lib/typescript/src/theme/scales.generated.d.ts +18 -0
- package/lib/typescript/src/theme/scales.generated.d.ts.map +1 -0
- package/lib/typescript/src/ui/element-frame.d.ts +32 -0
- package/lib/typescript/src/ui/element-frame.d.ts.map +1 -0
- package/lib/typescript/src/ui/payment-method-icon.d.ts +21 -0
- package/lib/typescript/src/ui/payment-method-icon.d.ts.map +1 -0
- package/lib/typescript/src/ui/primitives.d.ts +94 -0
- package/lib/typescript/src/ui/primitives.d.ts.map +1 -0
- package/lib/typescript/src/ui/select.d.ts +25 -0
- package/lib/typescript/src/ui/select.d.ts.map +1 -0
- package/lib/typescript/src/ui/suggestions.d.ts +15 -0
- package/lib/typescript/src/ui/suggestions.d.ts.map +1 -0
- package/lib/typescript/src/ui/whop-logo.d.ts +4 -0
- package/lib/typescript/src/ui/whop-logo.d.ts.map +1 -0
- package/package.json +121 -0
- package/scripts/check-swift.sh +27 -0
- package/scripts/codegen-shims.mjs +409 -0
- package/scripts/gen-country-names.mjs +58 -0
- package/scripts/gen-theme.mjs +124 -0
- package/scripts/gen-wordmark.mjs +68 -0
- package/scripts/mirror.mjs +112 -0
- package/src/api/client.ts +202 -0
- package/src/api/types.ts +166 -0
- package/src/controller/actions.ts +197 -0
- package/src/controller/store.ts +201 -0
- package/src/core/address/country-data.ts +927 -0
- package/src/core/address/country-name.ts +36 -0
- package/src/core/address/country-names.generated.ts +246 -0
- package/src/core/address/engine.ts +349 -0
- package/src/core/address/form-state.ts +479 -0
- package/src/core/address/places.ts +39 -0
- package/src/core/address/suggest.ts +153 -0
- package/src/core/address/use-suggestions.ts +37 -0
- package/src/core/payments/address-change.ts +121 -0
- package/src/core/payments/billing-merge.ts +91 -0
- package/src/core/payments/browser-info.ts +43 -0
- package/src/core/payments/bt.ts +176 -0
- package/src/core/payments/currency.ts +54 -0
- package/src/core/payments/detail.ts +204 -0
- package/src/core/payments/errors.ts +171 -0
- package/src/core/payments/mint.ts +130 -0
- package/src/core/payments/plan.ts +198 -0
- package/src/core/payments/refusals.ts +24 -0
- package/src/core/payments/secure-fields.ts +85 -0
- package/src/core/payments/tax-id-catalog.ts +320 -0
- package/src/core/payments/wallet-contact.ts +56 -0
- package/src/elements/address.tsx +570 -0
- package/src/elements/branding.tsx +87 -0
- package/src/elements/card-fields/context.tsx +310 -0
- package/src/elements/card-fields/fields.tsx +281 -0
- package/src/elements/card-fields/index.tsx +37 -0
- package/src/elements/card.tsx +101 -0
- package/src/elements/email.tsx +100 -0
- package/src/elements/payment/declared-fields.tsx +238 -0
- package/src/elements/payment/index.tsx +497 -0
- package/src/elements/payment/wallet.tsx +155 -0
- package/src/elements/tax-id.tsx +143 -0
- package/src/i18n/catalogs.ts +100 -0
- package/src/i18n/index.tsx +46 -0
- package/src/index.ts +68 -0
- package/src/namespace.tsx +231 -0
- package/src/native/index.ts +173 -0
- package/src/provider.tsx +76 -0
- package/src/specs/NativeWhopAddressSuggestions.ts +14 -0
- package/src/specs/NativeWhopAuthSession.ts +21 -0
- package/src/specs/NativeWhopPlatformPay.ts +25 -0
- package/src/specs/WhopPayButtonNativeComponent.ts +22 -0
- package/src/theme/appearance.ts +150 -0
- package/src/theme/provider.tsx +28 -0
- package/src/theme/resolve.ts +68 -0
- package/src/theme/scales.generated.ts +427 -0
- package/src/ui/element-frame.tsx +94 -0
- package/src/ui/payment-method-icon.tsx +55 -0
- package/src/ui/primitives.tsx +269 -0
- package/src/ui/select.tsx +255 -0
- package/src/ui/suggestions.tsx +69 -0
- package/src/ui/whop-logo.tsx +37 -0
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The registration types the API accepts for `tax_id.type`. The backend owns the set
|
|
3
|
+
* (`TaxIdentifier::TAX_ID_TYPES`); this package has no generated enum to derive it from, so the
|
|
4
|
+
* catalog below IS the set. `useTaxIdTypeLabels` keeps the half of the exhaustiveness gate that
|
|
5
|
+
* still applies: a catalog row with no label refuses to compile.
|
|
6
|
+
*/
|
|
7
|
+
export type TaxIdType = keyof typeof TAX_ID_TYPE_META;
|
|
8
|
+
/** Display metadata per wire type. */
|
|
9
|
+
export declare const TAX_ID_TYPE_META: {
|
|
10
|
+
ad_nrt: {
|
|
11
|
+
region: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
};
|
|
14
|
+
ae_trn: {
|
|
15
|
+
region: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
};
|
|
18
|
+
al_tin: {
|
|
19
|
+
region: string;
|
|
20
|
+
placeholder: string;
|
|
21
|
+
};
|
|
22
|
+
am_tin: {
|
|
23
|
+
region: string;
|
|
24
|
+
placeholder: string;
|
|
25
|
+
};
|
|
26
|
+
ao_tin: {
|
|
27
|
+
region: string;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
};
|
|
30
|
+
ar_cuit: {
|
|
31
|
+
region: string;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
};
|
|
34
|
+
au_abn: {
|
|
35
|
+
region: string;
|
|
36
|
+
placeholder: string;
|
|
37
|
+
};
|
|
38
|
+
au_arn: {
|
|
39
|
+
region: string;
|
|
40
|
+
placeholder: string;
|
|
41
|
+
};
|
|
42
|
+
aw_tin: {
|
|
43
|
+
region: string;
|
|
44
|
+
placeholder: string;
|
|
45
|
+
};
|
|
46
|
+
az_tin: {
|
|
47
|
+
region: string;
|
|
48
|
+
placeholder: string;
|
|
49
|
+
};
|
|
50
|
+
ba_tin: {
|
|
51
|
+
region: string;
|
|
52
|
+
placeholder: string;
|
|
53
|
+
};
|
|
54
|
+
bb_tin: {
|
|
55
|
+
region: string;
|
|
56
|
+
placeholder: string;
|
|
57
|
+
};
|
|
58
|
+
bd_bin: {
|
|
59
|
+
region: string;
|
|
60
|
+
placeholder: string;
|
|
61
|
+
};
|
|
62
|
+
bf_ifu: {
|
|
63
|
+
region: string;
|
|
64
|
+
placeholder: string;
|
|
65
|
+
};
|
|
66
|
+
bg_uic: {
|
|
67
|
+
region: string;
|
|
68
|
+
placeholder: string;
|
|
69
|
+
};
|
|
70
|
+
bh_vat: {
|
|
71
|
+
region: string;
|
|
72
|
+
placeholder: string;
|
|
73
|
+
};
|
|
74
|
+
bj_ifu: {
|
|
75
|
+
region: string;
|
|
76
|
+
placeholder: string;
|
|
77
|
+
};
|
|
78
|
+
bo_tin: {
|
|
79
|
+
region: string;
|
|
80
|
+
placeholder: string;
|
|
81
|
+
};
|
|
82
|
+
br_cnpj: {
|
|
83
|
+
region: string;
|
|
84
|
+
placeholder: string;
|
|
85
|
+
};
|
|
86
|
+
br_cpf: {
|
|
87
|
+
region: string;
|
|
88
|
+
placeholder: string;
|
|
89
|
+
};
|
|
90
|
+
bs_tin: {
|
|
91
|
+
region: string;
|
|
92
|
+
placeholder: string;
|
|
93
|
+
};
|
|
94
|
+
by_tin: {
|
|
95
|
+
region: string;
|
|
96
|
+
placeholder: string;
|
|
97
|
+
};
|
|
98
|
+
ca_bn: {
|
|
99
|
+
region: string;
|
|
100
|
+
placeholder: string;
|
|
101
|
+
};
|
|
102
|
+
ca_gst_hst: {
|
|
103
|
+
region: string;
|
|
104
|
+
placeholder: string;
|
|
105
|
+
};
|
|
106
|
+
ca_pst_bc: {
|
|
107
|
+
region: string;
|
|
108
|
+
placeholder: string;
|
|
109
|
+
};
|
|
110
|
+
ca_pst_mb: {
|
|
111
|
+
region: string;
|
|
112
|
+
placeholder: string;
|
|
113
|
+
};
|
|
114
|
+
ca_pst_sk: {
|
|
115
|
+
region: string;
|
|
116
|
+
placeholder: string;
|
|
117
|
+
};
|
|
118
|
+
ca_qst: {
|
|
119
|
+
region: string;
|
|
120
|
+
placeholder: string;
|
|
121
|
+
};
|
|
122
|
+
cd_nif: {
|
|
123
|
+
region: string;
|
|
124
|
+
placeholder: string;
|
|
125
|
+
};
|
|
126
|
+
ch_uid: {
|
|
127
|
+
region: string;
|
|
128
|
+
placeholder: string;
|
|
129
|
+
};
|
|
130
|
+
ch_vat: {
|
|
131
|
+
region: string;
|
|
132
|
+
placeholder: string;
|
|
133
|
+
};
|
|
134
|
+
cl_tin: {
|
|
135
|
+
region: string;
|
|
136
|
+
placeholder: string;
|
|
137
|
+
};
|
|
138
|
+
cm_niu: {
|
|
139
|
+
region: string;
|
|
140
|
+
placeholder: string;
|
|
141
|
+
};
|
|
142
|
+
cn_tin: {
|
|
143
|
+
region: string;
|
|
144
|
+
placeholder: string;
|
|
145
|
+
};
|
|
146
|
+
co_nit: {
|
|
147
|
+
region: string;
|
|
148
|
+
placeholder: string;
|
|
149
|
+
};
|
|
150
|
+
cr_tin: {
|
|
151
|
+
region: string;
|
|
152
|
+
placeholder: string;
|
|
153
|
+
};
|
|
154
|
+
cv_nif: {
|
|
155
|
+
region: string;
|
|
156
|
+
placeholder: string;
|
|
157
|
+
};
|
|
158
|
+
de_stn: {
|
|
159
|
+
region: string;
|
|
160
|
+
placeholder: string;
|
|
161
|
+
};
|
|
162
|
+
do_rcn: {
|
|
163
|
+
region: string;
|
|
164
|
+
placeholder: string;
|
|
165
|
+
};
|
|
166
|
+
ec_ruc: {
|
|
167
|
+
region: string;
|
|
168
|
+
placeholder: string;
|
|
169
|
+
};
|
|
170
|
+
eg_tin: {
|
|
171
|
+
region: string;
|
|
172
|
+
placeholder: string;
|
|
173
|
+
};
|
|
174
|
+
es_cif: {
|
|
175
|
+
region: string;
|
|
176
|
+
placeholder: string;
|
|
177
|
+
};
|
|
178
|
+
et_tin: {
|
|
179
|
+
region: string;
|
|
180
|
+
placeholder: string;
|
|
181
|
+
};
|
|
182
|
+
eu_oss_vat: {
|
|
183
|
+
region: string;
|
|
184
|
+
placeholder: string;
|
|
185
|
+
};
|
|
186
|
+
eu_vat: {
|
|
187
|
+
region: string;
|
|
188
|
+
placeholder: string;
|
|
189
|
+
};
|
|
190
|
+
gb_vat: {
|
|
191
|
+
region: string;
|
|
192
|
+
placeholder: string;
|
|
193
|
+
};
|
|
194
|
+
ge_vat: {
|
|
195
|
+
region: string;
|
|
196
|
+
placeholder: string;
|
|
197
|
+
};
|
|
198
|
+
gh_tin: {
|
|
199
|
+
region: string;
|
|
200
|
+
placeholder: string;
|
|
201
|
+
};
|
|
202
|
+
gn_nif: {
|
|
203
|
+
region: string;
|
|
204
|
+
placeholder: string;
|
|
205
|
+
};
|
|
206
|
+
hk_br: {
|
|
207
|
+
region: string;
|
|
208
|
+
placeholder: string;
|
|
209
|
+
};
|
|
210
|
+
hr_oib: {
|
|
211
|
+
region: string;
|
|
212
|
+
placeholder: string;
|
|
213
|
+
};
|
|
214
|
+
hu_tin: {
|
|
215
|
+
region: string;
|
|
216
|
+
placeholder: string;
|
|
217
|
+
};
|
|
218
|
+
id_npwp: {
|
|
219
|
+
region: string;
|
|
220
|
+
placeholder: string;
|
|
221
|
+
};
|
|
222
|
+
il_vat: {
|
|
223
|
+
region: string;
|
|
224
|
+
placeholder: string;
|
|
225
|
+
};
|
|
226
|
+
in_gst: {
|
|
227
|
+
region: string;
|
|
228
|
+
placeholder: string;
|
|
229
|
+
};
|
|
230
|
+
is_vat: {
|
|
231
|
+
region: string;
|
|
232
|
+
placeholder: string;
|
|
233
|
+
};
|
|
234
|
+
jp_cn: {
|
|
235
|
+
region: string;
|
|
236
|
+
placeholder: string;
|
|
237
|
+
};
|
|
238
|
+
jp_rn: {
|
|
239
|
+
region: string;
|
|
240
|
+
placeholder: string;
|
|
241
|
+
};
|
|
242
|
+
jp_trn: {
|
|
243
|
+
region: string;
|
|
244
|
+
placeholder: string;
|
|
245
|
+
};
|
|
246
|
+
ke_pin: {
|
|
247
|
+
region: string;
|
|
248
|
+
placeholder: string;
|
|
249
|
+
};
|
|
250
|
+
kg_tin: {
|
|
251
|
+
region: string;
|
|
252
|
+
placeholder: string;
|
|
253
|
+
};
|
|
254
|
+
kh_tin: {
|
|
255
|
+
region: string;
|
|
256
|
+
placeholder: string;
|
|
257
|
+
};
|
|
258
|
+
kr_brn: {
|
|
259
|
+
region: string;
|
|
260
|
+
placeholder: string;
|
|
261
|
+
};
|
|
262
|
+
kz_bin: {
|
|
263
|
+
region: string;
|
|
264
|
+
placeholder: string;
|
|
265
|
+
};
|
|
266
|
+
la_tin: {
|
|
267
|
+
region: string;
|
|
268
|
+
placeholder: string;
|
|
269
|
+
};
|
|
270
|
+
li_uid: {
|
|
271
|
+
region: string;
|
|
272
|
+
placeholder: string;
|
|
273
|
+
};
|
|
274
|
+
li_vat: {
|
|
275
|
+
region: string;
|
|
276
|
+
placeholder: string;
|
|
277
|
+
};
|
|
278
|
+
ma_vat: {
|
|
279
|
+
region: string;
|
|
280
|
+
placeholder: string;
|
|
281
|
+
};
|
|
282
|
+
md_vat: {
|
|
283
|
+
region: string;
|
|
284
|
+
placeholder: string;
|
|
285
|
+
};
|
|
286
|
+
me_pib: {
|
|
287
|
+
region: string;
|
|
288
|
+
placeholder: string;
|
|
289
|
+
};
|
|
290
|
+
mk_vat: {
|
|
291
|
+
region: string;
|
|
292
|
+
placeholder: string;
|
|
293
|
+
};
|
|
294
|
+
mr_nif: {
|
|
295
|
+
region: string;
|
|
296
|
+
placeholder: string;
|
|
297
|
+
};
|
|
298
|
+
mx_rfc: {
|
|
299
|
+
region: string;
|
|
300
|
+
placeholder: string;
|
|
301
|
+
};
|
|
302
|
+
my_frp: {
|
|
303
|
+
region: string;
|
|
304
|
+
placeholder: string;
|
|
305
|
+
};
|
|
306
|
+
my_itn: {
|
|
307
|
+
region: string;
|
|
308
|
+
placeholder: string;
|
|
309
|
+
};
|
|
310
|
+
my_sst: {
|
|
311
|
+
region: string;
|
|
312
|
+
placeholder: string;
|
|
313
|
+
};
|
|
314
|
+
ng_tin: {
|
|
315
|
+
region: string;
|
|
316
|
+
placeholder: string;
|
|
317
|
+
};
|
|
318
|
+
no_vat: {
|
|
319
|
+
region: string;
|
|
320
|
+
placeholder: string;
|
|
321
|
+
};
|
|
322
|
+
no_voec: {
|
|
323
|
+
region: string;
|
|
324
|
+
placeholder: string;
|
|
325
|
+
};
|
|
326
|
+
np_pan: {
|
|
327
|
+
region: string;
|
|
328
|
+
placeholder: string;
|
|
329
|
+
};
|
|
330
|
+
nz_gst: {
|
|
331
|
+
region: string;
|
|
332
|
+
placeholder: string;
|
|
333
|
+
};
|
|
334
|
+
om_vat: {
|
|
335
|
+
region: string;
|
|
336
|
+
placeholder: string;
|
|
337
|
+
};
|
|
338
|
+
pe_ruc: {
|
|
339
|
+
region: string;
|
|
340
|
+
placeholder: string;
|
|
341
|
+
};
|
|
342
|
+
ph_tin: {
|
|
343
|
+
region: string;
|
|
344
|
+
placeholder: string;
|
|
345
|
+
};
|
|
346
|
+
pl_nip: {
|
|
347
|
+
region: string;
|
|
348
|
+
placeholder: string;
|
|
349
|
+
};
|
|
350
|
+
ro_tin: {
|
|
351
|
+
region: string;
|
|
352
|
+
placeholder: string;
|
|
353
|
+
};
|
|
354
|
+
rs_pib: {
|
|
355
|
+
region: string;
|
|
356
|
+
placeholder: string;
|
|
357
|
+
};
|
|
358
|
+
ru_inn: {
|
|
359
|
+
region: string;
|
|
360
|
+
placeholder: string;
|
|
361
|
+
};
|
|
362
|
+
ru_kpp: {
|
|
363
|
+
region: string;
|
|
364
|
+
placeholder: string;
|
|
365
|
+
};
|
|
366
|
+
sa_vat: {
|
|
367
|
+
region: string;
|
|
368
|
+
placeholder: string;
|
|
369
|
+
};
|
|
370
|
+
sg_gst: {
|
|
371
|
+
region: string;
|
|
372
|
+
placeholder: string;
|
|
373
|
+
};
|
|
374
|
+
sg_uen: {
|
|
375
|
+
region: string;
|
|
376
|
+
placeholder: string;
|
|
377
|
+
};
|
|
378
|
+
si_tin: {
|
|
379
|
+
region: string;
|
|
380
|
+
placeholder: string;
|
|
381
|
+
};
|
|
382
|
+
sn_ninea: {
|
|
383
|
+
region: string;
|
|
384
|
+
placeholder: string;
|
|
385
|
+
};
|
|
386
|
+
sr_fin: {
|
|
387
|
+
region: string;
|
|
388
|
+
placeholder: string;
|
|
389
|
+
};
|
|
390
|
+
sv_nit: {
|
|
391
|
+
region: string;
|
|
392
|
+
placeholder: string;
|
|
393
|
+
};
|
|
394
|
+
th_vat: {
|
|
395
|
+
region: string;
|
|
396
|
+
placeholder: string;
|
|
397
|
+
};
|
|
398
|
+
tj_tin: {
|
|
399
|
+
region: string;
|
|
400
|
+
placeholder: string;
|
|
401
|
+
};
|
|
402
|
+
tr_tin: {
|
|
403
|
+
region: string;
|
|
404
|
+
placeholder: string;
|
|
405
|
+
};
|
|
406
|
+
tw_vat: {
|
|
407
|
+
region: string;
|
|
408
|
+
placeholder: string;
|
|
409
|
+
};
|
|
410
|
+
tz_vat: {
|
|
411
|
+
region: string;
|
|
412
|
+
placeholder: string;
|
|
413
|
+
};
|
|
414
|
+
ua_vat: {
|
|
415
|
+
region: string;
|
|
416
|
+
placeholder: string;
|
|
417
|
+
};
|
|
418
|
+
ug_tin: {
|
|
419
|
+
region: string;
|
|
420
|
+
placeholder: string;
|
|
421
|
+
};
|
|
422
|
+
us_ein: {
|
|
423
|
+
region: string;
|
|
424
|
+
placeholder: string;
|
|
425
|
+
};
|
|
426
|
+
uy_ruc: {
|
|
427
|
+
region: string;
|
|
428
|
+
placeholder: string;
|
|
429
|
+
};
|
|
430
|
+
uz_tin: {
|
|
431
|
+
region: string;
|
|
432
|
+
placeholder: string;
|
|
433
|
+
};
|
|
434
|
+
uz_vat: {
|
|
435
|
+
region: string;
|
|
436
|
+
placeholder: string;
|
|
437
|
+
};
|
|
438
|
+
ve_rif: {
|
|
439
|
+
region: string;
|
|
440
|
+
placeholder: string;
|
|
441
|
+
};
|
|
442
|
+
vn_tin: {
|
|
443
|
+
region: string;
|
|
444
|
+
placeholder: string;
|
|
445
|
+
};
|
|
446
|
+
xi_vat: {
|
|
447
|
+
region: string;
|
|
448
|
+
placeholder: string;
|
|
449
|
+
};
|
|
450
|
+
za_vat: {
|
|
451
|
+
region: string;
|
|
452
|
+
placeholder: string;
|
|
453
|
+
};
|
|
454
|
+
zm_tin: {
|
|
455
|
+
region: string;
|
|
456
|
+
placeholder: string;
|
|
457
|
+
};
|
|
458
|
+
zw_tin: {
|
|
459
|
+
region: string;
|
|
460
|
+
placeholder: string;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
export declare const TAX_ID_TYPES: readonly TaxIdType[];
|
|
464
|
+
export declare function isTaxIdType(value: string): value is TaxIdType;
|
|
465
|
+
/**
|
|
466
|
+
* The registration type a buyer country preselects: EU countries stay on `eu_vat` (a member
|
|
467
|
+
* state's domestic registration like `de_stn` is the rarer intent, and `eu_vat` was the only
|
|
468
|
+
* type the surface ever sent, so it is the floor); a country with exactly ONE catalog type
|
|
469
|
+
* preselects it (`AR` → `ar_cuit`, `US` → `us_ein`); everything else — unknown country, or one
|
|
470
|
+
* with several registrations to pick from — falls back to `eu_vat`, today's bare default.
|
|
471
|
+
*/
|
|
472
|
+
export declare function defaultTaxIdType(country: string | undefined): TaxIdType;
|
|
473
|
+
/**
|
|
474
|
+
* The buyer-facing name of each registration, the way the world abbreviates them (`EU VAT`,
|
|
475
|
+
* `AR CUIT`, `US EIN`) — the same labels the dashboard's tax settings use. Localized copy, so a
|
|
476
|
+
* hook: the labels ride the element's message catalog like every other user-facing string. The
|
|
477
|
+
* `Record<TaxIdType, …>` return type is the second half of the exhaustiveness gate — a new wire
|
|
478
|
+
* type without a label refuses to compile.
|
|
479
|
+
*/
|
|
480
|
+
export declare function useTaxIdTypeLabels(): Record<TaxIdType, string>;
|
|
481
|
+
//# sourceMappingURL=tax-id-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-id-catalog.d.ts","sourceRoot":"","sources":["../../../../../src/core/payments/tax-id-catalog.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAYtD,sCAAsC;AACtC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHY,CAAC;AAE1C,eAAO,MAAM,YAAY,EAAoC,SAAS,SAAS,EAAE,CAAC;AAElF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAE7D;AAgCD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAMvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAwH9D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** The contact fields an OS wallet sheet collected, in the wire keys the mint sends. */
|
|
2
|
+
export interface WalletContact {
|
|
3
|
+
email?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
address?: {
|
|
6
|
+
line1?: string;
|
|
7
|
+
line2?: string;
|
|
8
|
+
city?: string;
|
|
9
|
+
state?: string;
|
|
10
|
+
postal_code?: string;
|
|
11
|
+
country?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The native envelope, read tolerantly.
|
|
16
|
+
*
|
|
17
|
+
* Both platform modules answer with `{ paymentData, email?, name?, address? }`. Anything else is
|
|
18
|
+
* treated as the bare token, so an app whose native side has not been rebuilt still tokenizes — it
|
|
19
|
+
* just gets no contacts, which is exactly the behaviour it had before.
|
|
20
|
+
*/
|
|
21
|
+
export declare function readSheetResult(raw: string): {
|
|
22
|
+
paymentData: string;
|
|
23
|
+
} & WalletContact;
|
|
24
|
+
/**
|
|
25
|
+
* Folds the sheet's own contacts under whatever the caller and the mounted elements already supply.
|
|
26
|
+
*
|
|
27
|
+
* Explicit input always wins. The sheet is only ever asked for an email or an address when no
|
|
28
|
+
* element is mounted to collect them, so in practice it fills exactly the gaps — which is the whole
|
|
29
|
+
* point: without this the mint refused a buyer who had just typed their email into Apple Pay.
|
|
30
|
+
*/
|
|
31
|
+
export declare function mergeWalletContact(explicit: Partial<{
|
|
32
|
+
email: string;
|
|
33
|
+
name: string;
|
|
34
|
+
}> | undefined, contact: WalletContact): Partial<{
|
|
35
|
+
email: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}> & {
|
|
38
|
+
address?: WalletContact['address'];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=wallet-contact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-contact.d.ts","sourceRoot":"","sources":["../../../../../src/core/payments/wallet-contact.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,WAAW,aAAa;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAcpF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,EAC9D,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;CAAE,CAQnF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import { type EmittedAddress } from '../core/address/engine.js';
|
|
4
|
+
import { type CustomFieldSpec } from '../core/address/form-state.js';
|
|
5
|
+
export interface AddressChangePayload {
|
|
6
|
+
complete: boolean;
|
|
7
|
+
address: EmittedAddress;
|
|
8
|
+
custom: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
export interface AddressElementProps {
|
|
11
|
+
/** Autocomplete purpose: `billing` (default) or `shipping`. */
|
|
12
|
+
mode?: 'billing' | 'shipping';
|
|
13
|
+
/** `full` stacks labeled fields. `compact` groups placeholder-labeled fields. */
|
|
14
|
+
layout?: 'compact' | 'full';
|
|
15
|
+
/** `full` follows the country's complete format. `minimal` collects country and postal code. */
|
|
16
|
+
scope?: 'minimal' | 'full';
|
|
17
|
+
defaultValues?: {
|
|
18
|
+
name?: string;
|
|
19
|
+
address?: Partial<EmittedAddress>;
|
|
20
|
+
};
|
|
21
|
+
/** Default the country from the buyer's IP. Falls back to `countryHint`, then US. */
|
|
22
|
+
detectCountry?: boolean;
|
|
23
|
+
allowedCountries?: string[];
|
|
24
|
+
name?: 'combined' | 'split' | 'none';
|
|
25
|
+
organization?: 'none' | 'name' | 'name_with_type';
|
|
26
|
+
line2?: 'toggle' | 'always' | 'never';
|
|
27
|
+
/**
|
|
28
|
+
* Street suggestions from the platform geocoder — MapKit on iOS, `android.location.Geocoder` on
|
|
29
|
+
* Android. No API key and no account: where the web element asks Google Places, this asks the OS.
|
|
30
|
+
* Falls back silently to manual entry on a device whose geocoder answers nothing.
|
|
31
|
+
*
|
|
32
|
+
* @default true — the same default the web element takes.
|
|
33
|
+
*/
|
|
34
|
+
autocomplete?: boolean;
|
|
35
|
+
customFields?: CustomFieldSpec[];
|
|
36
|
+
/** Fallback country after `defaultValues` and IP detection. ISO 3166-1 alpha-2. */
|
|
37
|
+
countryHint?: string;
|
|
38
|
+
style?: StyleProp<ViewStyle>;
|
|
39
|
+
fallback?: ReactNode;
|
|
40
|
+
onChange?: (payload: AddressChangePayload) => void;
|
|
41
|
+
onReady?: () => void;
|
|
42
|
+
onError?: (error: {
|
|
43
|
+
message: string;
|
|
44
|
+
code?: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Collects a postal address using the per-country format engine ported from the web element, so
|
|
49
|
+
* field order, labels, required-ness, postal validation, and the state lists are identical across
|
|
50
|
+
* the two surfaces for all 241 countries in the catalog.
|
|
51
|
+
*/
|
|
52
|
+
export declare function AddressElement({ mode, layout, scope, defaultValues, detectCountry, allowedCountries, name, organization, line2, autocomplete, customFields, countryHint, style, fallback, onChange, onReady, onError, }: AddressElementProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
/** Intersection when both exist; a disjoint pair keeps the consumer's list rather than widening. */
|
|
54
|
+
export declare function effectiveAllowedCountries(methodCountries: string[] | undefined, allowedCountries: string[] | undefined): string[] | undefined;
|
|
55
|
+
//# sourceMappingURL=address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../../src/elements/address.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAiE,MAAM,OAAO,CAAC;AACtG,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAEN,KAAK,cAAc,EAMnB,MAAM,2BAAwB,CAAC;AAChC,OAAO,EAON,KAAK,eAAe,EAOpB,MAAM,+BAA4B,CAAC;AAepC,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IACnC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B,iFAAiF;IACjF,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,gGAAgG;IAChG,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;KAAE,CAAC;IACrE,qFAAqF;IACrF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC;IAClD,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IACjC,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC9D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC9B,IAAgB,EAChB,MAAe,EACf,KAAc,EACd,aAAa,EACb,aAAoB,EACpB,gBAAgB,EAChB,IAAiB,EACjB,YAAqB,EACrB,KAAgB,EAChB,YAAmB,EACnB,YAAY,EACZ,WAAgB,EAChB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO,GACP,EAAE,mBAAmB,2CAqGrB;AAED,oGAAoG;AACpG,wBAAgB,yBAAyB,CACxC,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,EACrC,gBAAgB,EAAE,MAAM,EAAE,GAAG,SAAS,GACpC,MAAM,EAAE,GAAG,SAAS,CAMtB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export interface BrandingElementProps {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
fallback?: ReactNode;
|
|
6
|
+
onReady?: () => void;
|
|
7
|
+
onError?: (error: {
|
|
8
|
+
message: string;
|
|
9
|
+
code?: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Whop is the merchant of record on these sales, so the buyer is told so on the screen where they
|
|
14
|
+
* pay. Mounting this is what unlocks `createConfirmationToken` — a payment surface without the
|
|
15
|
+
* notice refuses rather than charging quietly.
|
|
16
|
+
*/
|
|
17
|
+
export declare function BrandingElement({ style, fallback, onReady, onError }: BrandingElementProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=branding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../../../src/elements/branding.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAClD,OAAO,EAAa,KAAK,SAAS,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAejG,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC9D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,oBAAoB,2CA6C1F"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type MutableRefObject, type ReactNode } from 'react';
|
|
2
|
+
import type { CardNetworkArt } from '../../api/types.js';
|
|
3
|
+
import { type BasisTheoryElements, type CardFieldFailure, type CardFieldFailures } from '../../core/payments/bt.js';
|
|
4
|
+
export interface CardFieldsChangePayload {
|
|
5
|
+
complete: boolean;
|
|
6
|
+
brand: string;
|
|
7
|
+
funding: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface CardFieldsState {
|
|
10
|
+
publicKey: string | undefined;
|
|
11
|
+
networks: CardNetworkArt[] | undefined;
|
|
12
|
+
layout: 'stacked' | 'compact';
|
|
13
|
+
bt: BasisTheoryElements | undefined;
|
|
14
|
+
loadError: string | null;
|
|
15
|
+
brand: string;
|
|
16
|
+
funding: string | null;
|
|
17
|
+
complete: {
|
|
18
|
+
number: boolean;
|
|
19
|
+
expiry: boolean;
|
|
20
|
+
cvc: boolean;
|
|
21
|
+
};
|
|
22
|
+
errors: CardFieldFailures;
|
|
23
|
+
refs: MutableRefObject<{
|
|
24
|
+
number: unknown;
|
|
25
|
+
expiryDate: unknown;
|
|
26
|
+
cvc: unknown;
|
|
27
|
+
}>;
|
|
28
|
+
report: (field: 'number' | 'expiry' | 'cvc', event: FieldEvent) => void;
|
|
29
|
+
tokenize: () => Promise<string>;
|
|
30
|
+
}
|
|
31
|
+
export interface FieldEvent {
|
|
32
|
+
complete: boolean;
|
|
33
|
+
brand?: string;
|
|
34
|
+
funding?: string | null;
|
|
35
|
+
empty?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare function CardComposed({ children }: {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function useCardComposed(): boolean;
|
|
41
|
+
export declare function useCardFields(): CardFieldsState;
|
|
42
|
+
export interface CardFieldsProviderProps {
|
|
43
|
+
/** Advanced Basis Theory publishable key. Omit it to fetch the key automatically. */
|
|
44
|
+
publicKey?: string;
|
|
45
|
+
/** The seller's accepted card networks in display order. Omit to fetch alongside the key. */
|
|
46
|
+
networks?: CardNetworkArt[];
|
|
47
|
+
/** `stacked` puts the number above expiry and cvc. `compact` puts all three in one row. */
|
|
48
|
+
layout?: 'stacked' | 'compact';
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
onChange?: (payload: CardFieldsChangePayload) => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The card unit: one Basis Theory client, three field refs, and the tokenization that assembles
|
|
54
|
+
* them.
|
|
55
|
+
*
|
|
56
|
+
* The refs are opaque handles — an id and a formatter. The number the buyer typed lives inside the
|
|
57
|
+
* Basis Theory component and reaches the vault without passing through this object, which is the
|
|
58
|
+
* whole PCI story.
|
|
59
|
+
*/
|
|
60
|
+
export declare function CardFieldsProvider({ publicKey, networks, layout, children, onChange, }: CardFieldsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
/**
|
|
62
|
+
* Registers the unit as the handle's collection surface. `card` and `cardFields` register under
|
|
63
|
+
* different kinds so the confirm cascade resolves the same order the web controller does.
|
|
64
|
+
*/
|
|
65
|
+
export declare function useCardCollection(kind: 'card' | 'cardFields'): void;
|
|
66
|
+
export type { CardFieldFailure };
|
|
67
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/elements/card-fields/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAOd,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAiB,CAAC;AACtD,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAEtB,MAAM,2BAAwB,CAAC;AAOhC,MAAM,WAAW,uBAAuB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;IACvC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,EAAE,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,CAAC;IAC7D,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,gBAAgB,CAAC;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,OAAO,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/E,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,KAAK,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACxE,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CAChB;AAQD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAEjE;AAED,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,wBAAgB,aAAa,IAAI,eAAe,CAO/C;AAED,MAAM,WAAW,uBAAuB;IACvC,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACtD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAClC,SAAS,EACT,QAAQ,EACR,MAAkB,EAClB,QAAQ,EACR,QAAQ,GACR,EAAE,uBAAuB,2CAoEzB;AAsGD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CA+BnE;AAED,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
export interface CardFieldProps {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
fallback?: ReactNode;
|
|
6
|
+
onReady?: () => void;
|
|
7
|
+
onError?: (error: {
|
|
8
|
+
message: string;
|
|
9
|
+
code?: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function CardNumberElement({ style, fallback, onReady, onError }: CardFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function CardExpiryElement({ style, fallback, onReady, onError }: CardFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function CardCvcElement({ style, fallback, onReady, onError }: CardFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=fields.d.ts.map
|